<commit_before>////
/// @group themes
/// @access public
/// @author <a href="https://github.com/desig9stein" target="_blank"><NAME></a>
////

/// @param {Map} $theme - theme used to style the component.
/// @param {color} $label-color - The Color for date range separator label.
/// @requires --var
/// @requires rem
@function igx-date-range-picker-theme(
    $palette: $default-palette,
    $schema: $light-schema,
    $label-color: null
) {
    $name: 'igx-date-range';
    $date-range-schema: ();

    @if map-has-key($schema, $name) {
        $date-range-schema: map-get($schema, $name);
    } @else {
        $date-range-schema: $schema;
    }

    $theme: apply-palette($date-range-schema, $palette);

    @return extend($theme, (
        name: $name,
        palette: $palette,
        label-color: $label-color,
    ));
}

@mixin igx-date-range-picker($theme) {
    @include igx-root-css-vars($theme);
    $left: if-ltr(left, right);
    $right: if-ltr(right, left);

    $base-scale-size: (
        'comfortable': rem(16px),
        'cosy': rem(19px),
        'compact': rem(22px)
    );

    %igx-date-range-picker {
        display: flex;

        > igx-icon {
            cursor: pointer;
        }

        igx-input-group {
            flex: 1;
        }
    }

    igx-date-range-start,
    igx-date-range-end,
    %igx-date-range-picker__start,
    %igx-date-range-picker__end {
        flex: 1 0 0%;
    }

    %igx-date-range-picker__label {
        display: flex;
        align-items: center;
        color: --var($theme, 'label-color');
        margin: 0 rem(8px);
        padding-top: rem(18px, map-get($base-scale-size, 'comfortable'));
    }

    %igx-date-range-picker--cosy {
        %igx-date-range-picker__label {
            padding-top: rem(18px, map-get($base-scale-size, 'cosy'));
        }
    }

    %igx-date-range-picker--compact {
        %igx-date-range-picker__label {
            padding-top: rem(18px, map-get($base-scale-size, 'compact'));
        }
    }

    %igx-date-range-buttons {
        display: flex;
        justify-content: flex-end;
        padding: 0 rem(16px) rem(16px) rem(16px);

        > * {
            margin-#{$right}: rem(8px);

            &:last-of-type {
                margin-#{$right}: 0;
            }
        }

        &:empty {
            display: none;
        }
    }
}

/// Adds typography styles for the igx-date-range-picker component.
/// Uses the 'subtitle-1'
/// categories from the typographic scale.
/// @group typography
/// @param {Map} $type-scale - A typographic scale as produced by igx-type-scale.
/// @param {Map} $categories [(label: 'subtitle-1')] - The categories from the typographic scale used for type styles.
/// @requires {mixin} igx-type-style
@mixin igx-date-range-typography(<commit_msg>fix(date-range-picker): dialog buttons<commit_after>////
/// @group themes
/// @access public
/// @author <a href="https://github.com/desig9stein" target="_blank"><NAME></a>
////

/// @param {Map} $theme - theme used to style the component.
/// @param {color} $label-color - The Color for date range separator label.
/// @requires --var
/// @requires rem
@function igx-date-range-picker-theme(
    $palette: $default-palette,
    $schema: $light-schema,
    $label-color: null
) {
    $name: 'igx-date-range';
    $date-range-schema: ();

    @if map-has-key($schema, $name) {
        $date-range-schema: map-get($schema, $name);
    } @else {
        $date-range-schema: $schema;
    }

    $theme: apply-palette($date-range-schema, $palette);

    @return extend($theme, (
        name: $name,
        palette: $palette,
        label-color: $label-color,
    ));
}

@mixin igx-date-range-picker($theme) {
    @include igx-root-css-vars($theme);
    $left: if-ltr(left, right);
    $right: if-ltr(right, left);

    $base-scale-size: (
        'comfortable': rem(16px),
        'cosy': rem(19px),
        'compact': rem(22px)
    );

    %igx-date-range-picker {
        display: flex;

        > igx-icon {
            cursor: pointer;
        }

        igx-input-group {
            flex: 1;
        }
    }

    igx-date-range-start,
    igx-date-range-end,
    %igx-date-range-picker__start,
    %igx-date-range-picker__end {
        flex: 1 0 0%;
    }

    %igx-date-range-picker__label {
        display: flex;
        align-items: center;
        color: --var($theme, 'label-color');
        margin: 0 rem(8px);
        padding-top: rem(18px, map-get($base-scale-size, 'comfortable'));
    }

    %igx-date-range-picker--cosy {
        %igx-date-range-picker__label {
            padding-top: rem(18px, map-get($base-scale-size, 'cosy'));
        }
    }

    %igx-date-range-picker--compact {
        %igx-date-range-picker__label {
            padding-top: rem(18px, map-get($base-scale-size, 'compact'));
        }
    }

    %igx-date-range-picker-buttons {
        display: flex;
        justify-content: flex-end;
        padding: 0 rem(16px) rem(16px) rem(16px);

        > * {
            margin-#{$right}: rem(8px);

            &:last-of-type {
                margin-#{$right}: 0;
            }
        }

        &:empty {
            display: none;
        }
    }
}

/// Adds typography styles for the igx-date-range-picker component.
/// Uses the 'subtitle-1'
/// categories from the typographic scale.
/// @group typography
/// @param {Map} $type-scale - A typographic scale as produced by igx-type-scale.
/// @param {Map} $categories [(label: 'subtitle-1')] - The categories from the typographic scale used for type styles.
/// @requires {mixin} igx-type-style
@mixin igx-date-range-typography(
{'fraction_non_alphanumeric': 0.17106200997861726, 'fraction_numerical': 0.010691375623663579, 'mean_word_length': 2.0406283856988083, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3442419', 'n_tokens_mistral': 1986, 'n_tokens_neox': 1902, 'n_words': 379}