@cloudscape-design/components-themeable 3.0.1400 → 3.0.1401
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/autosuggest/styles.scss +5 -0
- package/lib/internal/scss/copy-to-clipboard/styles.scss +7 -7
- package/lib/internal/scss/flashbar/collapsible.scss +21 -11
- package/lib/internal/scss/flashbar/styles.scss +26 -8
- package/lib/internal/scss/icon/hover-motion.scss +21 -0
- package/lib/internal/scss/icon/styles.scss +2 -1
- package/lib/internal/scss/internal/components/option/styles.scss +8 -0
- package/lib/internal/scss/internal/components/radio-button/styles.scss +2 -0
- package/lib/internal/scss/internal/components/sticky-header/mixins.scss +11 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/multiselect/styles.scss +22 -0
- package/lib/internal/scss/radio-button/styles.scss +1 -2
- package/lib/internal/scss/radio-group/styles.scss +3 -0
- package/lib/internal/scss/segmented-control/segment.scss +29 -6
- package/lib/internal/scss/segmented-control/styles.scss +26 -4
- package/lib/internal/scss/select/parts/styles.scss +15 -2
- package/lib/internal/scss/select/styles.scss +20 -0
- package/lib/internal/scss/table/resizer/styles.scss +4 -4
- package/lib/internal/scss/table/styles.scss +2 -5
- package/lib/internal/template/autosuggest/index.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/index.js +1 -1
- package/lib/internal/template/autosuggest/index.js.map +1 -1
- package/lib/internal/template/autosuggest/internal.d.ts +6 -0
- package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/internal.js +2 -2
- package/lib/internal/template/autosuggest/internal.js.map +1 -1
- package/lib/internal/template/autosuggest/styles.css.js +3 -3
- package/lib/internal/template/autosuggest/styles.scoped.css +5 -3
- package/lib/internal/template/autosuggest/styles.selectors.js +3 -3
- package/lib/internal/template/cards/index.js +1 -1
- package/lib/internal/template/cards/index.js.map +1 -1
- package/lib/internal/template/container/internal.d.ts +3 -2
- package/lib/internal/template/container/internal.d.ts.map +1 -1
- package/lib/internal/template/container/internal.js +2 -2
- package/lib/internal/template/container/internal.js.map +1 -1
- package/lib/internal/template/container/use-sticky-header.d.ts +0 -8
- package/lib/internal/template/container/use-sticky-header.d.ts.map +1 -1
- package/lib/internal/template/container/use-sticky-header.js +9 -92
- package/lib/internal/template/container/use-sticky-header.js.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js +2 -16
- package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
- package/lib/internal/template/copy-to-clipboard/styles.css.js +10 -10
- package/lib/internal/template/copy-to-clipboard/styles.scoped.css +19 -19
- package/lib/internal/template/copy-to-clipboard/styles.selectors.js +10 -10
- package/lib/internal/template/flashbar/collapsible-flashbar.d.ts +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.js +10 -4
- package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/flash.d.ts +6 -0
- package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
- package/lib/internal/template/flashbar/flash.js +6 -6
- package/lib/internal/template/flashbar/flash.js.map +1 -1
- package/lib/internal/template/flashbar/internal-interfaces.d.ts +11 -1
- package/lib/internal/template/flashbar/internal-interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/internal-interfaces.js.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js +8 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +184 -161
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/icon/generated/icons.d.ts +4 -0
- package/lib/internal/template/icon/generated/icons.d.ts.map +1 -1
- package/lib/internal/template/icon/generated/icons.js +14 -0
- package/lib/internal/template/icon/generated/icons.js.map +1 -1
- package/lib/internal/template/icon/styles.css.js +44 -43
- package/lib/internal/template/icon/styles.scoped.css +109 -107
- package/lib/internal/template/icon/styles.selectors.js +44 -43
- package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +5 -0
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js +2 -2
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/option/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/index.js +2 -2
- package/lib/internal/template/internal/components/option/index.js.map +1 -1
- package/lib/internal/template/internal/components/option/styles.css.js +19 -18
- package/lib/internal/template/internal/components/option/styles.scoped.css +39 -33
- package/lib/internal/template/internal/components/option/styles.selectors.js +19 -18
- package/lib/internal/template/internal/components/radio-button/index.d.ts +1 -1
- package/lib/internal/template/internal/components/radio-button/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/radio-button/index.js.map +1 -1
- package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
- package/lib/internal/template/internal/components/radio-button/styles.scoped.css +36 -12
- package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/sortable-area/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/index.js +34 -4
- package/lib/internal/template/internal/components/sortable-area/index.js.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.js +1 -1
- package/lib/internal/template/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -1
- package/lib/internal/template/{table → internal/components/sticky-header}/sticky-scrolling.d.ts +1 -6
- package/lib/internal/template/internal/components/sticky-header/sticky-scrolling.d.ts.map +1 -0
- package/lib/internal/template/{table → internal/components/sticky-header}/sticky-scrolling.js +2 -7
- package/lib/internal/template/internal/components/sticky-header/sticky-scrolling.js.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.d.ts +2 -0
- package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.d.ts.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.js +39 -0
- package/lib/internal/template/internal/components/sticky-header/use-cells-resize-observer.js.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-header-stuck.d.ts +8 -0
- package/lib/internal/template/internal/components/sticky-header/use-header-stuck.d.ts.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-header-stuck.js +35 -0
- package/lib/internal/template/internal/components/sticky-header/use-header-stuck.js.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-sticky-header-copy.d.ts +14 -0
- package/lib/internal/template/internal/components/sticky-header/use-sticky-header-copy.d.ts.map +1 -0
- package/lib/internal/template/{table/use-sticky-header.js → internal/components/sticky-header/use-sticky-header-copy.js} +7 -8
- package/lib/internal/template/internal/components/sticky-header/use-sticky-header-copy.js.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-sticky-position.d.ts +22 -0
- package/lib/internal/template/internal/components/sticky-header/use-sticky-position.d.ts.map +1 -0
- package/lib/internal/template/internal/components/sticky-header/use-sticky-position.js +57 -0
- package/lib/internal/template/internal/components/sticky-header/use-sticky-position.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/multiselect/index.d.ts.map +1 -1
- package/lib/internal/template/multiselect/index.js +1 -1
- package/lib/internal/template/multiselect/index.js.map +1 -1
- package/lib/internal/template/multiselect/internal.d.ts +12 -1
- package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
- package/lib/internal/template/multiselect/internal.js +9 -5
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/multiselect/styles.css.js +5 -5
- package/lib/internal/template/multiselect/styles.scoped.css +17 -5
- package/lib/internal/template/multiselect/styles.selectors.js +5 -5
- package/lib/internal/template/radio-button/styles.css.js +1 -1
- package/lib/internal/template/radio-button/styles.scoped.css +1 -25
- package/lib/internal/template/radio-button/styles.selectors.js +1 -1
- package/lib/internal/template/radio-group/internal.d.ts +7 -1
- package/lib/internal/template/radio-group/internal.d.ts.map +1 -1
- package/lib/internal/template/radio-group/internal.js +2 -2
- package/lib/internal/template/radio-group/internal.js.map +1 -1
- package/lib/internal/template/radio-group/styles.css.js +5 -5
- package/lib/internal/template/radio-group/styles.scoped.css +7 -6
- package/lib/internal/template/radio-group/styles.selectors.js +5 -5
- package/lib/internal/template/segmented-control/internal-segmented-control.d.ts +3 -1
- package/lib/internal/template/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/internal-segmented-control.js +3 -3
- package/lib/internal/template/segmented-control/internal-segmented-control.js.map +1 -1
- package/lib/internal/template/segmented-control/internal.d.ts +11 -2
- package/lib/internal/template/segmented-control/internal.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/internal.js +3 -2
- package/lib/internal/template/segmented-control/internal.js.map +1 -1
- package/lib/internal/template/segmented-control/segment.d.ts +2 -0
- package/lib/internal/template/segmented-control/segment.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/segment.js +4 -2
- package/lib/internal/template/segmented-control/segment.js.map +1 -1
- package/lib/internal/template/segmented-control/styles.css.js +31 -31
- package/lib/internal/template/segmented-control/styles.scoped.css +119 -82
- package/lib/internal/template/segmented-control/styles.selectors.js +31 -31
- package/lib/internal/template/select/index.d.ts.map +1 -1
- package/lib/internal/template/select/index.js +1 -1
- package/lib/internal/template/select/index.js.map +1 -1
- package/lib/internal/template/select/internal.d.ts +8 -0
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js +4 -4
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/parts/styles.css.js +22 -21
- package/lib/internal/template/select/parts/styles.scoped.css +28 -24
- package/lib/internal/template/select/parts/styles.selectors.js +22 -21
- package/lib/internal/template/select/parts/trigger.d.ts +6 -0
- package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
- package/lib/internal/template/select/parts/trigger.js +4 -4
- package/lib/internal/template/select/parts/trigger.js.map +1 -1
- package/lib/internal/template/select/styles.css.js +3 -3
- package/lib/internal/template/select/styles.scoped.css +14 -3
- package/lib/internal/template/select/styles.selectors.js +3 -3
- package/lib/internal/template/styling/autosuggest.scss +1 -0
- package/lib/internal/template/styling/flashbar.scss +127 -0
- package/lib/internal/template/styling/multiselect.scss +80 -0
- package/lib/internal/template/styling/radio-group.scss +1 -0
- package/lib/internal/template/styling/segmented-control.scss +111 -0
- package/lib/internal/template/styling/select.scss +80 -0
- package/lib/internal/template/table/resizer/styles.css.js +17 -17
- package/lib/internal/template/table/resizer/styles.scoped.css +30 -29
- package/lib/internal/template/table/resizer/styles.selectors.js +17 -17
- package/lib/internal/template/table/sticky-header.d.ts.map +1 -1
- package/lib/internal/template/table/sticky-header.js +8 -2
- package/lib/internal/template/table/sticky-header.js.map +1 -1
- package/lib/internal/template/table/styles.css.js +37 -37
- package/lib/internal/template/table/styles.scoped.css +47 -47
- package/lib/internal/template/table/styles.selectors.js +37 -37
- package/lib/internal/template/table/use-column-widths.d.ts.map +1 -1
- package/lib/internal/template/table/use-column-widths.js +4 -16
- package/lib/internal/template/table/use-column-widths.js.map +1 -1
- 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/token-group/internal.d.ts +5 -1
- package/lib/internal/template/token-group/internal.d.ts.map +1 -1
- package/lib/internal/template/token-group/internal.js +2 -2
- package/lib/internal/template/token-group/internal.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/table/sticky-scrolling.d.ts.map +0 -1
- package/lib/internal/template/table/sticky-scrolling.js.map +0 -1
- package/lib/internal/template/table/use-sticky-header.d.ts +0 -6
- package/lib/internal/template/table/use-sticky-header.d.ts.map +0 -1
- package/lib/internal/template/table/use-sticky-header.js.map +0 -1
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use '../internal/styles/style-api' as style-api;
|
|
7
|
+
|
|
8
|
+
@include style-api.docs-forward('input', 'input');
|
|
9
|
+
@include style-api.docs-forward('dropdown', 'dropdown', 'container');
|
|
10
|
+
|
|
6
11
|
.root {
|
|
7
12
|
inline-size: 100%;
|
|
8
13
|
}
|
|
@@ -19,13 +19,6 @@
|
|
|
19
19
|
inset: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.icon-swap-copy,
|
|
23
|
-
.icon-swap-result {
|
|
24
|
-
position: absolute;
|
|
25
|
-
inset-block-start: 0;
|
|
26
|
-
inset-inline-start: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
22
|
.icon-swap-copy {
|
|
30
23
|
opacity: 1;
|
|
31
24
|
transform: scale(1);
|
|
@@ -38,6 +31,13 @@
|
|
|
38
31
|
@include motion.exiting-with-motion;
|
|
39
32
|
}
|
|
40
33
|
|
|
34
|
+
.icon-swap > .icon-swap-copy,
|
|
35
|
+
.icon-swap > .icon-swap-result {
|
|
36
|
+
position: absolute;
|
|
37
|
+
inset-block-start: 0;
|
|
38
|
+
inset-inline-start: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
41
|
.icon-swap-copied > .icon-swap-copy {
|
|
42
42
|
opacity: 0;
|
|
43
43
|
transform: scale(0);
|
|
@@ -9,8 +9,21 @@
|
|
|
9
9
|
@use '../internal/styles' as styles;
|
|
10
10
|
@use '../internal/styles/typography' as typography;
|
|
11
11
|
@use '../internal/styles/utils/theming' as theming;
|
|
12
|
+
@use '../internal/styles/style-api' as style-api;
|
|
12
13
|
@use './collapsible.motion';
|
|
13
14
|
|
|
15
|
+
// Style API v2. The focus-ring tokens are registered once, in styles.scss.
|
|
16
|
+
$_bar-tokens: style-api.resolve(style-api.$focus-ring, carrier);
|
|
17
|
+
@include style-api.docs(
|
|
18
|
+
'notificationBar',
|
|
19
|
+
$_bar-tokens,
|
|
20
|
+
$properties: (color, background, border, border-radius, box-shadow, padding),
|
|
21
|
+
$descriptions: (
|
|
22
|
+
slot:
|
|
23
|
+
'The bar under the stacked messages that expands and collapses the stack. Rendered for `stackItems` with more than one message; use `:hover` and `:active` for interaction states.'
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
|
|
14
27
|
$notification-bar-top-overlap: (
|
|
15
28
|
'collapsed': calc(#{awsui.$space-scaled-xl} + 3px),
|
|
16
29
|
'expanded': awsui.$space-scaled-s,
|
|
@@ -171,6 +184,7 @@ the grid layout will be:
|
|
|
171
184
|
}
|
|
172
185
|
|
|
173
186
|
.stack > .notification-bar {
|
|
187
|
+
@include style-api.carriers($_bar-tokens);
|
|
174
188
|
@include styles.text-wrapping;
|
|
175
189
|
background: var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-notification-stack-bar);
|
|
176
190
|
border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-notification-stack-bar);
|
|
@@ -203,7 +217,7 @@ the grid layout will be:
|
|
|
203
217
|
> .status > .item-count,
|
|
204
218
|
> .button {
|
|
205
219
|
@include typography.default-text-style;
|
|
206
|
-
color:
|
|
220
|
+
color: inherit;
|
|
207
221
|
cursor: pointer;
|
|
208
222
|
margin-block: 0;
|
|
209
223
|
padding-block: 0;
|
|
@@ -278,9 +292,6 @@ the grid layout will be:
|
|
|
278
292
|
@include theming.one-theme-only {
|
|
279
293
|
padding-inline: 0;
|
|
280
294
|
}
|
|
281
|
-
#{custom-props.$styleFocusRingBoxShadow}: 0 0 0
|
|
282
|
-
var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
|
|
283
|
-
var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-notification-stack-bar-focused);
|
|
284
295
|
|
|
285
296
|
> .icon {
|
|
286
297
|
@include styles.with-motion {
|
|
@@ -296,13 +307,12 @@ the grid layout will be:
|
|
|
296
307
|
}
|
|
297
308
|
|
|
298
309
|
@include focus-visible.when-visible {
|
|
299
|
-
@include
|
|
300
|
-
$gutter: 0px,
|
|
301
|
-
$
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
$box-shadow: var(#{custom-props.$styleFocusRingBoxShadow})
|
|
310
|
+
@include style-api.focus-highlight(
|
|
311
|
+
$gutter-block: 0px,
|
|
312
|
+
$gutter-inline: 0px,
|
|
313
|
+
$radius: var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring),
|
|
314
|
+
$width: var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width),
|
|
315
|
+
$color: var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-notification-stack-bar-focused)
|
|
306
316
|
);
|
|
307
317
|
}
|
|
308
318
|
}
|
|
@@ -8,9 +8,30 @@
|
|
|
8
8
|
@use '../internal/styles' as styles;
|
|
9
9
|
@use '../internal/styles/typography' as typography;
|
|
10
10
|
@use '../internal/styles/foundation' as foundation;
|
|
11
|
+
@use '../internal/styles/style-api' as style-api;
|
|
11
12
|
@use './motion';
|
|
12
13
|
@use './collapsible';
|
|
13
14
|
|
|
15
|
+
// Style API v2. The focus-ring tokens are registered once here, for the item slot and the notificationBar slot
|
|
16
|
+
// (collapsible.scss).
|
|
17
|
+
$_item-tokens: style-api.resolve(style-api.$focus-ring, carrier);
|
|
18
|
+
@include style-api.register($_item-tokens);
|
|
19
|
+
@include style-api.docs(
|
|
20
|
+
'item',
|
|
21
|
+
$_item-tokens,
|
|
22
|
+
$properties: (color, background, border, border-radius, box-shadow, padding),
|
|
23
|
+
$descriptions: (
|
|
24
|
+
slot:
|
|
25
|
+
'One flash message: its box and focus ring. Accepts a class name, or a function of `{ item }` that returns one, so each `type` can take its own class.'
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
@include style-api.docs(
|
|
29
|
+
'icon',
|
|
30
|
+
$properties: (color),
|
|
31
|
+
$descriptions: (slot: 'The status icon, or the spinner for `loading`.')
|
|
32
|
+
);
|
|
33
|
+
@include style-api.docs-forward('dismissButton', 'button', 'root');
|
|
34
|
+
|
|
14
35
|
.flashbar {
|
|
15
36
|
position: relative;
|
|
16
37
|
/* stylelint-disable-next-line selector-max-type */
|
|
@@ -26,6 +47,7 @@
|
|
|
26
47
|
}
|
|
27
48
|
|
|
28
49
|
.flash {
|
|
50
|
+
@include style-api.carriers($_item-tokens);
|
|
29
51
|
position: relative;
|
|
30
52
|
display: flex;
|
|
31
53
|
justify-content: flex-start;
|
|
@@ -41,10 +63,6 @@
|
|
|
41
63
|
overflow-wrap: break-word;
|
|
42
64
|
word-wrap: break-word;
|
|
43
65
|
box-shadow: awsui.$shadow-flash-sticky;
|
|
44
|
-
|
|
45
|
-
#{custom-props.$styleFocusRingBoxShadow}: 0 0 0
|
|
46
|
-
var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
|
|
47
|
-
var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused);
|
|
48
66
|
}
|
|
49
67
|
|
|
50
68
|
.initial-hidden {
|
|
@@ -83,10 +101,10 @@
|
|
|
83
101
|
outline: none;
|
|
84
102
|
}
|
|
85
103
|
@include focus-visible.when-visible {
|
|
86
|
-
@include
|
|
87
|
-
$
|
|
88
|
-
$
|
|
89
|
-
$
|
|
104
|
+
@include style-api.focus-highlight(
|
|
105
|
+
$radius: var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring),
|
|
106
|
+
$width: var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width),
|
|
107
|
+
$color: var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused)
|
|
90
108
|
);
|
|
91
109
|
}
|
|
92
110
|
}
|
|
@@ -692,6 +692,17 @@ $icon-hover-motion: (
|
|
|
692
692
|
),
|
|
693
693
|
),
|
|
694
694
|
),
|
|
695
|
+
'view-vertical-start': (
|
|
696
|
+
(
|
|
697
|
+
part: 'awsui-icon-panel',
|
|
698
|
+
animation: icon-panel-slide-left,
|
|
699
|
+
duration: 600ms,
|
|
700
|
+
easing: cubic-bezier(0.65, 0, 0.35, 1),
|
|
701
|
+
base: (
|
|
702
|
+
transform-box: fill-box,
|
|
703
|
+
),
|
|
704
|
+
),
|
|
705
|
+
),
|
|
695
706
|
'zoom-in': (
|
|
696
707
|
(
|
|
697
708
|
part: 'awsui-icon-arm',
|
|
@@ -1920,6 +1931,16 @@ $icon-hover-motion: (
|
|
|
1920
1931
|
}
|
|
1921
1932
|
}
|
|
1922
1933
|
|
|
1934
|
+
@keyframes icon-panel-slide-left {
|
|
1935
|
+
0%,
|
|
1936
|
+
100% {
|
|
1937
|
+
transform: translateX(0);
|
|
1938
|
+
}
|
|
1939
|
+
45% {
|
|
1940
|
+
transform: translateX(-300%);
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1923
1944
|
@keyframes icon-bar-slide-left {
|
|
1924
1945
|
0%,
|
|
1925
1946
|
100% {
|
|
@@ -29,6 +29,14 @@
|
|
|
29
29
|
color: awsui.$color-text-dropdown-group-label;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
// Inside a trigger (Select `triggerVariant="option"`, inline Token) the option shows the selected value and
|
|
33
|
+
// takes the trigger's font and color, also when disabled, so a font or color set on the trigger reaches it.
|
|
34
|
+
&.in-trigger {
|
|
35
|
+
font-family: inherit;
|
|
36
|
+
font-size: inherit;
|
|
37
|
+
font-weight: inherit;
|
|
38
|
+
color: inherit;
|
|
39
|
+
}
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
.content {
|
|
@@ -14,6 +14,8 @@ $radio-size: awsui.$size-control;
|
|
|
14
14
|
|
|
15
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
|
+
// Registered here, next to the carrier, so every component that renders this control loads the registration.
|
|
18
|
+
@include style-api.register($_control-tokens);
|
|
17
19
|
|
|
18
20
|
.radio-control {
|
|
19
21
|
@include style-api.carriers($_control-tokens);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// The sticky copy scrolls horizontally in step with the body, which owns the visible scrollbar.
|
|
5
|
+
@mixin copy-scroller {
|
|
6
|
+
overflow: auto;
|
|
7
|
+
scrollbar-width: none; /* Firefox */
|
|
8
|
+
&::-webkit-scrollbar {
|
|
9
|
+
display: none; /* Safari and Chrome */
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -5,6 +5,28 @@
|
|
|
5
5
|
|
|
6
6
|
@use '../internal/styles' as styles;
|
|
7
7
|
@use '../internal/styles/tokens' as awsui;
|
|
8
|
+
@use '../internal/styles/style-api' as style-api;
|
|
9
|
+
|
|
10
|
+
// The trigger is the Select trigger part; its placeholder reads the carrier set on `.trigger-button` there.
|
|
11
|
+
$trigger-tokens: style-api.resolve((placeholder-color), carrier);
|
|
12
|
+
@include style-api.register($trigger-tokens);
|
|
13
|
+
@include style-api.docs(
|
|
14
|
+
'trigger',
|
|
15
|
+
$trigger-tokens,
|
|
16
|
+
$properties: (color, background, border, border-radius, box-shadow, padding, font-family, font-size, font-weight),
|
|
17
|
+
$descriptions: (
|
|
18
|
+
slot:
|
|
19
|
+
'The trigger button, which is also the field box. Pass a different class for the states you control (`invalid`, `warning`, `disabled`, `readOnly`); use `:hover` and `:focus` for interaction states.',
|
|
20
|
+
properties: (
|
|
21
|
+
color: 'The placeholder is styled with `--awsui-style-placeholder-color`.',
|
|
22
|
+
box-shadow: 'Also draws the focus ring under `:focus`.',
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
@include style-api.docs('inlineLabel', $properties: (color, background, font-family, font-size, font-weight));
|
|
27
|
+
@include style-api.docs-forward('filter', 'input');
|
|
28
|
+
@include style-api.docs-forward('dropdown', 'dropdown', 'container');
|
|
29
|
+
@include style-api.docs-forward('token', 'token');
|
|
8
30
|
|
|
9
31
|
.root {
|
|
10
32
|
@include styles.styles-reset;
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
@use '../internal/styles' as styles;
|
|
7
7
|
@use '../internal/styles/style-api' as style-api;
|
|
8
8
|
|
|
9
|
-
// The control slot is painted by the shared internal radio button, which reads the same token map.
|
|
9
|
+
// The control slot is painted by the shared internal radio button, which reads the same token map and registers it.
|
|
10
10
|
$control-props: style-api.combine((fill-color, border-color, indicator-color), style-api.$focus-ring);
|
|
11
11
|
$control-tokens: style-api.resolve($control-props, carrier);
|
|
12
|
-
@include style-api.register($control-tokens);
|
|
13
12
|
@include style-api.docs('control', $control-tokens);
|
|
14
13
|
|
|
15
14
|
.radio-button {
|
|
@@ -8,8 +8,16 @@
|
|
|
8
8
|
@use '../internal/styles/foundation' as foundation;
|
|
9
9
|
@use '../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
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
|
|
|
14
|
+
// Style API v2. The root radius is a carrier so the segments can derive their own radius from it; the segment
|
|
15
|
+
// focus ring and the divider (the ::after of the segment) read carriers re-anchored on the segment.
|
|
16
|
+
$root-tokens: style-api.resolve((border-radius), carrier);
|
|
17
|
+
$segment-tokens: style-api.resolve(style-api.$focus-ring, carrier);
|
|
18
|
+
$divider-tokens: style-api.resolve((color, width), carrier);
|
|
19
|
+
@include style-api.register($segment-tokens, $divider-tokens);
|
|
20
|
+
|
|
13
21
|
$default-background: var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-segment-default);
|
|
14
22
|
$default-color: var(#{custom-props.$styleColorDefault}, awsui.$color-text-segment-default);
|
|
15
23
|
$hover-background: var(#{custom-props.$styleBackgroundHover}, awsui.$color-background-segment-hover);
|
|
@@ -23,9 +31,12 @@ $segment-border-width: var(#{$segment-border-width-prop}, 0);
|
|
|
23
31
|
$segment-gap: awsui.$space-static-xxs;
|
|
24
32
|
$segment-divider-width: 1px;
|
|
25
33
|
$one-theme-segment-gap: calc(#{$segment-gap} - #{$segment-divider-width});
|
|
26
|
-
$
|
|
34
|
+
$root-radius: style-api.value($root-tokens, border-radius, awsui.$border-radius-button);
|
|
35
|
+
$segment-radius: calc($root-radius - (#{awsui.$border-width-field} + #{awsui.$border-width-button}));
|
|
27
36
|
|
|
28
37
|
.segment {
|
|
38
|
+
@include style-api.carriers($segment-tokens);
|
|
39
|
+
@include style-api.carriers($divider-tokens);
|
|
29
40
|
@include styles.font-body-m;
|
|
30
41
|
@include styles.text-flex-wrapping;
|
|
31
42
|
@include styles.font-button;
|
|
@@ -69,13 +80,25 @@ $segment-radius: calc(awsui.$border-radius-button - (#{awsui.$border-width-field
|
|
|
69
80
|
}
|
|
70
81
|
|
|
71
82
|
#{custom-props.$styleFocusRingBoxShadow}: 0 0 0
|
|
72
|
-
|
|
73
|
-
|
|
83
|
+
style-api.value(
|
|
84
|
+
$segment-tokens,
|
|
85
|
+
focus-ring-width,
|
|
86
|
+
var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width)
|
|
87
|
+
)
|
|
88
|
+
style-api.value(
|
|
89
|
+
$segment-tokens,
|
|
90
|
+
focus-ring-color,
|
|
91
|
+
var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused)
|
|
92
|
+
);
|
|
74
93
|
|
|
75
94
|
@include focus-visible.when-visible {
|
|
76
95
|
@include styles.focus-highlight(
|
|
77
96
|
$gutter: awsui.$space-segmented-control-focus-outline-gutter,
|
|
78
|
-
$border-radius:
|
|
97
|
+
$border-radius: style-api.value(
|
|
98
|
+
$segment-tokens,
|
|
99
|
+
focus-ring-radius,
|
|
100
|
+
var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring)
|
|
101
|
+
),
|
|
79
102
|
$box-shadow: var(#{custom-props.$styleFocusRingBoxShadow}),
|
|
80
103
|
$z-index: 1 // Prevents adjacent segments from overlapping the focus ring
|
|
81
104
|
);
|
|
@@ -87,8 +110,8 @@ $segment-radius: calc(awsui.$border-radius-button - (#{awsui.$border-width-field
|
|
|
87
110
|
inset-inline-end: calc(-1 * ($segment-gap + $segment-divider-width));
|
|
88
111
|
block-size: calc(100% - (($segment-gap + awsui.$space-static-xxxs) * 2));
|
|
89
112
|
min-block-size: calc(awsui.$line-height-body-m - $segment-gap * 2);
|
|
90
|
-
inline-size: $segment-divider-width;
|
|
91
|
-
background: awsui.$color-border-segment-divider;
|
|
113
|
+
inline-size: style-api.value($divider-tokens, width, $segment-divider-width);
|
|
114
|
+
background: style-api.value($divider-tokens, color, awsui.$color-border-segment-divider);
|
|
92
115
|
z-index: 1;
|
|
93
116
|
}
|
|
94
117
|
&:not(.refresh):not(:last-child)::after {
|
|
@@ -8,8 +8,29 @@
|
|
|
8
8
|
@use 'sass:list' as list;
|
|
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
|
|
|
14
|
+
// Style API v2
|
|
15
|
+
@include style-api.register(seg.$root-tokens);
|
|
16
|
+
@include style-api.docs(
|
|
17
|
+
'root',
|
|
18
|
+
seg.$root-tokens,
|
|
19
|
+
$properties: (background, border),
|
|
20
|
+
$descriptions: (slot: 'The segment group. The radius is also applied to the segments.')
|
|
21
|
+
);
|
|
22
|
+
@include style-api.docs(
|
|
23
|
+
'segment',
|
|
24
|
+
seg.$segment-tokens,
|
|
25
|
+
$properties: (color, background, border, border-radius, box-shadow, padding, font-family, font-size, font-weight),
|
|
26
|
+
$descriptions: (
|
|
27
|
+
slot:
|
|
28
|
+
'Every segment button. Target the selected segment with `[aria-pressed=true]`, a disabled segment with `:disabled` or `[aria-disabled=true]`, and the hover state with `:hover`.'
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
@include style-api.docs('divider', seg.$divider-tokens, $descriptions: (slot: 'The line between two segments.'));
|
|
32
|
+
@include style-api.docs-forward('select', 'select');
|
|
33
|
+
|
|
13
34
|
@function repeatValue($value, $times) {
|
|
14
35
|
$result: ();
|
|
15
36
|
|
|
@@ -25,13 +46,14 @@
|
|
|
25
46
|
}
|
|
26
47
|
|
|
27
48
|
.segment-part {
|
|
49
|
+
@include style-api.carriers(seg.$root-tokens);
|
|
28
50
|
display: inline-grid;
|
|
29
51
|
border-inline: solid awsui.$border-width-field awsui.$color-border-segment-wrapper;
|
|
30
52
|
border-block: solid awsui.$border-width-field awsui.$color-border-segment-wrapper;
|
|
31
|
-
border-start-start-radius:
|
|
32
|
-
border-start-end-radius:
|
|
33
|
-
border-end-start-radius:
|
|
34
|
-
border-end-end-radius:
|
|
53
|
+
border-start-start-radius: seg.$root-radius;
|
|
54
|
+
border-start-end-radius: seg.$root-radius;
|
|
55
|
+
border-end-start-radius: seg.$root-radius;
|
|
56
|
+
border-end-end-radius: seg.$root-radius;
|
|
35
57
|
background-color: awsui.$color-background-segment-wrapper;
|
|
36
58
|
align-items: center;
|
|
37
59
|
min-block-size: calc(awsui.$line-height-body-m + awsui.$space-static-xxs);
|
|
@@ -6,17 +6,30 @@
|
|
|
6
6
|
@use '../../internal/styles' as styles;
|
|
7
7
|
@use '../../internal/styles/tokens' as awsui;
|
|
8
8
|
@use '../../internal/styles/forms/mixins' as forms;
|
|
9
|
+
@use '../../internal/styles/style-api' as style-api;
|
|
9
10
|
@use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
|
|
10
11
|
|
|
12
|
+
// The placeholder is a span inside the trigger button, so the token set on the button (the `trigger` slot of
|
|
13
|
+
// Select and Multiselect) is re-anchored as a carrier there and read here.
|
|
14
|
+
$trigger-tokens: style-api.resolve((placeholder-color), carrier);
|
|
15
|
+
|
|
16
|
+
.trigger-button {
|
|
17
|
+
@include style-api.carriers($trigger-tokens);
|
|
18
|
+
}
|
|
19
|
+
|
|
11
20
|
.placeholder {
|
|
12
|
-
@include styles.form-placeholder
|
|
21
|
+
@include styles.form-placeholder(
|
|
22
|
+
$color: style-api.value($trigger-tokens, placeholder-color, awsui.$color-text-input-placeholder)
|
|
23
|
+
);
|
|
13
24
|
// Placeholder text is purely decorative and not intended to be interacted
|
|
14
25
|
// with. Disable selection so that it doesn't become selectable inside
|
|
15
26
|
// read-only triggers (which enable text selection).
|
|
16
27
|
user-select: none;
|
|
17
28
|
|
|
18
29
|
&.disabled {
|
|
19
|
-
@include styles.form-placeholder-disabled
|
|
30
|
+
@include styles.form-placeholder-disabled(
|
|
31
|
+
$color: style-api.value($trigger-tokens, placeholder-color, awsui.$color-text-input-placeholder-disabled)
|
|
32
|
+
);
|
|
20
33
|
}
|
|
21
34
|
}
|
|
22
35
|
|
|
@@ -4,6 +4,26 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@use '../internal/styles' as styles;
|
|
7
|
+
@use '../internal/styles/style-api' as style-api;
|
|
8
|
+
|
|
9
|
+
$trigger-tokens: style-api.resolve((placeholder-color), carrier);
|
|
10
|
+
@include style-api.register($trigger-tokens);
|
|
11
|
+
@include style-api.docs(
|
|
12
|
+
'trigger',
|
|
13
|
+
$trigger-tokens,
|
|
14
|
+
$properties: (color, background, border, border-radius, box-shadow, padding, font-family, font-size, font-weight),
|
|
15
|
+
$descriptions: (
|
|
16
|
+
slot:
|
|
17
|
+
'The trigger button, which is also the field box. Pass a different class for the states you control (`invalid`, `warning`, `disabled`, `readOnly`); use `:hover` and `:focus` for interaction states.',
|
|
18
|
+
properties: (
|
|
19
|
+
color: 'The placeholder is styled with `--awsui-style-placeholder-color`.',
|
|
20
|
+
box-shadow: 'Also draws the focus ring under `:focus`.',
|
|
21
|
+
)
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
@include style-api.docs('inlineLabel', $properties: (color, background, font-family, font-size, font-weight));
|
|
25
|
+
@include style-api.docs-forward('filter', 'input');
|
|
26
|
+
@include style-api.docs-forward('dropdown', 'dropdown', 'container');
|
|
7
27
|
|
|
8
28
|
.root {
|
|
9
29
|
@include styles.styles-reset;
|
|
@@ -25,10 +25,6 @@ $block-gap: cell-base.$divider-block-gap;
|
|
|
25
25
|
inline-size: $handle-width;
|
|
26
26
|
overflow: hidden;
|
|
27
27
|
z-index: 10;
|
|
28
|
-
|
|
29
|
-
th:last-child > &:has(.divider-interactive).is-borderless {
|
|
30
|
-
inset-inline-end: 0;
|
|
31
|
-
}
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
.resizer-button-wrapper {
|
|
@@ -86,6 +82,10 @@ th:not([data-rightmost]) > .divider,
|
|
|
86
82
|
/* used in test-utils */
|
|
87
83
|
}
|
|
88
84
|
|
|
85
|
+
.resizer-wrapper.is-borderless.is-last {
|
|
86
|
+
inset-inline-end: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
89
|
.resizer-wrapper.visual-refresh.is-borderless.is-last {
|
|
90
90
|
> .divider-interactive {
|
|
91
91
|
inset-inline-end: 0;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
@use '../container/shared' as container;
|
|
10
10
|
@use '../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
11
11
|
@use '../internal/styles/typography/constants.scss' as constants;
|
|
12
|
+
@use '../internal/components/sticky-header/mixins' as sticky-header;
|
|
12
13
|
|
|
13
14
|
.root {
|
|
14
15
|
@include styles.default-text-style;
|
|
@@ -164,8 +165,7 @@ filter search icon.
|
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
.header-secondary {
|
|
167
|
-
|
|
168
|
-
scrollbar-width: none; /* Firefox */
|
|
168
|
+
@include sticky-header.copy-scroller;
|
|
169
169
|
box-sizing: border-box;
|
|
170
170
|
inline-size: 100%;
|
|
171
171
|
border-start-start-radius: 0;
|
|
@@ -187,9 +187,6 @@ filter search icon.
|
|
|
187
187
|
border-start-end-radius: awsui.$border-radius-container;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
&::-webkit-scrollbar {
|
|
191
|
-
display: none; /* Safari and Chrome */
|
|
192
|
-
}
|
|
193
190
|
&.table-has-header {
|
|
194
191
|
border-block-start: awsui.$border-divider-list-width solid awsui.$color-border-container-divider;
|
|
195
192
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FAoDhB,CAAC;AAGF,eAAe,WAAW,CAAC"}
|
|
@@ -31,7 +31,7 @@ const Autosuggest = React.forwardRef(({ filteringType = 'auto', statusType = 'fi
|
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
const externalProps = getExternalProps(props);
|
|
34
|
-
return (React.createElement(InternalAutosuggest, { renderOption: renderOption, filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect, hideEnteredTextOption: hideEnteredTextOption, ...externalProps, ...baseComponentProps, ref: ref, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) }));
|
|
34
|
+
return (React.createElement(InternalAutosuggest, { renderOption: renderOption, filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect, hideEnteredTextOption: hideEnteredTextOption, ...externalProps, ...baseComponentProps, styleClassNames: props.styleClassNames, ref: ref, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) }));
|
|
35
35
|
});
|
|
36
36
|
applyDisplayName(Autosuggest, 'Autosuggest');
|
|
37
37
|
export default Autosuggest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,mBAAwC,MAAM,YAAY,CAAC;AAIlE,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,EACE,aAAa,GAAG,MAAM,EACtB,UAAU,GAAG,UAAU,EACvB,yBAAyB,GAAG,KAAK,EACjC,qBAAqB,GAAG,KAAK,EAC7B,YAAY,EACZ,GAAG,KAAK,EACS,EACnB,GAAoC,EACpC,EAAE;IACF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,aAAa,EAAE;QACzD,KAAK,EAAE;YACL,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,yBAAyB;YACzB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,aAAa;YACb,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,qBAAqB;SACtB;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,KAAK,CAAC,MAAM,KAAK,SAAS;SACtC;KACF,CAAC,CAAC;IAEH,MAAM,0BAA0B,GAAmD;QACjF,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,OAAO;QACd,UAAU,EAAE;YACV,QAAQ,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC/B,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;SACzB;KACF,CAAC;IAEF,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CACL,oBAAC,mBAAmB,IAClB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,yBAAyB,EAAE,yBAAyB,EACpD,qBAAqB,EAAE,qBAAqB,KACxC,aAAa,KACb,kBAAkB,EACtB,eAAe,EAAG,KAA+C,CAAC,eAAe,EACjF,GAAG,EAAE,GAAG,KACJ,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,GAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC7C,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { GeneratedAnalyticsMetadataAutosuggestComponent } from './analytics-metadata/interfaces';\nimport { AutosuggestProps } from './interfaces';\nimport InternalAutosuggest, { StyleClassNames } from './internal';\n\nexport { AutosuggestProps };\n\nconst Autosuggest = React.forwardRef(\n (\n {\n filteringType = 'auto',\n statusType = 'finished',\n disableBrowserAutocorrect = false,\n hideEnteredTextOption = false,\n renderOption,\n ...props\n }: AutosuggestProps,\n ref: React.Ref<AutosuggestProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Autosuggest', {\n props: {\n autoFocus: props.autoFocus,\n disableBrowserAutocorrect,\n expandToViewport: props.expandToViewport,\n filteringType,\n readOnly: props.readOnly,\n virtualScroll: props.virtualScroll,\n hideEnteredTextOption,\n },\n metadata: {\n hasTokens: props.tokens !== undefined,\n },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataAutosuggestComponent = {\n name: 'awsui.Autosuggest',\n label: 'input',\n properties: {\n disabled: `${!!props.disabled}`,\n value: props.value || '',\n },\n };\n\n const externalProps = getExternalProps(props);\n return (\n <InternalAutosuggest\n renderOption={renderOption}\n filteringType={filteringType}\n statusType={statusType}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n hideEnteredTextOption={hideEnteredTextOption}\n {...externalProps}\n {...baseComponentProps}\n styleClassNames={(props as { styleClassNames?: StyleClassNames }).styleClassNames}\n ref={ref}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Autosuggest, 'Autosuggest');\nexport default Autosuggest;\n"]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { StyleClassNames as InputStyleClassNames } from '../input/internal';
|
|
2
3
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
3
4
|
import { AutosuggestProps } from './interfaces';
|
|
4
5
|
interface InternalAutosuggestProps extends AutosuggestProps, InternalBaseComponentProps {
|
|
6
|
+
styleClassNames?: StyleClassNames;
|
|
7
|
+
}
|
|
8
|
+
export interface StyleClassNames {
|
|
9
|
+
input?: InputStyleClassNames;
|
|
10
|
+
dropdown?: string;
|
|
5
11
|
}
|
|
6
12
|
declare const InternalAutosuggest: React.ForwardRefExoticComponent<InternalAutosuggestProps & React.RefAttributes<AutosuggestProps.Ref>>;
|
|
7
13
|
export default InternalAutosuggest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAShE,OAAO,EAAE,eAAe,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAS5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAmB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOjE,UAAU,wBAAyB,SAAQ,gBAAgB,EAAE,0BAA0B;IACrF,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAGD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,mBAAmB,uGAiRvB,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
|
@@ -20,7 +20,7 @@ import AutosuggestOptionsList from './options-list';
|
|
|
20
20
|
import styles from './styles.css.js';
|
|
21
21
|
const InternalAutosuggest = React.forwardRef((props, ref) => {
|
|
22
22
|
var _a, _b, _c;
|
|
23
|
-
const { value, onChange, onBlur, onFocus, onKeyUp, onLoadItems, options, filteringType = 'auto', statusType = 'finished', placeholder, clearAriaLabel, name, disabled, disableBrowserAutocorrect = false, autoFocus, readOnly, ariaLabel, ariaRequired, enteredTextLabel, hideEnteredTextOption, filteringResultsText, onKeyDown, virtualScroll, expandToViewport, onSelect, renderHighlightedAriaLive, style, renderOption, tokens, i18nStrings, __internalRootRef, ...restProps } = props;
|
|
23
|
+
const { value, onChange, onBlur, onFocus, onKeyUp, onLoadItems, options, filteringType = 'auto', statusType = 'finished', placeholder, clearAriaLabel, name, disabled, disableBrowserAutocorrect = false, autoFocus, readOnly, ariaLabel, ariaRequired, enteredTextLabel, hideEnteredTextOption, filteringResultsText, onKeyDown, virtualScroll, expandToViewport, onSelect, renderHighlightedAriaLive, style, renderOption, tokens, i18nStrings, styleClassNames, __internalRootRef, ...restProps } = props;
|
|
24
24
|
checkControlled('Autosuggest', 'value', value, 'onChange', onChange);
|
|
25
25
|
checkOptionValueField('Autosuggest', 'options', options);
|
|
26
26
|
const autosuggestInputRef = useRef(null);
|
|
@@ -152,7 +152,7 @@ const InternalAutosuggest = React.forwardRef((props, ref) => {
|
|
|
152
152
|
const shouldRenderDropdownContent = autosuggestItemsState.items.length !== 0 || !!dropdownStatus.content || (!hideEnteredTextOption && !!value);
|
|
153
153
|
const hasItems = useRef(autosuggestItemsState.items.length > 0);
|
|
154
154
|
hasItems.current = hasItems.current || autosuggestItemsState.items.length > 0;
|
|
155
|
-
return (React.createElement(AutosuggestInput, { ...restProps, className: clsx(styles.root, restProps.className), ref: autosuggestInputRef, __internalRootRef: __internalRootRef, value: value, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, name: name, controlId: controlId, placeholder: placeholder, disabled: disabled, readOnly: readOnly, autoFocus: autoFocus, ariaLabel: ariaLabel, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, disableBrowserAutocorrect: disableBrowserAutocorrect, expandToViewport: effectiveExpandToViewport, ariaControls: listId, ariaActivedescendant: highlightedOptionId, dropdownExpanded: shouldRenderDropdownContent, style: style, tokens: tokens, tokenOverflowAriaLabel: tokenI18n.tokenOverflowAriaLabel, tokenInsertedAnnouncement: tokenI18n.tokenInsertedAriaLabel, tokenDismissLabel: tokenI18n.tokenDismissLabel, dropdownContent: shouldRenderDropdownContent && (React.createElement(AutosuggestOptionsList, { renderOption: renderOption, statusType: statusType, autosuggestItemsState: autosuggestItemsState, autosuggestItemsHandlers: autosuggestItemsHandlers, highlightedOptionId: highlightedOptionId, highlightText: value, listId: listId, controlId: controlId, handleLoadMore: autosuggestLoadMoreHandlers.fireLoadMoreOnScroll, hasDropdownStatus: dropdownStatus.content !== null, virtualScroll: virtualScroll, selectedAriaLabel: selectedAriaLabel, renderHighlightedAriaLive: renderHighlightedAriaLive, listBottom: !dropdownStatus.isSticky ? React.createElement(DropdownFooter, { content: dropdownStatus.content, id: footerControlId }) : null, ariaDescribedby: dropdownStatus.content ? footerControlId : undefined })), dropdownFooter: dropdownStatus.isSticky && dropdownStatus.content ? (React.createElement(DropdownFooter, { id: footerControlId, content: dropdownStatus.content, hasItems: autosuggestItemsState.items.length >= 1 })) : null,
|
|
155
|
+
return (React.createElement(AutosuggestInput, { ...restProps, className: clsx(styles.root, restProps.className), ref: autosuggestInputRef, __internalRootRef: __internalRootRef, value: value, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyUp: handleKeyUp, onKeyDown: handleKeyDown, name: name, controlId: controlId, placeholder: placeholder, disabled: disabled, readOnly: readOnly, autoFocus: autoFocus, ariaLabel: ariaLabel, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, disableBrowserAutocorrect: disableBrowserAutocorrect, expandToViewport: effectiveExpandToViewport, ariaControls: listId, ariaActivedescendant: highlightedOptionId, dropdownExpanded: shouldRenderDropdownContent, style: style, styleClassNames: styleClassNames, tokens: tokens, tokenOverflowAriaLabel: tokenI18n.tokenOverflowAriaLabel, tokenInsertedAnnouncement: tokenI18n.tokenInsertedAriaLabel, tokenDismissLabel: tokenI18n.tokenDismissLabel, dropdownContent: shouldRenderDropdownContent && (React.createElement(AutosuggestOptionsList, { renderOption: renderOption, statusType: statusType, autosuggestItemsState: autosuggestItemsState, autosuggestItemsHandlers: autosuggestItemsHandlers, highlightedOptionId: highlightedOptionId, highlightText: value, listId: listId, controlId: controlId, handleLoadMore: autosuggestLoadMoreHandlers.fireLoadMoreOnScroll, hasDropdownStatus: dropdownStatus.content !== null, virtualScroll: virtualScroll, selectedAriaLabel: selectedAriaLabel, renderHighlightedAriaLive: renderHighlightedAriaLive, listBottom: !dropdownStatus.isSticky ? React.createElement(DropdownFooter, { content: dropdownStatus.content, id: footerControlId }) : null, ariaDescribedby: dropdownStatus.content ? footerControlId : undefined })), dropdownFooter: dropdownStatus.isSticky && dropdownStatus.content ? (React.createElement(DropdownFooter, { id: footerControlId, content: dropdownStatus.content, hasItems: autosuggestItemsState.items.length >= 1 })) : null,
|
|
156
156
|
// Forces dropdown position recalculation when new options are loaded
|
|
157
157
|
dropdownContentKey: hasItems.current.toString(), loopFocus: dropdownStatus.hasRecoveryButton, onCloseDropdown: handleCloseDropdown, onDelayedInput: handleDelayedInput, onPressArrowDown: handlePressArrowDown, onPressArrowUp: handlePressArrowUp, onPressEnter: handlePressEnter }));
|
|
158
158
|
});
|