@cloudscape-design/components 3.0.1392 → 3.0.1393
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/alert/styles.css.js +27 -27
- package/alert/styles.scoped.css +43 -43
- package/alert/styles.selectors.js +27 -27
- package/badge/styles.css.js +10 -10
- package/badge/styles.scoped.css +11 -11
- package/badge/styles.selectors.js +10 -10
- package/button/styles.css.js +23 -23
- package/button/styles.scoped.css +71 -71
- package/button/styles.selectors.js +23 -23
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +8 -8
- package/checkbox/styles.selectors.js +3 -3
- package/dropdown/styles.css.js +20 -20
- package/dropdown/styles.scoped.css +38 -38
- package/dropdown/styles.selectors.js +20 -20
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +3 -4
- package/input/internal.js.map +1 -1
- package/input/styles.css.js +36 -34
- package/input/styles.scoped.css +89 -79
- package/input/styles.selectors.js +36 -34
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/button-trigger/index.d.ts +2 -2
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +3 -2
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +21 -19
- package/internal/components/button-trigger/styles.scoped.css +49 -39
- package/internal/components/button-trigger/styles.selectors.js +21 -19
- package/internal/components/control-group/grouped-control-styles.d.ts +12 -0
- package/internal/components/control-group/grouped-control-styles.d.ts.map +1 -0
- package/internal/components/control-group/grouped-control-styles.js +14 -0
- package/internal/components/control-group/grouped-control-styles.js.map +1 -0
- package/internal/components/control-group/index.d.ts +3 -0
- package/internal/components/control-group/index.d.ts.map +1 -1
- package/internal/components/control-group/index.js +5 -5
- package/internal/components/control-group/index.js.map +1 -1
- package/internal/components/control-group/styles.css.js +8 -4
- package/internal/components/control-group/styles.scoped.css +13 -4
- package/internal/components/control-group/styles.selectors.js +8 -4
- package/internal/components/focus-lock/index.d.ts +6 -0
- package/internal/components/focus-lock/index.d.ts.map +1 -1
- package/internal/components/focus-lock/index.js +8 -3
- package/internal/components/focus-lock/index.js.map +1 -1
- package/internal/context/control-group-context.d.ts +6 -0
- package/internal/context/control-group-context.d.ts.map +1 -1
- package/internal/context/control-group-context.js +3 -1
- package/internal/context/control-group-context.js.map +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/link/styles.css.js +21 -21
- package/link/styles.scoped.css +73 -73
- package/link/styles.selectors.js +21 -21
- package/manifest.json +2 -2
- package/modal/index.d.ts +1 -0
- package/modal/index.d.ts.map +1 -1
- package/modal/index.js +6 -5
- package/modal/index.js.map +1 -1
- package/modal/interfaces.d.ts +7 -0
- package/modal/interfaces.d.ts.map +1 -1
- package/modal/interfaces.js.map +1 -1
- package/modal/internal.js +23 -6
- package/modal/internal.js.map +1 -1
- package/modal/styles.css.js +32 -31
- package/modal/styles.scoped.css +49 -46
- package/modal/styles.selectors.js +32 -31
- package/multiselect/internal.d.ts.map +1 -1
- package/multiselect/internal.js +7 -3
- package/multiselect/internal.js.map +1 -1
- package/package.json +1 -1
- package/prompt-input/styles.css.js +26 -26
- package/prompt-input/styles.scoped.css +57 -53
- package/prompt-input/styles.selectors.js +26 -26
- package/radio-button/styles.css.js +1 -1
- package/radio-button/styles.scoped.css +2 -2
- package/radio-button/styles.selectors.js +1 -1
- package/segmented-control/internal-segmented-control.d.ts +3 -3
- package/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/segmented-control/internal-segmented-control.js +8 -5
- package/segmented-control/internal-segmented-control.js.map +1 -1
- package/segmented-control/internal.d.ts.map +1 -1
- package/segmented-control/internal.js +4 -6
- package/segmented-control/internal.js.map +1 -1
- package/segmented-control/segment.d.ts +1 -0
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js +2 -2
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +26 -21
- package/segmented-control/styles.scoped.css +75 -43
- package/segmented-control/styles.selectors.js +26 -21
- package/select/internal.js +2 -2
- package/select/internal.js.map +1 -1
- package/select/parts/trigger.d.ts +2 -2
- package/select/parts/trigger.d.ts.map +1 -1
- package/select/parts/trigger.js +2 -2
- package/select/parts/trigger.js.map +1 -1
- package/steps/styles.css.js +17 -17
- package/steps/styles.scoped.css +35 -35
- package/steps/styles.selectors.js +17 -17
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +20 -20
- package/toggle/styles.selectors.js +10 -10
|
@@ -38,10 +38,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
38
38
|
syntax: "*";
|
|
39
39
|
inherits: false;
|
|
40
40
|
}
|
|
41
|
-
/* awsui:style-api-slot name=control tokens=color, background-color, border-color, focus-ring-color, focus-ring-width, focus-ring-radius, focus-ring-gutter-block, focus-ring-gutter-inline */
|
|
42
|
-
/* awsui:style-api-slot name=label tokens=color */
|
|
43
|
-
/* awsui:style-api-slot name=description tokens=color */
|
|
44
|
-
.
|
|
41
|
+
/* awsui:style-api-slot name=control tokens=color, background-color, border-color, focus-ring-color, focus-ring-width, focus-ring-radius, focus-ring-gutter-block, focus-ring-gutter-inline properties= */
|
|
42
|
+
/* awsui:style-api-slot name=label tokens=color properties= */
|
|
43
|
+
/* awsui:style-api-slot name=description tokens=color properties= */
|
|
44
|
+
.awsui_root_k2y2q_1svvf_44.awsui_root_k2y2q_1svvf_44:not(#\9) {
|
|
45
45
|
border-collapse: separate;
|
|
46
46
|
border-spacing: 0;
|
|
47
47
|
box-sizing: border-box;
|
|
@@ -74,7 +74,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
74
74
|
display: flex;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.awsui_checkbox-
|
|
77
|
+
.awsui_checkbox-control_k2y2q_1svvf_77:not(#\9) {
|
|
78
78
|
--awsui-internal-style-color: var(--awsui-style-color);
|
|
79
79
|
--awsui-internal-style-background-color: var(--awsui-style-background-color);
|
|
80
80
|
--awsui-internal-style-border-color: var(--awsui-style-border-color);
|
|
@@ -90,14 +90,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
inline-size: var(--size-control-jpgj8e, 16px);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.
|
|
93
|
+
.awsui_outline_k2y2q_1svvf_93:not(#\9) {
|
|
94
94
|
position: relative;
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
.awsui_outline_k2y2q_1svvf_93:not(#\9) {
|
|
97
97
|
outline: 2px dotted transparent;
|
|
98
98
|
outline-offset: calc(var(--awsui-internal-style-focus-ring-gutter-inline, 2px) - 1px);
|
|
99
99
|
}
|
|
100
|
-
.
|
|
100
|
+
.awsui_outline_k2y2q_1svvf_93:not(#\9)::before {
|
|
101
101
|
content: " ";
|
|
102
102
|
display: block;
|
|
103
103
|
position: absolute;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"checkbox-control": "awsui_checkbox-
|
|
7
|
-
"outline": "
|
|
5
|
+
"root": "awsui_root_k2y2q_1svvf_44",
|
|
6
|
+
"checkbox-control": "awsui_checkbox-control_k2y2q_1svvf_77",
|
|
7
|
+
"outline": "awsui_outline_k2y2q_1svvf_93"
|
|
8
8
|
};
|
|
9
9
|
|
package/dropdown/styles.css.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"dropdown-content-wrapper": "awsui_dropdown-content-
|
|
5
|
-
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-
|
|
6
|
-
"refresh": "
|
|
7
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
8
|
-
"root": "
|
|
9
|
-
"interior": "
|
|
10
|
-
"dropdown": "
|
|
11
|
-
"use-portal": "awsui_use-
|
|
12
|
-
"is-empty": "awsui_is-
|
|
13
|
-
"dropdown-drop-up": "awsui_dropdown-drop-
|
|
14
|
-
"with-limited-width": "awsui_with-limited-
|
|
15
|
-
"dropdown-drop-left": "awsui_dropdown-drop-
|
|
16
|
-
"dropdown-drop-right": "awsui_dropdown-drop-
|
|
17
|
-
"occupy-entire-width": "awsui_occupy-entire-
|
|
18
|
-
"use-flexible-width": "awsui_use-flexible-
|
|
19
|
-
"hide-block-border": "awsui_hide-block-
|
|
20
|
-
"open": "
|
|
21
|
-
"nowrap": "
|
|
22
|
-
"dropdown-content": "awsui_dropdown-
|
|
23
|
-
"stretch-trigger-height": "awsui_stretch-trigger-
|
|
4
|
+
"dropdown-content-wrapper": "awsui_dropdown-content-wrapper_9duf6_184t9_13",
|
|
5
|
+
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_9duf6_184t9_1",
|
|
6
|
+
"refresh": "awsui_refresh_9duf6_184t9_34",
|
|
7
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_9duf6_184t9_1",
|
|
8
|
+
"root": "awsui_root_9duf6_184t9_76",
|
|
9
|
+
"interior": "awsui_interior_9duf6_184t9_109",
|
|
10
|
+
"dropdown": "awsui_dropdown_9duf6_184t9_13",
|
|
11
|
+
"use-portal": "awsui_use-portal_9duf6_184t9_119",
|
|
12
|
+
"is-empty": "awsui_is-empty_9duf6_184t9_199",
|
|
13
|
+
"dropdown-drop-up": "awsui_dropdown-drop-up_9duf6_184t9_206",
|
|
14
|
+
"with-limited-width": "awsui_with-limited-width_9duf6_184t9_210",
|
|
15
|
+
"dropdown-drop-left": "awsui_dropdown-drop-left_9duf6_184t9_213",
|
|
16
|
+
"dropdown-drop-right": "awsui_dropdown-drop-right_9duf6_184t9_216",
|
|
17
|
+
"occupy-entire-width": "awsui_occupy-entire-width_9duf6_184t9_219",
|
|
18
|
+
"use-flexible-width": "awsui_use-flexible-width_9duf6_184t9_222",
|
|
19
|
+
"hide-block-border": "awsui_hide-block-border_9duf6_184t9_230",
|
|
20
|
+
"open": "awsui_open_9duf6_184t9_239",
|
|
21
|
+
"nowrap": "awsui_nowrap_9duf6_184t9_248",
|
|
22
|
+
"dropdown-content": "awsui_dropdown-content_9duf6_184t9_13",
|
|
23
|
+
"stretch-trigger-height": "awsui_stretch-trigger-height_9duf6_184t9_259"
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -10,10 +10,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
10
10
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
11
|
SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
*/
|
|
13
|
-
.awsui_dropdown-content-
|
|
14
|
-
animation: awsui_awsui-motion-fade-in-
|
|
13
|
+
.awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
14
|
+
animation: awsui_awsui-motion-fade-in-dropdown_9duf6_184t9_1 var(--motion-duration-show-quick-24aj9c, 135ms) var(--motion-easing-show-quick-gb8584, ease-out);
|
|
15
15
|
}
|
|
16
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
16
|
+
@keyframes awsui_awsui-motion-fade-in-dropdown_9duf6_184t9_1 {
|
|
17
17
|
from {
|
|
18
18
|
opacity: 0.4;
|
|
19
19
|
}
|
|
@@ -22,22 +22,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
@media (prefers-reduced-motion: reduce) {
|
|
25
|
-
.awsui_dropdown-content-
|
|
25
|
+
.awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
26
26
|
animation: none;
|
|
27
27
|
transition: none;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
.awsui-motion-disabled .awsui_dropdown-content-
|
|
30
|
+
.awsui-motion-disabled .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9), .awsui-mode-entering .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
31
31
|
animation: none;
|
|
32
32
|
transition: none;
|
|
33
33
|
}
|
|
34
|
-
.awsui_dropdown-content-
|
|
34
|
+
.awsui_dropdown-content-wrapper_9duf6_184t9_13.awsui_refresh_9duf6_184t9_34:not(#\9) {
|
|
35
35
|
transform-origin: top;
|
|
36
|
-
animation-name: awsui_awsui-motion-fade-in-
|
|
36
|
+
animation-name: awsui_awsui-motion-fade-in-0_9duf6_184t9_1;
|
|
37
37
|
animation-duration: var(--motion-duration-show-quick-24aj9c, 135ms);
|
|
38
38
|
animation-timing-function: var(--motion-easing-show-quick-gb8584, ease-out);
|
|
39
39
|
}
|
|
40
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
40
|
+
@keyframes awsui_awsui-motion-fade-in-0_9duf6_184t9_1 {
|
|
41
41
|
from {
|
|
42
42
|
opacity: 0;
|
|
43
43
|
}
|
|
@@ -46,12 +46,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
@media (prefers-reduced-motion: reduce) {
|
|
49
|
-
.awsui_dropdown-content-
|
|
49
|
+
.awsui_dropdown-content-wrapper_9duf6_184t9_13.awsui_refresh_9duf6_184t9_34:not(#\9) {
|
|
50
50
|
animation: none;
|
|
51
51
|
transition: none;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
.awsui-motion-disabled .awsui_dropdown-content-
|
|
54
|
+
.awsui-motion-disabled .awsui_dropdown-content-wrapper_9duf6_184t9_13.awsui_refresh_9duf6_184t9_34:not(#\9), .awsui-mode-entering .awsui_dropdown-content-wrapper_9duf6_184t9_13.awsui_refresh_9duf6_184t9_34:not(#\9) {
|
|
55
55
|
animation: none;
|
|
56
56
|
transition: none;
|
|
57
57
|
}
|
|
@@ -72,8 +72,8 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
72
72
|
syntax: "*";
|
|
73
73
|
inherits: false;
|
|
74
74
|
}
|
|
75
|
-
/* awsui:style-api-slot name=dropdown tokens=background-color, border-color, border-width, border-radius */
|
|
76
|
-
.
|
|
75
|
+
/* awsui:style-api-slot name=dropdown tokens=background-color, border-color, border-width, border-radius properties= */
|
|
76
|
+
.awsui_root_9duf6_184t9_76:not(#\9) {
|
|
77
77
|
border-collapse: separate;
|
|
78
78
|
border-spacing: 0;
|
|
79
79
|
box-sizing: border-box;
|
|
@@ -106,34 +106,34 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
106
106
|
position: relative;
|
|
107
107
|
white-space: inherit;
|
|
108
108
|
}
|
|
109
|
-
.
|
|
109
|
+
.awsui_root_9duf6_184t9_76.awsui_interior_9duf6_184t9_109:not(#\9) {
|
|
110
110
|
position: static;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.awsui_dropdown_9duf6_184t9_13:not(#\9) {
|
|
114
114
|
position: absolute;
|
|
115
115
|
display: none;
|
|
116
116
|
z-index: 2000;
|
|
117
117
|
transform-origin: top;
|
|
118
118
|
}
|
|
119
|
-
.
|
|
119
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_use-portal_9duf6_184t9_119:not(#\9) {
|
|
120
120
|
z-index: 7000;
|
|
121
121
|
}
|
|
122
|
-
.
|
|
122
|
+
.awsui_dropdown_9duf6_184t9_13:not(#\9):not(.awsui_interior_9duf6_184t9_109) {
|
|
123
123
|
transform: translateY(0px);
|
|
124
124
|
transition: transform var(--motion-duration-show-quick-24aj9c, 135ms);
|
|
125
125
|
}
|
|
126
126
|
@media (prefers-reduced-motion: reduce) {
|
|
127
|
-
.
|
|
127
|
+
.awsui_dropdown_9duf6_184t9_13:not(#\9):not(.awsui_interior_9duf6_184t9_109) {
|
|
128
128
|
animation: none;
|
|
129
129
|
transition: none;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
.awsui-motion-disabled .
|
|
132
|
+
.awsui-motion-disabled .awsui_dropdown_9duf6_184t9_13:not(#\9):not(.awsui_interior_9duf6_184t9_109), .awsui-mode-entering .awsui_dropdown_9duf6_184t9_13:not(#\9):not(.awsui_interior_9duf6_184t9_109) {
|
|
133
133
|
animation: none;
|
|
134
134
|
transition: none;
|
|
135
135
|
}
|
|
136
|
-
.awsui_dropdown-content-
|
|
136
|
+
.awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
137
137
|
border-collapse: separate;
|
|
138
138
|
border-spacing: 0;
|
|
139
139
|
box-sizing: border-box;
|
|
@@ -179,7 +179,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
179
179
|
border-block: var(--border-divider-list-width-2qbfmz, 1px) solid var(--color-border-container-top-9e7tpv, transparent);
|
|
180
180
|
box-sizing: border-box;
|
|
181
181
|
}
|
|
182
|
-
.awsui_dropdown-content-
|
|
182
|
+
.awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9)::after {
|
|
183
183
|
content: "";
|
|
184
184
|
position: absolute;
|
|
185
185
|
z-index: 1;
|
|
@@ -196,66 +196,66 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
196
196
|
border-end-end-radius: var(--awsui-internal-style-border-radius, var(--awsui-dropdown-content-border-radius-ka4djm, var(--border-radius-dropdown-azs8zp, 8px)));
|
|
197
197
|
pointer-events: none;
|
|
198
198
|
}
|
|
199
|
-
.awsui_dropdown-content-
|
|
199
|
+
.awsui_dropdown-content-wrapper_9duf6_184t9_13.awsui_is-empty_9duf6_184t9_199:not(#\9)::after {
|
|
200
200
|
display: none;
|
|
201
201
|
}
|
|
202
|
-
.
|
|
202
|
+
.awsui_dropdown_9duf6_184t9_13 > .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
203
203
|
border-block-start: var(--border-divider-list-width-2qbfmz, 1px) solid var(--color-border-container-top-9e7tpv, transparent);
|
|
204
204
|
border-block-end: var(--border-divider-list-width-2qbfmz, 1px) solid var(--color-border-dropdown-group-y5droz, #c6c6cd);
|
|
205
205
|
}
|
|
206
|
-
.awsui_dropdown-drop-
|
|
206
|
+
.awsui_dropdown-drop-up_9duf6_184t9_206 > .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
207
207
|
transform-origin: bottom;
|
|
208
208
|
box-shadow: var(--shadow-dropup-40ssty, 0px 4px 20px 1px rgba(0, 7, 22, 0.1));
|
|
209
209
|
}
|
|
210
|
-
.awsui_dropdown-drop-
|
|
210
|
+
.awsui_dropdown-drop-up_9duf6_184t9_206.awsui_with-limited-width_9duf6_184t9_210 > .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
211
211
|
border-block-start: none;
|
|
212
212
|
}
|
|
213
|
-
.awsui_dropdown-drop-
|
|
213
|
+
.awsui_dropdown-drop-left_9duf6_184t9_213:not(#\9) {
|
|
214
214
|
inset-inline-end: 0;
|
|
215
215
|
}
|
|
216
|
-
.awsui_dropdown-drop-
|
|
216
|
+
.awsui_dropdown-drop-right_9duf6_184t9_216:not(#\9) {
|
|
217
217
|
inset-inline-start: 0;
|
|
218
218
|
}
|
|
219
|
-
.
|
|
219
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_occupy-entire-width_9duf6_184t9_219:not(#\9) {
|
|
220
220
|
min-inline-size: 100%;
|
|
221
221
|
}
|
|
222
|
-
.
|
|
222
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_use-flexible-width_9duf6_184t9_222:not(#\9) {
|
|
223
223
|
inline-size: max-content;
|
|
224
224
|
max-inline-size: var(--awsui-dropdown-default-max-width-ka4djm, none);
|
|
225
225
|
min-inline-size: var(--awsui-dropdown-default-min-width-ka4djm, auto);
|
|
226
226
|
}
|
|
227
|
-
.
|
|
227
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_interior_9duf6_184t9_109 > .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
228
228
|
margin-block-start: -1px;
|
|
229
229
|
}
|
|
230
|
-
.
|
|
230
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_hide-block-border_9duf6_184t9_230 > .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
231
231
|
border-block-start: none;
|
|
232
232
|
}
|
|
233
|
-
.
|
|
233
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_hide-block-border_9duf6_184t9_230:not(#\9):not(.awsui_dropdown-drop-up_9duf6_184t9_206) > .awsui_dropdown-content-wrapper_9duf6_184t9_13 {
|
|
234
234
|
border-block-end: none;
|
|
235
235
|
}
|
|
236
|
-
.
|
|
236
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_hide-block-border_9duf6_184t9_230.awsui_refresh_9duf6_184t9_34 > .awsui_dropdown-content-wrapper_9duf6_184t9_13:not(#\9) {
|
|
237
237
|
border-block-end: none;
|
|
238
238
|
}
|
|
239
|
-
.
|
|
239
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_open_9duf6_184t9_239:not(#\9) {
|
|
240
240
|
display: block;
|
|
241
241
|
}
|
|
242
|
-
.
|
|
242
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_open_9duf6_184t9_239:not(#\9):not(.awsui_interior_9duf6_184t9_109).awsui_refresh_9duf6_184t9_34[data-animating=true] {
|
|
243
243
|
transform: translateY(4px);
|
|
244
244
|
}
|
|
245
|
-
.
|
|
245
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_open_9duf6_184t9_239:not(#\9):not(.awsui_interior_9duf6_184t9_109).awsui_refresh_9duf6_184t9_34[data-animating=true].awsui_dropdown-drop-up_9duf6_184t9_206 {
|
|
246
246
|
transform: translateY(-4px);
|
|
247
247
|
}
|
|
248
|
-
.
|
|
248
|
+
.awsui_dropdown_9duf6_184t9_13.awsui_open_9duf6_184t9_239.awsui_nowrap_9duf6_184t9_248:not(#\9) {
|
|
249
249
|
white-space: nowrap;
|
|
250
250
|
overflow: scroll;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
.awsui_dropdown-
|
|
253
|
+
.awsui_dropdown-content_9duf6_184t9_13:not(#\9) {
|
|
254
254
|
display: flex;
|
|
255
255
|
flex-direction: column;
|
|
256
256
|
inline-size: 100%;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
.awsui_stretch-trigger-
|
|
259
|
+
.awsui_stretch-trigger-height_9duf6_184t9_259:not(#\9) {
|
|
260
260
|
block-size: 100%;
|
|
261
261
|
}
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"dropdown-content-wrapper": "awsui_dropdown-content-
|
|
6
|
-
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-
|
|
7
|
-
"refresh": "
|
|
8
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
9
|
-
"root": "
|
|
10
|
-
"interior": "
|
|
11
|
-
"dropdown": "
|
|
12
|
-
"use-portal": "awsui_use-
|
|
13
|
-
"is-empty": "awsui_is-
|
|
14
|
-
"dropdown-drop-up": "awsui_dropdown-drop-
|
|
15
|
-
"with-limited-width": "awsui_with-limited-
|
|
16
|
-
"dropdown-drop-left": "awsui_dropdown-drop-
|
|
17
|
-
"dropdown-drop-right": "awsui_dropdown-drop-
|
|
18
|
-
"occupy-entire-width": "awsui_occupy-entire-
|
|
19
|
-
"use-flexible-width": "awsui_use-flexible-
|
|
20
|
-
"hide-block-border": "awsui_hide-block-
|
|
21
|
-
"open": "
|
|
22
|
-
"nowrap": "
|
|
23
|
-
"dropdown-content": "awsui_dropdown-
|
|
24
|
-
"stretch-trigger-height": "awsui_stretch-trigger-
|
|
5
|
+
"dropdown-content-wrapper": "awsui_dropdown-content-wrapper_9duf6_184t9_13",
|
|
6
|
+
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_9duf6_184t9_1",
|
|
7
|
+
"refresh": "awsui_refresh_9duf6_184t9_34",
|
|
8
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_9duf6_184t9_1",
|
|
9
|
+
"root": "awsui_root_9duf6_184t9_76",
|
|
10
|
+
"interior": "awsui_interior_9duf6_184t9_109",
|
|
11
|
+
"dropdown": "awsui_dropdown_9duf6_184t9_13",
|
|
12
|
+
"use-portal": "awsui_use-portal_9duf6_184t9_119",
|
|
13
|
+
"is-empty": "awsui_is-empty_9duf6_184t9_199",
|
|
14
|
+
"dropdown-drop-up": "awsui_dropdown-drop-up_9duf6_184t9_206",
|
|
15
|
+
"with-limited-width": "awsui_with-limited-width_9duf6_184t9_210",
|
|
16
|
+
"dropdown-drop-left": "awsui_dropdown-drop-left_9duf6_184t9_213",
|
|
17
|
+
"dropdown-drop-right": "awsui_dropdown-drop-right_9duf6_184t9_216",
|
|
18
|
+
"occupy-entire-width": "awsui_occupy-entire-width_9duf6_184t9_219",
|
|
19
|
+
"use-flexible-width": "awsui_use-flexible-width_9duf6_184t9_222",
|
|
20
|
+
"hide-block-border": "awsui_hide-block-border_9duf6_184t9_230",
|
|
21
|
+
"open": "awsui_open_9duf6_184t9_239",
|
|
22
|
+
"nowrap": "awsui_nowrap_9duf6_184t9_248",
|
|
23
|
+
"dropdown-content": "awsui_dropdown-content_9duf6_184t9_13",
|
|
24
|
+
"stretch-trigger-height": "awsui_stretch-trigger-height_9duf6_184t9_259"
|
|
25
25
|
};
|
|
26
26
|
|
package/input/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":"AAEA,OAA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AAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAE/E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,8BAA8B,CAAC,EAAE,YAAY,CAAC;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;;AAgUD,wBAA+C"}
|
package/input/internal.js
CHANGED
|
@@ -8,6 +8,7 @@ import InternalButton from '../button/internal';
|
|
|
8
8
|
import { useInternalI18n } from '../i18n/context';
|
|
9
9
|
import InternalIcon from '../icon/internal';
|
|
10
10
|
import { getBaseProps } from '../internal/base-component';
|
|
11
|
+
import { getGroupedControlClassNames } from '../internal/components/control-group/grouped-control-styles';
|
|
11
12
|
import { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';
|
|
12
13
|
import { useFormFieldContext } from '../internal/context/form-field-context';
|
|
13
14
|
import { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';
|
|
@@ -20,7 +21,7 @@ import styles from './styles.css.js';
|
|
|
20
21
|
function InternalInput({ type = 'text', step, inputMode, autoComplete = true, ariaLabel, clearAriaLabel: clearAriaLabelOverride, name, value, placeholder, autoFocus, disabled, readOnly, disableBrowserAutocorrect, spellcheck, __noBorderRadius, __startIcon, __startIconVariant = 'subtle', __onStartIconClick, ariaRequired, __endIcon, __onEndIconClick, onKeyDown, onKeyUp, onChange, __onDelayedInput, __onBlurWithDetail, onBlur, onFocus, nativeInputAttributes, __internalRootRef, __inheritFormFieldProps, __injectAnalyticsComponentMetadata, __skipNativeAttributesWarnings, __fullWidth, style, prefix, suffix, inlineLabelText, ...rest }, ref) {
|
|
21
22
|
var _a;
|
|
22
23
|
const baseProps = getBaseProps(rest);
|
|
23
|
-
const
|
|
24
|
+
const groupedControlProps = useGroupedControlContext();
|
|
24
25
|
const i18n = useInternalI18n('input');
|
|
25
26
|
const fireDelayedInput = useDebounceCallback((value) => fireNonCancelableEvent(__onDelayedInput, { value }));
|
|
26
27
|
const handleChange = (value) => {
|
|
@@ -52,9 +53,7 @@ function InternalInput({ type = 'text', step, inputMode, autoComplete = true, ar
|
|
|
52
53
|
const hasPrefix = !!prefix;
|
|
53
54
|
const hasSuffix = !!suffix;
|
|
54
55
|
const hasPrefixOrSuffix = hasPrefix || hasSuffix;
|
|
55
|
-
const groupedControlClasses =
|
|
56
|
-
? [styles.grouped, styles[`grouped-${groupedControlPosition}`]]
|
|
57
|
-
: [];
|
|
56
|
+
const groupedControlClasses = getGroupedControlClassNames(styles, groupedControlProps);
|
|
58
57
|
const inputStyles = getInputStyles(style);
|
|
59
58
|
const nativeInputStyles = hasPrefixOrSuffix && inputStyles
|
|
60
59
|
? { ...inputStyles, borderRadius: undefined, borderWidth: undefined }
|
package/input/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AA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AC;IAEF,MAAM,cAAc,GAAG,eAAe,CAAC,CAAC,CAAC,CACvC,gCACM,SAAS,EACb,SAAS,EAAE,IAAI,CACb,SAAS,CAAC,SAAS,EACnB,MAAM,CAAC,sBAAsB,CAAC,EAC9B,WAAW,IAAI,MAAM,CAAC,iCAAiC,CAAC,CACzD;QAED,+BAAO,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAAC,IAC7G,eAAe,CACV;QACR,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,8BAA8B,CAAC,EACtC,WAAW,IAAI,MAAM,CAAC,yCAAyC,CAAC,CACjE,IAEA,2BAA2B,EAAE,CAC1B,CACF,CACP,CAAC,CAAC,CAAC,CACF,2BAA2B,CAAC,SAAS,CAAC,CACvC,CAAC;IACF,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport {\n copyAnalyticsMetadataAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { isDevelopment } from '../internal/is-development';\nimport WithNativeAttributes, { SkipWarnings } from '../internal/utils/with-native-attributes';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport {\n GeneratedAnalyticsMetadataInputClearInput,\n GeneratedAnalyticsMetadataInputComponent,\n} from './analytics-metadata/interfaces';\nimport { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputProps } from './interfaces';\nimport { getInputStyles } from './styles';\nimport { convertAutoComplete, useSearchProps } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __startIcon?: IconProps['name'];\n __startIconVariant?: IconProps['variant'];\n __onStartIconClick?: () => void;\n\n __endIcon?: IconProps['name'];\n __onEndIconClick?: () => void;\n\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __skipNativeAttributesWarnings?: SkipWarnings;\n __fullWidth?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __startIcon,\n __startIconVariant = 'subtle',\n __onStartIconClick,\n\n ariaRequired,\n\n __endIcon,\n __onEndIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n nativeInputAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n __injectAnalyticsComponentMetadata,\n __skipNativeAttributesWarnings,\n __fullWidth,\n style,\n prefix,\n suffix,\n inlineLabelText,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const { position: groupedControlPosition } = useGroupedControlContext();\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __startIcon = __startIcon ?? searchProps.__startIcon;\n __endIcon = __endIcon ?? searchProps.__endIcon;\n __onEndIconClick = __onEndIconClick ?? searchProps.__onEndIconClick;\n\n // Search inputs use built-in search and clear icons that would overlap adornments.\n const isSearch = type === 'search' || type === 'visualSearch';\n if (isDevelopment) {\n if (isSearch && (prefix !== undefined || suffix !== undefined)) {\n warnOnce('Input', 'prefix and suffix are ignored when type is search.');\n }\n }\n if (isSearch) {\n prefix = undefined;\n suffix = undefined;\n }\n\n const formFieldContext = useFormFieldContext(rest);\n const {\n ariaLabelledby,\n ariaDescribedby,\n controlId: controlIdFromFormFieldContext,\n invalid,\n warning,\n } = __inheritFormFieldProps ? formFieldContext : rest;\n\n // When an inline label is rendered, the native input must have an id so the\n // label's htmlFor can reference it. Fall back to a generated id if none was provided.\n const generatedControlId = useUniqueId('input');\n const controlId = controlIdFromFormFieldContext ?? (inlineLabelText ? generatedControlId : undefined);\n\n const hasPrefix = !!prefix;\n const hasSuffix = !!suffix;\n const hasPrefixOrSuffix = hasPrefix || hasSuffix;\n\n const groupedControlClasses = groupedControlPosition\n ? [styles.grouped, styles[`grouped-${groupedControlPosition}`]]\n : [];\n\n const inputStyles = getInputStyles(style);\n const nativeInputStyles =\n hasPrefixOrSuffix && inputStyles\n ? { ...inputStyles, borderRadius: undefined, borderWidth: undefined }\n : inputStyles;\n const adornedContainerStyles =\n hasPrefixOrSuffix && inputStyles\n ? { ...inputStyles, paddingBlock: undefined, paddingInline: undefined }\n : undefined;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __endIcon && styles['input-has-icon-end'],\n __startIcon && styles['input-has-icon-start'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n !hasPrefixOrSuffix && groupedControlClasses,\n hasPrefixOrSuffix && styles['input-adorned'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid && !hasPrefixOrSuffix,\n [styles['input-warning']]: warning && !invalid && !hasPrefixOrSuffix,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n fireNonCancelableEvent(onBlur);\n fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataInputComponent = {\n name: 'awsui.Input',\n label: 'input',\n properties: {\n value: value || '',\n },\n };\n\n const mainInput = (\n <WithNativeAttributes\n {...attributes}\n tag=\"input\"\n componentName=\"Input\"\n nativeAttributes={nativeInputAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n ref={mergedRef}\n style={nativeInputStyles}\n />\n );\n\n const renderedId = nativeInputAttributes?.id ?? controlId;\n\n const endIcon = __endIcon ? (\n <span\n className={styles['input-icon-end']}\n {...(__endIcon === 'close'\n ? getAnalyticsMetadataAttribute({\n action: 'clearInput',\n } as Partial<GeneratedAnalyticsMetadataInputClearInput>)\n : {})}\n >\n <InternalButton\n // Used for test utils\n className={styles['input-button-right']}\n variant=\"inline-icon-pointer-target\"\n formAction=\"none\"\n iconName={__endIcon}\n onClick={__onEndIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n ) : null;\n\n // Root-level props (base component props, root class/ref, and analytics metadata)\n // are applied to the outermost rendered element so the component root always\n // contains the whole component, including the inline label when present.\n const rootProps = {\n ...baseProps,\n className: baseProps.className,\n ref: __internalRootRef,\n ...(__injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })\n : copyAnalyticsMetadataAttribute(rest)),\n };\n\n const renderInputWithPrefixSuffix = (\n extraProps: React.HTMLAttributes<HTMLDivElement> & { ref?: React.Ref<HTMLDivElement> } = {}\n ) => (\n <div\n {...extraProps}\n className={clsx(extraProps.className, styles['input-container'])}\n dir={type === 'email' ? 'ltr' : undefined}\n >\n {__startIcon && (\n <span onClick={__onStartIconClick} className={styles['input-icon-start']}>\n <InternalIcon name={__startIcon} variant={disabled ? 'disabled' : readOnly ? 'subtle' : __startIconVariant} />\n </span>\n )}\n {hasPrefixOrSuffix ? (\n // [prefix][divider][input][divider][suffix] - one flex bar owns the border and focus ring.\n <div\n className={clsx(\n styles['input-adorned-container'],\n invalid && styles['input-adorned-container-invalid'],\n warning && !invalid && styles['input-adorned-container-warning'],\n disabled && styles['input-adorned-container-disabled'],\n readOnly && !disabled && styles['input-adorned-container-readonly'],\n groupedControlClasses\n )}\n aria-disabled={disabled || undefined}\n style={adornedContainerStyles}\n >\n {hasPrefix && (\n <>\n <span className={styles['input-prefix']} aria-hidden=\"true\">\n <span className={styles['input-adornment-content']}>\n <ResetGroupedControlContext>{prefix}</ResetGroupedControlContext>\n </span>\n </span>\n <span className={styles['input-adornment-divider']} />\n </>\n )}\n {mainInput}\n {hasSuffix && (\n <>\n <span className={styles['input-adornment-divider']} />\n <span className={styles['input-suffix']} aria-hidden=\"true\">\n <span className={styles['input-adornment-content']}>\n <ResetGroupedControlContext>{suffix}</ResetGroupedControlContext>\n </span>\n </span>\n </>\n )}\n {endIcon}\n </div>\n ) : (\n mainInput\n )}\n {!hasPrefixOrSuffix && endIcon}\n </div>\n );\n\n const inputWithLabel = inlineLabelText ? (\n <div\n {...rootProps}\n className={clsx(\n rootProps.className,\n styles['inline-label-wrapper'],\n __fullWidth && styles['inline-label-wrapper-full-width']\n )}\n >\n <label htmlFor={renderedId} className={clsx(styles['inline-label'], disabled && styles['inline-label-disabled'])}>\n {inlineLabelText}\n </label>\n <div\n className={clsx(\n styles['inline-label-trigger-wrapper'],\n __fullWidth && styles['inline-label-trigger-wrapper-full-width']\n )}\n >\n {renderInputWithPrefixSuffix()}\n </div>\n </div>\n ) : (\n renderInputWithPrefixSuffix(rootProps)\n );\n return inputWithLabel;\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC;AAC1G,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,oBAAsC,MAAM,0CAA0C,CAAC;AAS9F,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA4BrC,SAAS,aAAa,CACpB,EACE,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,SAAS,EACT,YAAY,GAAG,IAAI,EACnB,SAAS,EACT,cAAc,EAAE,sBAAs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,SAAS,CAAC,CACvC,CAAC;IACF,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport {\n copyAnalyticsMetadataAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { getGroupedControlClassNames } from '../internal/components/control-group/grouped-control-styles';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { isDevelopment } from '../internal/is-development';\nimport WithNativeAttributes, { SkipWarnings } from '../internal/utils/with-native-attributes';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport {\n GeneratedAnalyticsMetadataInputClearInput,\n GeneratedAnalyticsMetadataInputComponent,\n} from './analytics-metadata/interfaces';\nimport { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputProps } from './interfaces';\nimport { getInputStyles } from './styles';\nimport { convertAutoComplete, useSearchProps } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __startIcon?: IconProps['name'];\n __startIconVariant?: IconProps['variant'];\n __onStartIconClick?: () => void;\n\n __endIcon?: IconProps['name'];\n __onEndIconClick?: () => void;\n\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __skipNativeAttributesWarnings?: SkipWarnings;\n __fullWidth?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __startIcon,\n __startIconVariant = 'subtle',\n __onStartIconClick,\n\n ariaRequired,\n\n __endIcon,\n __onEndIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n nativeInputAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n __injectAnalyticsComponentMetadata,\n __skipNativeAttributesWarnings,\n __fullWidth,\n style,\n prefix,\n suffix,\n inlineLabelText,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const groupedControlProps = useGroupedControlContext();\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __startIcon = __startIcon ?? searchProps.__startIcon;\n __endIcon = __endIcon ?? searchProps.__endIcon;\n __onEndIconClick = __onEndIconClick ?? searchProps.__onEndIconClick;\n\n // Search inputs use built-in search and clear icons that would overlap adornments.\n const isSearch = type === 'search' || type === 'visualSearch';\n if (isDevelopment) {\n if (isSearch && (prefix !== undefined || suffix !== undefined)) {\n warnOnce('Input', 'prefix and suffix are ignored when type is search.');\n }\n }\n if (isSearch) {\n prefix = undefined;\n suffix = undefined;\n }\n\n const formFieldContext = useFormFieldContext(rest);\n const {\n ariaLabelledby,\n ariaDescribedby,\n controlId: controlIdFromFormFieldContext,\n invalid,\n warning,\n } = __inheritFormFieldProps ? formFieldContext : rest;\n\n // When an inline label is rendered, the native input must have an id so the\n // label's htmlFor can reference it. Fall back to a generated id if none was provided.\n const generatedControlId = useUniqueId('input');\n const controlId = controlIdFromFormFieldContext ?? (inlineLabelText ? generatedControlId : undefined);\n\n const hasPrefix = !!prefix;\n const hasSuffix = !!suffix;\n const hasPrefixOrSuffix = hasPrefix || hasSuffix;\n\n const groupedControlClasses = getGroupedControlClassNames(styles, groupedControlProps);\n\n const inputStyles = getInputStyles(style);\n const nativeInputStyles =\n hasPrefixOrSuffix && inputStyles\n ? { ...inputStyles, borderRadius: undefined, borderWidth: undefined }\n : inputStyles;\n const adornedContainerStyles =\n hasPrefixOrSuffix && inputStyles\n ? { ...inputStyles, paddingBlock: undefined, paddingInline: undefined }\n : undefined;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __endIcon && styles['input-has-icon-end'],\n __startIcon && styles['input-has-icon-start'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n !hasPrefixOrSuffix && groupedControlClasses,\n hasPrefixOrSuffix && styles['input-adorned'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid && !hasPrefixOrSuffix,\n [styles['input-warning']]: warning && !invalid && !hasPrefixOrSuffix,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n fireNonCancelableEvent(onBlur);\n fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataInputComponent = {\n name: 'awsui.Input',\n label: 'input',\n properties: {\n value: value || '',\n },\n };\n\n const mainInput = (\n <WithNativeAttributes\n {...attributes}\n tag=\"input\"\n componentName=\"Input\"\n nativeAttributes={nativeInputAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n ref={mergedRef}\n style={nativeInputStyles}\n />\n );\n\n const renderedId = nativeInputAttributes?.id ?? controlId;\n\n const endIcon = __endIcon ? (\n <span\n className={styles['input-icon-end']}\n {...(__endIcon === 'close'\n ? getAnalyticsMetadataAttribute({\n action: 'clearInput',\n } as Partial<GeneratedAnalyticsMetadataInputClearInput>)\n : {})}\n >\n <InternalButton\n // Used for test utils\n className={styles['input-button-right']}\n variant=\"inline-icon-pointer-target\"\n formAction=\"none\"\n iconName={__endIcon}\n onClick={__onEndIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n ) : null;\n\n // Root-level props (base component props, root class/ref, and analytics metadata)\n // are applied to the outermost rendered element so the component root always\n // contains the whole component, including the inline label when present.\n const rootProps = {\n ...baseProps,\n className: baseProps.className,\n ref: __internalRootRef,\n ...(__injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })\n : copyAnalyticsMetadataAttribute(rest)),\n };\n\n const renderInputWithPrefixSuffix = (\n extraProps: React.HTMLAttributes<HTMLDivElement> & { ref?: React.Ref<HTMLDivElement> } = {}\n ) => (\n <div\n {...extraProps}\n className={clsx(extraProps.className, styles['input-container'])}\n dir={type === 'email' ? 'ltr' : undefined}\n >\n {__startIcon && (\n <span onClick={__onStartIconClick} className={styles['input-icon-start']}>\n <InternalIcon name={__startIcon} variant={disabled ? 'disabled' : readOnly ? 'subtle' : __startIconVariant} />\n </span>\n )}\n {hasPrefixOrSuffix ? (\n // [prefix][divider][input][divider][suffix] - one flex bar owns the border and focus ring.\n <div\n className={clsx(\n styles['input-adorned-container'],\n invalid && styles['input-adorned-container-invalid'],\n warning && !invalid && styles['input-adorned-container-warning'],\n disabled && styles['input-adorned-container-disabled'],\n readOnly && !disabled && styles['input-adorned-container-readonly'],\n groupedControlClasses\n )}\n aria-disabled={disabled || undefined}\n style={adornedContainerStyles}\n >\n {hasPrefix && (\n <>\n <span className={styles['input-prefix']} aria-hidden=\"true\">\n <span className={styles['input-adornment-content']}>\n <ResetGroupedControlContext>{prefix}</ResetGroupedControlContext>\n </span>\n </span>\n <span className={styles['input-adornment-divider']} />\n </>\n )}\n {mainInput}\n {hasSuffix && (\n <>\n <span className={styles['input-adornment-divider']} />\n <span className={styles['input-suffix']} aria-hidden=\"true\">\n <span className={styles['input-adornment-content']}>\n <ResetGroupedControlContext>{suffix}</ResetGroupedControlContext>\n </span>\n </span>\n </>\n )}\n {endIcon}\n </div>\n ) : (\n mainInput\n )}\n {!hasPrefixOrSuffix && endIcon}\n </div>\n );\n\n const inputWithLabel = inlineLabelText ? (\n <div\n {...rootProps}\n className={clsx(\n rootProps.className,\n styles['inline-label-wrapper'],\n __fullWidth && styles['inline-label-wrapper-full-width']\n )}\n >\n <label htmlFor={renderedId} className={clsx(styles['inline-label'], disabled && styles['inline-label-disabled'])}>\n {inlineLabelText}\n </label>\n <div\n className={clsx(\n styles['inline-label-trigger-wrapper'],\n __fullWidth && styles['inline-label-trigger-wrapper-full-width']\n )}\n >\n {renderInputWithPrefixSuffix()}\n </div>\n </div>\n ) : (\n renderInputWithPrefixSuffix(rootProps)\n );\n return inputWithLabel;\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|
package/input/styles.css.js
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"input-adorned-container": "awsui_input-adorned-
|
|
5
|
-
"input": "
|
|
6
|
-
"input-adorned-container-readonly": "awsui_input-adorned-container-
|
|
7
|
-
"input-readonly": "awsui_input-
|
|
8
|
-
"root": "
|
|
9
|
-
"input-invalid": "awsui_input-
|
|
10
|
-
"input-has-icon-start": "awsui_input-has-icon-
|
|
11
|
-
"input-warning": "awsui_input-
|
|
12
|
-
"input-type-search": "awsui_input-type-
|
|
13
|
-
"input-has-icon-end": "awsui_input-has-icon-
|
|
14
|
-
"input-has-no-border-radius": "awsui_input-has-no-border-
|
|
15
|
-
"grouped": "
|
|
16
|
-
"grouped-first": "awsui_grouped-
|
|
17
|
-
"grouped-middle": "awsui_grouped-
|
|
18
|
-
"grouped-last": "awsui_grouped-
|
|
19
|
-
"grouped-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"input-
|
|
23
|
-
"input-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"inline-label-wrapper": "awsui_inline-label-
|
|
27
|
-
"inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-
|
|
28
|
-
"inline-label": "awsui_inline-
|
|
29
|
-
"inline-label-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"input-adorned-container-
|
|
33
|
-
"input-
|
|
34
|
-
"input-
|
|
35
|
-
"input-
|
|
36
|
-
"input-
|
|
37
|
-
"input-
|
|
4
|
+
"input-adorned-container": "awsui_input-adorned-container_2rhyz_1vc67_9",
|
|
5
|
+
"input": "awsui_input_2rhyz_1vc67_9",
|
|
6
|
+
"input-adorned-container-readonly": "awsui_input-adorned-container-readonly_2rhyz_1vc67_22",
|
|
7
|
+
"input-readonly": "awsui_input-readonly_2rhyz_1vc67_22",
|
|
8
|
+
"root": "awsui_root_2rhyz_1vc67_35",
|
|
9
|
+
"input-invalid": "awsui_input-invalid_2rhyz_1vc67_138",
|
|
10
|
+
"input-has-icon-start": "awsui_input-has-icon-start_2rhyz_1vc67_147",
|
|
11
|
+
"input-warning": "awsui_input-warning_2rhyz_1vc67_150",
|
|
12
|
+
"input-type-search": "awsui_input-type-search_2rhyz_1vc67_162",
|
|
13
|
+
"input-has-icon-end": "awsui_input-has-icon-end_2rhyz_1vc67_175",
|
|
14
|
+
"input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_1vc67_178",
|
|
15
|
+
"grouped": "awsui_grouped_2rhyz_1vc67_185",
|
|
16
|
+
"grouped-horizontal-first": "awsui_grouped-horizontal-first_2rhyz_1vc67_191",
|
|
17
|
+
"grouped-horizontal-middle": "awsui_grouped-horizontal-middle_2rhyz_1vc67_195",
|
|
18
|
+
"grouped-horizontal-last": "awsui_grouped-horizontal-last_2rhyz_1vc67_201",
|
|
19
|
+
"grouped-vertical-first": "awsui_grouped-vertical-first_2rhyz_1vc67_205",
|
|
20
|
+
"grouped-vertical-middle": "awsui_grouped-vertical-middle_2rhyz_1vc67_209",
|
|
21
|
+
"grouped-vertical-last": "awsui_grouped-vertical-last_2rhyz_1vc67_215",
|
|
22
|
+
"input-container": "awsui_input-container_2rhyz_1vc67_220",
|
|
23
|
+
"input-icon-start": "awsui_input-icon-start_2rhyz_1vc67_225",
|
|
24
|
+
"input-icon-end": "awsui_input-icon-end_2rhyz_1vc67_232",
|
|
25
|
+
"input-button-right": "awsui_input-button-right_2rhyz_1vc67_238",
|
|
26
|
+
"inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_2rhyz_1vc67_242",
|
|
27
|
+
"inline-label-trigger-wrapper-full-width": "awsui_inline-label-trigger-wrapper-full-width_2rhyz_1vc67_245",
|
|
28
|
+
"inline-label-wrapper": "awsui_inline-label-wrapper_2rhyz_1vc67_249",
|
|
29
|
+
"inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-width_2rhyz_1vc67_252",
|
|
30
|
+
"inline-label": "awsui_inline-label_2rhyz_1vc67_242",
|
|
31
|
+
"inline-label-disabled": "awsui_inline-label-disabled_2rhyz_1vc67_277",
|
|
32
|
+
"input-adorned-container-disabled": "awsui_input-adorned-container-disabled_2rhyz_1vc67_302",
|
|
33
|
+
"input-adorned-container-invalid": "awsui_input-adorned-container-invalid_2rhyz_1vc67_310",
|
|
34
|
+
"input-adorned-container-warning": "awsui_input-adorned-container-warning_2rhyz_1vc67_323",
|
|
35
|
+
"input-prefix": "awsui_input-prefix_2rhyz_1vc67_337",
|
|
36
|
+
"input-suffix": "awsui_input-suffix_2rhyz_1vc67_338",
|
|
37
|
+
"input-adornment-content": "awsui_input-adornment-content_2rhyz_1vc67_351",
|
|
38
|
+
"input-adornment-divider": "awsui_input-adornment-divider_2rhyz_1vc67_360",
|
|
39
|
+
"input-adorned": "awsui_input-adorned_2rhyz_1vc67_9"
|
|
38
40
|
};
|
|
39
41
|
|