From e3d34a6d6ce2db04c3c898ad6a4687a0c59df996 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 18 Oct 2024 19:07:42 +0200 Subject: Update --- src/objects/_action-button.vars.scss | 188 ++++++++++++++++++----------------- 1 file changed, 95 insertions(+), 93 deletions(-) (limited to 'src/objects/_action-button.vars.scss') diff --git a/src/objects/_action-button.vars.scss b/src/objects/_action-button.vars.scss index 16d9e7f..d1b3a4a 100644 --- a/src/objects/_action-button.vars.scss +++ b/src/objects/_action-button.vars.scss @@ -1,33 +1,33 @@ @use 'sass:map'; @use '../props'; -@use '../vars'; +@use '../core'; $line-height: props.def(--o-action-button--line-height, 1.4) !default; -$pad-i: props.def(--o-action-button--pad-i, props.get(vars.$size--150)) !default; -$pad-i-pill: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--200)) !default; -$pad-b: props.def(--o-action-button--pad-b, props.get(vars.$size--85)) !default; -$border-width: props.def(--o-action-button--border-width, props.get(vars.$border-width--thin)) !default; -$rounding: props.def(--o-action-button--rounding, props.get(vars.$rounding)) !default; -$font-size: props.def(--o-action-button--font-size, props.get(vars.$font-size--100)) !default; - -$pad-i--sm: props.def(--o-action-button--pad-i, props.get(vars.$size--100), 'sm') !default; -$pad-i-pill--sm: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--150), 'sm') !default; -$pad-b--sm: props.def(--o-action-button--pad-b, props.get(vars.$size--40), 'sm') !default; -$font-size--sm: props.def(--o-action-button--font-size, props.get(vars.$font-size--75), 'sm') !default; - -$pad-i--lg: props.def(--o-action-button--pad-i, props.get(vars.$size--175), 'lg') !default; -$pad-i-pill--lg: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--225), 'lg') !default; -$pad-b--lg: props.def(--o-action-button--pad-b, props.get(vars.$size--115), 'lg') !default; -$font-size--lg: props.def(--o-action-button--font-size, props.get(vars.$font-size--150), 'lg') !default; - -$pad-i--xl: props.def(--o-action-button--pad-i, props.get(vars.$size--225), 'xl') !default; -$pad-i-pill--xl: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--300), 'xl') !default; -$pad-b--xl: props.def(--o-action-button--pad-b, props.get(vars.$size--150), 'xl') !default; -$font-size--xl: props.def(--o-action-button--font-size, props.get(vars.$font-size--200), 'xl') !default; - -$key-focus--border-width: props.def(--o-action-button--key-focus--border-width, props.get(vars.$key-focus--border-width)) !default; -$key-focus--border-offset: props.def(--o-action-button--key-focus--border-offset, props.get(vars.$key-focus--border-offset)) !default; -$key-focus--outline-width: props.def(--o-action-button--key-focus--outline-width, props.get(vars.$key-focus--outline-width)) !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--pad-i, props.get(core.$size--100), 'sm') !default; +$pad-i-pill--sm: props.def(--o-action-button--pad-i-pill, props.get(core.$size--150), 'sm') !default; +$pad-b--sm: props.def(--o-action-button--pad-b, props.get(core.$size--40), 'sm') !default; +$font-size--sm: props.def(--o-action-button--font-size, props.get(core.$font-size--75), 'sm') !default; + +$pad-i--lg: props.def(--o-action-button--pad-i, props.get(core.$size--175), 'lg') !default; +$pad-i-pill--lg: props.def(--o-action-button--pad-i-pill, props.get(core.$size--225), 'lg') !default; +$pad-b--lg: props.def(--o-action-button--pad-b, props.get(core.$size--115), 'lg') !default; +$font-size--lg: props.def(--o-action-button--font-size, props.get(core.$font-size--150), 'lg') !default; + +$pad-i--xl: props.def(--o-action-button--pad-i, props.get(core.$size--225), 'xl') !default; +$pad-i-pill--xl: props.def(--o-action-button--pad-i-pill, props.get(core.$size--300), 'xl') !default; +$pad-b--xl: props.def(--o-action-button--pad-b, props.get(core.$size--150), 'xl') !default; +$font-size--xl: props.def(--o-action-button--font-size, props.get(core.$font-size--200), 'xl') !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, @@ -35,149 +35,151 @@ $fixed-sizes: ( 'xl' $pad-i--xl $pad-i-pill--xl $pad-b--xl $font-size--xl, ) !default; -$default-theme: props.def(--o-action-button, ( - --bg-color: props.get(vars.$theme, --base, --75), - --label-color: props.get(vars.$theme, --text), - --border-color: props.get(vars.$theme, --border-strong), +$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(vars.$theme, --border-mute), - --label-color: props.get(vars.$theme, --heading), - --border-color: props.get(vars.$theme, --text-mute-more), + --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(vars.$theme, --border), - --label-color: props.get(vars.$theme, --heading), - --border-color: props.get(vars.$theme, --text-mute), + --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(vars.$theme, --bg-l1), - --label-color: props.get(vars.$theme, --border-strong), - --border-color: props.get(vars.$theme, --border), + --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(vars.$theme, --focus, --border), - --outline-color: props.get(vars.$theme, --focus, --outline), + --border-color: props.get(core.$theme, --focus, --border), + --outline-color: props.get(core.$theme, --focus, --outline), ), --selected: ( - --bg-color: props.get(vars.$theme, --text-mute), - --label-color: props.get(vars.$theme, --base, --50), - --border-color: props.get(vars.$theme, --text-mute), + --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(vars.$theme, --text), - --label-color: props.get(vars.$theme, --base, --50), - --border-color: props.get(vars.$theme, --text), + --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(vars.$theme, --heading), - --label-color: props.get(vars.$theme, --base, --50), - --border-color: props.get(vars.$theme, --heading), + --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(vars.$theme, --border-mute), - --label-color: props.get(vars.$theme, --border-strong), - --border-color: props.get(vars.$theme, --border-mute), + --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(vars.$theme, --text), + --label-color: props.get(core.$theme, --text), --hover: ( - --bg-color: props.get(vars.$theme, --border-mute), - --label-color: props.get(vars.$theme, --heading), + --bg-color: props.get(core.$theme, --border-mute), + --label-color: props.get(core.$theme, --heading), ), --active: ( - --bg-color: props.get(vars.$theme, --border), - --label-color: props.get(vars.$theme, --heading), + --bg-color: props.get(core.$theme, --border), + --label-color: props.get(core.$theme, --heading), ), --disabled: ( - --label-color: props.get(vars.$theme, --border-strong), + --label-color: props.get(core.$theme, --border-strong), ), ), -)) !default; +), $default-theme-override) !default; +$default-theme: props.def(--o-action-button, $default-theme); $static-themes: props.def(--o-action-button); -@each $theme in map.keys(props.get(vars.$transparent-colors)) { +@each $theme in map.keys(props.get(core.$transparent-colors)) { $button-theme: #{$theme}-static; $static-themes: props.merge($static-themes, ( $button-theme: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --100), - --label-color: props.get(vars.$transparent-colors, $theme, --900), - --border-color: props.get(vars.$transparent-colors, $theme, --400), + --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(vars.$transparent-colors, $theme, --300), - --label-color: props.get(vars.$transparent-colors, $theme, --900), - --border-color: props.get(vars.$transparent-colors, $theme, --500), + --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(vars.$transparent-colors, $theme, --400), - --label-color: props.get(vars.$transparent-colors, $theme, --900), - --border-color: props.get(vars.$transparent-colors, $theme, --600), + --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(vars.$transparent-colors, $theme, --100), - --label-color: props.get(vars.$transparent-colors, $theme, --500), - --border-color: props.get(vars.$transparent-colors, $theme, --300), + --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(vars.$transparent-colors, $theme, --900), - --outline-color: props.get(vars.$transparent-colors, $theme, --300), + --border-color: props.get(core.$transparent-colors, $theme, --900), + --outline-color: props.get(core.$transparent-colors, $theme, --300), ), --selected: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --800), - --label-color: props.get(vars.$transparent-colors, $theme, --text), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --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(vars.$transparent-colors, $theme, --900), - --label-color: props.get(vars.$transparent-colors, $theme, --text), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --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(vars.$transparent-colors, $theme, --900), - --label-color: props.get(vars.$transparent-colors, $theme, --text), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --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(vars.$transparent-colors, $theme, --200), - --label-color: props.get(vars.$transparent-colors, $theme, --500), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --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(vars.$transparent-colors, $theme, --900), + --label-color: props.get(core.$transparent-colors, $theme, --900), --hover: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --300), - --label-color: props.get(vars.$transparent-colors, $theme, --900), + --bg-color: props.get(core.$transparent-colors, $theme, --300), + --label-color: props.get(core.$transparent-colors, $theme, --900), ), --active: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --400), - --label-color: props.get(vars.$transparent-colors, $theme, --900), + --bg-color: props.get(core.$transparent-colors, $theme, --400), + --label-color: props.get(core.$transparent-colors, $theme, --900), ), --disabled: ( - --label-color: props.get(vars.$transparent-colors, $theme, --500), + --label-color: props.get(core.$transparent-colors, $theme, --500), ), ), ) -- cgit v1.2.3-70-g09d2