@lumx/core 3.0.7 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{CONTRIBUTING.md → dist/CONTRIBUTING.md} +0 -0
- package/{LICENSE.md → dist/LICENSE.md} +0 -0
- package/{css → dist/css}/_retro-compat-v2.css +0 -0
- package/{css → dist/css}/design-tokens.css +0 -0
- package/{css → dist/css}/material.css +0 -0
- package/{js → dist/js}/constants/design-tokens.js +0 -0
- package/{js → dist/js}/constants/design-tokens.min.js +0 -0
- package/{js → dist/js}/constants/design-tokens.min.js.map +0 -0
- package/{js → dist/js}/constants/design-tokens.ts +0 -0
- package/{js → dist/js}/constants/index.js +0 -0
- package/{js → dist/js}/constants/index.min.js +0 -0
- package/{js → dist/js}/constants/index.min.js.map +0 -0
- package/{js → dist/js}/constants/index.ts +0 -0
- package/{js → dist/js}/constants/keycodes.js +0 -0
- package/{js → dist/js}/constants/keycodes.min.js +0 -0
- package/{js → dist/js}/constants/keycodes.min.js.map +0 -0
- package/{js → dist/js}/constants/keycodes.ts +0 -0
- package/{js → dist/js}/custom-colors.js +0 -0
- package/{js → dist/js}/custom-colors.min.js +0 -0
- package/dist/js/custom-colors.min.js.map +1 -0
- package/{js → dist/js}/custom-colors.ts +0 -0
- package/{js → dist/js}/date-picker.js +0 -0
- package/{js → dist/js}/date-picker.min.js +0 -0
- package/dist/js/date-picker.min.js.map +1 -0
- package/{js → dist/js}/date-picker.ts +0 -0
- package/{js → dist/js}/utils.js +0 -0
- package/{js → dist/js}/utils.min.js +0 -0
- package/dist/js/utils.min.js.map +1 -0
- package/{js → dist/js}/utils.ts +0 -0
- package/{lumx.css → dist/lumx.css} +1 -1
- package/{lumx.min.css → dist/lumx.min.css} +1 -1
- package/dist/package.json +81 -0
- package/{scss → dist/scss}/_components.scss +0 -0
- package/{scss → dist/scss}/_core.scss +0 -0
- package/{scss → dist/scss}/_design-tokens.scss +0 -0
- package/{scss → dist/scss}/_retro-compat-v2.scss +0 -0
- package/{scss → dist/scss}/components/avatar/_index.scss +0 -0
- package/{scss → dist/scss}/components/badge/_index.scss +0 -0
- package/{scss → dist/scss}/components/button/_index.scss +0 -0
- package/{scss → dist/scss}/components/button/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/button/_variables.scss +0 -0
- package/{scss → dist/scss}/components/checkbox/_index.scss +0 -0
- package/{scss → dist/scss}/components/checkbox/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/chip/_index.scss +0 -0
- package/{scss → dist/scss}/components/chip/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/chip/_variables.scss +0 -0
- package/{scss → dist/scss}/components/comment-block/_index.scss +0 -0
- package/{scss → dist/scss}/components/date-picker/_index.scss +0 -0
- package/{scss → dist/scss}/components/dialog/_index.scss +0 -0
- package/{scss → dist/scss}/components/dialog/_variables.scss +0 -0
- package/{scss → dist/scss}/components/divider/_index.scss +0 -0
- package/{scss → dist/scss}/components/divider/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/divider/_variables.scss +0 -0
- package/{scss → dist/scss}/components/drag-handle/_index.scss +0 -0
- package/{scss → dist/scss}/components/dropdown/_index.scss +0 -0
- package/{scss → dist/scss}/components/expansion-panel/_index.scss +0 -0
- package/{scss → dist/scss}/components/expansion-panel/_variables.scss +0 -0
- package/{scss → dist/scss}/components/flag/_index.scss +0 -0
- package/{scss → dist/scss}/components/flex-box/_index.scss +0 -0
- package/{scss → dist/scss}/components/generic-block/_index.scss +0 -0
- package/{scss → dist/scss}/components/grid/_index.scss +0 -0
- package/dist/scss/components/grid-column/_index.scss +18 -0
- package/{scss → dist/scss}/components/icon/_index.scss +0 -0
- package/{scss → dist/scss}/components/icon/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/icon/_variables.scss +0 -0
- package/{scss → dist/scss}/components/image-block/_index.scss +0 -0
- package/{scss → dist/scss}/components/inline-list/_index.scss +0 -0
- package/{scss → dist/scss}/components/input-helper/_index.scss +0 -0
- package/{scss → dist/scss}/components/input-helper/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/input-helper/_variables.scss +0 -0
- package/{scss → dist/scss}/components/input-label/_index.scss +0 -0
- package/{scss → dist/scss}/components/input-label/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/lightbox/_index.scss +0 -0
- package/{scss → dist/scss}/components/lightbox/_variables.scss +0 -0
- package/{scss → dist/scss}/components/link/_index.scss +0 -0
- package/{scss → dist/scss}/components/link/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/link-preview/_index.scss +0 -0
- package/{scss → dist/scss}/components/list/_index.scss +0 -0
- package/{scss → dist/scss}/components/list/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/list/_variables.scss +0 -0
- package/{scss → dist/scss}/components/message/_index.scss +0 -0
- package/{scss → dist/scss}/components/mosaic/_index.scss +0 -0
- package/{scss → dist/scss}/components/notification/_index.scss +0 -0
- package/{scss → dist/scss}/components/notification/_variables.scss +0 -0
- package/{scss → dist/scss}/components/notification-block/_index.scss +0 -0
- package/{scss → dist/scss}/components/popover/_index.scss +0 -0
- package/{scss → dist/scss}/components/popover/_variables.scss +0 -0
- package/{scss → dist/scss}/components/post-block/_index.scss +0 -0
- package/{scss → dist/scss}/components/progress/_index.scss +20 -0
- package/dist/scss/components/progress/_variables.scss +12 -0
- package/{scss → dist/scss}/components/progress-tracker/_index.scss +0 -0
- package/{scss → dist/scss}/components/progress-tracker/_variables.scss +0 -0
- package/{scss → dist/scss}/components/radio-button/_index.scss +0 -0
- package/{scss → dist/scss}/components/radio-button/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/select/_index.scss +0 -0
- package/{scss → dist/scss}/components/select/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/side-navigation/_index.scss +0 -0
- package/{scss → dist/scss}/components/side-navigation/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/skeleton/_index.scss +0 -0
- package/{scss → dist/scss}/components/skeleton/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/slider/_index.scss +0 -0
- package/{scss → dist/scss}/components/slideshow/_index.scss +0 -0
- package/{scss → dist/scss}/components/slideshow/_variables.scss +0 -0
- package/{scss → dist/scss}/components/switch/_index.scss +0 -0
- package/{scss → dist/scss}/components/switch/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/table/_index.scss +0 -0
- package/{scss → dist/scss}/components/table/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/tabs/_index.scss +0 -0
- package/{scss → dist/scss}/components/tabs/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/text/_index.scss +0 -0
- package/{scss → dist/scss}/components/text-field/_index.scss +0 -0
- package/{scss → dist/scss}/components/text-field/_mixins.scss +0 -0
- package/{scss → dist/scss}/components/text-field/_variables.scss +0 -0
- package/{scss → dist/scss}/components/thumbnail/_index.scss +0 -0
- package/{scss → dist/scss}/components/thumbnail/_variables.scss +0 -0
- package/{scss → dist/scss}/components/toolbar/_index.scss +0 -0
- package/{scss → dist/scss}/components/toolbar/_variables.scss +0 -0
- package/{scss → dist/scss}/components/tooltip/_index.scss +0 -0
- package/{scss → dist/scss}/components/tooltip/_variables.scss +0 -0
- package/{scss → dist/scss}/components/uploader/_index.scss +0 -0
- package/{scss → dist/scss}/components/user-block/_index.scss +0 -0
- package/{scss → dist/scss}/core/base/_functions.scss +0 -0
- package/{scss → dist/scss}/core/base/_helpers.scss +0 -0
- package/{scss → dist/scss}/core/base/_index.scss +0 -0
- package/{scss → dist/scss}/core/base/_normalize.scss +0 -0
- package/{scss → dist/scss}/core/base/_variables.scss +0 -0
- package/{scss → dist/scss}/core/color/_functions.scss +0 -0
- package/{scss → dist/scss}/core/color/_index.scss +0 -0
- package/{scss → dist/scss}/core/color/_variables.scss +0 -0
- package/{scss → dist/scss}/core/elevation/_mixins.scss +0 -0
- package/{scss → dist/scss}/core/elevation/_variables.scss +0 -0
- package/{scss → dist/scss}/core/size/_variables.scss +0 -0
- package/{scss → dist/scss}/core/spacing/_index.scss +0 -0
- package/{scss → dist/scss}/core/spacing/_variables.scss +0 -0
- package/{scss → dist/scss}/core/state/_mixins.scss +0 -0
- package/{scss → dist/scss}/core/state/_variables.scss +0 -0
- package/{scss → dist/scss}/core/typography/_index.scss +0 -0
- package/{scss → dist/scss}/core/typography/_mixins.scss +0 -0
- package/{scss → dist/scss}/core/typography/_variables.scss +0 -0
- package/{scss → dist/scss}/lumx.scss +1 -0
- package/package.json +4 -8
- package/src/css/_retro-compat-v2.css +117 -0
- package/src/css/design-tokens.css +544 -0
- package/src/css/material.css +62 -0
- package/src/js/constants/design-tokens.ts +2157 -0
- package/src/js/constants/index.ts +35 -0
- package/src/js/constants/keycodes.ts +44 -0
- package/src/js/custom-colors.ts +56 -0
- package/src/js/date-picker.ts +71 -0
- package/src/js/utils.ts +296 -0
- package/src/scss/_components.scss +35 -0
- package/src/scss/_core.scss +12 -0
- package/src/scss/_design-tokens.scss +1667 -0
- package/src/scss/_retro-compat-v2.scss +95 -0
- package/src/scss/components/avatar/_index.scss +42 -0
- package/src/scss/components/badge/_index.scss +47 -0
- package/src/scss/components/button/_index.scss +166 -0
- package/src/scss/components/button/_mixins.scss +271 -0
- package/src/scss/components/button/_variables.scss +6 -0
- package/src/scss/components/checkbox/_index.scss +231 -0
- package/src/scss/components/checkbox/_mixins.scss +69 -0
- package/src/scss/components/chip/_index.scss +156 -0
- package/src/scss/components/chip/_mixins.scss +37 -0
- package/src/scss/components/chip/_variables.scss +1 -0
- package/src/scss/components/comment-block/_index.scss +170 -0
- package/src/scss/components/date-picker/_index.scss +67 -0
- package/src/scss/components/dialog/_index.scss +169 -0
- package/src/scss/components/dialog/_variables.scss +8 -0
- package/src/scss/components/divider/_index.scss +39 -0
- package/src/scss/components/divider/_mixins.scss +60 -0
- package/src/scss/components/divider/_variables.scss +7 -0
- package/src/scss/components/drag-handle/_index.scss +7 -0
- package/src/scss/components/dropdown/_index.scss +22 -0
- package/src/scss/components/expansion-panel/_index.scss +80 -0
- package/src/scss/components/expansion-panel/_variables.scss +2 -0
- package/src/scss/components/flag/_index.scss +41 -0
- package/src/scss/components/flex-box/_index.scss +132 -0
- package/src/scss/components/generic-block/_index.scss +11 -0
- package/src/scss/components/grid/_index.scss +147 -0
- package/src/scss/components/grid-column/_index.scss +18 -0
- package/src/scss/components/icon/_index.scss +106 -0
- package/src/scss/components/icon/_mixins.scss +42 -0
- package/src/scss/components/icon/_variables.scss +6 -0
- package/src/scss/components/image-block/_index.scss +108 -0
- package/src/scss/components/inline-list/_index.scss +15 -0
- package/src/scss/components/input-helper/_index.scss +27 -0
- package/src/scss/components/input-helper/_mixins.scss +12 -0
- package/src/scss/components/input-helper/_variables.scss +1 -0
- package/src/scss/components/input-label/_index.scss +23 -0
- package/src/scss/components/input-label/_mixins.scss +12 -0
- package/src/scss/components/lightbox/_index.scss +59 -0
- package/src/scss/components/lightbox/_variables.scss +1 -0
- package/src/scss/components/link/_index.scss +35 -0
- package/src/scss/components/link/_mixins.scss +25 -0
- package/src/scss/components/link-preview/_index.scss +95 -0
- package/src/scss/components/list/_index.scss +96 -0
- package/src/scss/components/list/_mixins.scss +128 -0
- package/src/scss/components/list/_variables.scss +7 -0
- package/src/scss/components/message/_index.scss +36 -0
- package/src/scss/components/mosaic/_index.scss +120 -0
- package/src/scss/components/notification/_index.scss +78 -0
- package/src/scss/components/notification/_variables.scss +3 -0
- package/src/scss/components/notification-block/_index.scss +42 -0
- package/src/scss/components/popover/_index.scss +64 -0
- package/src/scss/components/popover/_variables.scss +1 -0
- package/src/scss/components/post-block/_index.scss +101 -0
- package/src/scss/components/progress/_index.scss +190 -0
- package/src/scss/components/progress/_variables.scss +12 -0
- package/src/scss/components/progress-tracker/_index.scss +131 -0
- package/src/scss/components/progress-tracker/_variables.scss +2 -0
- package/src/scss/components/radio-button/_index.scss +180 -0
- package/src/scss/components/radio-button/_mixins.scss +82 -0
- package/src/scss/components/select/_index.scss +295 -0
- package/src/scss/components/select/_mixins.scss +36 -0
- package/src/scss/components/side-navigation/_index.scss +69 -0
- package/src/scss/components/side-navigation/_mixins.scss +61 -0
- package/src/scss/components/skeleton/_index.scss +143 -0
- package/src/scss/components/skeleton/_mixins.scss +9 -0
- package/src/scss/components/slider/_index.scss +209 -0
- package/src/scss/components/slideshow/_index.scss +171 -0
- package/src/scss/components/slideshow/_variables.scss +1 -0
- package/src/scss/components/switch/_index.scss +257 -0
- package/src/scss/components/switch/_mixins.scss +77 -0
- package/src/scss/components/table/_index.scss +138 -0
- package/src/scss/components/table/_mixins.scss +115 -0
- package/src/scss/components/tabs/_index.scss +111 -0
- package/src/scss/components/tabs/_mixins.scss +104 -0
- package/src/scss/components/text/_index.scss +29 -0
- package/src/scss/components/text-field/_index.scss +323 -0
- package/src/scss/components/text-field/_mixins.scss +149 -0
- package/src/scss/components/text-field/_variables.scss +2 -0
- package/src/scss/components/thumbnail/_index.scss +227 -0
- package/src/scss/components/thumbnail/_variables.scss +6 -0
- package/src/scss/components/toolbar/_index.scss +38 -0
- package/src/scss/components/toolbar/_variables.scss +1 -0
- package/src/scss/components/tooltip/_index.scss +91 -0
- package/src/scss/components/tooltip/_variables.scss +4 -0
- package/src/scss/components/uploader/_index.scss +115 -0
- package/src/scss/components/user-block/_index.scss +106 -0
- package/src/scss/core/base/_functions.scss +3 -0
- package/src/scss/core/base/_helpers.scss +21 -0
- package/src/scss/core/base/_index.scss +54 -0
- package/src/scss/core/base/_normalize.scss +353 -0
- package/src/scss/core/base/_variables.scss +39 -0
- package/src/scss/core/color/_functions.scss +7 -0
- package/src/scss/core/color/_index.scss +15 -0
- package/src/scss/core/color/_variables.scss +4 -0
- package/src/scss/core/elevation/_mixins.scss +10 -0
- package/src/scss/core/elevation/_variables.scss +7 -0
- package/src/scss/core/size/_variables.scss +3 -0
- package/src/scss/core/spacing/_index.scss +15 -0
- package/src/scss/core/spacing/_variables.scss +22 -0
- package/src/scss/core/state/_mixins.scss +127 -0
- package/src/scss/core/state/_variables.scss +1 -0
- package/src/scss/core/typography/_index.scss +16 -0
- package/src/scss/core/typography/_mixins.scss +25 -0
- package/src/scss/core/typography/_variables.scss +6 -0
- package/src/scss/lumx.scss +69 -0
- package/style-dictionary/.eslintignore +1 -0
- package/style-dictionary/README.md +19 -0
- package/style-dictionary/config/_run.js +12 -0
- package/style-dictionary/config/_transform-group.js +16 -0
- package/style-dictionary/config/gen-css-variables.js +25 -0
- package/style-dictionary/config/gen-scss-variables.js +65 -0
- package/style-dictionary/config/gen-ts-variables.js +52 -0
- package/style-dictionary/config/utils/_color-attributes.js +24 -0
- package/style-dictionary/config/utils/_color-rgba-value.js +22 -0
- package/style-dictionary/config/utils/_css-prefer-variable.js +24 -0
- package/style-dictionary/config/utils/_genHeader.js +3 -0
- package/style-dictionary/config/utils/_lumx-variables.js +12 -0
- package/style-dictionary/config/utils/_pickFieldsInTree.js +22 -0
- package/style-dictionary/config/utils/_prettier-scss.js +13 -0
- package/style-dictionary/config/utils/_prettier-ts.js +13 -0
- package/style-dictionary/config/utils/_resolve-structure-alias.js +76 -0
- package/style-dictionary/index.js +11 -0
- package/style-dictionary/properties/components/button.json +206 -0
- package/style-dictionary/properties/components/material.json +64 -0
- package/style-dictionary/properties/components/navigation.json +207 -0
- package/style-dictionary/properties/components/tabs.json +168 -0
- package/style-dictionary/properties/components/text-field.json +167 -0
- package/style-dictionary/properties/core/border-radius.json +3 -0
- package/style-dictionary/properties/core/color.json +421 -0
- package/style-dictionary/properties/core/size.json +11 -0
- package/style-dictionary/properties/core/spacing.json +11 -0
- package/style-dictionary/properties/core/typography.json +127 -0
- package/tsconfig.json +3 -0
- package/webpack.config.js +202 -0
- package/js/custom-colors.min.js.map +0 -1
- package/js/date-picker.min.js.map +0 -1
- package/js/utils.min.js.map +0 -1
- package/scss/components/progress/_variables.scss +0 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of deprecated v2 variables that have been removed or renamed.
|
|
3
|
+
* Warning: These will be removed in the next major version.
|
|
4
|
+
*/
|
|
5
|
+
$lumx-button-font-weight: $lumx-typography-font-weight-bold;
|
|
6
|
+
$lumx-button-text-transform: $lumx-material-button-text-transform;
|
|
7
|
+
$lumx-button-variant-icon-border-radius: 50%;
|
|
8
|
+
$lumx-button-size-m-font-size: $lumx-typography-custom-button-size-m-font-size;
|
|
9
|
+
$lumx-button-size-s-font-size: $lumx-typography-custom-button-size-s-font-size;
|
|
10
|
+
$lumx-checkbox-wrapper-size: $lumx-material-checkbox-wrapper-size;
|
|
11
|
+
$lumx-checkbox-control-size: $lumx-material-checkbox-control-size;
|
|
12
|
+
$lumx-chip-size-m-height: $lumx-material-chip-size-m-height;
|
|
13
|
+
$lumx-chip-size-m-border-radius: $lumx-material-chip-size-m-border-radius;
|
|
14
|
+
$lumx-chip-size-m-padding-vertical: $lumx-material-chip-size-m-padding-vertical;
|
|
15
|
+
$lumx-chip-size-s-height: $lumx-material-chip-size-s-height;
|
|
16
|
+
$lumx-chip-size-s-border-radius: $lumx-material-chip-size-s-border-radius;
|
|
17
|
+
$lumx-chip-size-s-padding-vertical: $lumx-material-chip-size-s-padding-vertical;
|
|
18
|
+
$lumx-input-helper-font-size: $lumx-material-input-helper-font-size;
|
|
19
|
+
$lumx-input-helper-font-weight: $lumx-material-input-helper-font-weight;
|
|
20
|
+
$lumx-input-helper-line-height: $lumx-material-input-helper-line-height;
|
|
21
|
+
$lumx-input-label-font-size: $lumx-material-input-label-font-size;
|
|
22
|
+
$lumx-input-label-font-weight: $lumx-material-input-label-font-weight;
|
|
23
|
+
$lumx-input-label-line-height: $lumx-material-input-label-line-height;
|
|
24
|
+
$lumx-radio-button-wrapper-size: $lumx-material-radio-button-wrapper-size;
|
|
25
|
+
$lumx-radio-button-control-size: $lumx-material-radio-button-control-size;
|
|
26
|
+
$lumx-radio-button-indicator-size: $lumx-material-radio-button-indicator-size;
|
|
27
|
+
$lumx-switch-wrapper-width: $lumx-material-switch-wrapper-width;
|
|
28
|
+
$lumx-switch-wrapper-height: $lumx-material-switch-wrapper-height;
|
|
29
|
+
$lumx-switch-control-width: $lumx-material-switch-control-width;
|
|
30
|
+
$lumx-switch-control-height: $lumx-material-switch-control-height;
|
|
31
|
+
$lumx-switch-indicator-size: $lumx-material-switch-indicator-size;
|
|
32
|
+
$lumx-switch-indicator-offset: $lumx-material-switch-indicator-offset;
|
|
33
|
+
$lumx-text-field-padding-top: $lumx-material-text-field-padding-top;
|
|
34
|
+
$lumx-text-field-padding-bottom: $lumx-material-text-field-padding-bottom;
|
|
35
|
+
$lumx-text-field-header-margin-bottom: $lumx-material-text-field-header-wrapper-margin-bottom;
|
|
36
|
+
$lumx-text-field-label-font-size: $lumx-material-text-field-header-label-font-size;
|
|
37
|
+
$lumx-text-field-label-font-weight: $lumx-material-text-field-header-label-font-weight;
|
|
38
|
+
$lumx-text-field-label-line-height: $lumx-material-text-field-header-label-line-height;
|
|
39
|
+
$lumx-text-field-wrapper-min-height: $lumx-text-field-input-min-height;
|
|
40
|
+
$lumx-text-field-wrapper-border-radius: $lumx-text-field-input-border-radius;
|
|
41
|
+
$lumx-text-field-wrapper-padding-vertical: $lumx-spacing-unit-tiny;
|
|
42
|
+
$lumx-text-field-wrapper-padding-horizontal: $lumx-text-field-input-padding-horizontal;
|
|
43
|
+
$lumx-text-field-state-default-border-top-width: $lumx-text-field-state-default-input-border-top-width;
|
|
44
|
+
$lumx-text-field-state-default-border-right-width: $lumx-text-field-state-default-input-border-right-width;
|
|
45
|
+
$lumx-text-field-state-default-border-bottom-width: $lumx-text-field-state-default-input-border-bottom-width;
|
|
46
|
+
$lumx-text-field-state-default-border-left-width: $lumx-text-field-state-default-input-border-left-width;
|
|
47
|
+
$lumx-text-field-state-default-theme-light-background-color: $lumx-text-field-state-default-theme-light-input-background-color;
|
|
48
|
+
$lumx-text-field-state-default-theme-light-border-color: $lumx-text-field-state-default-theme-light-input-border-color;
|
|
49
|
+
$lumx-text-field-state-default-theme-dark-background-color: $lumx-text-field-state-default-theme-dark-input-background-color;
|
|
50
|
+
$lumx-text-field-state-default-theme-dark-border-color: $lumx-text-field-state-default-theme-dark-input-border-color;
|
|
51
|
+
$lumx-text-field-state-hover-theme-light-background-color: $lumx-text-field-state-hover-theme-light-input-background-color;
|
|
52
|
+
$lumx-text-field-state-hover-theme-dark-background-color: $lumx-text-field-state-hover-theme-dark-input-background-color;
|
|
53
|
+
$lumx-text-field-state-focus-border-top-width: $lumx-text-field-state-focus-input-border-top-width;
|
|
54
|
+
$lumx-text-field-state-focus-border-right-width: $lumx-text-field-state-focus-input-border-right-width;
|
|
55
|
+
$lumx-text-field-state-focus-border-bottom-width: $lumx-text-field-state-focus-input-border-bottom-width;
|
|
56
|
+
$lumx-text-field-state-focus-border-left-width: $lumx-text-field-state-focus-input-border-left-width;
|
|
57
|
+
$lumx-text-field-state-focus-theme-light-background-color: $lumx-text-field-state-focus-theme-light-input-background-color;
|
|
58
|
+
$lumx-text-field-state-focus-theme-light-border-color: $lumx-text-field-state-focus-theme-light-input-border-color;
|
|
59
|
+
$lumx-text-field-state-focus-theme-dark-background-color: $lumx-text-field-state-focus-theme-dark-input-background-color;
|
|
60
|
+
$lumx-text-field-state-focus-theme-dark-border-color: $lumx-text-field-state-focus-theme-dark-input-border-color;
|
|
61
|
+
$lumx-text-field-input-icon-size: $lumx-size-xs;
|
|
62
|
+
$lumx-text-field-input-font-size: $lumx-material-text-field-input-content-font-size;
|
|
63
|
+
$lumx-text-field-input-font-weight: $lumx-material-text-field-input-content-font-weight;
|
|
64
|
+
$lumx-text-field-input-line-height: $lumx-material-text-field-input-content-line-height;
|
|
65
|
+
$lumx-text-field-input-validity-size: $lumx-size-xxs;
|
|
66
|
+
$lumx-text-field-input-clear-size: $lumx-size-s;
|
|
67
|
+
$lumx-progress-bounce: $lumx-material-progress-bounce;
|
|
68
|
+
$lumx-progress-rotate: $lumx-material-progress-rotate;
|
|
69
|
+
$lumx-typography-style-display1-font-size: $lumx-typography-interface-display1-font-size;
|
|
70
|
+
$lumx-typography-style-display1-font-weight: $lumx-typography-interface-display1-font-weight;
|
|
71
|
+
$lumx-typography-style-display1-line-height: $lumx-typography-interface-display1-line-height;
|
|
72
|
+
$lumx-typography-style-headline-font-size: $lumx-typography-interface-headline-font-size;
|
|
73
|
+
$lumx-typography-style-headline-font-weight: $lumx-typography-interface-headline-font-weight;
|
|
74
|
+
$lumx-typography-style-headline-line-height: $lumx-typography-interface-headline-line-height;
|
|
75
|
+
$lumx-typography-style-title-font-size: $lumx-typography-interface-title-font-size;
|
|
76
|
+
$lumx-typography-style-title-font-weight: $lumx-typography-interface-title-font-weight;
|
|
77
|
+
$lumx-typography-style-title-line-height: $lumx-typography-interface-title-line-height;
|
|
78
|
+
$lumx-typography-style-subtitle2-font-size: $lumx-typography-interface-subtitle2-font-size;
|
|
79
|
+
$lumx-typography-style-subtitle2-font-weight: $lumx-typography-interface-subtitle2-font-weight;
|
|
80
|
+
$lumx-typography-style-subtitle2-line-height: $lumx-typography-interface-subtitle2-line-height;
|
|
81
|
+
$lumx-typography-style-subtitle1-font-size: $lumx-typography-interface-subtitle1-font-size;
|
|
82
|
+
$lumx-typography-style-subtitle1-font-weight: $lumx-typography-interface-subtitle1-font-weight;
|
|
83
|
+
$lumx-typography-style-subtitle1-line-height: $lumx-typography-interface-subtitle1-line-height;
|
|
84
|
+
$lumx-typography-style-body2-font-size: $lumx-typography-interface-body2-font-size;
|
|
85
|
+
$lumx-typography-style-body2-font-weight: $lumx-typography-interface-body2-font-weight;
|
|
86
|
+
$lumx-typography-style-body2-line-height: $lumx-typography-interface-body2-line-height;
|
|
87
|
+
$lumx-typography-style-body1-font-size: $lumx-typography-interface-body1-font-size;
|
|
88
|
+
$lumx-typography-style-body1-font-weight: $lumx-typography-interface-body1-font-weight;
|
|
89
|
+
$lumx-typography-style-body1-line-height: $lumx-typography-interface-body1-line-height;
|
|
90
|
+
$lumx-typography-style-caption-font-size: $lumx-typography-interface-caption-font-size;
|
|
91
|
+
$lumx-typography-style-caption-font-weight: $lumx-typography-interface-caption-font-weight;
|
|
92
|
+
$lumx-typography-style-caption-line-height: $lumx-typography-interface-caption-line-height;
|
|
93
|
+
$lumx-typography-style-overline-font-size: $lumx-typography-interface-overline-font-size;
|
|
94
|
+
$lumx-typography-style-overline-font-weight: $lumx-typography-interface-overline-font-weight;
|
|
95
|
+
$lumx-typography-style-overline-line-height: $lumx-typography-interface-overline-line-height;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
Avatar
|
|
5
|
+
========================================================================== */
|
|
6
|
+
|
|
7
|
+
.#{$lumx-base-prefix}-avatar {
|
|
8
|
+
position: relative;
|
|
9
|
+
background-repeat: no-repeat;
|
|
10
|
+
background-position: center;
|
|
11
|
+
background-size: cover;
|
|
12
|
+
outline: none;
|
|
13
|
+
|
|
14
|
+
&__thumbnail {
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__actions {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 50%;
|
|
22
|
+
right: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
transform: translateY(-50%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__badge {
|
|
28
|
+
position: absolute;
|
|
29
|
+
right: math.div(-$lumx-spacing-unit, 2);
|
|
30
|
+
bottom: math.div(-$lumx-spacing-unit, 2);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Avatar sizes
|
|
35
|
+
========================================================================== */
|
|
36
|
+
|
|
37
|
+
@each $key, $size in $lumx-sizes {
|
|
38
|
+
.#{$lumx-base-prefix}-avatar--size-#{$key} {
|
|
39
|
+
width: $size;
|
|
40
|
+
height: $size;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
Badge
|
|
5
|
+
========================================================================== */
|
|
6
|
+
|
|
7
|
+
.#{$lumx-base-prefix}-badge {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
width: map.get($lumx-sizes, lumx-base-const("size", "XS"));
|
|
12
|
+
height: map.get($lumx-sizes, lumx-base-const("size", "XS"));
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
border-radius: 50%;
|
|
15
|
+
|
|
16
|
+
span {
|
|
17
|
+
@include lumx-typography("overline");
|
|
18
|
+
|
|
19
|
+
line-height: map.get($lumx-sizes, lumx-base-const("size", "XS"));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
i {
|
|
23
|
+
width: 12px;
|
|
24
|
+
height: 12px;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
line-height: 12px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Badge colors
|
|
31
|
+
========================================================================== */
|
|
32
|
+
|
|
33
|
+
@each $key, $color in $lumx-color-palette {
|
|
34
|
+
.#{$lumx-base-prefix}-badge--color-#{$key} {
|
|
35
|
+
background-color: lumx-color-variant($key, "N");
|
|
36
|
+
|
|
37
|
+
@if $key == "light" {
|
|
38
|
+
@include lumx-elevation(2);
|
|
39
|
+
} @else {
|
|
40
|
+
@if $key == "yellow" {
|
|
41
|
+
color: lumx-color-variant("dark", "L1");
|
|
42
|
+
} @else {
|
|
43
|
+
color: lumx-color-variant("light", "N");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
Button
|
|
5
|
+
========================================================================== */
|
|
6
|
+
|
|
7
|
+
.#{$lumx-base-prefix}-button {
|
|
8
|
+
@include lumx-button-base;
|
|
9
|
+
|
|
10
|
+
.#{$lumx-base-prefix}-badge {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: math.div(-$lumx-spacing-unit, 2);
|
|
13
|
+
right: math.div(-$lumx-spacing-unit, 2);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Button sizes
|
|
18
|
+
========================================================================== */
|
|
19
|
+
|
|
20
|
+
@each $key, $size in $lumx-sizes {
|
|
21
|
+
@if $key == lumx-base-const("size", "S") or $key == lumx-base-const("size", "M") {
|
|
22
|
+
.#{$lumx-base-prefix}-button--size-#{$key} {
|
|
23
|
+
&.#{$lumx-base-prefix}-button--emphasis-high {
|
|
24
|
+
&.#{$lumx-base-prefix}-button--variant-button {
|
|
25
|
+
@include lumx-button-size(lumx-base-const("emphasis", "HIGH"), "button", $key);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.#{$lumx-base-prefix}-button--variant-icon {
|
|
29
|
+
@include lumx-button-size(lumx-base-const("emphasis", "HIGH"), "icon", $key);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.#{$lumx-base-prefix}-button--emphasis-medium {
|
|
34
|
+
&.#{$lumx-base-prefix}-button--variant-button {
|
|
35
|
+
@include lumx-button-size(lumx-base-const("emphasis", "MEDIUM"), "button", $key);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.#{$lumx-base-prefix}-button--variant-icon {
|
|
39
|
+
@include lumx-button-size(lumx-base-const("emphasis", "MEDIUM"), "icon", $key);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.#{$lumx-base-prefix}-button--emphasis-low {
|
|
44
|
+
&.#{$lumx-base-prefix}-button--variant-button {
|
|
45
|
+
@include lumx-button-size(lumx-base-const("emphasis", "LOW"), "button", $key);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.#{$lumx-base-prefix}-button--variant-icon {
|
|
49
|
+
@include lumx-button-size(lumx-base-const("emphasis", "LOW"), "icon", $key);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.#{$lumx-base-prefix}-button--variant-button {
|
|
54
|
+
i:first-child {
|
|
55
|
+
@include lumx-button-icon("button", $key, lumx-base-const("position", "LEFT"));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
i:last-child {
|
|
59
|
+
@include lumx-button-icon("button", $key, lumx-base-const("position", "RIGHT"));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.#{$lumx-base-prefix}-button--variant-icon {
|
|
64
|
+
& > i,
|
|
65
|
+
& > img {
|
|
66
|
+
@include lumx-button-icon("icon", $key);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& > span {
|
|
71
|
+
@include lumx-button-text($key);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Button colors
|
|
78
|
+
========================================================================== */
|
|
79
|
+
|
|
80
|
+
@each $key, $color in $lumx-color-palette {
|
|
81
|
+
@if $key != "dark" and $key != "light" {
|
|
82
|
+
.#{$lumx-base-prefix}-button--color-#{$key} {
|
|
83
|
+
&.#{$lumx-base-prefix}-button--emphasis-high.#{$lumx-base-prefix}-button--theme-light {
|
|
84
|
+
@include lumx-button-color(
|
|
85
|
+
lumx-base-const("emphasis", "HIGH"),
|
|
86
|
+
$key,
|
|
87
|
+
lumx-base-const("theme", "LIGHT")
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.#{$lumx-base-prefix}-button--emphasis-high.#{$lumx-base-prefix}-button--theme-dark {
|
|
92
|
+
@include lumx-button-color(lumx-base-const("emphasis", "HIGH"), $key, lumx-base-const("theme", "DARK"));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@each $key, $color in $lumx-color-palette {
|
|
99
|
+
.#{$lumx-base-prefix}-button--color-#{$key} {
|
|
100
|
+
&:not(.#{$lumx-base-prefix}-button--is-selected).#{$lumx-base-prefix}-button--emphasis-medium {
|
|
101
|
+
@include lumx-button-color(lumx-base-const("emphasis", "MEDIUM"), $key);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:not(.#{$lumx-base-prefix}-button--is-selected).#{$lumx-base-prefix}-button--emphasis-low {
|
|
105
|
+
@include lumx-button-color(lumx-base-const("emphasis", "LOW"), $key);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.#{$lumx-base-prefix}-button--is-selected {
|
|
109
|
+
@include lumx-button-color(lumx-base-const("emphasis", "SELECTED"), $key);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Button wrapper
|
|
115
|
+
========================================================================== */
|
|
116
|
+
|
|
117
|
+
.#{$lumx-base-prefix}-button-wrapper {
|
|
118
|
+
width: fit-content;
|
|
119
|
+
|
|
120
|
+
&--variant-button {
|
|
121
|
+
border-radius: var(--lumx-border-radius);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&--variant-icon {
|
|
125
|
+
border-radius: var(--lumx-material-button-variant-icon-border-radius, var(--lumx-button-border-radius));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&--color-light {
|
|
129
|
+
background-color: lumx-color-variant("light", "N");
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&--color-dark {
|
|
133
|
+
background-color: lumx-color-variant("dark", "N");
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Button group
|
|
138
|
+
========================================================================== */
|
|
139
|
+
|
|
140
|
+
.#{$lumx-base-prefix}-button-group {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
vertical-align: top;
|
|
143
|
+
|
|
144
|
+
.#{$lumx-base-prefix}-button {
|
|
145
|
+
margin-right: 1px;
|
|
146
|
+
border-radius: 0 !important;
|
|
147
|
+
|
|
148
|
+
&:first-child {
|
|
149
|
+
border-radius: var(--lumx-border-radius) 0 0 var(--lumx-border-radius) !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:last-child {
|
|
153
|
+
margin-right: 0;
|
|
154
|
+
border-radius: 0 var(--lumx-border-radius) var(--lumx-border-radius) 0 !important;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Button full width
|
|
160
|
+
========================================================================== */
|
|
161
|
+
|
|
162
|
+
.#{$lumx-base-prefix}-button--is-full-width:not(.#{$lumx-base-prefix}-button--variant-icon),
|
|
163
|
+
.#{$lumx-base-prefix}-button-wrapper--is-full-width:not(.#{$lumx-base-prefix}-button-wrapper--variant-icon) {
|
|
164
|
+
flex-grow: 1;
|
|
165
|
+
width: 100%;
|
|
166
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
|
|
4
|
+
@mixin lumx-button-base() {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: 0;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
user-select: none;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
border: none;
|
|
16
|
+
outline: none;
|
|
17
|
+
transition-duration: $lumx-state-transition-duration;
|
|
18
|
+
transition-property: padding, border-radius, background-color, color;
|
|
19
|
+
|
|
20
|
+
&:hover,
|
|
21
|
+
&[class*="--is-hovered"] {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::before {
|
|
26
|
+
transition-duration: $lumx-state-transition-duration;
|
|
27
|
+
transition-property: border-radius, border-width, border-color;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin lumx-button-size($emphasis, $variant, $size) {
|
|
32
|
+
@if $size == lumx-base-const("size", "M") {
|
|
33
|
+
height: var(--lumx-button-height);
|
|
34
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
35
|
+
height: calc(var(--lumx-button-height) / 1.5);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@if $variant == "button" {
|
|
39
|
+
border-radius: var(--lumx-button-border-radius);
|
|
40
|
+
} @else if $variant == "icon" {
|
|
41
|
+
@if $size == lumx-base-const("size", "M") {
|
|
42
|
+
width: var(--lumx-button-height);
|
|
43
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
44
|
+
width: calc(var(--lumx-button-height) / 1.5);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
border-radius: var(--lumx-material-button-variant-icon-border-radius, var(--lumx-button-border-radius));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::before {
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
right: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
left: 0;
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
content: "";
|
|
58
|
+
border-style: solid;
|
|
59
|
+
border-width: var(--lumx-button-#{$emphasis}-state-default-border-width);
|
|
60
|
+
|
|
61
|
+
@if $variant == "button" {
|
|
62
|
+
border-radius: var(--lumx-button-border-radius);
|
|
63
|
+
} @else if $variant == "icon" {
|
|
64
|
+
border-radius: var(--lumx-material-button-variant-icon-border-radius, var(--lumx-button-border-radius));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@if $variant == "button" {
|
|
69
|
+
@if $size == lumx-base-const("size", "M") {
|
|
70
|
+
padding: 0 var(--lumx-button-#{$emphasis}-state-default-padding-horizontal);
|
|
71
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
72
|
+
padding: 0 calc(var(--lumx-button-#{$emphasis}-state-default-padding-horizontal) / 1.5);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:hover,
|
|
77
|
+
&[class*="--is-hovered"] {
|
|
78
|
+
@if $variant == "button" {
|
|
79
|
+
@if $size == lumx-base-const("size", "M") {
|
|
80
|
+
padding: 0 var(--lumx-button-#{$emphasis}-state-hover-padding-horizontal);
|
|
81
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
82
|
+
padding: 0 calc(var(--lumx-button-#{$emphasis}-state-hover-padding-horizontal) / 1.5);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&::before {
|
|
87
|
+
border-width: var(--lumx-button-#{$emphasis}-state-hover-border-width);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:active,
|
|
92
|
+
&[class*="--is-active"] {
|
|
93
|
+
@if $variant == "button" {
|
|
94
|
+
@if $size == lumx-base-const("size", "M") {
|
|
95
|
+
padding: 0 var(--lumx-button-#{$emphasis}-state-active-padding-horizontal);
|
|
96
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
97
|
+
padding: 0 calc(var(--lumx-button-#{$emphasis}-state-active-padding-horizontal) / 1.5);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&::before {
|
|
102
|
+
border-width: var(--lumx-button-#{$emphasis}-state-active-border-width);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@mixin lumx-button-color($emphasis, $color, $theme: null) {
|
|
108
|
+
@if $color == "primary" and $emphasis == lumx-base-const("emphasis", "HIGH") {
|
|
109
|
+
color: var(--lumx-button-#{$emphasis}-state-default-#{$theme}-color);
|
|
110
|
+
background-color: var(--lumx-button-#{$emphasis}-state-default-#{$theme}-background-color);
|
|
111
|
+
} @else if $color == "dark" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
112
|
+
color: var(--lumx-button-#{$emphasis}-state-default-theme-light-color);
|
|
113
|
+
background-color: var(--lumx-button-#{$emphasis}-state-default-theme-light-background-color);
|
|
114
|
+
} @else if $color == "light" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
115
|
+
color: var(--lumx-button-#{$emphasis}-state-default-theme-dark-color);
|
|
116
|
+
background-color: var(--lumx-button-#{$emphasis}-state-default-theme-dark-background-color);
|
|
117
|
+
} @else {
|
|
118
|
+
@include lumx-state(lumx-base-const("state", "DEFAULT"), $emphasis, $color, $theme);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&::before {
|
|
122
|
+
@if $color == "primary" and $emphasis == lumx-base-const("emphasis", "HIGH") {
|
|
123
|
+
border-color: var(--lumx-button-#{$emphasis}-state-default-#{$theme}-border-color);
|
|
124
|
+
} @else if $color == "dark" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
125
|
+
border-color: var(--lumx-button-#{$emphasis}-state-default-theme-light-border-color);
|
|
126
|
+
} @else if $color == "light" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
127
|
+
border-color: var(--lumx-button-#{$emphasis}-state-default-theme-dark-border-color);
|
|
128
|
+
} @else {
|
|
129
|
+
border-color: transparent;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:hover,
|
|
134
|
+
&[class*="--is-hovered"] {
|
|
135
|
+
@if $color == "primary" and $emphasis == lumx-base-const("emphasis", "HIGH") {
|
|
136
|
+
color: var(--lumx-button-#{$emphasis}-state-hover-#{$theme}-color);
|
|
137
|
+
background-color: var(--lumx-button-#{$emphasis}-state-hover-#{$theme}-background-color);
|
|
138
|
+
} @else if $color == "dark" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
139
|
+
color: var(--lumx-button-#{$emphasis}-state-hover-theme-light-color);
|
|
140
|
+
background-color: var(--lumx-button-#{$emphasis}-state-hover-theme-light-background-color);
|
|
141
|
+
} @else if $color == "light" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
142
|
+
color: var(--lumx-button-#{$emphasis}-state-hover-theme-dark-color);
|
|
143
|
+
background-color: var(--lumx-button-#{$emphasis}-state-hover-theme-dark-background-color);
|
|
144
|
+
} @else {
|
|
145
|
+
@include lumx-state(lumx-base-const("state", "HOVER"), $emphasis, $color, $theme);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&::before {
|
|
149
|
+
@if $color == "primary" and $emphasis == lumx-base-const("emphasis", "HIGH") {
|
|
150
|
+
border-color: var(--lumx-button-#{$emphasis}-state-hover-#{$theme}-border-color);
|
|
151
|
+
} @else if $color == "dark" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
152
|
+
border-color: var(--lumx-button-#{$emphasis}-state-hover-theme-light-border-color);
|
|
153
|
+
} @else if $color == "light" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
154
|
+
border-color: var(--lumx-button-#{$emphasis}-state-hover-theme-dark-border-color);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:active,
|
|
160
|
+
&[class*="--is-active"] {
|
|
161
|
+
@if $color == "primary" and $emphasis == lumx-base-const("emphasis", "HIGH") {
|
|
162
|
+
color: var(--lumx-button-#{$emphasis}-state-active-#{$theme}-color);
|
|
163
|
+
background-color: var(--lumx-button-#{$emphasis}-state-active-#{$theme}-background-color);
|
|
164
|
+
} @else if $color == "dark" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
165
|
+
color: var(--lumx-button-#{$emphasis}-state-active-theme-light-color);
|
|
166
|
+
background-color: var(--lumx-button-#{$emphasis}-state-active-theme-light-background-color);
|
|
167
|
+
} @else if $color == "light" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
168
|
+
color: var(--lumx-button-#{$emphasis}-state-active-theme-dark-color);
|
|
169
|
+
background-color: var(--lumx-button-#{$emphasis}-state-active-theme-dark-background-color);
|
|
170
|
+
} @else {
|
|
171
|
+
@include lumx-state(lumx-base-const("state", "ACTIVE"), $emphasis, $color, $theme);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&::before {
|
|
175
|
+
@if $color == "primary" and $emphasis == lumx-base-const("emphasis", "HIGH") {
|
|
176
|
+
border-color: var(--lumx-button-#{$emphasis}-state-active-#{$theme}-border-color);
|
|
177
|
+
} @else if $color == "dark" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
178
|
+
border-color: var(--lumx-button-#{$emphasis}-state-active-theme-light-border-color);
|
|
179
|
+
} @else if $color == "light" and $emphasis != lumx-base-const("emphasis", "HIGH") {
|
|
180
|
+
border-color: var(--lumx-button-#{$emphasis}-state-active-theme-dark-border-color);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&[data-focus-visible-added],
|
|
186
|
+
&[class*="--is-focused"] {
|
|
187
|
+
@include lumx-state(lumx-base-const("state", "FOCUS"), $emphasis, $color, $theme);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:disabled,
|
|
191
|
+
&[aria-disabled="true"] {
|
|
192
|
+
@include lumx-state-disabled-input;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@mixin lumx-button-is-selected($theme) {
|
|
197
|
+
@include lumx-state-as-selected(lumx-base-const("state", "DEFAULT"), $theme);
|
|
198
|
+
|
|
199
|
+
&:hover,
|
|
200
|
+
&[class*="--is-hovered"] {
|
|
201
|
+
@include lumx-state-as-selected(lumx-base-const("state", "HOVER"), $theme);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&:active,
|
|
205
|
+
&[class*="--is-active"] {
|
|
206
|
+
@include lumx-state-as-selected(lumx-base-const("state", "ACTIVE"), $theme);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&[data-focus-visible-added],
|
|
210
|
+
&[class*="--is-focused"] {
|
|
211
|
+
@include lumx-state-as-selected(lumx-base-const("state", "FOCUS"), $theme);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@mixin lumx-button($emphasis, $variant, $size, $color, $theme: null, $icon-position: null) {
|
|
216
|
+
@include lumx-state-transition;
|
|
217
|
+
@include lumx-button-base;
|
|
218
|
+
@include lumx-button-size($emphasis, $variant, $size);
|
|
219
|
+
|
|
220
|
+
@if $icon-position {
|
|
221
|
+
@include lumx-button-reduced-spacing($size, $icon-position);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@include lumx-button-color($emphasis, $color, $theme);
|
|
225
|
+
|
|
226
|
+
& > i {
|
|
227
|
+
@include lumx-button-icon($variant, $size, $icon-position);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
& > span {
|
|
231
|
+
@include lumx-button-text($size);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@mixin lumx-button-icon($variant, $size, $position: null) {
|
|
236
|
+
width: map.get($lumx-button-icon-sizes, $size);
|
|
237
|
+
height: map.get($lumx-button-icon-sizes, $size);
|
|
238
|
+
font-size: map.get($lumx-button-icon-sizes, $size);
|
|
239
|
+
line-height: map.get($lumx-button-icon-sizes, $size);
|
|
240
|
+
pointer-events: none;
|
|
241
|
+
|
|
242
|
+
@if $variant == "button" {
|
|
243
|
+
@if $position == lumx-base-const("position", "LEFT") {
|
|
244
|
+
@if $size == lumx-base-const("size", "M") {
|
|
245
|
+
margin-right: $lumx-spacing-unit;
|
|
246
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
247
|
+
margin-right: math.div($lumx-spacing-unit, 2);
|
|
248
|
+
}
|
|
249
|
+
} @else if $position == lumx-base-const("position", "RIGHT") {
|
|
250
|
+
@if $size == lumx-base-const("size", "M") {
|
|
251
|
+
margin-left: $lumx-spacing-unit;
|
|
252
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
253
|
+
margin-left: math.div($lumx-spacing-unit, 2);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@mixin lumx-button-text($size) {
|
|
260
|
+
font-family: var(--lumx-typography-custom-button-size-#{$size}-font-family);
|
|
261
|
+
font-size: var(--lumx-typography-custom-button-size-#{$size}-font-size);
|
|
262
|
+
font-weight: var(--lumx-typography-custom-button-size-#{$size}-font-weight);
|
|
263
|
+
text-transform: var(--lumx-material-button-text-transform);
|
|
264
|
+
pointer-events: none;
|
|
265
|
+
|
|
266
|
+
@if $size == lumx-base-const("size", "M") {
|
|
267
|
+
line-height: var(--lumx-button-height);
|
|
268
|
+
} @else if $size == lumx-base-const("size", "S") {
|
|
269
|
+
line-height: calc(var(--lumx-button-height) / 1.5);
|
|
270
|
+
}
|
|
271
|
+
}
|