@cloudscape-design/components-themeable 3.0.1395 → 3.0.1397
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/alert/styles.scss +14 -25
- package/lib/internal/scss/badge/styles.scss +39 -42
- package/lib/internal/scss/button/constants.scss +8 -8
- package/lib/internal/scss/button/styles.scss +55 -80
- package/lib/internal/scss/checkbox/styles.scss +2 -6
- package/lib/internal/scss/code-editor/ace-editor.scss +2 -2
- package/lib/internal/scss/container/styles.scss +1 -1
- package/lib/internal/scss/copy-to-clipboard/motion.scss +31 -0
- package/lib/internal/scss/copy-to-clipboard/styles.scss +41 -0
- package/lib/internal/scss/dropdown/styles.scss +16 -11
- package/lib/internal/scss/expandable-section/styles.scss +11 -0
- package/lib/internal/scss/icon/hover-motion.scss +17 -12
- package/lib/internal/scss/input/styles.scss +71 -12
- package/lib/internal/scss/internal/components/abstract-switch/styles.scss +3 -9
- package/lib/internal/scss/internal/components/autosuggest-input/styles.scss +3 -0
- package/lib/internal/scss/internal/components/button-trigger/styles.scss +13 -1
- package/lib/internal/scss/internal/components/checkbox-icon/styles.scss +7 -7
- package/lib/internal/scss/internal/components/control-group/styles.scss +45 -0
- package/lib/internal/scss/internal/components/expand-toggle-button/styles.scss +1 -1
- package/lib/internal/scss/internal/components/option/styles.scss +23 -0
- package/lib/internal/scss/internal/components/radio-button/styles.scss +9 -9
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/internal/styles/forms/grouped-control.scss +129 -1
- package/lib/internal/scss/internal/styles/forms/mixins.scss +30 -27
- package/lib/internal/scss/internal/styles/links.scss +10 -24
- package/lib/internal/scss/internal/styles/style-api.scss +5 -5
- package/lib/internal/scss/link/styles.scss +13 -16
- package/lib/internal/scss/radio-button/styles.scss +1 -1
- package/lib/internal/scss/segmented-control/segment.scss +5 -4
- package/lib/internal/scss/segmented-control/styles.scss +12 -0
- package/lib/internal/scss/side-navigation/styles.scss +9 -0
- package/lib/internal/scss/table/cell-base/_cell-box.scss +4 -3
- package/lib/internal/scss/table/styles.scss +3 -0
- package/lib/internal/scss/toggle/styles.scss +10 -14
- package/lib/internal/scss/token/constants.scss +2 -0
- package/lib/internal/scss/token/styles.scss +4 -2
- package/lib/internal/template/action-card/internal.d.ts.map +1 -1
- package/lib/internal/template/action-card/internal.js +1 -4
- package/lib/internal/template/action-card/internal.js.map +1 -1
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +67 -116
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js +6 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js.map +1 -1
- package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/internal.js +1 -1
- package/lib/internal/template/autosuggest/internal.js.map +1 -1
- package/lib/internal/template/autosuggest/options-list.js +1 -1
- package/lib/internal/template/autosuggest/options-list.js.map +1 -1
- package/lib/internal/template/badge/styles.css.js +10 -10
- package/lib/internal/template/badge/styles.scoped.css +55 -83
- package/lib/internal/template/badge/styles.selectors.js +10 -10
- package/lib/internal/template/button/styles.css.js +24 -24
- package/lib/internal/template/button/styles.scoped.css +367 -395
- package/lib/internal/template/button/styles.selectors.js +24 -24
- package/lib/internal/template/button-dropdown/filter.d.ts +1 -1
- package/lib/internal/template/button-dropdown/filter.d.ts.map +1 -1
- package/lib/internal/template/checkbox/internal.d.ts +0 -2
- package/lib/internal/template/checkbox/internal.d.ts.map +1 -1
- package/lib/internal/template/checkbox/internal.js +1 -1
- package/lib/internal/template/checkbox/internal.js.map +1 -1
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +16 -28
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/code-editor/styles.css.js +33 -33
- package/lib/internal/template/code-editor/styles.scoped.css +188 -188
- package/lib/internal/template/code-editor/styles.selectors.js +33 -33
- package/lib/internal/template/container/styles.css.js +34 -34
- package/lib/internal/template/container/styles.scoped.css +59 -59
- package/lib/internal/template/container/styles.selectors.js +34 -34
- package/lib/internal/template/copy-to-clipboard/internal.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js +50 -16
- package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
- package/lib/internal/template/copy-to-clipboard/styles.css.js +10 -5
- package/lib/internal/template/copy-to-clipboard/styles.scoped.css +38 -6
- package/lib/internal/template/copy-to-clipboard/styles.selectors.js +10 -5
- package/lib/internal/template/dropdown/styles.css.js +20 -20
- package/lib/internal/template/dropdown/styles.scoped.css +55 -63
- package/lib/internal/template/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts +2 -1
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +11 -9
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/internal.d.ts +7 -1
- package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/internal.js +2 -2
- package/lib/internal/template/expandable-section/internal.js.map +1 -1
- package/lib/internal/template/expandable-section/styles.css.js +46 -44
- package/lib/internal/template/expandable-section/styles.scoped.css +98 -89
- package/lib/internal/template/expandable-section/styles.selectors.js +46 -44
- package/lib/internal/template/input/index.d.ts.map +1 -1
- package/lib/internal/template/input/index.js +2 -1
- package/lib/internal/template/input/index.js.map +1 -1
- package/lib/internal/template/input/internal.d.ts +8 -1
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +7 -7
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +44 -37
- package/lib/internal/template/input/styles.scoped.css +205 -88
- package/lib/internal/template/input/styles.selectors.js +44 -37
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/base-theme/styles.scoped.css +18 -0
- package/lib/internal/template/internal/components/abstract-switch/index.d.ts +1 -3
- package/lib/internal/template/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/abstract-switch/index.js +3 -3
- package/lib/internal/template/internal/components/abstract-switch/index.js.map +1 -1
- package/lib/internal/template/internal/components/abstract-switch/styles.css.js +13 -13
- package/lib/internal/template/internal/components/abstract-switch/styles.scoped.css +23 -23
- package/lib/internal/template/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/lib/internal/template/internal/components/autosuggest-input/index.js +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/styles.css.js +33 -27
- package/lib/internal/template/internal/components/autosuggest-input/styles.scoped.css +131 -36
- package/lib/internal/template/internal/components/autosuggest-input/styles.selectors.js +33 -27
- package/lib/internal/template/internal/components/button-trigger/index.js +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/styles.css.js +29 -23
- package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +145 -44
- package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +29 -23
- package/lib/internal/template/internal/components/checkbox-icon/styles.css.js +9 -9
- package/lib/internal/template/internal/components/checkbox-icon/styles.scoped.css +15 -15
- package/lib/internal/template/internal/components/checkbox-icon/styles.selectors.js +9 -9
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts +3 -3
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts.map +1 -1
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js +8 -6
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js.map +1 -1
- package/lib/internal/template/internal/components/control-group/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/control-group/index.js +28 -4
- package/lib/internal/template/internal/components/control-group/index.js.map +1 -1
- package/lib/internal/template/internal/components/control-group/styles.css.js +27 -20
- package/lib/internal/template/internal/components/control-group/styles.scoped.css +51 -20
- package/lib/internal/template/internal/components/control-group/styles.selectors.js +27 -20
- package/lib/internal/template/internal/components/expand-toggle-button/styles.css.js +4 -4
- package/lib/internal/template/internal/components/expand-toggle-button/styles.scoped.css +18 -18
- package/lib/internal/template/internal/components/expand-toggle-button/styles.selectors.js +4 -4
- package/lib/internal/template/internal/components/listbox/parts/common.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/common.js.map +1 -0
- package/lib/internal/template/{select/utils → internal/components/listbox/parts}/get-item-props.d.ts +1 -1
- package/lib/internal/template/internal/components/listbox/parts/get-item-props.d.ts.map +1 -0
- package/lib/internal/template/{select/utils → internal/components/listbox/parts}/get-item-props.js +1 -1
- package/lib/internal/template/internal/components/listbox/parts/get-item-props.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/option-group.d.ts.map +1 -0
- package/lib/internal/template/{select → internal/components/listbox}/parts/option-group.js +1 -1
- package/lib/internal/template/internal/components/listbox/parts/option-group.js.map +1 -0
- package/lib/internal/template/{select/utils → internal/components/listbox/parts}/render-options.d.ts +5 -5
- package/lib/internal/template/internal/components/listbox/parts/render-options.d.ts.map +1 -0
- package/lib/internal/template/{select/utils → internal/components/listbox/parts}/render-options.js +4 -4
- package/lib/internal/template/internal/components/listbox/parts/render-options.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/scroll-to-index.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/scroll-to-index.js.map +1 -0
- package/lib/internal/template/{select/utils → internal/components/listbox}/use-announcement.d.ts +2 -2
- package/lib/internal/template/internal/components/listbox/use-announcement.d.ts.map +1 -0
- package/lib/internal/template/{select/utils → internal/components/listbox}/use-announcement.js +1 -1
- package/lib/internal/template/internal/components/listbox/use-announcement.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/utils/check-option-value-field.d.ts.map +1 -0
- package/lib/internal/template/{select → internal/components/listbox}/utils/check-option-value-field.js +1 -1
- package/lib/internal/template/internal/components/listbox/utils/check-option-value-field.js.map +1 -0
- package/lib/internal/template/{select → internal/components/listbox}/utils/connect-options.d.ts +2 -2
- package/lib/internal/template/internal/components/listbox/utils/connect-options.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/utils/connect-options.js.map +1 -0
- package/lib/internal/template/internal/components/option/index.d.ts +1 -1
- package/lib/internal/template/internal/components/option/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/index.js +4 -4
- package/lib/internal/template/internal/components/option/index.js.map +1 -1
- package/lib/internal/template/internal/components/option/interfaces.d.ts +2 -0
- package/lib/internal/template/internal/components/option/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/option/option-parts.d.ts +2 -1
- package/lib/internal/template/internal/components/option/option-parts.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/option-parts.js +1 -1
- package/lib/internal/template/internal/components/option/option-parts.js.map +1 -1
- package/lib/internal/template/internal/components/option/styles.css.js +18 -17
- package/lib/internal/template/internal/components/option/styles.scoped.css +52 -29
- package/lib/internal/template/internal/components/option/styles.selectors.js +18 -17
- package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
- package/lib/internal/template/internal/components/radio-button/styles.scoped.css +27 -29
- package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
- package/lib/internal/template/internal/context/control-group-context.d.ts +7 -0
- package/lib/internal/template/internal/context/control-group-context.d.ts.map +1 -1
- package/lib/internal/template/internal/context/control-group-context.js +4 -1
- package/lib/internal/template/internal/context/control-group-context.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +5 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +5 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +75 -0
- package/lib/internal/template/internal/generated/theming/index.js +75 -0
- package/lib/internal/template/link/styles.css.js +21 -21
- package/lib/internal/template/link/styles.scoped.css +133 -145
- package/lib/internal/template/link/styles.selectors.js +21 -21
- package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
- package/lib/internal/template/multiselect/use-multiselect.js +3 -3
- package/lib/internal/template/multiselect/use-multiselect.js.map +1 -1
- package/lib/internal/template/prompt-input/components/menu-dropdown.js +1 -1
- package/lib/internal/template/prompt-input/components/menu-dropdown.js.map +1 -1
- package/lib/internal/template/prompt-input/styles.css.js +26 -26
- package/lib/internal/template/prompt-input/styles.scoped.css +55 -55
- package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
- package/lib/internal/template/property-filter/filtering-token/index.js +3 -2
- package/lib/internal/template/property-filter/filtering-token/index.js.map +1 -1
- package/lib/internal/template/radio-button/styles.css.js +1 -1
- package/lib/internal/template/radio-button/styles.scoped.css +5 -13
- package/lib/internal/template/radio-button/styles.selectors.js +1 -1
- package/lib/internal/template/segmented-control/internal-segmented-control.js +2 -2
- package/lib/internal/template/segmented-control/internal-segmented-control.js.map +1 -1
- package/lib/internal/template/segmented-control/internal.js +1 -1
- package/lib/internal/template/segmented-control/internal.js.map +1 -1
- package/lib/internal/template/segmented-control/styles.css.js +31 -27
- package/lib/internal/template/segmented-control/styles.scoped.css +136 -49
- package/lib/internal/template/segmented-control/styles.selectors.js +31 -27
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js +2 -2
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/parts/filter.d.ts +1 -1
- package/lib/internal/template/select/parts/filter.d.ts.map +1 -1
- package/lib/internal/template/select/parts/plain-list.d.ts.map +1 -1
- package/lib/internal/template/select/parts/plain-list.js +3 -3
- package/lib/internal/template/select/parts/plain-list.js.map +1 -1
- package/lib/internal/template/select/parts/virtual-list.js +3 -3
- package/lib/internal/template/select/parts/virtual-list.js.map +1 -1
- package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-select.js +1 -1
- package/lib/internal/template/select/utils/use-select.js.map +1 -1
- package/lib/internal/template/side-navigation/interfaces.d.ts +6 -0
- package/lib/internal/template/side-navigation/interfaces.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/interfaces.js.map +1 -1
- package/lib/internal/template/side-navigation/parts.js +14 -4
- package/lib/internal/template/side-navigation/parts.js.map +1 -1
- package/lib/internal/template/side-navigation/styles.css.js +65 -64
- package/lib/internal/template/side-navigation/styles.scoped.css +119 -111
- package/lib/internal/template/side-navigation/styles.selectors.js +65 -64
- package/lib/internal/template/styling/alert.scss +68 -0
- package/lib/internal/template/styling/badge.scss +55 -0
- package/lib/internal/template/styling/button.scss +59 -0
- package/lib/internal/template/styling/checkbox.scss +23 -0
- package/lib/internal/template/styling/dropdown.scss +31 -0
- package/lib/internal/template/styling/input.scss +106 -0
- package/lib/internal/template/styling/link.scss +29 -0
- package/lib/internal/template/styling/radio-button.scss +23 -0
- package/lib/internal/template/styling/toggle.scss +21 -0
- package/lib/internal/template/table/body-cell/styles.css.js +47 -47
- package/lib/internal/template/table/body-cell/styles.scoped.css +568 -568
- package/lib/internal/template/table/body-cell/styles.selectors.js +47 -47
- package/lib/internal/template/table/header-cell/styles.css.js +39 -39
- package/lib/internal/template/table/header-cell/styles.scoped.css +82 -82
- package/lib/internal/template/table/header-cell/styles.selectors.js +39 -39
- package/lib/internal/template/table/styles.css.js +37 -37
- package/lib/internal/template/table/styles.scoped.css +46 -45
- package/lib/internal/template/table/styles.selectors.js +37 -37
- package/lib/internal/template/textarea/styles.css.js +9 -9
- package/lib/internal/template/textarea/styles.scoped.css +19 -19
- package/lib/internal/template/textarea/styles.selectors.js +9 -9
- package/lib/internal/template/toggle/internal.d.ts +0 -2
- package/lib/internal/template/toggle/internal.d.ts.map +1 -1
- package/lib/internal/template/toggle/internal.js +1 -1
- package/lib/internal/template/toggle/internal.js.map +1 -1
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +38 -50
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/lib/internal/template/token/index.d.ts +1 -1
- package/lib/internal/template/token/index.d.ts.map +1 -1
- package/lib/internal/template/token/index.js +6 -3
- package/lib/internal/template/token/index.js.map +1 -1
- package/lib/internal/template/token/interfaces.d.ts +9 -6
- package/lib/internal/template/token/interfaces.d.ts.map +1 -1
- package/lib/internal/template/token/interfaces.js.map +1 -1
- package/lib/internal/template/token/internal.d.ts.map +1 -1
- package/lib/internal/template/token/internal.js +22 -17
- package/lib/internal/template/token/internal.js.map +1 -1
- package/lib/internal/template/token/styles.css.js +14 -14
- package/lib/internal/template/token/styles.scoped.css +28 -27
- package/lib/internal/template/token/styles.selectors.js +14 -14
- package/package.json +1 -1
- package/lib/internal/template/select/parts/common.d.ts.map +0 -1
- package/lib/internal/template/select/parts/common.js.map +0 -1
- package/lib/internal/template/select/parts/option-group.d.ts.map +0 -1
- package/lib/internal/template/select/parts/option-group.js.map +0 -1
- package/lib/internal/template/select/utils/check-option-value-field.d.ts.map +0 -1
- package/lib/internal/template/select/utils/check-option-value-field.js.map +0 -1
- package/lib/internal/template/select/utils/connect-options.d.ts.map +0 -1
- package/lib/internal/template/select/utils/connect-options.js.map +0 -1
- package/lib/internal/template/select/utils/get-item-props.d.ts.map +0 -1
- package/lib/internal/template/select/utils/get-item-props.js.map +0 -1
- package/lib/internal/template/select/utils/render-options.d.ts.map +0 -1
- package/lib/internal/template/select/utils/render-options.js.map +0 -1
- package/lib/internal/template/select/utils/scroll-to-index.d.ts.map +0 -1
- package/lib/internal/template/select/utils/scroll-to-index.js.map +0 -1
- package/lib/internal/template/select/utils/use-announcement.d.ts.map +0 -1
- package/lib/internal/template/select/utils/use-announcement.js.map +0 -1
- /package/lib/internal/template/{select → internal/components/listbox}/parts/common.d.ts +0 -0
- /package/lib/internal/template/{select → internal/components/listbox}/parts/common.js +0 -0
- /package/lib/internal/template/{select → internal/components/listbox}/parts/option-group.d.ts +0 -0
- /package/lib/internal/template/{select/utils → internal/components/listbox/parts}/scroll-to-index.d.ts +0 -0
- /package/lib/internal/template/{select/utils → internal/components/listbox/parts}/scroll-to-index.js +0 -0
- /package/lib/internal/template/{select → internal/components/listbox}/utils/check-option-value-field.d.ts +0 -0
- /package/lib/internal/template/{select → internal/components/listbox}/utils/connect-options.js +0 -0
|
@@ -31,6 +31,14 @@ $_opted-in: 'svg[#{$_animated-attribute}]';
|
|
|
31
31
|
// Opt-in attribute for which element triggers hover motion.
|
|
32
32
|
$_trigger-attribute: 'data-awsui-motion-trigger';
|
|
33
33
|
$_hover-trigger: '[#{$_trigger-attribute}~="hover"]#{$_enabled-only}';
|
|
34
|
+
// A focus owner that plays the motion of icons inside it.
|
|
35
|
+
$_focus-trigger: '[#{$_trigger-attribute}~="focus"]#{$_enabled-only}';
|
|
36
|
+
// A trigger whose focus owner is nested and does not contain the icon (e.g. action card).
|
|
37
|
+
// Matches `:focus-within` during keyboard interaction (the `useFocusVisible` body attribute that
|
|
38
|
+
// focus rings use) instead of `:has(:focus-visible)`: a non-subject `:has()` is costly on every
|
|
39
|
+
// style recalc and DOM insert. `:where(body... *)` keeps it independent of where the theme class is.
|
|
40
|
+
$_delegated-focus-trigger: '[#{$_trigger-attribute}~="delegated-focus"]#{$_enabled-only}';
|
|
41
|
+
$_keyboard-focus-within: ':focus-within:where(body[data-awsui-focus-visible="true"] *)';
|
|
34
42
|
|
|
35
43
|
// Opt-in attribute for where the motion should be applied within a trigger region.
|
|
36
44
|
$_target-attribute: 'data-awsui-motion-target';
|
|
@@ -1569,10 +1577,13 @@ $icon-hover-motion: (
|
|
|
1569
1577
|
}
|
|
1570
1578
|
}
|
|
1571
1579
|
|
|
1572
|
-
// Also fires on :focus-visible,
|
|
1580
|
+
// Also fires on :focus-visible of the trigger, of a focus owner around the icon, or of a
|
|
1581
|
+
// focus owner nested inside a delegated-focus trigger.
|
|
1573
1582
|
@mixin _on-hover-trigger($suffix) {
|
|
1574
1583
|
#{'#{$_hover-trigger}:hover #{$suffix}'},
|
|
1575
|
-
#{'#{$_hover-trigger}:
|
|
1584
|
+
#{'#{$_hover-trigger}:focus-visible #{$suffix}'},
|
|
1585
|
+
#{'#{$_focus-trigger}:focus-visible #{$suffix}'},
|
|
1586
|
+
#{'#{$_delegated-focus-trigger}#{$_keyboard-focus-within} #{$suffix}'} {
|
|
1576
1587
|
@content;
|
|
1577
1588
|
}
|
|
1578
1589
|
}
|
|
@@ -1609,9 +1620,10 @@ $icon-hover-motion: (
|
|
|
1609
1620
|
}
|
|
1610
1621
|
|
|
1611
1622
|
// Icons with BOTH a whole-icon spec and a part spec are excluded — the cancel would out-specify the whole-icon rule and reset it to none.
|
|
1623
|
+
// No `:has()` check for the parts is needed: an opted-in svg that is a direct child of `.icon.name-*`
|
|
1624
|
+
// is always the generated icon of that name (overrides are wrapped in a `.custom-icon` span).
|
|
1612
1625
|
@mixin _cancel-floor-under-hover-parts {
|
|
1613
1626
|
$names: ();
|
|
1614
|
-
$parts: ();
|
|
1615
1627
|
|
|
1616
1628
|
@each $name, $specs in $icon-hover-motion {
|
|
1617
1629
|
$whole-icon: false;
|
|
@@ -1623,17 +1635,11 @@ $icon-hover-motion: (
|
|
|
1623
1635
|
|
|
1624
1636
|
@if not $whole-icon {
|
|
1625
1637
|
$names: list.append($names, '.name-#{$name}', comma);
|
|
1626
|
-
@each $spec in _specs($specs) {
|
|
1627
|
-
$part: '.#{map.get($spec, part)}';
|
|
1628
|
-
@if not list.index($parts, $part) {
|
|
1629
|
-
$parts: list.append($parts, $part, comma);
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
1638
|
}
|
|
1633
1639
|
}
|
|
1634
1640
|
|
|
1635
1641
|
@if list.length($names) > 0 {
|
|
1636
|
-
@include _on-hover-trigger('.icon#{$_animating-icon}:is(#{$names}) > :global(#{$_opted-in}
|
|
1642
|
+
@include _on-hover-trigger('.icon#{$_animating-icon}:is(#{$names}) > :global(#{$_opted-in})') {
|
|
1637
1643
|
@include with-motion {
|
|
1638
1644
|
transform: none;
|
|
1639
1645
|
}
|
|
@@ -2202,8 +2208,7 @@ $_spec-keys: (part, animation, to, base, origin, duration, easing, delay, iterat
|
|
|
2202
2208
|
// Safari mishandles negative dash offsets. This check validates no negative offsets exist.
|
|
2203
2209
|
// Instead of negative offsets, shift the offset up by one period to keep it positive.
|
|
2204
2210
|
@each $state in (base, to) {
|
|
2205
|
-
$
|
|
2206
|
-
$offset: map.get($values, stroke-dashoffset);
|
|
2211
|
+
$offset: map.get($spec, $state, stroke-dashoffset);
|
|
2207
2212
|
@if meta.type-of($offset) == 'number' and $offset < 0 {
|
|
2208
2213
|
@error 'The $icon-hover-motion spec for `#{$name}` sets a negative `stroke-dashoffset`, ' +
|
|
2209
2214
|
'which Safari mishandles. Add one full dash period (the sum of the `stroke-dasharray` ' +
|
|
@@ -8,6 +8,40 @@
|
|
|
8
8
|
@use '../internal/styles/foundation' as foundation;
|
|
9
9
|
@use '../internal/styles/forms/mixins' as forms;
|
|
10
10
|
@use '../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
11
|
+
@use '../internal/styles/style-api' as style-api;
|
|
12
|
+
|
|
13
|
+
@include style-api.docs(
|
|
14
|
+
'root',
|
|
15
|
+
$properties: (background, border, border-radius, box-shadow),
|
|
16
|
+
$descriptions: (
|
|
17
|
+
properties: (
|
|
18
|
+
box-shadow: 'Also draws the focus ring under `:focus-within`.',
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// The placeholder tokens are read by the ::placeholder pseudo-element of the native input, which does not
|
|
24
|
+
// inherit the non-inheriting public tokens: they are re-anchored as carriers on the input itself.
|
|
25
|
+
$input-tokens: style-api.resolve(
|
|
26
|
+
(placeholder-color, placeholder-font-size, placeholder-font-style, placeholder-font-weight),
|
|
27
|
+
carrier
|
|
28
|
+
);
|
|
29
|
+
@include style-api.register($input-tokens);
|
|
30
|
+
@include style-api.docs(
|
|
31
|
+
'input',
|
|
32
|
+
$input-tokens,
|
|
33
|
+
$properties: (color, padding, font-family, font-size, font-weight),
|
|
34
|
+
$descriptions: (
|
|
35
|
+
properties: (
|
|
36
|
+
padding:
|
|
37
|
+
'Replaces the inline padding reserved for the search icon and the clear button; include that room when styling search inputs.',
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
@include style-api.docs('inlineLabel', $properties: (color, background, font-family, font-size, font-weight));
|
|
43
|
+
@include style-api.docs('searchIcon', $properties: (color));
|
|
44
|
+
@include style-api.docs-forward('clearButton', 'button', 'root');
|
|
11
45
|
|
|
12
46
|
@mixin placeholder {
|
|
13
47
|
&::-webkit-input-placeholder {
|
|
@@ -21,11 +55,6 @@
|
|
|
21
55
|
@content;
|
|
22
56
|
opacity: 1;
|
|
23
57
|
}
|
|
24
|
-
|
|
25
|
-
&:-moz-placeholder {
|
|
26
|
-
@content;
|
|
27
|
-
opacity: 1;
|
|
28
|
-
}
|
|
29
58
|
}
|
|
30
59
|
|
|
31
60
|
.root {
|
|
@@ -35,6 +64,7 @@
|
|
|
35
64
|
// The native input only renders text: the border, background, box-shadow and all state styles
|
|
36
65
|
// live on the surrounding .input-field box.
|
|
37
66
|
.input {
|
|
67
|
+
@include style-api.carriers($input-tokens);
|
|
38
68
|
@include styles.styles-reset;
|
|
39
69
|
flex: 1;
|
|
40
70
|
min-inline-size: 0;
|
|
@@ -56,7 +86,7 @@
|
|
|
56
86
|
&:hover {
|
|
57
87
|
color: var(
|
|
58
88
|
#{custom-props.$styleColorHover},
|
|
59
|
-
var(#{custom-props.$
|
|
89
|
+
var(#{custom-props.$styleColorDefault}, awsui.$color-text-body-default)
|
|
60
90
|
);
|
|
61
91
|
}
|
|
62
92
|
|
|
@@ -69,10 +99,22 @@
|
|
|
69
99
|
|
|
70
100
|
@include placeholder {
|
|
71
101
|
@include styles.form-placeholder(
|
|
72
|
-
$color:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
102
|
+
$color: style-api.value(
|
|
103
|
+
$input-tokens,
|
|
104
|
+
placeholder-color,
|
|
105
|
+
var(#{custom-props.$stylePlaceholderColor}, #{awsui.$color-text-input-placeholder})
|
|
106
|
+
),
|
|
107
|
+
$font-size: style-api.value($input-tokens, placeholder-font-size, var(#{custom-props.$stylePlaceholderFontSize})),
|
|
108
|
+
$font-style: style-api.value(
|
|
109
|
+
$input-tokens,
|
|
110
|
+
placeholder-font-style,
|
|
111
|
+
var(#{custom-props.$stylePlaceholderFontStyle}, italic)
|
|
112
|
+
),
|
|
113
|
+
$font-weight: style-api.value(
|
|
114
|
+
$input-tokens,
|
|
115
|
+
placeholder-font-weight,
|
|
116
|
+
var(#{custom-props.$stylePlaceholderFontWeight})
|
|
117
|
+
)
|
|
76
118
|
);
|
|
77
119
|
}
|
|
78
120
|
|
|
@@ -86,7 +128,11 @@
|
|
|
86
128
|
cursor: default;
|
|
87
129
|
@include placeholder {
|
|
88
130
|
@include styles.form-placeholder-disabled(
|
|
89
|
-
$color:
|
|
131
|
+
$color: style-api.value(
|
|
132
|
+
$input-tokens,
|
|
133
|
+
placeholder-color,
|
|
134
|
+
var(#{custom-props.$stylePlaceholderColor}, #{awsui.$color-text-input-placeholder-disabled})
|
|
135
|
+
)
|
|
90
136
|
);
|
|
91
137
|
}
|
|
92
138
|
}
|
|
@@ -187,6 +233,7 @@
|
|
|
187
233
|
}
|
|
188
234
|
|
|
189
235
|
&:focus-within {
|
|
236
|
+
border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-text-status-error);
|
|
190
237
|
box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid);
|
|
191
238
|
}
|
|
192
239
|
}
|
|
@@ -201,6 +248,7 @@
|
|
|
201
248
|
}
|
|
202
249
|
|
|
203
250
|
&:focus-within {
|
|
251
|
+
border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-text-status-warning);
|
|
204
252
|
box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid);
|
|
205
253
|
}
|
|
206
254
|
}
|
|
@@ -226,7 +274,12 @@
|
|
|
226
274
|
}
|
|
227
275
|
|
|
228
276
|
&.grouped {
|
|
229
|
-
|
|
277
|
+
// Unlike other controls, input's padding is rendered by the inner input element and not by its wrapper,
|
|
278
|
+
// so we should not add extra space to the wrapper for the validation border.
|
|
279
|
+
@include styles.grouped-control($validation-border-padding: awsui.$border-width-field);
|
|
280
|
+
&.input-field-disabled {
|
|
281
|
+
@include styles.grouped-control-disabled;
|
|
282
|
+
}
|
|
230
283
|
}
|
|
231
284
|
}
|
|
232
285
|
|
|
@@ -290,6 +343,12 @@
|
|
|
290
343
|
pointer-events: none;
|
|
291
344
|
inset-inline-start: styles.$control-icon-horizontal-offset;
|
|
292
345
|
inset-block-start: styles.$control-icon-vertical-offset;
|
|
346
|
+
// The icon inside uses currentColor, so the span owns the subtle/disabled colors.
|
|
347
|
+
color: awsui.$color-text-icon-subtle;
|
|
348
|
+
|
|
349
|
+
&.input-icon-start-disabled {
|
|
350
|
+
color: awsui.$color-text-interactive-disabled;
|
|
351
|
+
}
|
|
293
352
|
}
|
|
294
353
|
|
|
295
354
|
.input-icon-end {
|
|
@@ -5,12 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
@use '../../styles' as styles;
|
|
7
7
|
@use '../../styles/tokens' as awsui;
|
|
8
|
-
@use '../../styles/style-api' as style-api;
|
|
9
8
|
@use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
|
|
10
9
|
|
|
11
|
-
// The owning component's label / description slot classes land on these elements themselves.
|
|
12
|
-
$_text-tokens: style-api.resolve((color), public);
|
|
13
|
-
|
|
14
10
|
.content,
|
|
15
11
|
.description,
|
|
16
12
|
.label {
|
|
@@ -18,7 +14,7 @@ $_text-tokens: style-api.resolve((color), public);
|
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
.label {
|
|
21
|
-
color:
|
|
17
|
+
color: awsui.$color-text-form-default;
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
.outline {
|
|
@@ -55,9 +51,7 @@ $_text-tokens: style-api.resolve((color), public);
|
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
.description {
|
|
58
|
-
@include styles.form-control-description(
|
|
59
|
-
$color: style-api.value($_text-tokens, color, awsui.$color-text-form-secondary)
|
|
60
|
-
);
|
|
54
|
+
@include styles.form-control-description($color: awsui.$color-text-form-secondary);
|
|
61
55
|
&-bottom-padding {
|
|
62
56
|
padding-block-end: awsui.$space-scaled-xxs;
|
|
63
57
|
}
|
|
@@ -67,7 +61,7 @@ $_text-tokens: style-api.resolve((color), public);
|
|
|
67
61
|
.description {
|
|
68
62
|
padding-inline-start: awsui.$space-xs;
|
|
69
63
|
&-disabled {
|
|
70
|
-
color:
|
|
64
|
+
color: awsui.$color-text-control-disabled;
|
|
71
65
|
}
|
|
72
66
|
}
|
|
73
67
|
|
|
@@ -127,7 +127,7 @@ $icon-offset: awsui.$space-xxxs;
|
|
|
127
127
|
text-decoration: none;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
&:not(.in-filtering-token):not(.compact) {
|
|
130
|
+
&:not(.in-filtering-token):not(.compact):not(.grouped-with-error):not(.grouped-with-warning) {
|
|
131
131
|
@include focus-visible.when-visible {
|
|
132
132
|
@include styles.form-focus-element();
|
|
133
133
|
}
|
|
@@ -146,6 +146,15 @@ $icon-offset: awsui.$space-xxxs;
|
|
|
146
146
|
&.warning:focus {
|
|
147
147
|
@include styles.form-warning-control();
|
|
148
148
|
}
|
|
149
|
+
|
|
150
|
+
@include focus-visible.when-visible {
|
|
151
|
+
&.invalid {
|
|
152
|
+
border-color: awsui.$color-text-status-error;
|
|
153
|
+
}
|
|
154
|
+
&.warning {
|
|
155
|
+
border-color: awsui.$color-text-status-warning;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
149
158
|
}
|
|
150
159
|
|
|
151
160
|
&.custom-option {
|
|
@@ -181,5 +190,8 @@ $icon-offset: awsui.$space-xxxs;
|
|
|
181
190
|
|
|
182
191
|
&.grouped {
|
|
183
192
|
@include styles.grouped-control;
|
|
193
|
+
&.disabled {
|
|
194
|
+
@include styles.grouped-control-disabled;
|
|
195
|
+
}
|
|
184
196
|
}
|
|
185
197
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@use '../../styles/style-api' as style-api;
|
|
9
9
|
@use './motion' as motion;
|
|
10
10
|
|
|
11
|
-
$_control-tokens: style-api.resolve((color,
|
|
11
|
+
$_control-tokens: style-api.resolve((fill-color, border-color, indicator-color), carrier);
|
|
12
12
|
|
|
13
13
|
.root {
|
|
14
14
|
position: absolute;
|
|
@@ -18,7 +18,7 @@ $_control-tokens: style-api.resolve((color, background-color, border-color), car
|
|
|
18
18
|
inset-inline-start: 0;
|
|
19
19
|
|
|
20
20
|
> .styled-box {
|
|
21
|
-
fill: style-api.value($_control-tokens,
|
|
21
|
+
fill: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-default);
|
|
22
22
|
stroke: style-api.value($_control-tokens, border-color, awsui.$color-border-control-default);
|
|
23
23
|
stroke-width: awsui.$border-width-field;
|
|
24
24
|
@include styles.with-motion {
|
|
@@ -28,25 +28,25 @@ $_control-tokens: style-api.resolve((color, background-color, border-color), car
|
|
|
28
28
|
}
|
|
29
29
|
&-checked,
|
|
30
30
|
&-indeterminate {
|
|
31
|
-
fill: style-api.value($_control-tokens,
|
|
31
|
+
fill: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-checked);
|
|
32
32
|
stroke: style-api.value($_control-tokens, border-color, awsui.$color-border-control-checked);
|
|
33
33
|
}
|
|
34
34
|
&-disabled,
|
|
35
35
|
&-readonly {
|
|
36
|
-
fill: style-api.value($_control-tokens,
|
|
36
|
+
fill: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-disabled);
|
|
37
37
|
stroke: style-api.value($_control-tokens, border-color, awsui.$color-border-control-disabled);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
> .styled-line {
|
|
42
|
-
stroke: style-api.value($_control-tokens, color, awsui.$color-foreground-control-default);
|
|
42
|
+
stroke: style-api.value($_control-tokens, indicator-color, awsui.$color-foreground-control-default);
|
|
43
43
|
stroke-width: 2;
|
|
44
44
|
fill: none;
|
|
45
45
|
&-disabled {
|
|
46
|
-
stroke: style-api.value($_control-tokens, color, awsui.$color-foreground-control-disabled);
|
|
46
|
+
stroke: style-api.value($_control-tokens, indicator-color, awsui.$color-foreground-control-disabled);
|
|
47
47
|
}
|
|
48
48
|
&-readonly {
|
|
49
|
-
stroke: style-api.value($_control-tokens, color, awsui.$color-foreground-control-read-only);
|
|
49
|
+
stroke: style-api.value($_control-tokens, indicator-color, awsui.$color-foreground-control-read-only);
|
|
50
50
|
}
|
|
51
51
|
@include motion.draw-in;
|
|
52
52
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@use '../../styles' as styles;
|
|
7
7
|
@use '../../styles/tokens' as awsui;
|
|
8
8
|
@use '../../styles/forms/mixins' as forms;
|
|
9
|
+
@use '../../styles/forms/constants' as constants;
|
|
9
10
|
|
|
10
11
|
$margin-overlap: calc(-1 * #{awsui.$border-width-field});
|
|
11
12
|
|
|
@@ -46,6 +47,9 @@ $margin-overlap: calc(-1 * #{awsui.$border-width-field});
|
|
|
46
47
|
.controls {
|
|
47
48
|
display: flex;
|
|
48
49
|
align-items: stretch;
|
|
50
|
+
// Keep control borders above the action button's.
|
|
51
|
+
// This becomes especially relevant when controls render validation-style border colors.
|
|
52
|
+
z-index: 1;
|
|
49
53
|
|
|
50
54
|
&-horizontal {
|
|
51
55
|
flex-direction: row;
|
|
@@ -77,6 +81,47 @@ $margin-overlap: calc(-1 * #{awsui.$border-width-field});
|
|
|
77
81
|
margin-block-start: $margin-overlap;
|
|
78
82
|
}
|
|
79
83
|
}
|
|
84
|
+
|
|
85
|
+
&-validation {
|
|
86
|
+
position: relative;
|
|
87
|
+
|
|
88
|
+
// Thick validation border rendered by the wrapping `.control` instead of the grouped individual controls
|
|
89
|
+
// in order to prevent subtle visual artifacts where the horizontal and vertical borders of the controls meet.
|
|
90
|
+
&::before {
|
|
91
|
+
content: '';
|
|
92
|
+
position: absolute;
|
|
93
|
+
inset-block: 0;
|
|
94
|
+
inset-inline-start: 0;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
// Rneder the thick border as an actual border (rather than a background fill) so it works also in
|
|
97
|
+
// forced-colors mode: forced-colors recolors borders to the system palette whereas backgrounds get flattened
|
|
98
|
+
// to Canvas.
|
|
99
|
+
border-inline-start-style: solid;
|
|
100
|
+
border-inline-start-width: constants.$invalid-control-left-border;
|
|
101
|
+
z-index: 1;
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&.control-in-error::before {
|
|
106
|
+
border-inline-start-color: awsui.$color-text-status-error;
|
|
107
|
+
}
|
|
108
|
+
&.control-in-warning::before {
|
|
109
|
+
border-inline-start-color: awsui.$color-text-status-warning;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&.control-first-horizontal::before,
|
|
113
|
+
&.control-only-horizontal::before,
|
|
114
|
+
&.control-only-vertical::before {
|
|
115
|
+
border-start-start-radius: constants.$control-border-radius;
|
|
116
|
+
border-end-start-radius: constants.$control-border-radius;
|
|
117
|
+
}
|
|
118
|
+
&.control-first-vertical::before {
|
|
119
|
+
border-start-start-radius: constants.$control-border-radius;
|
|
120
|
+
}
|
|
121
|
+
&.control-last-vertical::before {
|
|
122
|
+
border-end-start-radius: constants.$control-border-radius;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
80
125
|
}
|
|
81
126
|
|
|
82
127
|
.action-slot,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
// so we disable this one
|
|
45
45
|
&:not(.disable-focus-highlight) {
|
|
46
46
|
@include focus-visible.when-visible {
|
|
47
|
-
@include styles.focus-highlight(awsui.$space-
|
|
47
|
+
@include styles.focus-highlight(awsui.$space-expand-toggle-focus-outline-gutter);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@use '../../styles/tokens' as awsui;
|
|
8
8
|
@use './constants' as constants;
|
|
9
9
|
@use '../../generated/custom-css-properties/index' as custom-props;
|
|
10
|
+
@use '../../../token/constants' as token-constants;
|
|
10
11
|
|
|
11
12
|
.option {
|
|
12
13
|
@include styles.styles-reset;
|
|
@@ -69,6 +70,28 @@
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
.option.single-line {
|
|
74
|
+
max-block-size: token-constants.$token-max-height-inline;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.label-content.single-line {
|
|
78
|
+
flex-wrap: nowrap;
|
|
79
|
+
|
|
80
|
+
> .label {
|
|
81
|
+
flex: 0 1 auto;
|
|
82
|
+
min-inline-size: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
> .label-tag {
|
|
86
|
+
// huge number to ensure tag shrinks before label
|
|
87
|
+
flex: 0 100000 auto;
|
|
88
|
+
min-inline-size: 4ch;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
72
95
|
.tags,
|
|
73
96
|
.description {
|
|
74
97
|
@include styles.font-body-s;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
$radio-size: awsui.$size-control;
|
|
14
14
|
|
|
15
|
-
$_control-props: style-api.combine((color,
|
|
15
|
+
$_control-props: style-api.combine((fill-color, border-color, indicator-color), style-api.$focus-ring);
|
|
16
16
|
$_control-tokens: style-api.resolve($_control-props, carrier);
|
|
17
17
|
|
|
18
18
|
.radio-control {
|
|
@@ -32,17 +32,17 @@ $_control-tokens: style-api.resolve($_control-props, carrier);
|
|
|
32
32
|
|
|
33
33
|
.styled-circle-border {
|
|
34
34
|
stroke: style-api.value($_control-tokens, border-color, awsui.$color-border-control-default);
|
|
35
|
-
fill: style-api.value($_control-tokens,
|
|
35
|
+
fill: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-default);
|
|
36
36
|
&.styled-circle-disabled,
|
|
37
37
|
&.styled-circle-readonly {
|
|
38
|
-
fill: style-api.value($_control-tokens,
|
|
38
|
+
fill: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-disabled);
|
|
39
39
|
stroke: style-api.value($_control-tokens, border-color, awsui.$color-background-control-disabled);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.styled-circle-fill {
|
|
44
|
-
stroke: style-api.value($_control-tokens,
|
|
45
|
-
fill: style-api.value($_control-tokens, color, awsui.$color-foreground-control-default);
|
|
44
|
+
stroke: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-checked);
|
|
45
|
+
fill: style-api.value($_control-tokens, indicator-color, awsui.$color-foreground-control-default);
|
|
46
46
|
opacity: 0;
|
|
47
47
|
@include styles.with-motion {
|
|
48
48
|
transition: opacity awsui.$motion-duration-transition-quick awsui.$motion-easing-transition-quick;
|
|
@@ -51,12 +51,12 @@ $_control-tokens: style-api.resolve($_control-props, carrier);
|
|
|
51
51
|
opacity: 1;
|
|
52
52
|
}
|
|
53
53
|
&.styled-circle-disabled {
|
|
54
|
-
fill: style-api.value($_control-tokens, color, awsui.$color-foreground-control-disabled);
|
|
55
|
-
stroke: style-api.value($_control-tokens,
|
|
54
|
+
fill: style-api.value($_control-tokens, indicator-color, awsui.$color-foreground-control-disabled);
|
|
55
|
+
stroke: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-disabled);
|
|
56
56
|
}
|
|
57
57
|
&.styled-circle-readonly {
|
|
58
|
-
fill: style-api.value($_control-tokens, color, awsui.$color-foreground-control-read-only);
|
|
59
|
-
stroke: style-api.value($_control-tokens,
|
|
58
|
+
fill: style-api.value($_control-tokens, indicator-color, awsui.$color-foreground-control-read-only);
|
|
59
|
+
stroke: style-api.value($_control-tokens, fill-color, awsui.$color-background-control-disabled);
|
|
60
60
|
}
|
|
61
61
|
@include motion.select;
|
|
62
62
|
}
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
@use '../tokens' as awsui;
|
|
5
5
|
@use '../utils' as styles;
|
|
6
|
+
@use '../foundation' as foundation;
|
|
6
7
|
@use './constants' as constants;
|
|
8
|
+
@use './mixins' as mixins;
|
|
9
|
+
@use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
|
|
7
10
|
|
|
8
11
|
$grouped-control-border-radius: constants.$control-border-radius;
|
|
9
12
|
|
|
10
13
|
@mixin grouped-control-base {
|
|
11
14
|
@include styles.logical-radius($grouped-control-border-radius);
|
|
15
|
+
border-color: awsui.$color-border-control-group-default;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
@mixin grouped-control-horizontal-first {
|
|
@@ -31,7 +35,106 @@ $grouped-control-border-radius: constants.$control-border-radius;
|
|
|
31
35
|
@include styles.logical-radius(0);
|
|
32
36
|
}
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
// Recolors the outward border edges of each grouped position to `$color`.
|
|
39
|
+
@mixin grouped-control-status-edges($color) {
|
|
40
|
+
&.grouped-horizontal-first {
|
|
41
|
+
&,
|
|
42
|
+
&:hover,
|
|
43
|
+
&:focus {
|
|
44
|
+
border-inline-start-color: $color;
|
|
45
|
+
border-block-start-color: $color;
|
|
46
|
+
border-block-end-color: $color;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
&.grouped-horizontal-middle {
|
|
50
|
+
&,
|
|
51
|
+
&:hover,
|
|
52
|
+
&:focus {
|
|
53
|
+
border-block-start-color: $color;
|
|
54
|
+
border-block-end-color: $color;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
&.grouped-horizontal-last {
|
|
58
|
+
&,
|
|
59
|
+
&:hover,
|
|
60
|
+
&:focus {
|
|
61
|
+
border-inline-end-color: $color;
|
|
62
|
+
border-block-start-color: $color;
|
|
63
|
+
border-block-end-color: $color;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
&.grouped-vertical-first {
|
|
67
|
+
&,
|
|
68
|
+
&:hover,
|
|
69
|
+
&:focus {
|
|
70
|
+
border-block-start-color: $color;
|
|
71
|
+
border-inline-start-color: $color;
|
|
72
|
+
border-inline-end-color: $color;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
&.grouped-vertical-middle {
|
|
76
|
+
&,
|
|
77
|
+
&:hover,
|
|
78
|
+
&:focus {
|
|
79
|
+
border-inline-start-color: $color;
|
|
80
|
+
border-inline-end-color: $color;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
&.grouped-vertical-last {
|
|
84
|
+
&,
|
|
85
|
+
&:hover,
|
|
86
|
+
&:focus {
|
|
87
|
+
border-block-end-color: $color;
|
|
88
|
+
border-inline-start-color: $color;
|
|
89
|
+
border-inline-end-color: $color;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
&.grouped-horizontal-only,
|
|
93
|
+
&.grouped-vertical-only {
|
|
94
|
+
&,
|
|
95
|
+
&:hover,
|
|
96
|
+
&:focus {
|
|
97
|
+
border-inline-start-color: $color;
|
|
98
|
+
border-inline-end-color: $color;
|
|
99
|
+
border-block-start-color: $color;
|
|
100
|
+
border-block-end-color: $color;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@mixin grouped-control-disabled {
|
|
106
|
+
&:not(.grouped-with-error):not(.grouped-with-warning) {
|
|
107
|
+
&.grouped-horizontal {
|
|
108
|
+
border-block-color: transparent;
|
|
109
|
+
}
|
|
110
|
+
&.grouped-vertical-first,
|
|
111
|
+
&.grouped-vertical-only {
|
|
112
|
+
border-block-start-color: transparent;
|
|
113
|
+
}
|
|
114
|
+
&.grouped-vertical-last,
|
|
115
|
+
&.grouped-vertical-only {
|
|
116
|
+
border-block-end-color: transparent;
|
|
117
|
+
}
|
|
118
|
+
&.grouped-horizontal-first,
|
|
119
|
+
&.grouped-horizontal-only,
|
|
120
|
+
&.grouped-vertical {
|
|
121
|
+
border-inline-start-color: transparent;
|
|
122
|
+
}
|
|
123
|
+
&:not(.grouped-with-action) {
|
|
124
|
+
&.grouped-vertical,
|
|
125
|
+
&.grouped-horizontal-last,
|
|
126
|
+
&.grouped-horizontal-only {
|
|
127
|
+
border-inline-end-color: transparent;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@mixin grouped-control(
|
|
134
|
+
$validation-border-padding: calc(
|
|
135
|
+
#{constants.$invalid-control-left-border} + #{constants.$invalid-control-left-padding}
|
|
136
|
+
)
|
|
137
|
+
) {
|
|
35
138
|
@include grouped-control-base;
|
|
36
139
|
|
|
37
140
|
&-horizontal {
|
|
@@ -62,4 +165,29 @@ $grouped-control-border-radius: constants.$control-border-radius;
|
|
|
62
165
|
border-start-end-radius: 0;
|
|
63
166
|
border-end-end-radius: 0;
|
|
64
167
|
}
|
|
168
|
+
|
|
169
|
+
&-with-error {
|
|
170
|
+
@include grouped-control-status-edges(awsui.$color-text-status-error);
|
|
171
|
+
}
|
|
172
|
+
&-with-warning {
|
|
173
|
+
@include grouped-control-status-edges(awsui.$color-text-status-warning);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&-with-error,
|
|
177
|
+
&-with-warning {
|
|
178
|
+
&.grouped-horizontal-first,
|
|
179
|
+
&.grouped-horizontal-only,
|
|
180
|
+
&.grouped-vertical {
|
|
181
|
+
// Room for the validation thick border, which is rendered from the control group wrapper
|
|
182
|
+
padding-inline-start: $validation-border-padding;
|
|
183
|
+
}
|
|
184
|
+
@include focus-visible.when-visible {
|
|
185
|
+
@include mixins.windows-high-contrast-outline;
|
|
186
|
+
box-shadow: foundation.$box-shadow-focused-light-invalid;
|
|
187
|
+
}
|
|
188
|
+
&:focus-within {
|
|
189
|
+
@include mixins.windows-high-contrast-outline;
|
|
190
|
+
box-shadow: foundation.$box-shadow-focused-light-invalid;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
65
193
|
}
|