@cloudscape-design/components-themeable 3.0.1402 → 3.0.1404
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/action-card/mixins.scss +18 -4
- package/lib/internal/scss/action-card/styles.scss +63 -13
- package/lib/internal/scss/header/styles.scss +2 -2
- package/lib/internal/scss/icon/hover-motion.scss +98 -60
- package/lib/internal/scss/internal/components/selectable-item/styles.scss +6 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/item-card/styles.scss +103 -13
- package/lib/internal/scss/option-list/styles.scss +11 -0
- package/lib/internal/scss/option-list/test-classes/styles.scss +9 -0
- package/lib/internal/scss/table-root/styles.scss +29 -0
- package/lib/internal/template/action-card/internal.d.ts +10 -2
- package/lib/internal/template/action-card/internal.d.ts.map +1 -1
- package/lib/internal/template/action-card/internal.js +5 -5
- package/lib/internal/template/action-card/internal.js.map +1 -1
- package/lib/internal/template/action-card/styles.css.js +18 -17
- package/lib/internal/template/action-card/styles.scoped.css +274 -202
- package/lib/internal/template/action-card/styles.selectors.js +18 -17
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +3 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -1
- package/lib/internal/template/button-dropdown/filter.d.ts +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/header/interfaces.d.ts +4 -0
- package/lib/internal/template/header/interfaces.d.ts.map +1 -1
- package/lib/internal/template/header/interfaces.js.map +1 -1
- package/lib/internal/template/header/internal.d.ts +1 -6
- package/lib/internal/template/header/internal.d.ts.map +1 -1
- package/lib/internal/template/header/internal.js +2 -2
- package/lib/internal/template/header/internal.js.map +1 -1
- package/lib/internal/template/header/styles.css.js +36 -36
- package/lib/internal/template/header/styles.scoped.css +55 -55
- package/lib/internal/template/header/styles.selectors.js +36 -36
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +3 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/index.d.ts +1 -0
- package/lib/internal/template/index.d.ts.map +1 -1
- package/lib/internal/template/index.js +1 -0
- package/lib/internal/template/index.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/focus-lock/utils.d.ts +2 -0
- package/lib/internal/template/internal/components/focus-lock/utils.d.ts.map +1 -1
- package/lib/internal/template/internal/components/focus-lock/utils.js +5 -1
- package/lib/internal/template/internal/components/focus-lock/utils.js.map +1 -1
- package/lib/internal/template/internal/components/listbox/interfaces.d.ts +13 -0
- package/lib/internal/template/internal/components/listbox/interfaces.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/interfaces.js +2 -0
- package/lib/internal/template/internal/components/listbox/interfaces.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/get-item-props.d.ts +1 -2
- package/lib/internal/template/internal/components/listbox/parts/get-item-props.d.ts.map +1 -1
- package/lib/internal/template/internal/components/listbox/parts/get-item-props.js +1 -2
- package/lib/internal/template/internal/components/listbox/parts/get-item-props.js.map +1 -1
- package/lib/internal/template/internal/components/listbox/parts/item.d.ts +46 -0
- package/lib/internal/template/internal/components/listbox/parts/item.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/item.js +184 -0
- package/lib/internal/template/internal/components/listbox/parts/item.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/plain-list.d.ts +30 -0
- package/lib/internal/template/internal/components/listbox/parts/plain-list.d.ts.map +1 -0
- package/lib/internal/template/{select → internal/components/listbox}/parts/plain-list.js +12 -12
- package/lib/internal/template/internal/components/listbox/parts/plain-list.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/parts/render-options.d.ts +3 -3
- package/lib/internal/template/internal/components/listbox/parts/render-options.d.ts.map +1 -1
- package/lib/internal/template/internal/components/listbox/parts/render-options.js +3 -6
- package/lib/internal/template/internal/components/listbox/parts/render-options.js.map +1 -1
- package/lib/internal/template/internal/components/listbox/parts/scroll-to-index.d.ts +8 -0
- package/lib/internal/template/internal/components/listbox/parts/scroll-to-index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/listbox/parts/scroll-to-index.js +16 -0
- package/lib/internal/template/internal/components/listbox/parts/scroll-to-index.js.map +1 -1
- package/lib/internal/template/internal/components/listbox/use-listbox.d.ts +85 -0
- package/lib/internal/template/internal/components/listbox/use-listbox.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/use-listbox.js +117 -0
- package/lib/internal/template/internal/components/listbox/use-listbox.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/use-type-ahead.d.ts +13 -0
- package/lib/internal/template/internal/components/listbox/use-type-ahead.d.ts.map +1 -0
- package/lib/internal/template/{select/utils/use-native-search.js → internal/components/listbox/use-type-ahead.js} +8 -8
- package/lib/internal/template/internal/components/listbox/use-type-ahead.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/utils/navigation.d.ts +20 -0
- package/lib/internal/template/internal/components/listbox/utils/navigation.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/utils/navigation.js +22 -0
- package/lib/internal/template/internal/components/listbox/utils/navigation.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/utils/option-props.d.ts +32 -0
- package/lib/internal/template/internal/components/listbox/utils/option-props.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/utils/option-props.js +51 -0
- package/lib/internal/template/internal/components/listbox/utils/option-props.js.map +1 -0
- package/lib/internal/template/internal/components/options-list/index.d.ts +4 -1
- package/lib/internal/template/internal/components/options-list/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/options-list/index.js +1 -1
- package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
- package/lib/internal/template/internal/components/options-list/utils/use-keyboard.d.ts +2 -1
- package/lib/internal/template/internal/components/options-list/utils/use-keyboard.d.ts.map +1 -1
- package/lib/internal/template/internal/components/options-list/utils/use-keyboard.js +5 -3
- package/lib/internal/template/internal/components/options-list/utils/use-keyboard.js.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/index.d.ts +1 -0
- package/lib/internal/template/internal/components/selectable-item/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/index.js +2 -1
- package/lib/internal/template/internal/components/selectable-item/index.js.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts +1 -0
- package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/styles.css.js +23 -22
- package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +52 -49
- package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +23 -22
- package/lib/internal/template/internal/components/sticky-header/use-untabbable-descendants.d.ts +3 -0
- package/lib/internal/template/internal/components/sticky-header/use-untabbable-descendants.d.ts.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-untabbable-descendants.js +16 -0
- package/lib/internal/template/internal/components/sticky-header/use-untabbable-descendants.js.map +1 -0
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/item-card/internal.d.ts +10 -1
- package/lib/internal/template/item-card/internal.d.ts.map +1 -1
- package/lib/internal/template/item-card/internal.js +4 -4
- package/lib/internal/template/item-card/internal.js.map +1 -1
- package/lib/internal/template/item-card/style.d.ts.map +1 -1
- package/lib/internal/template/item-card/style.js +6 -1
- package/lib/internal/template/item-card/style.js.map +1 -1
- package/lib/internal/template/item-card/styles.css.js +14 -14
- package/lib/internal/template/item-card/styles.scoped.css +125 -63
- package/lib/internal/template/item-card/styles.selectors.js +14 -14
- package/lib/internal/template/multiselect/embedded.d.ts.map +1 -1
- package/lib/internal/template/multiselect/embedded.js +2 -2
- package/lib/internal/template/multiselect/embedded.js.map +1 -1
- package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
- package/lib/internal/template/multiselect/internal.js +2 -2
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/multiselect/use-multiselect.d.ts +3 -4
- package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
- package/lib/internal/template/multiselect/use-multiselect.js +7 -18
- package/lib/internal/template/multiselect/use-multiselect.js.map +1 -1
- package/lib/internal/template/option-list/index.d.ts +6 -0
- package/lib/internal/template/option-list/index.d.ts.map +1 -0
- package/lib/internal/template/option-list/index.js +21 -0
- package/lib/internal/template/option-list/index.js.map +1 -0
- package/lib/internal/template/option-list/interfaces.d.ts +132 -0
- package/lib/internal/template/option-list/interfaces.d.ts.map +1 -0
- package/lib/internal/template/option-list/interfaces.js +2 -0
- package/lib/internal/template/option-list/interfaces.js.map +1 -0
- package/lib/internal/template/option-list/internal.d.ts +6 -0
- package/lib/internal/template/option-list/internal.d.ts.map +1 -0
- package/lib/internal/template/option-list/internal.js +138 -0
- package/lib/internal/template/option-list/internal.js.map +1 -0
- package/lib/internal/template/option-list/styles.css.js +6 -0
- package/lib/internal/template/option-list/styles.scoped.css +40 -0
- package/lib/internal/template/option-list/styles.selectors.js +7 -0
- package/lib/internal/template/option-list/test-classes/styles.css.js +8 -0
- package/lib/internal/template/option-list/test-classes/styles.scoped.css +9 -0
- package/lib/internal/template/option-list/test-classes/styles.selectors.js +9 -0
- package/lib/internal/template/option-list/use-option-list.d.ts +30 -0
- package/lib/internal/template/option-list/use-option-list.d.ts.map +1 -0
- package/lib/internal/template/option-list/use-option-list.js +69 -0
- package/lib/internal/template/option-list/use-option-list.js.map +1 -0
- package/lib/internal/template/package.json +3 -0
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js +9 -19
- 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/virtual-list.d.ts +3 -2
- package/lib/internal/template/select/parts/virtual-list.d.ts.map +1 -1
- package/lib/internal/template/select/parts/virtual-list.js +7 -8
- package/lib/internal/template/select/parts/virtual-list.js.map +1 -1
- package/lib/internal/template/select/utils/use-select.d.ts +15 -11
- package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-select.js +41 -117
- package/lib/internal/template/select/utils/use-select.js.map +1 -1
- package/lib/internal/template/styling/action-card.scss +56 -0
- package/lib/internal/template/styling/item-card.scss +81 -0
- package/lib/internal/template/table-root/index.js +1 -1
- package/lib/internal/template/table-root/index.js.map +1 -1
- package/lib/internal/template/table-root/interfaces.d.ts +15 -1
- package/lib/internal/template/table-root/interfaces.d.ts.map +1 -1
- package/lib/internal/template/table-root/interfaces.js.map +1 -1
- package/lib/internal/template/table-root/internal.d.ts +1 -1
- package/lib/internal/template/table-root/internal.d.ts.map +1 -1
- package/lib/internal/template/table-root/internal.js +23 -11
- package/lib/internal/template/table-root/internal.js.map +1 -1
- package/lib/internal/template/table-root/sticky-header-slot.d.ts +15 -0
- package/lib/internal/template/table-root/sticky-header-slot.d.ts.map +1 -0
- package/lib/internal/template/table-root/sticky-header-slot.js +13 -0
- package/lib/internal/template/table-root/sticky-header-slot.js.map +1 -0
- package/lib/internal/template/table-root/styles.css.js +10 -5
- package/lib/internal/template/table-root/styles.scoped.css +52 -7
- package/lib/internal/template/table-root/styles.selectors.js +10 -5
- package/lib/internal/template/table-root/use-sticky-header.d.ts +28 -0
- package/lib/internal/template/table-root/use-sticky-header.d.ts.map +1 -0
- package/lib/internal/template/table-root/use-sticky-header.js +141 -0
- package/lib/internal/template/table-root/use-sticky-header.js.map +1 -0
- package/lib/internal/template/test-utils/dom/header/index.d.ts +1 -0
- package/lib/internal/template/test-utils/dom/header/index.js +3 -0
- package/lib/internal/template/test-utils/dom/header/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/index.d.ts +28 -0
- package/lib/internal/template/test-utils/dom/index.js +21 -2
- package/lib/internal/template/test-utils/dom/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/option-list/index.d.ts +69 -0
- package/lib/internal/template/test-utils/dom/option-list/index.js +132 -0
- package/lib/internal/template/test-utils/dom/option-list/index.js.map +1 -0
- package/lib/internal/template/test-utils/selectors/header/index.d.ts +1 -0
- package/lib/internal/template/test-utils/selectors/header/index.js +3 -0
- package/lib/internal/template/test-utils/selectors/header/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/index.d.ts +18 -0
- package/lib/internal/template/test-utils/selectors/index.js +16 -2
- package/lib/internal/template/test-utils/selectors/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/option-list/index.d.ts +66 -0
- package/lib/internal/template/test-utils/selectors/option-list/index.js +108 -0
- package/lib/internal/template/test-utils/selectors/option-list/index.js.map +1 -0
- package/package.json +1 -1
- package/lib/internal/template/select/parts/item.d.ts +0 -34
- package/lib/internal/template/select/parts/item.d.ts.map +0 -1
- package/lib/internal/template/select/parts/item.js +0 -94
- package/lib/internal/template/select/parts/item.js.map +0 -1
- package/lib/internal/template/select/parts/multiselect-item.d.ts +0 -15
- package/lib/internal/template/select/parts/multiselect-item.d.ts.map +0 -1
- package/lib/internal/template/select/parts/multiselect-item.js +0 -112
- package/lib/internal/template/select/parts/multiselect-item.js.map +0 -1
- package/lib/internal/template/select/parts/plain-list.d.ts +0 -27
- package/lib/internal/template/select/parts/plain-list.d.ts.map +0 -1
- package/lib/internal/template/select/parts/plain-list.js.map +0 -1
- package/lib/internal/template/select/utils/use-native-search.d.ts +0 -13
- package/lib/internal/template/select/utils/use-native-search.d.ts.map +0 -1
- package/lib/internal/template/select/utils/use-native-search.js.map +0 -1
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
@use 'sass:map';
|
|
5
5
|
@use '../internal/styles/tokens' as awsui;
|
|
6
|
+
@use '../internal/styles/style-api' as style-api;
|
|
6
7
|
@use './constants' as constants;
|
|
7
8
|
|
|
9
|
+
// Border tokens stay public: as carriers they would inherit into nested components that read the same carrier name.
|
|
10
|
+
$border-tokens: style-api.resolve((border-color, border-width), public);
|
|
11
|
+
$carrier-tokens: style-api.resolve((border-radius, focus-ring-color, focus-ring-width, focus-ring-radius), carrier);
|
|
12
|
+
$tokens: map.merge($border-tokens, $carrier-tokens);
|
|
13
|
+
|
|
8
14
|
$variant-border-radius: (
|
|
9
15
|
'embedded': awsui.$border-radius-action-card-embedded,
|
|
10
16
|
'default': awsui.$border-radius-action-card-default,
|
|
@@ -29,7 +35,15 @@ $variant-padding-inline: (
|
|
|
29
35
|
|
|
30
36
|
@mixin state-border-radius($variant: 'default', $state: 'default') {
|
|
31
37
|
$token: map.get($variant-border-radius, $variant);
|
|
32
|
-
@include border-radius-all($token);
|
|
38
|
+
@include border-radius-all(style-api.value($carrier-tokens, border-radius, $token));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin inherit-border-tokens {
|
|
42
|
+
@if style-api.enabled() {
|
|
43
|
+
@each $token, $property in $border-tokens {
|
|
44
|
+
#{$property}: inherit;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
33
47
|
}
|
|
34
48
|
|
|
35
49
|
@mixin state-border-radius-all-variants($state: 'default') {
|
|
@@ -55,9 +69,9 @@ $variant-padding-inline: (
|
|
|
55
69
|
}
|
|
56
70
|
|
|
57
71
|
&:after {
|
|
58
|
-
border-color: map.get($s, 'border-color');
|
|
59
|
-
border-block-width: map.get($s, 'border-width');
|
|
60
|
-
border-inline-width: map.get($s, 'border-width');
|
|
72
|
+
border-color: style-api.value($border-tokens, border-color, map.get($s, 'border-color'));
|
|
73
|
+
border-block-width: style-api.value($border-tokens, border-width, map.get($s, 'border-width'));
|
|
74
|
+
border-inline-width: style-api.value($border-tokens, border-width, map.get($s, 'border-width'));
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
> .icon,
|
|
@@ -8,12 +8,38 @@
|
|
|
8
8
|
@use '../internal/styles' as styles;
|
|
9
9
|
@use '../internal/styles/tokens' as awsui;
|
|
10
10
|
@use '../internal/styles/utils/theming' as theming;
|
|
11
|
+
@use '../internal/styles/style-api' as style-api;
|
|
11
12
|
@use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
|
|
12
13
|
@use './constants' as constants;
|
|
13
14
|
@use './mixins' as mixins;
|
|
14
15
|
@use './motion';
|
|
15
16
|
|
|
17
|
+
$tokens: mixins.$tokens;
|
|
18
|
+
@include style-api.register($tokens);
|
|
19
|
+
@include style-api.docs(
|
|
20
|
+
'root',
|
|
21
|
+
$tokens,
|
|
22
|
+
$properties: (background),
|
|
23
|
+
$descriptions: (
|
|
24
|
+
slot:
|
|
25
|
+
'This is NOT a semantic button element. Use `:has(:hover)` or `:has(:active)` to target semantic button states. `disabled` is set by you: pass a different class when it is true.',
|
|
26
|
+
tokens: (
|
|
27
|
+
border-color: 'The border is drawn over the card edges and takes no space.',
|
|
28
|
+
border-width: 'The border is drawn over the card edges and takes no space.',
|
|
29
|
+
border-radius: 'Also rounds the header corners that meet the card corners.',
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
@include style-api.docs(
|
|
34
|
+
'header',
|
|
35
|
+
$properties: (background, border),
|
|
36
|
+
$descriptions: (
|
|
37
|
+
slot:
|
|
38
|
+
'Rendered when `header` or `description` is set. The block-end border is the divider between the header and the content. With a top-aligned `icon`, the header spans the full card width, icon included. With a centered `icon`, the icon column stays outside the header.'
|
|
39
|
+
)
|
|
40
|
+
);
|
|
16
41
|
.header {
|
|
42
|
+
border-block-end: 0 solid transparent;
|
|
17
43
|
&-inner {
|
|
18
44
|
@include styles.font-heading-s;
|
|
19
45
|
&.disabled {
|
|
@@ -31,10 +57,14 @@
|
|
|
31
57
|
.header-row {
|
|
32
58
|
display: flex;
|
|
33
59
|
align-items: flex-start;
|
|
60
|
+
border-block-end: 0 solid transparent;
|
|
34
61
|
> .header {
|
|
35
62
|
flex: 1;
|
|
36
63
|
min-inline-size: 0;
|
|
37
64
|
}
|
|
65
|
+
&:not(:has(+ .body)) {
|
|
66
|
+
flex: 1;
|
|
67
|
+
}
|
|
38
68
|
}
|
|
39
69
|
|
|
40
70
|
.body {
|
|
@@ -111,6 +141,7 @@
|
|
|
111
141
|
min-inline-size: 0;
|
|
112
142
|
text-align: start;
|
|
113
143
|
display: flex;
|
|
144
|
+
@include style-api.carriers(mixins.$carrier-tokens);
|
|
114
145
|
$default-state: map.get(constants.$states, 'default');
|
|
115
146
|
background: map.get($default-state, 'background');
|
|
116
147
|
box-shadow: map.get($default-state, 'box-shadow');
|
|
@@ -122,10 +153,13 @@
|
|
|
122
153
|
|
|
123
154
|
&:after {
|
|
124
155
|
@include styles.base-pseudo-element;
|
|
156
|
+
@include mixins.inherit-border-tokens;
|
|
125
157
|
|
|
126
158
|
box-shadow: none;
|
|
127
|
-
border-
|
|
128
|
-
border-
|
|
159
|
+
$border-width: style-api.value(mixins.$border-tokens, border-width, map.get($default-state, 'border-width'));
|
|
160
|
+
$border-color: style-api.value(mixins.$border-tokens, border-color, map.get($default-state, 'border-color'));
|
|
161
|
+
border-block: solid $border-width $border-color;
|
|
162
|
+
border-inline: solid $border-width $border-color;
|
|
129
163
|
}
|
|
130
164
|
|
|
131
165
|
&.variant-default,
|
|
@@ -175,17 +209,7 @@
|
|
|
175
209
|
|
|
176
210
|
&:has(.header-button:focus-visible),
|
|
177
211
|
&:has(.overlay-button:focus-visible) {
|
|
178
|
-
@include
|
|
179
|
-
2px,
|
|
180
|
-
awsui.$border-radius-control-default-focus-ring,
|
|
181
|
-
0 0 0 2px awsui.$color-border-item-focused
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
@each $variant in ('embedded', 'default') {
|
|
185
|
-
&.variant-#{$variant}::before {
|
|
186
|
-
@include mixins.border-radius-all(awsui.$border-radius-control-default-focus-ring);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
212
|
+
@include style-api.focus-highlight($gutter-block: 2px, $gutter-inline: 2px);
|
|
189
213
|
}
|
|
190
214
|
|
|
191
215
|
@each $variant in ('embedded', 'default') {
|
|
@@ -195,6 +219,32 @@
|
|
|
195
219
|
@include mixins.state-border-radius($variant);
|
|
196
220
|
}
|
|
197
221
|
|
|
222
|
+
$border-radius: style-api.value(
|
|
223
|
+
mixins.$carrier-tokens,
|
|
224
|
+
border-radius,
|
|
225
|
+
map.get(mixins.$variant-border-radius, $variant)
|
|
226
|
+
);
|
|
227
|
+
> .inner-card > .header,
|
|
228
|
+
> .inner-card > .header-row {
|
|
229
|
+
border-start-start-radius: $border-radius;
|
|
230
|
+
}
|
|
231
|
+
> .inner-card > .header:not(:has(+ .body)),
|
|
232
|
+
> .inner-card > .header-row:not(:has(+ .body)) {
|
|
233
|
+
border-end-start-radius: $border-radius;
|
|
234
|
+
}
|
|
235
|
+
&:not(.has-icon) > .inner-card > .header {
|
|
236
|
+
border-start-end-radius: $border-radius;
|
|
237
|
+
&:not(:has(+ .body)) {
|
|
238
|
+
border-end-end-radius: $border-radius;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
> .inner-card > .header-row {
|
|
242
|
+
border-start-end-radius: $border-radius;
|
|
243
|
+
&:not(:has(+ .body)) {
|
|
244
|
+
border-end-end-radius: $border-radius;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
198
248
|
$padding-block: map.get(mixins.$variant-padding-block, $variant);
|
|
199
249
|
$padding-inline: map.get(mixins.$variant-padding-inline, $variant);
|
|
200
250
|
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
.secondary-content {
|
|
134
134
|
display: inline-flex;
|
|
135
135
|
align-items: center;
|
|
136
136
|
flex-shrink: 0;
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
|
|
190
190
|
// With secondary content beside the heading, center both against a constant-height line so their
|
|
191
191
|
// alignment no longer shifts when actions wrap to a second row.
|
|
192
|
-
.main:has(> .
|
|
192
|
+
.main:has(> .secondary-content) > .title-variant-h2.title-in-expandable-section.refresh {
|
|
193
193
|
padding-block-start: 0;
|
|
194
194
|
min-block-size: awsui.$size-vertical-input;
|
|
195
195
|
display: flex;
|
|
@@ -30,16 +30,20 @@ $_opted-in: 'svg[#{$_animated-attribute}]';
|
|
|
30
30
|
|
|
31
31
|
// Opt-in attribute for which element triggers hover motion.
|
|
32
32
|
$_trigger-attribute: 'data-awsui-motion-trigger';
|
|
33
|
-
$_hover-trigger: '[#{$_trigger-attribute}~="hover"]
|
|
33
|
+
$_hover-trigger: '[#{$_trigger-attribute}~="hover"]';
|
|
34
34
|
// A focus owner that plays the motion of icons inside it.
|
|
35
|
-
$_focus-trigger: '[#{$_trigger-attribute}~="focus"]
|
|
35
|
+
$_focus-trigger: '[#{$_trigger-attribute}~="focus"]';
|
|
36
36
|
// A trigger whose focus owner is nested and does not contain the icon (e.g. action card).
|
|
37
37
|
// Matches `:focus-within` during keyboard interaction (the `useFocusVisible` body attribute that
|
|
38
38
|
// focus rings use) instead of `:has(:focus-visible)`: a non-subject `:has()` is costly on every
|
|
39
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"]
|
|
40
|
+
$_delegated-focus-trigger: '[#{$_trigger-attribute}~="delegated-focus"]';
|
|
41
41
|
$_keyboard-focus-within: ':focus-within:where(body[data-awsui-focus-visible="true"] *)';
|
|
42
42
|
|
|
43
|
+
// Every trigger state in one selector, since a selector per state repeats the long prefix in
|
|
44
|
+
// every rule. The arms have equal specificity, so the cascade is the same as separate selectors.
|
|
45
|
+
$_active-trigger: ':is(#{$_hover-trigger}:is(:hover, :focus-visible), #{$_focus-trigger}:focus-visible, #{$_delegated-focus-trigger}#{$_keyboard-focus-within})#{$_enabled-only}';
|
|
46
|
+
|
|
43
47
|
// Opt-in attribute for where the motion should be applied within a trigger region.
|
|
44
48
|
$_target-attribute: 'data-awsui-motion-target';
|
|
45
49
|
$_animating-icon: ':is([#{$_target-attribute}], :where([#{$_target-attribute}] *))';
|
|
@@ -1588,13 +1592,8 @@ $icon-hover-motion: (
|
|
|
1588
1592
|
}
|
|
1589
1593
|
}
|
|
1590
1594
|
|
|
1591
|
-
// Also fires on :focus-visible of the trigger, of a focus owner around the icon, or of a
|
|
1592
|
-
// focus owner nested inside a delegated-focus trigger.
|
|
1593
1595
|
@mixin _on-hover-trigger($suffix) {
|
|
1594
|
-
#{'#{$
|
|
1595
|
-
#{'#{$_hover-trigger}:focus-visible #{$suffix}'},
|
|
1596
|
-
#{'#{$_focus-trigger}:focus-visible #{$suffix}'},
|
|
1597
|
-
#{'#{$_delegated-focus-trigger}#{$_keyboard-focus-within} #{$suffix}'} {
|
|
1596
|
+
#{'#{$_active-trigger} #{$suffix}'} {
|
|
1598
1597
|
@content;
|
|
1599
1598
|
}
|
|
1600
1599
|
}
|
|
@@ -1658,63 +1657,102 @@ $icon-hover-motion: (
|
|
|
1658
1657
|
}
|
|
1659
1658
|
}
|
|
1660
1659
|
|
|
1660
|
+
@function _rest-declarations($spec) {
|
|
1661
|
+
$declarations: ();
|
|
1662
|
+
@if map.get($spec, to) {
|
|
1663
|
+
$declarations: map.merge(
|
|
1664
|
+
$declarations,
|
|
1665
|
+
(
|
|
1666
|
+
transition-property: map.get($spec, property) or transform,
|
|
1667
|
+
transition-duration: map.get($spec, duration),
|
|
1668
|
+
transition-timing-function: map.get($spec, easing),
|
|
1669
|
+
)
|
|
1670
|
+
);
|
|
1671
|
+
}
|
|
1672
|
+
@if map.get($spec, base) {
|
|
1673
|
+
$declarations: map.merge($declarations, map.get($spec, base));
|
|
1674
|
+
}
|
|
1675
|
+
@if map.get($spec, origin) {
|
|
1676
|
+
$declarations: map.set($declarations, transform-origin, map.get($spec, origin));
|
|
1677
|
+
}
|
|
1678
|
+
@return $declarations;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
@function _hover-declarations($spec) {
|
|
1682
|
+
$animation: map.get($spec, animation);
|
|
1683
|
+
@if not $animation {
|
|
1684
|
+
@return map.get($spec, to) or ();
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
$declarations: (
|
|
1688
|
+
animation-name: $animation,
|
|
1689
|
+
animation-duration: map.get($spec, duration),
|
|
1690
|
+
animation-timing-function: map.get($spec, easing),
|
|
1691
|
+
);
|
|
1692
|
+
$iterations: map.get($spec, iterations) or 1;
|
|
1693
|
+
$fill: map.get($spec, fill) or none;
|
|
1694
|
+
$delay: map.get($spec, delay) or 0s;
|
|
1695
|
+
@if $iterations != 1 {
|
|
1696
|
+
$declarations: map.set($declarations, animation-iteration-count, $iterations);
|
|
1697
|
+
}
|
|
1698
|
+
@if $fill != none {
|
|
1699
|
+
$declarations: map.set($declarations, animation-fill-mode, $fill);
|
|
1700
|
+
}
|
|
1701
|
+
@if $delay != 0s {
|
|
1702
|
+
$declarations: map.set($declarations, animation-delay, $delay);
|
|
1703
|
+
}
|
|
1704
|
+
@return $declarations;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
// Appends `.name-$name` to the list stored under `$key`, creating the list if needed.
|
|
1708
|
+
@function _add-name($groups, $key, $name) {
|
|
1709
|
+
$names: map.get($groups, $key) or ();
|
|
1710
|
+
@return map.set($groups, $key, list.append($names, '.name-#{$name}', comma));
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
@function _names-selector($names) {
|
|
1714
|
+
@if list.length($names) == 1 {
|
|
1715
|
+
@return list.nth($names, 1);
|
|
1716
|
+
}
|
|
1717
|
+
@return ':is(#{$names})';
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
// Icons whose specs produce the same declarations on the same part share a rule, so each
|
|
1721
|
+
// distinct motion emits the long trigger and theme prefix once rather than once per icon.
|
|
1722
|
+
// An icon has a single name class, so merging rules across icons cannot change the cascade.
|
|
1661
1723
|
@mixin per-icon-hover-motion {
|
|
1724
|
+
$rest-groups: ();
|
|
1725
|
+
$hover-groups: ();
|
|
1726
|
+
|
|
1662
1727
|
@each $name, $specs in $icon-hover-motion {
|
|
1663
1728
|
@each $spec in _specs($specs) {
|
|
1664
|
-
$
|
|
1665
|
-
$
|
|
1666
|
-
$
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
@
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
@if $to {
|
|
1682
|
-
transition-property: #{$property};
|
|
1683
|
-
transition-duration: $duration;
|
|
1684
|
-
transition-timing-function: $easing;
|
|
1685
|
-
}
|
|
1686
|
-
@if $base {
|
|
1687
|
-
@each $property, $value in $base {
|
|
1688
|
-
#{$property}: #{$value};
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
@if $origin {
|
|
1692
|
-
transform-origin: $origin;
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1729
|
+
$target: _target(map.get($spec, part));
|
|
1730
|
+
$rest: _rest-declarations($spec);
|
|
1731
|
+
$hover: _hover-declarations($spec);
|
|
1732
|
+
@if list.length($rest) > 0 {
|
|
1733
|
+
$rest-groups: _add-name($rest-groups, ($target, $rest), $name);
|
|
1734
|
+
}
|
|
1735
|
+
@if list.length($hover) > 0 {
|
|
1736
|
+
$hover-groups: _add-name($hover-groups, ($target, $hover), $name);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
@each $key, $names in $rest-groups {
|
|
1742
|
+
.icon#{_names-selector($names)} #{list.nth($key, 1)} {
|
|
1743
|
+
@include with-motion {
|
|
1744
|
+
@each $property, $value in list.nth($key, 2) {
|
|
1745
|
+
#{$property}: #{$value};
|
|
1695
1746
|
}
|
|
1696
1747
|
}
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1697
1750
|
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
animation-timing-function: $easing;
|
|
1704
|
-
@if $iterations != 1 {
|
|
1705
|
-
animation-iteration-count: $iterations;
|
|
1706
|
-
}
|
|
1707
|
-
@if $fill != none {
|
|
1708
|
-
animation-fill-mode: $fill;
|
|
1709
|
-
}
|
|
1710
|
-
@if $delay != 0s {
|
|
1711
|
-
animation-delay: $delay;
|
|
1712
|
-
}
|
|
1713
|
-
} @else if $to {
|
|
1714
|
-
@each $property, $value in $to {
|
|
1715
|
-
#{$property}: #{$value};
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1751
|
+
@each $key, $names in $hover-groups {
|
|
1752
|
+
@include _on-hover-trigger('.icon#{$_animating-icon}#{_names-selector($names)} #{list.nth($key, 1)}') {
|
|
1753
|
+
@include with-motion {
|
|
1754
|
+
@each $property, $value in list.nth($key, 2) {
|
|
1755
|
+
#{$property}: #{$value};
|
|
1718
1756
|
}
|
|
1719
1757
|
}
|
|
1720
1758
|
}
|
|
@@ -210,6 +210,12 @@ $neg-divider-w: calc(-1 * #{$divider-w});
|
|
|
210
210
|
box-shadow: inset 0 $neg-divider-w 0 0 awsui.$color-border-dropdown-item-default;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
// Used by Option List, where there is no dropdown border above the first item.
|
|
214
|
+
// Exclude highlighted/selected states to preserve their box-shadow.
|
|
215
|
+
&.hide-top-divider:not(.highlighted):not(.selected):not(.sticky) {
|
|
216
|
+
box-shadow: inset 0 $neg-divider-w 0 0 awsui.$color-border-dropdown-item-default;
|
|
217
|
+
}
|
|
218
|
+
|
|
213
219
|
&.sticky {
|
|
214
220
|
position: sticky;
|
|
215
221
|
inset-block-start: 0;
|
|
@@ -9,8 +9,43 @@
|
|
|
9
9
|
@use '../internal/styles' as styles;
|
|
10
10
|
@use '../internal/styles/tokens' as awsui;
|
|
11
11
|
@use '../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
12
|
+
@use '../internal/styles/style-api' as style-api;
|
|
12
13
|
@use './motion';
|
|
13
14
|
|
|
15
|
+
$border-tokens: style-api.resolve((border-color, border-width), public);
|
|
16
|
+
// A carrier, because the nested `.inner-card` reads the radius.
|
|
17
|
+
$radius-tokens: style-api.resolve((border-radius), carrier);
|
|
18
|
+
@include style-api.register($border-tokens, $radius-tokens);
|
|
19
|
+
@include style-api.docs(
|
|
20
|
+
'root',
|
|
21
|
+
map.merge($border-tokens, $radius-tokens),
|
|
22
|
+
$properties: (background, box-shadow),
|
|
23
|
+
$descriptions: (
|
|
24
|
+
slot:
|
|
25
|
+
'The card box. The header, content and footer contents are your own elements; use `disableHeaderPaddings`, `disableContentPaddings` and `disableFooterPaddings` to let them fill their section.',
|
|
26
|
+
tokens: (
|
|
27
|
+
border-color: 'The border is drawn over the card edges and takes no space.',
|
|
28
|
+
border-width: 'The border is drawn over the card edges and takes no space.',
|
|
29
|
+
border-radius: 'Also rounds the header and footer corners.',
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
@include style-api.docs(
|
|
34
|
+
'header',
|
|
35
|
+
$properties: (background, border),
|
|
36
|
+
$descriptions: (
|
|
37
|
+
slot:
|
|
38
|
+
'Rendered when `header`, `description`, `icon` or `actions` is set. The block-end border is the divider between the header and the content.'
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
@include style-api.docs(
|
|
42
|
+
'footer',
|
|
43
|
+
$properties: (background, border),
|
|
44
|
+
$descriptions: (
|
|
45
|
+
slot: 'Rendered when `footer` is set. The block-start border is the divider between the content and the footer.'
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
|
|
14
49
|
// Variant configuration maps — adjust values here for easy customization
|
|
15
50
|
$variant-border-radius: (
|
|
16
51
|
'embedded': awsui.$border-radius-item-card-embedded,
|
|
@@ -30,15 +65,48 @@ $variant-padding-inline: (
|
|
|
30
65
|
$action-padding-vertical: awsui.$space-scaled-xxs;
|
|
31
66
|
$action-padding-horizontal: awsui.$space-xxs;
|
|
32
67
|
|
|
33
|
-
@
|
|
68
|
+
@function border-radius($variant) {
|
|
34
69
|
$radius: map.get($variant-border-radius, $variant);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
70
|
+
@return style-api.value($radius-tokens, border-radius, var(#{custom-props.$styleItemCardBorderRadius}, #{$radius}));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@mixin apply-border-radius($variant: 'default') {
|
|
74
|
+
$radius: border-radius($variant);
|
|
75
|
+
border-start-start-radius: $radius;
|
|
76
|
+
border-start-end-radius: $radius;
|
|
77
|
+
border-end-start-radius: $radius;
|
|
78
|
+
border-end-end-radius: $radius;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@mixin inherit-start-radius {
|
|
82
|
+
border-start-start-radius: inherit;
|
|
83
|
+
border-start-end-radius: inherit;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@mixin inherit-end-radius {
|
|
87
|
+
border-end-start-radius: inherit;
|
|
88
|
+
border-end-end-radius: inherit;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@function border-width($fallback) {
|
|
92
|
+
@return style-api.value(
|
|
93
|
+
$border-tokens,
|
|
94
|
+
border-width,
|
|
95
|
+
var(#{custom-props.$styleItemCardBorderWidthDefault}, #{$fallback})
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@function border-color($fallback) {
|
|
100
|
+
@return style-api.value(
|
|
101
|
+
$border-tokens,
|
|
102
|
+
border-color,
|
|
103
|
+
var(#{custom-props.$styleItemCardBorderColorDefault}, #{$fallback})
|
|
104
|
+
);
|
|
39
105
|
}
|
|
40
106
|
|
|
41
107
|
.header {
|
|
108
|
+
// Solid on the divider side only, so a consumer border draws only the divider; zero width keeps the default.
|
|
109
|
+
border-block-end: 0 solid transparent;
|
|
42
110
|
&-inner {
|
|
43
111
|
@include styles.font-heading-s;
|
|
44
112
|
}
|
|
@@ -52,12 +120,15 @@ $action-padding-horizontal: awsui.$space-xxs;
|
|
|
52
120
|
}
|
|
53
121
|
|
|
54
122
|
.footer {
|
|
123
|
+
// Solid on the divider side only, so a consumer border draws only the divider; zero width keeps the default.
|
|
124
|
+
border-block-start: 0 solid transparent;
|
|
55
125
|
&:first-child {
|
|
56
126
|
margin-block-start: auto;
|
|
57
127
|
}
|
|
58
128
|
}
|
|
59
129
|
|
|
60
130
|
.root {
|
|
131
|
+
@include style-api.carriers($radius-tokens);
|
|
61
132
|
@include styles.styles-reset();
|
|
62
133
|
box-sizing: border-box;
|
|
63
134
|
position: relative;
|
|
@@ -67,12 +138,15 @@ $action-padding-horizontal: awsui.$space-xxs;
|
|
|
67
138
|
|
|
68
139
|
&:before {
|
|
69
140
|
@include styles.base-pseudo-element;
|
|
141
|
+
@if style-api.enabled() {
|
|
142
|
+
// Public tokens do not inherit, so `::before` takes them from the root.
|
|
143
|
+
--awsui-style-border-color: inherit;
|
|
144
|
+
--awsui-style-border-width: inherit;
|
|
145
|
+
}
|
|
70
146
|
box-shadow: none;
|
|
71
147
|
border-color: transparent;
|
|
72
|
-
border-block: solid
|
|
73
|
-
|
|
74
|
-
border-inline: solid var(#{custom-props.$styleItemCardBorderWidthDefault}, awsui.$border-width-item-card)
|
|
75
|
-
var(#{custom-props.$styleItemCardBorderColorDefault}, awsui.$color-border-item-card);
|
|
148
|
+
border-block: solid border-width(awsui.$border-width-item-card) border-color(awsui.$color-border-item-card);
|
|
149
|
+
border-inline: solid border-width(awsui.$border-width-item-card) border-color(awsui.$color-border-item-card);
|
|
76
150
|
}
|
|
77
151
|
|
|
78
152
|
&::after {
|
|
@@ -80,16 +154,18 @@ $action-padding-horizontal: awsui.$space-xxs;
|
|
|
80
154
|
}
|
|
81
155
|
|
|
82
156
|
&:not(.refresh)::before {
|
|
83
|
-
border-block-start: solid
|
|
84
|
-
|
|
157
|
+
border-block-start: solid border-width(awsui.$border-container-top-width)
|
|
158
|
+
border-color(awsui.$color-border-container-top);
|
|
85
159
|
}
|
|
86
160
|
|
|
87
161
|
&.highlighted {
|
|
88
162
|
background: awsui.$color-background-item-selected;
|
|
89
163
|
|
|
90
164
|
&:before {
|
|
91
|
-
border-block: solid
|
|
92
|
-
|
|
165
|
+
border-block: solid style-api.value($border-tokens, border-width, awsui.$border-width-card-selected)
|
|
166
|
+
style-api.value($border-tokens, border-color, awsui.$color-border-item-card-highlighted);
|
|
167
|
+
border-inline: solid style-api.value($border-tokens, border-width, awsui.$border-width-card-selected)
|
|
168
|
+
style-api.value($border-tokens, border-color, awsui.$color-border-item-card-highlighted);
|
|
93
169
|
}
|
|
94
170
|
}
|
|
95
171
|
|
|
@@ -128,6 +204,20 @@ $action-padding-horizontal: awsui.$space-xxs;
|
|
|
128
204
|
@include apply-border-radius($variant);
|
|
129
205
|
}
|
|
130
206
|
|
|
207
|
+
// So a header or footer background stays inside the rounded card.
|
|
208
|
+
> .inner-card > .header {
|
|
209
|
+
@include inherit-start-radius;
|
|
210
|
+
&:last-child {
|
|
211
|
+
@include inherit-end-radius;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
> .inner-card > .footer {
|
|
215
|
+
@include inherit-end-radius;
|
|
216
|
+
&:first-child {
|
|
217
|
+
@include inherit-start-radius;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
131
221
|
$padding-block: map.get($variant-padding-block, $variant);
|
|
132
222
|
$padding-inline: map.get($variant-padding-inline, $variant);
|
|
133
223
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@use '../internal/styles/index' as styles;
|
|
7
7
|
@use '../internal/styles/tokens' as awsui;
|
|
8
8
|
@use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
|
|
9
|
+
@use '../internal/components/sticky-header/mixins' as sticky-header;
|
|
9
10
|
@use '../internal/components/sticky-scrollbar/mixins' as sticky-scrollbar;
|
|
10
11
|
|
|
11
12
|
.root {
|
|
@@ -40,3 +41,31 @@
|
|
|
40
41
|
.table-grid {
|
|
41
42
|
display: block;
|
|
42
43
|
}
|
|
44
|
+
|
|
45
|
+
// Keeps the copy's cells at the widths copied from the real header.
|
|
46
|
+
.table-copy-fixed {
|
|
47
|
+
table-layout: fixed;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.sticky-slot {
|
|
51
|
+
position: sticky;
|
|
52
|
+
inset-block-start: 0;
|
|
53
|
+
// Above absolutely positioned (virtualized) rows, below overlays.
|
|
54
|
+
z-index: 800;
|
|
55
|
+
background: awsui.$color-background-table-header;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.sticky-slot-stuck {
|
|
59
|
+
box-shadow: awsui.$shadow-sticky-embedded;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.sticky-copy-scroller {
|
|
63
|
+
@include sticky-header.copy-scroller;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.sticky-copy-focus {
|
|
67
|
+
@include focus-visible.when-visible-unfocused {
|
|
68
|
+
// No gutter: the copy's scroller clips anything outside it.
|
|
69
|
+
@include styles.focus-highlight(awsui.$space-none);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
3
3
|
import { ActionCardProps } from './interfaces';
|
|
4
|
-
export type InternalActionCardProps = ActionCardProps & InternalBaseComponentProps
|
|
5
|
-
|
|
4
|
+
export type InternalActionCardProps = ActionCardProps & InternalBaseComponentProps & {
|
|
5
|
+
styleClassNames?: StyleClassNames;
|
|
6
|
+
};
|
|
7
|
+
export interface StyleClassNames {
|
|
8
|
+
root?: string;
|
|
9
|
+
header?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const InternalActionCard: React.ForwardRefExoticComponent<ActionCardProps & InternalBaseComponentProps & {
|
|
12
|
+
styleClassNames?: StyleClassNames;
|
|
13
|
+
} & React.RefAttributes<ActionCardProps.Ref>>;
|
|
6
14
|
export default InternalActionCard;
|
|
7
15
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/action-card/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,MAAM,MAAM,uBAAuB,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/action-card/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,MAAM,MAAM,uBAAuB,GAAG,eAAe,GACnD,0BAA0B,GAAG;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC;AAGJ,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,kBAAkB;sBATF,eAAe;6CAqPpC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|