diff options
Diffstat (limited to 'src/objects/_action-button.vars.scss')
| -rw-r--r-- | src/objects/_action-button.vars.scss | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/src/objects/_action-button.vars.scss b/src/objects/_action-button.vars.scss new file mode 100644 index 0000000..16d9e7f --- /dev/null +++ b/src/objects/_action-button.vars.scss | |||
| @@ -0,0 +1,185 @@ | |||
| 1 | @use 'sass:map'; | ||
| 2 | @use '../props'; | ||
| 3 | @use '../vars'; | ||
| 4 | |||
| 5 | $line-height: props.def(--o-action-button--line-height, 1.4) !default; | ||
| 6 | $pad-i: props.def(--o-action-button--pad-i, props.get(vars.$size--150)) !default; | ||
| 7 | $pad-i-pill: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--200)) !default; | ||
| 8 | $pad-b: props.def(--o-action-button--pad-b, props.get(vars.$size--85)) !default; | ||
| 9 | $border-width: props.def(--o-action-button--border-width, props.get(vars.$border-width--thin)) !default; | ||
| 10 | $rounding: props.def(--o-action-button--rounding, props.get(vars.$rounding)) !default; | ||
| 11 | $font-size: props.def(--o-action-button--font-size, props.get(vars.$font-size--100)) !default; | ||
| 12 | |||
| 13 | $pad-i--sm: props.def(--o-action-button--pad-i, props.get(vars.$size--100), 'sm') !default; | ||
| 14 | $pad-i-pill--sm: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--150), 'sm') !default; | ||
| 15 | $pad-b--sm: props.def(--o-action-button--pad-b, props.get(vars.$size--40), 'sm') !default; | ||
| 16 | $font-size--sm: props.def(--o-action-button--font-size, props.get(vars.$font-size--75), 'sm') !default; | ||
| 17 | |||
| 18 | $pad-i--lg: props.def(--o-action-button--pad-i, props.get(vars.$size--175), 'lg') !default; | ||
| 19 | $pad-i-pill--lg: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--225), 'lg') !default; | ||
| 20 | $pad-b--lg: props.def(--o-action-button--pad-b, props.get(vars.$size--115), 'lg') !default; | ||
| 21 | $font-size--lg: props.def(--o-action-button--font-size, props.get(vars.$font-size--150), 'lg') !default; | ||
| 22 | |||
| 23 | $pad-i--xl: props.def(--o-action-button--pad-i, props.get(vars.$size--225), 'xl') !default; | ||
| 24 | $pad-i-pill--xl: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--300), 'xl') !default; | ||
| 25 | $pad-b--xl: props.def(--o-action-button--pad-b, props.get(vars.$size--150), 'xl') !default; | ||
| 26 | $font-size--xl: props.def(--o-action-button--font-size, props.get(vars.$font-size--200), 'xl') !default; | ||
| 27 | |||
| 28 | $key-focus--border-width: props.def(--o-action-button--key-focus--border-width, props.get(vars.$key-focus--border-width)) !default; | ||
| 29 | $key-focus--border-offset: props.def(--o-action-button--key-focus--border-offset, props.get(vars.$key-focus--border-offset)) !default; | ||
| 30 | $key-focus--outline-width: props.def(--o-action-button--key-focus--outline-width, props.get(vars.$key-focus--outline-width)) !default; | ||
| 31 | |||
| 32 | $fixed-sizes: ( | ||
| 33 | 'sm' $pad-i--sm $pad-i-pill--sm $pad-b--sm $font-size--sm, | ||
| 34 | 'lg' $pad-i--lg $pad-i-pill--lg $pad-b--lg $font-size--lg, | ||
| 35 | 'xl' $pad-i--xl $pad-i-pill--xl $pad-b--xl $font-size--xl, | ||
| 36 | ) !default; | ||
| 37 | |||
| 38 | $default-theme: props.def(--o-action-button, ( | ||
| 39 | --bg-color: props.get(vars.$theme, --base, --75), | ||
| 40 | --label-color: props.get(vars.$theme, --text), | ||
| 41 | --border-color: props.get(vars.$theme, --border-strong), | ||
| 42 | |||
| 43 | --hover: ( | ||
| 44 | --bg-color: props.get(vars.$theme, --border-mute), | ||
| 45 | --label-color: props.get(vars.$theme, --heading), | ||
| 46 | --border-color: props.get(vars.$theme, --text-mute-more), | ||
| 47 | ), | ||
| 48 | |||
| 49 | --active: ( | ||
| 50 | --bg-color: props.get(vars.$theme, --border), | ||
| 51 | --label-color: props.get(vars.$theme, --heading), | ||
| 52 | --border-color: props.get(vars.$theme, --text-mute), | ||
| 53 | ), | ||
| 54 | |||
| 55 | --disabled: ( | ||
| 56 | --bg-color: props.get(vars.$theme, --bg-l1), | ||
| 57 | --label-color: props.get(vars.$theme, --border-strong), | ||
| 58 | --border-color: props.get(vars.$theme, --border), | ||
| 59 | ), | ||
| 60 | |||
| 61 | --key-focus: ( | ||
| 62 | --border-color: props.get(vars.$theme, --focus, --border), | ||
| 63 | --outline-color: props.get(vars.$theme, --focus, --outline), | ||
| 64 | ), | ||
| 65 | |||
| 66 | --selected: ( | ||
| 67 | --bg-color: props.get(vars.$theme, --text-mute), | ||
| 68 | --label-color: props.get(vars.$theme, --base, --50), | ||
| 69 | --border-color: props.get(vars.$theme, --text-mute), | ||
| 70 | |||
| 71 | --hover: ( | ||
| 72 | --bg-color: props.get(vars.$theme, --text), | ||
| 73 | --label-color: props.get(vars.$theme, --base, --50), | ||
| 74 | --border-color: props.get(vars.$theme, --text), | ||
| 75 | ), | ||
| 76 | |||
| 77 | --active: ( | ||
| 78 | --bg-color: props.get(vars.$theme, --heading), | ||
| 79 | --label-color: props.get(vars.$theme, --base, --50), | ||
| 80 | --border-color: props.get(vars.$theme, --heading), | ||
| 81 | ), | ||
| 82 | |||
| 83 | --disabled: ( | ||
| 84 | --bg-color: props.get(vars.$theme, --border-mute), | ||
| 85 | --label-color: props.get(vars.$theme, --border-strong), | ||
| 86 | --border-color: props.get(vars.$theme, --border-mute), | ||
| 87 | ), | ||
| 88 | ), | ||
| 89 | |||
| 90 | --quiet: ( | ||
| 91 | --label-color: props.get(vars.$theme, --text), | ||
| 92 | |||
| 93 | --hover: ( | ||
| 94 | --bg-color: props.get(vars.$theme, --border-mute), | ||
| 95 | --label-color: props.get(vars.$theme, --heading), | ||
| 96 | ), | ||
| 97 | |||
| 98 | --active: ( | ||
| 99 | --bg-color: props.get(vars.$theme, --border), | ||
| 100 | --label-color: props.get(vars.$theme, --heading), | ||
| 101 | ), | ||
| 102 | |||
| 103 | --disabled: ( | ||
| 104 | --label-color: props.get(vars.$theme, --border-strong), | ||
| 105 | ), | ||
| 106 | ), | ||
| 107 | )) !default; | ||
| 108 | |||
| 109 | $static-themes: props.def(--o-action-button); | ||
| 110 | @each $theme in map.keys(props.get(vars.$transparent-colors)) { | ||
| 111 | $button-theme: #{$theme}-static; | ||
| 112 | |||
| 113 | $static-themes: props.merge($static-themes, ( | ||
| 114 | $button-theme: ( | ||
| 115 | --bg-color: props.get(vars.$transparent-colors, $theme, --100), | ||
| 116 | --label-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 117 | --border-color: props.get(vars.$transparent-colors, $theme, --400), | ||
| 118 | |||
| 119 | --hover: ( | ||
| 120 | --bg-color: props.get(vars.$transparent-colors, $theme, --300), | ||
| 121 | --label-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 122 | --border-color: props.get(vars.$transparent-colors, $theme, --500), | ||
| 123 | ), | ||
| 124 | |||
| 125 | --active: ( | ||
| 126 | --bg-color: props.get(vars.$transparent-colors, $theme, --400), | ||
| 127 | --label-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 128 | --border-color: props.get(vars.$transparent-colors, $theme, --600), | ||
| 129 | ), | ||
| 130 | |||
| 131 | --disabled: ( | ||
| 132 | --bg-color: props.get(vars.$transparent-colors, $theme, --100), | ||
| 133 | --label-color: props.get(vars.$transparent-colors, $theme, --500), | ||
| 134 | --border-color: props.get(vars.$transparent-colors, $theme, --300), | ||
| 135 | ), | ||
| 136 | |||
| 137 | --key-focus: ( | ||
| 138 | --border-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 139 | --outline-color: props.get(vars.$transparent-colors, $theme, --300), | ||
| 140 | ), | ||
| 141 | |||
| 142 | --selected: ( | ||
| 143 | --bg-color: props.get(vars.$transparent-colors, $theme, --800), | ||
| 144 | --label-color: props.get(vars.$transparent-colors, $theme, --text), | ||
| 145 | --border-color: props.get(vars.$transparent-colors, $theme, --100), | ||
| 146 | |||
| 147 | --hover: ( | ||
| 148 | --bg-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 149 | --label-color: props.get(vars.$transparent-colors, $theme, --text), | ||
| 150 | --border-color: props.get(vars.$transparent-colors, $theme, --100), | ||
| 151 | ), | ||
| 152 | |||
| 153 | --active: ( | ||
| 154 | --bg-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 155 | --label-color: props.get(vars.$transparent-colors, $theme, --text), | ||
| 156 | --border-color: props.get(vars.$transparent-colors, $theme, --100), | ||
| 157 | ), | ||
| 158 | |||
| 159 | --disabled: ( | ||
| 160 | --bg-color: props.get(vars.$transparent-colors, $theme, --200), | ||
| 161 | --label-color: props.get(vars.$transparent-colors, $theme, --500), | ||
| 162 | --border-color: props.get(vars.$transparent-colors, $theme, --100), | ||
| 163 | ), | ||
| 164 | ), | ||
| 165 | |||
| 166 | --quiet: ( | ||
| 167 | --label-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 168 | |||
| 169 | --hover: ( | ||
| 170 | --bg-color: props.get(vars.$transparent-colors, $theme, --300), | ||
| 171 | --label-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 172 | ), | ||
| 173 | |||
| 174 | --active: ( | ||
| 175 | --bg-color: props.get(vars.$transparent-colors, $theme, --400), | ||
| 176 | --label-color: props.get(vars.$transparent-colors, $theme, --900), | ||
| 177 | ), | ||
| 178 | |||
| 179 | --disabled: ( | ||
| 180 | --label-color: props.get(vars.$transparent-colors, $theme, --500), | ||
| 181 | ), | ||
| 182 | ), | ||
| 183 | ) | ||
| 184 | )); | ||
| 185 | } | ||
