@cloudscape-design/components 3.0.681 → 3.0.682
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/button/index.d.ts.map +1 -1
- package/button/index.js +2 -2
- package/button/index.js.map +1 -1
- package/button/interfaces.d.ts +6 -0
- package/button/interfaces.d.ts.map +1 -1
- package/button/interfaces.js.map +1 -1
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +15 -4
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +20 -19
- package/button/styles.scoped.css +161 -167
- package/button/styles.selectors.js +20 -19
- package/button/test-classes/styles.css.js +6 -0
- package/button/test-classes/styles.scoped.css +7 -0
- package/button/test-classes/styles.selectors.js +7 -0
- package/button-dropdown/category-elements/expandable-category-element.js +1 -1
- package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/button-dropdown/index.d.ts.map +1 -1
- package/button-dropdown/index.js +2 -2
- package/button-dropdown/index.js.map +1 -1
- package/button-dropdown/interfaces.d.ts +7 -0
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/internal.d.ts.map +1 -1
- package/button-dropdown/internal.js +4 -2
- package/button-dropdown/internal.js.map +1 -1
- package/button-dropdown/item-element/index.js +1 -1
- package/button-dropdown/item-element/index.js.map +1 -1
- package/calendar/grid/index.d.ts +3 -1
- package/calendar/grid/index.d.ts.map +1 -1
- package/calendar/grid/index.js +26 -6
- package/calendar/grid/index.js.map +1 -1
- package/calendar/grid/use-calendar-grid-keyboard-navigation.d.ts +2 -1
- package/calendar/grid/use-calendar-grid-keyboard-navigation.d.ts.map +1 -1
- package/calendar/grid/use-calendar-grid-keyboard-navigation.js +8 -5
- package/calendar/grid/use-calendar-grid-keyboard-navigation.js.map +1 -1
- package/calendar/interfaces.d.ts +9 -0
- package/calendar/interfaces.d.ts.map +1 -1
- package/calendar/interfaces.js.map +1 -1
- package/calendar/internal.d.ts +1 -1
- package/calendar/internal.d.ts.map +1 -1
- package/calendar/internal.js +7 -5
- package/calendar/internal.js.map +1 -1
- package/calendar/styles.css.js +21 -20
- package/calendar/styles.scoped.css +46 -42
- package/calendar/styles.selectors.js +21 -20
- package/calendar/utils/navigation.d.ts +10 -10
- package/calendar/utils/navigation.d.ts.map +1 -1
- package/calendar/utils/navigation.js +29 -29
- package/calendar/utils/navigation.js.map +1 -1
- package/date-picker/index.d.ts.map +1 -1
- package/date-picker/index.js +2 -2
- package/date-picker/index.js.map +1 -1
- package/date-range-picker/calendar/grids/grid.d.ts +2 -1
- package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid.js +55 -7
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.d.ts +2 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +20 -12
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/grids/styles.css.js +28 -27
- package/date-range-picker/calendar/grids/styles.scoped.css +46 -42
- package/date-range-picker/calendar/grids/styles.selectors.js +28 -27
- package/date-range-picker/calendar/index.d.ts +2 -1
- package/date-range-picker/calendar/index.d.ts.map +1 -1
- package/date-range-picker/calendar/index.js +2 -2
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/dropdown.d.ts +2 -2
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +2 -2
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +9 -0
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/internal/base-component/styles.scoped.css +12 -10
- package/internal/components/option/interfaces.d.ts +2 -0
- package/internal/components/option/interfaces.d.ts.map +1 -1
- package/internal/components/option/interfaces.js.map +1 -1
- package/internal/components/selectable-item/index.d.ts +1 -0
- package/internal/components/selectable-item/index.d.ts.map +1 -1
- package/internal/components/selectable-item/index.js +3 -0
- package/internal/components/selectable-item/index.js.map +1 -1
- package/internal/components/tooltip/index.d.ts +3 -1
- package/internal/components/tooltip/index.d.ts.map +1 -1
- package/internal/components/tooltip/index.js +3 -3
- package/internal/components/tooltip/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +2 -0
- package/internal/generated/styles/tokens.js +4 -2
- package/internal/generated/theming/index.cjs +78 -12
- package/internal/generated/theming/index.cjs.d.ts +16 -0
- package/internal/generated/theming/index.d.ts +16 -0
- package/internal/generated/theming/index.js +78 -12
- package/{button-dropdown/utils/use-hidden-description.d.ts → internal/hooks/use-hidden-description/index.d.ts} +2 -1
- package/internal/hooks/use-hidden-description/index.d.ts.map +1 -0
- package/{button-dropdown/utils/use-hidden-description.js → internal/hooks/use-hidden-description/index.js} +3 -2
- package/internal/hooks/use-hidden-description/index.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/segmented-control/interfaces.d.ts +2 -0
- package/segmented-control/interfaces.d.ts.map +1 -1
- package/segmented-control/interfaces.js.map +1 -1
- package/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/segmented-control/internal-segmented-control.js +11 -8
- package/segmented-control/internal-segmented-control.js.map +1 -1
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js +14 -4
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +15 -14
- package/segmented-control/styles.scoped.css +37 -33
- package/segmented-control/styles.selectors.js +15 -14
- package/select/interfaces.d.ts +1 -0
- package/select/interfaces.d.ts.map +1 -1
- package/select/interfaces.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/select/parts/item.d.ts.map +1 -1
- package/select/parts/item.js +13 -3
- package/select/parts/item.js.map +1 -1
- package/select/parts/multiselect-item.d.ts.map +1 -1
- package/select/parts/multiselect-item.js +15 -3
- package/select/parts/multiselect-item.js.map +1 -1
- package/select/parts/styles.css.js +17 -16
- package/select/parts/styles.scoped.css +21 -17
- package/select/parts/styles.selectors.js +17 -16
- package/split-panel/icons/styles.css.js +22 -22
- package/split-panel/icons/styles.scoped.css +25 -25
- package/split-panel/icons/styles.selectors.js +22 -22
- package/table/body-cell/disabled-inline-editor.js +1 -1
- package/table/body-cell/disabled-inline-editor.js.map +1 -1
- package/tabs/interfaces.d.ts +5 -0
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/tabs/styles.css.js +28 -25
- package/tabs/styles.scoped.css +60 -49
- package/tabs/styles.selectors.js +28 -25
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +38 -14
- package/tabs/tab-header-bar.js.map +1 -1
- package/test-utils/dom/button/index.d.ts +1 -0
- package/test-utils/dom/button/index.js +6 -2
- package/test-utils/dom/button/index.js.map +1 -1
- package/test-utils/dom/button-dropdown/index.d.ts +2 -1
- package/test-utils/dom/button-dropdown/index.js +5 -1
- package/test-utils/dom/button-dropdown/index.js.map +1 -1
- package/test-utils/dom/calendar/index.d.ts +4 -1
- package/test-utils/dom/calendar/index.js +8 -1
- package/test-utils/dom/calendar/index.js.map +1 -1
- package/test-utils/dom/date-range-picker/index.d.ts +4 -1
- package/test-utils/dom/date-range-picker/index.js +8 -2
- package/test-utils/dom/date-range-picker/index.js.map +1 -1
- package/test-utils/dom/internal/dropdown-host.js.map +1 -1
- package/test-utils/dom/internal/option.d.ts +1 -0
- package/test-utils/dom/internal/option.js +4 -0
- package/test-utils/dom/internal/option.js.map +1 -1
- package/test-utils/dom/segmented-control/index.d.ts +9 -0
- package/test-utils/dom/segmented-control/index.js +15 -0
- package/test-utils/dom/segmented-control/index.js.map +1 -1
- package/test-utils/dom/tabs/index.d.ts +9 -2
- package/test-utils/dom/tabs/index.js +15 -2
- package/test-utils/dom/tabs/index.js.map +1 -1
- package/test-utils/selectors/button/index.d.ts +1 -0
- package/test-utils/selectors/button/index.js +6 -2
- package/test-utils/selectors/button/index.js.map +1 -1
- package/test-utils/selectors/button-dropdown/index.d.ts +2 -1
- package/test-utils/selectors/button-dropdown/index.js +5 -1
- package/test-utils/selectors/button-dropdown/index.js.map +1 -1
- package/test-utils/selectors/calendar/index.d.ts +4 -1
- package/test-utils/selectors/calendar/index.js +8 -1
- package/test-utils/selectors/calendar/index.js.map +1 -1
- package/test-utils/selectors/date-range-picker/index.d.ts +4 -1
- package/test-utils/selectors/date-range-picker/index.js +8 -2
- package/test-utils/selectors/date-range-picker/index.js.map +1 -1
- package/test-utils/selectors/internal/dropdown-host.js.map +1 -1
- package/test-utils/selectors/internal/option.d.ts +1 -0
- package/test-utils/selectors/internal/option.js +4 -0
- package/test-utils/selectors/internal/option.js.map +1 -1
- package/test-utils/selectors/segmented-control/index.d.ts +9 -0
- package/test-utils/selectors/segmented-control/index.js +15 -0
- package/test-utils/selectors/segmented-control/index.js.map +1 -1
- package/test-utils/selectors/tabs/index.d.ts +9 -2
- package/test-utils/selectors/tabs/index.js +15 -2
- package/test-utils/selectors/tabs/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/button-dropdown/utils/use-hidden-description.d.ts.map +0 -1
- package/button-dropdown/utils/use-hidden-description.js.map +0 -1
|
@@ -98,7 +98,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
98
98
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
99
99
|
SPDX-License-Identifier: Apache-2.0
|
|
100
100
|
*/
|
|
101
|
-
.
|
|
101
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9) {
|
|
102
102
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
103
103
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
104
104
|
word-wrap: break-word;
|
|
@@ -117,41 +117,41 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
117
117
|
color: var(--color-text-segment-default-nncpby, #414d5c);
|
|
118
118
|
overflow: visible;
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):focus {
|
|
121
121
|
outline: none;
|
|
122
122
|
}
|
|
123
|
-
.
|
|
123
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):nth-child(1) {
|
|
124
124
|
grid-column: 1;
|
|
125
125
|
-ms-grid-column: 1;
|
|
126
126
|
}
|
|
127
|
-
.
|
|
127
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):nth-child(2) {
|
|
128
128
|
grid-column: 2;
|
|
129
129
|
-ms-grid-column: 2;
|
|
130
130
|
}
|
|
131
|
-
.
|
|
131
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):nth-child(3) {
|
|
132
132
|
grid-column: 3;
|
|
133
133
|
-ms-grid-column: 3;
|
|
134
134
|
}
|
|
135
|
-
.
|
|
135
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):nth-child(4) {
|
|
136
136
|
grid-column: 4;
|
|
137
137
|
-ms-grid-column: 4;
|
|
138
138
|
}
|
|
139
|
-
.
|
|
139
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):nth-child(5) {
|
|
140
140
|
grid-column: 5;
|
|
141
141
|
-ms-grid-column: 5;
|
|
142
142
|
}
|
|
143
|
-
.
|
|
143
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):nth-child(6) {
|
|
144
144
|
grid-column: 6;
|
|
145
145
|
-ms-grid-column: 6;
|
|
146
146
|
}
|
|
147
|
-
body[data-awsui-focus-visible=true] .
|
|
147
|
+
body[data-awsui-focus-visible=true] .awsui_segment_8cbea_8e18d_101:not(#\9):focus {
|
|
148
148
|
position: relative;
|
|
149
149
|
}
|
|
150
|
-
body[data-awsui-focus-visible=true] .
|
|
150
|
+
body[data-awsui-focus-visible=true] .awsui_segment_8cbea_8e18d_101:not(#\9):focus {
|
|
151
151
|
outline: 2px dotted transparent;
|
|
152
152
|
outline-offset: calc(var(--space-segmented-control-focus-outline-gutter-gbye20, 4px) - 1px);
|
|
153
153
|
}
|
|
154
|
-
body[data-awsui-focus-visible=true] .
|
|
154
|
+
body[data-awsui-focus-visible=true] .awsui_segment_8cbea_8e18d_101:not(#\9):focus::before {
|
|
155
155
|
content: " ";
|
|
156
156
|
display: block;
|
|
157
157
|
position: absolute;
|
|
@@ -165,59 +165,59 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_gkapv_101:not(#\9):focu
|
|
|
165
165
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
166
166
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
167
167
|
}
|
|
168
|
-
.
|
|
168
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):last-child {
|
|
169
169
|
border-inline-end-width: var(--border-field-width-09w7vk, 2px);
|
|
170
170
|
border-start-start-radius: 0;
|
|
171
171
|
border-start-end-radius: var(--border-radius-button-ypmfry, 20px);
|
|
172
172
|
border-end-start-radius: 0;
|
|
173
173
|
border-end-end-radius: var(--border-radius-button-ypmfry, 20px);
|
|
174
174
|
}
|
|
175
|
-
.
|
|
175
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):first-child {
|
|
176
176
|
border-start-start-radius: var(--border-radius-button-ypmfry, 20px);
|
|
177
177
|
border-start-end-radius: 0;
|
|
178
178
|
border-end-start-radius: var(--border-radius-button-ypmfry, 20px);
|
|
179
179
|
border-end-end-radius: 0;
|
|
180
180
|
}
|
|
181
|
-
.
|
|
181
|
+
.awsui_segment_8cbea_8e18d_101.awsui_disabled_8cbea_8e18d_181:not(#\9) {
|
|
182
182
|
background: var(--color-background-segment-disabled-o4y9v5, #ffffff);
|
|
183
183
|
border-color: var(--color-border-segment-disabled-ylnixy, #414d5c);
|
|
184
184
|
color: var(--color-text-interactive-disabled-z7a3t4, #9ba7b6);
|
|
185
185
|
}
|
|
186
|
-
.
|
|
186
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):not(.awsui_disabled_8cbea_8e18d_181) + .awsui_segment_8cbea_8e18d_101.awsui_disabled_8cbea_8e18d_181 {
|
|
187
187
|
border-inline-start-color: var(--color-border-segment-default-a5zrkd, #414d5c);
|
|
188
188
|
}
|
|
189
|
-
.
|
|
189
|
+
.awsui_segment_8cbea_8e18d_101.awsui_selected_8cbea_8e18d_189:not(#\9) {
|
|
190
190
|
background: var(--color-background-segment-active-366806, #0972d3);
|
|
191
191
|
border-color: var(--color-border-segment-active-9ah16u, #414d5c);
|
|
192
192
|
color: var(--color-text-segment-active-6s77n9, #ffffff);
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
.awsui_segment_8cbea_8e18d_101.awsui_selected_8cbea_8e18d_189 + .awsui_segment_8cbea_8e18d_101:not(#\9), .awsui_segment_8cbea_8e18d_101.awsui_selected_8cbea_8e18d_189 + .awsui_segment_8cbea_8e18d_101.awsui_disabled_8cbea_8e18d_181:not(#\9) {
|
|
195
195
|
border-inline-start-color: var(--color-border-segment-active-9ah16u, #414d5c);
|
|
196
196
|
}
|
|
197
|
-
.
|
|
197
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):hover:not(.awsui_selected_8cbea_8e18d_189):not(.awsui_disabled_8cbea_8e18d_181):not(:focus) {
|
|
198
198
|
background: var(--color-background-segment-hover-jysoxv, #ffffff);
|
|
199
199
|
color: var(--color-text-segment-hover-k5ujfk, #0972d3);
|
|
200
200
|
border-color: var(--color-border-segment-hover-ggg2rz, #414d5c);
|
|
201
201
|
cursor: pointer;
|
|
202
202
|
}
|
|
203
|
-
.
|
|
203
|
+
.awsui_segment_8cbea_8e18d_101:not(#\9):hover:not(.awsui_selected_8cbea_8e18d_189):not(.awsui_disabled_8cbea_8e18d_181):not(:focus) + .awsui_segment_8cbea_8e18d_101:not(.awsui_selected_8cbea_8e18d_189) {
|
|
204
204
|
border-inline-start-color: var(--color-border-segment-hover-ggg2rz, #414d5c);
|
|
205
205
|
}
|
|
206
|
-
.
|
|
206
|
+
.awsui_segment_8cbea_8e18d_101.awsui_selected_8cbea_8e18d_189 + .awsui_segment_8cbea_8e18d_101:not(#\9):hover:not(.awsui_selected_8cbea_8e18d_189):not(.awsui_disabled_8cbea_8e18d_181):not(:focus) {
|
|
207
207
|
border-inline-start-color: var(--color-border-segment-active-9ah16u, #414d5c);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
.
|
|
210
|
+
.awsui_icon_8cbea_8e18d_210:not(#\9) {
|
|
211
211
|
/* used in test-utils */
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
.awsui_with-
|
|
214
|
+
.awsui_with-text_8cbea_8e18d_214:not(#\9) {
|
|
215
215
|
position: relative;
|
|
216
216
|
inset-inline-start: calc(-1 * var(--space-xxs-p8yyaw, 4px));
|
|
217
217
|
margin-inline-end: var(--space-xxs-p8yyaw, 4px);
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.awsui_with-no-
|
|
220
|
+
.awsui_with-no-text_8cbea_8e18d_220:not(#\9) {
|
|
221
221
|
margin-inline: auto;
|
|
222
222
|
inset-inline: 0;
|
|
223
223
|
}
|
|
@@ -226,7 +226,7 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_gkapv_101:not(#\9):focu
|
|
|
226
226
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
227
227
|
SPDX-License-Identifier: Apache-2.0
|
|
228
228
|
*/
|
|
229
|
-
.
|
|
229
|
+
.awsui_root_8cbea_8e18d_229:not(#\9) {
|
|
230
230
|
border-collapse: separate;
|
|
231
231
|
border-spacing: 0;
|
|
232
232
|
box-sizing: border-box;
|
|
@@ -262,40 +262,44 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_gkapv_101:not(#\9):focu
|
|
|
262
262
|
-moz-osx-font-smoothing: auto;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
.awsui_segment-
|
|
265
|
+
.awsui_segment-part_8cbea_8e18d_264:not(#\9) {
|
|
266
266
|
display: inline-grid;
|
|
267
267
|
}
|
|
268
268
|
@media (max-width: 688px) {
|
|
269
|
-
.awsui_segment-
|
|
269
|
+
.awsui_segment-part_8cbea_8e18d_264:not(#\9) {
|
|
270
270
|
display: none;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
.
|
|
274
|
+
.awsui_select_8cbea_8e18d_189:not(#\9) {
|
|
275
275
|
display: none;
|
|
276
276
|
}
|
|
277
277
|
@media (max-width: 688px) {
|
|
278
|
-
.
|
|
278
|
+
.awsui_select_8cbea_8e18d_189:not(#\9) {
|
|
279
279
|
display: block;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
.awsui_segment-count-
|
|
283
|
+
.awsui_segment-count-2_8cbea_8e18d_283:not(#\9) {
|
|
284
284
|
grid-template-columns: 1fr 1fr;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
.awsui_segment-count-
|
|
287
|
+
.awsui_segment-count-3_8cbea_8e18d_287:not(#\9) {
|
|
288
288
|
grid-template-columns: 1fr 1fr 1fr;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.awsui_segment-count-
|
|
291
|
+
.awsui_segment-count-4_8cbea_8e18d_291:not(#\9) {
|
|
292
292
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.awsui_segment-count-
|
|
295
|
+
.awsui_segment-count-5_8cbea_8e18d_295:not(#\9) {
|
|
296
296
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.awsui_segment-count-
|
|
299
|
+
.awsui_segment-count-6_8cbea_8e18d_299:not(#\9) {
|
|
300
300
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.awsui_disabled-reason-tooltip_8cbea_8e18d_303:not(#\9) {
|
|
304
|
+
/* used in test-utils or tests */
|
|
301
305
|
}
|
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"segment": "
|
|
6
|
-
"disabled": "
|
|
7
|
-
"selected": "
|
|
8
|
-
"icon": "
|
|
9
|
-
"with-text": "awsui_with-
|
|
10
|
-
"with-no-text": "awsui_with-no-
|
|
11
|
-
"root": "
|
|
12
|
-
"segment-part": "awsui_segment-
|
|
13
|
-
"select": "
|
|
14
|
-
"segment-count-2": "awsui_segment-count-
|
|
15
|
-
"segment-count-3": "awsui_segment-count-
|
|
16
|
-
"segment-count-4": "awsui_segment-count-
|
|
17
|
-
"segment-count-5": "awsui_segment-count-
|
|
18
|
-
"segment-count-6": "awsui_segment-count-
|
|
5
|
+
"segment": "awsui_segment_8cbea_8e18d_101",
|
|
6
|
+
"disabled": "awsui_disabled_8cbea_8e18d_181",
|
|
7
|
+
"selected": "awsui_selected_8cbea_8e18d_189",
|
|
8
|
+
"icon": "awsui_icon_8cbea_8e18d_210",
|
|
9
|
+
"with-text": "awsui_with-text_8cbea_8e18d_214",
|
|
10
|
+
"with-no-text": "awsui_with-no-text_8cbea_8e18d_220",
|
|
11
|
+
"root": "awsui_root_8cbea_8e18d_229",
|
|
12
|
+
"segment-part": "awsui_segment-part_8cbea_8e18d_264",
|
|
13
|
+
"select": "awsui_select_8cbea_8e18d_189",
|
|
14
|
+
"segment-count-2": "awsui_segment-count-2_8cbea_8e18d_283",
|
|
15
|
+
"segment-count-3": "awsui_segment-count-3_8cbea_8e18d_287",
|
|
16
|
+
"segment-count-4": "awsui_segment-count-4_8cbea_8e18d_291",
|
|
17
|
+
"segment-count-5": "awsui_segment-count-5_8cbea_8e18d_295",
|
|
18
|
+
"segment-count-6": "awsui_segment-count-6_8cbea_8e18d_299",
|
|
19
|
+
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_8e18d_303"
|
|
19
20
|
};
|
|
20
21
|
|
package/select/interfaces.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface BaseSelectProps extends BaseDropdownHostProps, BaseComponentPro
|
|
|
16
16
|
* - `lang` (string) - (Optional) The language of the option, provided as a BCP 47 language tag.
|
|
17
17
|
* - `description` (string) - (Optional) Further information about the option that appears below the label.
|
|
18
18
|
* - `disabled` (boolean) - (Optional) Determines whether the option is disabled.
|
|
19
|
+
* - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.
|
|
19
20
|
* - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.
|
|
20
21
|
* - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option.
|
|
21
22
|
* - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAClH,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AACxF,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,4CAA4C,CAAC;AAEpD,MAAM,WAAW,eACf,SAAQ,qBAAqB,EAC3B,kB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AAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
package/select/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n * - `label` (string) - (Optional) Option text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option is disabled.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option.\n * - `iconAlt` (string) - (Optional) Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * #### OptionGroup\n * - `label` (string) - Option group text displayed to the user.\n * - `disabled` (boolean) - (Optional) Determines whether the option group is disabled.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n * - `label` (string) - (Optional) Option text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option is disabled.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option.\n * - `iconAlt` (string) - (Optional) Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * #### OptionGroup\n * - `label` (string) - Option group text displayed to the user.\n * - `disabled` (boolean) - (Optional) Determines whether the option group is disabled.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
|
package/select/parts/filter.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export interface FilterProps extends InternalInputProps {
|
|
|
5
5
|
ref?: React.Ref<HTMLInputElement>;
|
|
6
6
|
filteringType: SelectProps.FilteringType;
|
|
7
7
|
}
|
|
8
|
-
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "disabled" | "autoComplete" | "autoFocus" | "name" | "className" | "id" | "placeholder" | "inputMode" | "type" | "readOnly" | "step" | "value" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "warning" | "invalid" | "__internalRootRef" | "ariaLabel" | "ariaDescribedby" | "
|
|
8
|
+
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "disabled" | "autoComplete" | "autoFocus" | "name" | "className" | "id" | "placeholder" | "inputMode" | "type" | "readOnly" | "step" | "value" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "warning" | "invalid" | "__internalRootRef" | "ariaLabel" | "ariaDescribedby" | "clearAriaLabel" | "ariaLabelledby" | "__nativeAttributes" | "controlId" | "filteringType" | "ariaRequired" | "disableBrowserAutocorrect" | "spellcheck" | "__leftIcon" | "__leftIconVariant" | "__onLeftIconClick" | "__rightIcon" | "__onRightIconClick" | "__noBorderRadius" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export default Filter;
|
|
10
10
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/item.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAMtC,OAAO,EAAE,cAAc,EAAoB,MAAM,6CAA6C,CAAC;AAG/F,OAAO,EAAE,aAAa,EAAE,MAAM,sEAAsE,CAAC;AAKrG,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACvC;;AA0FD,wBAAkD"}
|
package/select/parts/item.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useRef } from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
7
|
import Option from '../../internal/components/option';
|
|
@@ -9,6 +9,9 @@ import SelectableItem from '../../internal/components/selectable-item';
|
|
|
9
9
|
import { getBaseProps } from '../../internal/base-component';
|
|
10
10
|
import CheckboxIcon from '../../internal/components/checkbox-icon';
|
|
11
11
|
import InternalIcon from '../../icon/internal.js';
|
|
12
|
+
import useHiddenDescription from '../../internal/hooks/use-hidden-description';
|
|
13
|
+
import Tooltip from '../../internal/components/tooltip';
|
|
14
|
+
import { useMergeRefs } from '../../internal/hooks/use-merge-refs';
|
|
12
15
|
const Item = (_a, ref) => {
|
|
13
16
|
var { option, highlighted, selected, filteringValue, hasCheckbox, virtualPosition, padBottom, isNextSelected, screenReaderContent, ariaPosinset, ariaSetsize, highlightType } = _a, restProps = __rest(_a, ["option", "highlighted", "selected", "filteringValue", "hasCheckbox", "virtualPosition", "padBottom", "isNextSelected", "screenReaderContent", "ariaPosinset", "ariaSetsize", "highlightType"]);
|
|
14
17
|
const baseProps = getBaseProps(restProps);
|
|
@@ -16,13 +19,20 @@ const Item = (_a, ref) => {
|
|
|
16
19
|
const isChild = option.type === 'child';
|
|
17
20
|
const wrappedOption = option.option;
|
|
18
21
|
const disabled = option.disabled || wrappedOption.disabled;
|
|
19
|
-
|
|
22
|
+
const disabledReason = disabled && wrappedOption.disabledReason ? wrappedOption.disabledReason : '';
|
|
23
|
+
const isDisabledWithReason = !!disabledReason;
|
|
24
|
+
const internalRef = useRef(null);
|
|
25
|
+
const { descriptionEl, descriptionId } = useHiddenDescription(disabledReason);
|
|
26
|
+
return (React.createElement(SelectableItem, Object.assign({ ariaSelected: Boolean(selected), selected: selected, isNextSelected: isNextSelected, highlighted: highlighted, disabled: option.disabled, isParent: isParent, isChild: isChild, ref: useMergeRefs(ref, internalRef), virtualPosition: virtualPosition, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaPosinset: ariaPosinset, ariaSetsize: ariaSetsize, highlightType: highlightType, ariaDescribedby: isDisabledWithReason ? descriptionId : '' }, baseProps),
|
|
20
27
|
React.createElement("div", { className: clsx(styles.item, !isParent && wrappedOption.labelTag && styles['show-label-tag']) },
|
|
21
28
|
hasCheckbox && !isParent && (React.createElement("div", { className: styles.checkbox },
|
|
22
29
|
React.createElement(CheckboxIcon, { checked: selected || false, disabled: option.disabled }))),
|
|
23
30
|
isParent ? (React.createElement("span", null, wrappedOption.label || wrappedOption.value)) : (React.createElement(Option, { option: Object.assign(Object.assign({}, wrappedOption), { disabled }), highlightedOption: highlighted, selectedOption: selected, highlightText: filteringValue })),
|
|
24
31
|
!hasCheckbox && !isParent && selected && (React.createElement("div", { className: styles['selected-icon'] },
|
|
25
|
-
React.createElement(InternalIcon, { name: "check" })))
|
|
32
|
+
React.createElement(InternalIcon, { name: "check" }))),
|
|
33
|
+
isDisabledWithReason && (React.createElement(React.Fragment, null,
|
|
34
|
+
descriptionEl,
|
|
35
|
+
highlighted && (React.createElement(Tooltip, { className: styles['disabled-reason-tooltip'], trackRef: internalRef, value: disabledReason, position: "right" })))))));
|
|
26
36
|
};
|
|
27
37
|
export default React.memo(React.forwardRef(Item));
|
|
28
38
|
//# sourceMappingURL=item.js.map
|
package/select/parts/item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../src/select/parts/item.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../src/select/parts/item.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,cAAc,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAC/E,OAAO,OAAO,MAAM,mCAAmC,CAAC;AACxD,OAAO,EAAE,YAAY,EA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AC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport Option from '../../internal/components/option';\nimport SelectableItem from '../../internal/components/selectable-item';\nimport { getBaseProps } from '../../internal/base-component';\nimport { DropdownOption, OptionDefinition } from '../../internal/components/option/interfaces';\nimport CheckboxIcon from '../../internal/components/checkbox-icon';\nimport InternalIcon from '../../icon/internal.js';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option.js';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport Tooltip from '../../internal/components/tooltip';\nimport { useMergeRefs } from '../../internal/hooks/use-merge-refs';\n\nexport interface ItemProps {\n option: DropdownOption;\n highlighted?: boolean;\n selected?: boolean;\n filteringValue?: string;\n hasCheckbox?: boolean;\n virtualPosition?: number;\n padBottom?: boolean;\n isNextSelected?: boolean;\n screenReaderContent?: string;\n ariaPosinset?: number;\n ariaSetsize?: number;\n highlightType?: HighlightType['type'];\n}\n\nconst Item = (\n {\n option,\n highlighted,\n selected,\n filteringValue,\n hasCheckbox,\n virtualPosition,\n padBottom,\n isNextSelected,\n screenReaderContent,\n ariaPosinset,\n ariaSetsize,\n highlightType,\n ...restProps\n }: ItemProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(restProps);\n\n const isParent = option.type === 'parent';\n const isChild = option.type === 'child';\n const wrappedOption: OptionDefinition = option.option;\n const disabled = option.disabled || wrappedOption.disabled;\n const disabledReason = disabled && wrappedOption.disabledReason ? wrappedOption.disabledReason : '';\n const isDisabledWithReason = !!disabledReason;\n const internalRef = useRef<HTMLDivElement>(null);\n\n const { descriptionEl, descriptionId } = useHiddenDescription(disabledReason);\n\n return (\n <SelectableItem\n ariaSelected={Boolean(selected)}\n selected={selected}\n isNextSelected={isNextSelected}\n highlighted={highlighted}\n disabled={option.disabled}\n isParent={isParent}\n isChild={isChild}\n ref={useMergeRefs(ref, internalRef)}\n virtualPosition={virtualPosition}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaPosinset={ariaPosinset}\n ariaSetsize={ariaSetsize}\n highlightType={highlightType}\n ariaDescribedby={isDisabledWithReason ? descriptionId : ''}\n {...baseProps}\n >\n <div className={clsx(styles.item, !isParent && wrappedOption.labelTag && styles['show-label-tag'])}>\n {hasCheckbox && !isParent && (\n <div className={styles.checkbox}>\n <CheckboxIcon checked={selected || false} disabled={option.disabled} />\n </div>\n )}\n {isParent ? (\n <span>{wrappedOption.label || wrappedOption.value}</span>\n ) : (\n <Option\n option={{ ...wrappedOption, disabled }}\n highlightedOption={highlighted}\n selectedOption={selected}\n highlightText={filteringValue}\n />\n )}\n {!hasCheckbox && !isParent && selected && (\n <div className={styles['selected-icon']}>\n <InternalIcon name=\"check\" />\n </div>\n )}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {highlighted && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n trackRef={internalRef}\n value={disabledReason!}\n position=\"right\"\n />\n )}\n </>\n )}\n </div>\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(Item));\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect-item.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/multiselect-item.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"multiselect-item.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/multiselect-item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAQtC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAInC,UAAU,oBAAqB,SAAQ,SAAS;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;;AA0FD,wBAA6D"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useRef } from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
7
|
import Option from '../../internal/components/option';
|
|
8
8
|
import SelectableItem from '../../internal/components/selectable-item';
|
|
9
9
|
import { getBaseProps } from '../../internal/base-component';
|
|
10
10
|
import CheckboxIcon from '../../internal/components/checkbox-icon';
|
|
11
|
+
import useHiddenDescription from '../../internal/hooks/use-hidden-description';
|
|
12
|
+
import { useMergeRefs } from '../../internal/hooks/use-merge-refs';
|
|
13
|
+
import Tooltip from '../../internal/components/tooltip';
|
|
11
14
|
const MultiSelectItem = (_a, ref) => {
|
|
12
15
|
var { option, highlighted, selected, filteringValue, hasCheckbox, virtualPosition, padBottom, isNextSelected, indeterminate, screenReaderContent, ariaPosinset, ariaSetsize, highlightType } = _a, restProps = __rest(_a, ["option", "highlighted", "selected", "filteringValue", "hasCheckbox", "virtualPosition", "padBottom", "isNextSelected", "indeterminate", "screenReaderContent", "ariaPosinset", "ariaSetsize", "highlightType"]);
|
|
13
16
|
const baseProps = getBaseProps(restProps);
|
|
@@ -15,14 +18,23 @@ const MultiSelectItem = (_a, ref) => {
|
|
|
15
18
|
const isChild = option.type === 'child';
|
|
16
19
|
const wrappedOption = option.option;
|
|
17
20
|
const disabled = option.disabled || wrappedOption.disabled;
|
|
21
|
+
const disabledReason = disabled && (option.disabledReason || wrappedOption.disabledReason)
|
|
22
|
+
? option.disabledReason || wrappedOption.disabledReason
|
|
23
|
+
: '';
|
|
24
|
+
const isDisabledWithReason = !!disabledReason;
|
|
25
|
+
const internalRef = useRef(null);
|
|
18
26
|
const className = clsx(styles.item, {
|
|
19
27
|
[styles.disabled]: disabled,
|
|
20
28
|
});
|
|
21
|
-
|
|
29
|
+
const { descriptionId, descriptionEl } = useHiddenDescription(disabledReason);
|
|
30
|
+
return (React.createElement(SelectableItem, Object.assign({ ariaChecked: isParent && indeterminate ? 'mixed' : Boolean(selected), selected: selected, isNextSelected: isNextSelected, highlighted: highlighted, disabled: disabled, isParent: isParent, isChild: isChild, highlightType: highlightType, ref: useMergeRefs(ref, internalRef), virtualPosition: virtualPosition, padBottom: padBottom, useInteractiveGroups: true, screenReaderContent: screenReaderContent, ariaPosinset: ariaPosinset, ariaSetsize: ariaSetsize, ariaDescribedby: isDisabledWithReason ? descriptionId : '' }, baseProps),
|
|
22
31
|
React.createElement("div", { className: className },
|
|
23
32
|
hasCheckbox && (React.createElement("div", { className: styles.checkbox },
|
|
24
33
|
React.createElement(CheckboxIcon, { checked: selected, indeterminate: isParent && indeterminate, disabled: option.disabled }))),
|
|
25
|
-
React.createElement(Option, { option: Object.assign(Object.assign({}, wrappedOption), { disabled }), highlightedOption: highlighted, selectedOption: selected, highlightText: filteringValue, isGroupOption: isParent }))
|
|
34
|
+
React.createElement(Option, { option: Object.assign(Object.assign({}, wrappedOption), { disabled }), highlightedOption: highlighted, selectedOption: selected, highlightText: filteringValue, isGroupOption: isParent })),
|
|
35
|
+
isDisabledWithReason && (React.createElement(React.Fragment, null,
|
|
36
|
+
descriptionEl,
|
|
37
|
+
highlighted && (React.createElement(Tooltip, { className: styles['disabled-reason-tooltip'], trackRef: internalRef, value: disabledReason, position: "right" }))))));
|
|
26
38
|
};
|
|
27
39
|
export default React.memo(React.forwardRef(MultiSelectItem));
|
|
28
40
|
//# sourceMappingURL=multiselect-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect-item.js","sourceRoot":"","sources":["../../../../src/select/parts/multiselect-item.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"multiselect-item.js","sourceRoot":"","sources":["../../../../src/select/parts/multiselect-item.t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AC9B,cAAc,EAAE,QAAQ,EACxB,aAAa,EAAE,cAAc,EAC7B,aAAa,EAAE,QAAQ,GACvB,CACE;QACL,oBAAoB,IAAI,CACvB;YACG,aAAa;YACb,WAAW,IAAI,CACd,oBAAC,OAAO,IACN,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,EAC5C,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,cAAe,EACtB,QAAQ,EAAC,OAAO,GAChB,CACH,CACA,CACJ,CACc,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport Option from '../../internal/components/option';\nimport SelectableItem from '../../internal/components/selectable-item';\nimport { getBaseProps } from '../../internal/base-component';\nimport { OptionDefinition } from '../../internal/components/option/interfaces';\nimport CheckboxIcon from '../../internal/components/checkbox-icon';\nimport { ItemProps } from './item';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { useMergeRefs } from '../../internal/hooks/use-merge-refs';\nimport Tooltip from '../../internal/components/tooltip';\ninterface MultiselectItemProps extends ItemProps {\n indeterminate?: boolean;\n}\n\nconst MultiSelectItem = (\n {\n option,\n highlighted,\n selected,\n filteringValue,\n hasCheckbox,\n virtualPosition,\n padBottom,\n isNextSelected,\n indeterminate,\n screenReaderContent,\n ariaPosinset,\n ariaSetsize,\n highlightType,\n ...restProps\n }: MultiselectItemProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(restProps);\n\n const isParent = option.type === 'parent';\n const isChild = option.type === 'child';\n const wrappedOption: OptionDefinition = option.option;\n const disabled = option.disabled || wrappedOption.disabled;\n const disabledReason =\n disabled && (option.disabledReason || wrappedOption.disabledReason)\n ? option.disabledReason || wrappedOption.disabledReason\n : '';\n const isDisabledWithReason = !!disabledReason;\n const internalRef = useRef<HTMLDivElement>(null);\n const className = clsx(styles.item, {\n [styles.disabled]: disabled,\n });\n\n const { descriptionId, descriptionEl } = useHiddenDescription(disabledReason);\n\n return (\n <SelectableItem\n ariaChecked={isParent && indeterminate ? 'mixed' : Boolean(selected)}\n selected={selected}\n isNextSelected={isNextSelected}\n highlighted={highlighted}\n disabled={disabled}\n isParent={isParent}\n isChild={isChild}\n highlightType={highlightType}\n ref={useMergeRefs(ref, internalRef)}\n virtualPosition={virtualPosition}\n padBottom={padBottom}\n useInteractiveGroups={true}\n screenReaderContent={screenReaderContent}\n ariaPosinset={ariaPosinset}\n ariaSetsize={ariaSetsize}\n ariaDescribedby={isDisabledWithReason ? descriptionId : ''}\n {...baseProps}\n >\n <div className={className}>\n {hasCheckbox && (\n <div className={styles.checkbox}>\n <CheckboxIcon checked={selected} indeterminate={isParent && indeterminate} disabled={option.disabled} />\n </div>\n )}\n <Option\n option={{ ...wrappedOption, disabled }}\n highlightedOption={highlighted}\n selectedOption={selected}\n highlightText={filteringValue}\n isGroupOption={isParent}\n />\n </div>\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {highlighted && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n trackRef={internalRef}\n value={disabledReason!}\n position=\"right\"\n />\n )}\n </>\n )}\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(MultiSelectItem));\n"]}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"placeholder": "
|
|
5
|
-
"item": "
|
|
6
|
-
"checkbox": "
|
|
7
|
-
"filter": "
|
|
8
|
-
"trigger": "
|
|
9
|
-
"layout-strut": "awsui_layout-
|
|
10
|
-
"list-bottom": "awsui_list-
|
|
11
|
-
"selected-icon": "awsui_selected-
|
|
12
|
-
"show-label-tag": "awsui_show-label-
|
|
13
|
-
"inline-token-trigger": "awsui_inline-token-
|
|
14
|
-
"inline-token-list": "awsui_inline-token-
|
|
15
|
-
"inline-token": "awsui_inline-
|
|
16
|
-
"visual-refresh": "awsui_visual-
|
|
17
|
-
"inline-token-hidden-placeholder": "awsui_inline-token-hidden-
|
|
18
|
-
"inline-token-counter": "awsui_inline-token-
|
|
19
|
-
"inline-token-trigger--disabled": "awsui_inline-token-trigger--
|
|
4
|
+
"placeholder": "awsui_placeholder_dwuol_1bifm_97",
|
|
5
|
+
"item": "awsui_item_dwuol_1bifm_102",
|
|
6
|
+
"checkbox": "awsui_checkbox_dwuol_1bifm_106",
|
|
7
|
+
"filter": "awsui_filter_dwuol_1bifm_115",
|
|
8
|
+
"trigger": "awsui_trigger_dwuol_1bifm_120",
|
|
9
|
+
"layout-strut": "awsui_layout-strut_dwuol_1bifm_126",
|
|
10
|
+
"list-bottom": "awsui_list-bottom_dwuol_1bifm_132",
|
|
11
|
+
"selected-icon": "awsui_selected-icon_dwuol_1bifm_136",
|
|
12
|
+
"show-label-tag": "awsui_show-label-tag_dwuol_1bifm_140",
|
|
13
|
+
"inline-token-trigger": "awsui_inline-token-trigger_dwuol_1bifm_144",
|
|
14
|
+
"inline-token-list": "awsui_inline-token-list_dwuol_1bifm_151",
|
|
15
|
+
"inline-token": "awsui_inline-token_dwuol_1bifm_144",
|
|
16
|
+
"visual-refresh": "awsui_visual-refresh_dwuol_1bifm_181",
|
|
17
|
+
"inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_1bifm_188",
|
|
18
|
+
"inline-token-counter": "awsui_inline-token-counter_dwuol_1bifm_194",
|
|
19
|
+
"inline-token-trigger--disabled": "awsui_inline-token-trigger--disabled_dwuol_1bifm_198",
|
|
20
|
+
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_dwuol_1bifm_204"
|
|
20
21
|
};
|
|
21
22
|
|