@use 'sass:map'; @use 'sass:string'; @use 'iro-sass/src/props'; @use '../core.vars' as core; $line-height: props.def(--o-action-button--line-height, 1.4) !default; $pad-i: props.def(--o-action-button--pad-i, props.get(core.$size--150)) !default; $pad-i-pill: props.def(--o-action-button--pad-i-pill, props.get(core.$size--200)) !default; $pad-b: props.def(--o-action-button--pad-b, props.get(core.$size--85)) !default; $border-width: props.def(--o-action-button--border-width, props.get(core.$border-width--thin)) !default; $rounding: props.def(--o-action-button--rounding, props.get(core.$rounding)) !default; $font-size: props.def(--o-action-button--font-size, props.get(core.$font-size--100)) !default; $pad-i--sm: props.def(--o-action-button--sm--pad-i, props.get(core.$size--100)) !default; $pad-i-pill--sm: props.def(--o-action-button--sm--pad-i-pill, props.get(core.$size--150)) !default; $pad-b--sm: props.def(--o-action-button--sm--pad-b, props.get(core.$size--40)) !default; $font-size--sm: props.def(--o-action-button--sm--font-size, props.get(core.$font-size--75)) !default; $pad-i--lg: props.def(--o-action-button--lg--pad-i, props.get(core.$size--175)) !default; $pad-i-pill--lg: props.def(--o-action-button--lg--pad-i-pill, props.get(core.$size--225)) !default; $pad-b--lg: props.def(--o-action-button--lg--pad-b, props.get(core.$size--115)) !default; $font-size--lg: props.def(--o-action-button--lg--font-size, props.get(core.$font-size--150)) !default; $pad-i--xl: props.def(--o-action-button--xl--pad-i, props.get(core.$size--225)) !default; $pad-i-pill--xl: props.def(--o-action-button--xl--pad-i-pill, props.get(core.$size--300)) !default; $pad-b--xl: props.def(--o-action-button--xl--pad-b, props.get(core.$size--150)) !default; $font-size--xl: props.def(--o-action-button--xl--font-size, props.get(core.$font-size--200)) !default; $key-focus--border-width: props.def(--o-action-button--key-focus--border-width, props.get(core.$key-focus--border-width)) !default; $key-focus--border-offset: props.def(--o-action-button--key-focus--border-offset, props.get(core.$key-focus--border-offset)) !default; $key-focus--outline-width: props.def(--o-action-button--key-focus--outline-width, props.get(core.$key-focus--outline-width)) !default; $fixed-sizes: ( 'sm' $pad-i--sm $pad-i-pill--sm $pad-b--sm $font-size--sm, 'lg' $pad-i--lg $pad-i-pill--lg $pad-b--lg $font-size--lg, 'xl' $pad-i--xl $pad-i-pill--xl $pad-b--xl $font-size--xl, ) !default; $themes: props.def(--o-action-button); $default-theme-override: () !default; $default-theme: map.deep-merge(( --bg-color: props.get(core.$theme, --base, --75), --label-color: props.get(core.$theme, --text), --border-color: props.get(core.$theme, --border-strong), --hover: ( --bg-color: props.get(core.$theme, --border-mute), --label-color: props.get(core.$theme, --heading), --border-color: props.get(core.$theme, --text-mute-more), ), --active: ( --bg-color: props.get(core.$theme, --border), --label-color: props.get(core.$theme, --heading), --border-color: props.get(core.$theme, --text-mute), ), --disabled: ( --bg-color: props.get(core.$theme, --bg-l1), --label-color: props.get(core.$theme, --border-strong), --border-color: props.get(core.$theme, --border), ), --key-focus: ( --border-color: props.get(core.$theme, --focus, --border), --outline-color: props.get(core.$theme, --focus, --outline), ), --selected: ( --bg-color: props.get(core.$theme, --text-mute), --label-color: props.get(core.$theme, --base, --50), --border-color: props.get(core.$theme, --text-mute), --hover: ( --bg-color: props.get(core.$theme, --text), --label-color: props.get(core.$theme, --base, --50), --border-color: props.get(core.$theme, --text), ), --active: ( --bg-color: props.get(core.$theme, --heading), --label-color: props.get(core.$theme, --base, --50), --border-color: props.get(core.$theme, --heading), ), --disabled: ( --bg-color: props.get(core.$theme, --border-mute), --label-color: props.get(core.$theme, --border-strong), --border-color: props.get(core.$theme, --border-mute), ), ), --quiet: ( --label-color: props.get(core.$theme, --text), --hover: ( --bg-color: props.get(core.$theme, --border-mute), --label-color: props.get(core.$theme, --heading), ), --active: ( --bg-color: props.get(core.$theme, --border), --label-color: props.get(core.$theme, --heading), ), --disabled: ( --label-color: props.get(core.$theme, --border-strong), ), ), ), $default-theme-override) !default; $default-theme: props.def(--o-action-button, $default-theme); @each $theme in map.keys(props.get(core.$transparent-colors)) { $button-theme: --static-#{string.slice($theme, 3)}; $themes: props.merge($themes, ( $button-theme: ( --bg-color: props.get(core.$transparent-colors, $theme, --100), --label-color: props.get(core.$transparent-colors, $theme, --900), --border-color: props.get(core.$transparent-colors, $theme, --400), --hover: ( --bg-color: props.get(core.$transparent-colors, $theme, --300), --label-color: props.get(core.$transparent-colors, $theme, --900), --border-color: props.get(core.$transparent-colors, $theme, --500), ), --active: ( --bg-color: props.get(core.$transparent-colors, $theme, --400), --label-color: props.get(core.$transparent-colors, $theme, --900), --border-color: props.get(core.$transparent-colors, $theme, --600), ), --disabled: ( --bg-color: props.get(core.$transparent-colors, $theme, --100), --label-color: props.get(core.$transparent-colors, $theme, --500), --border-color: props.get(core.$transparent-colors, $theme, --300), ), --key-focus: ( --border-color: props.get(core.$transparent-colors, $theme, --900), --outline-color: props.get(core.$transparent-colors, $theme, --300), ), --selected: ( --bg-color: props.get(core.$transparent-colors, $theme, --800), --label-color: props.get(core.$transparent-colors, $theme, --text), --border-color: props.get(core.$transparent-colors, $theme, --100), --hover: ( --bg-color: props.get(core.$transparent-colors, $theme, --900), --label-color: props.get(core.$transparent-colors, $theme, --text), --border-color: props.get(core.$transparent-colors, $theme, --100), ), --active: ( --bg-color: props.get(core.$transparent-colors, $theme, --900), --label-color: props.get(core.$transparent-colors, $theme, --text), --border-color: props.get(core.$transparent-colors, $theme, --100), ), --disabled: ( --bg-color: props.get(core.$transparent-colors, $theme, --200), --label-color: props.get(core.$transparent-colors, $theme, --500), --border-color: props.get(core.$transparent-colors, $theme, --100), ), ), --quiet: ( --label-color: props.get(core.$transparent-colors, $theme, --900), --hover: ( --bg-color: props.get(core.$transparent-colors, $theme, --300), --label-color: props.get(core.$transparent-colors, $theme, --900), ), --active: ( --bg-color: props.get(core.$transparent-colors, $theme, --400), --label-color: props.get(core.$transparent-colors, $theme, --900), ), --disabled: ( --label-color: props.get(core.$transparent-colors, $theme, --500), ), ), ) )); }