@cloudscape-design/components 3.0.1282 → 3.0.1283
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-dropdown/category-elements/styles.css.js +18 -18
- package/button-dropdown/category-elements/styles.scoped.css +30 -30
- package/button-dropdown/category-elements/styles.selectors.js +18 -18
- package/button-dropdown/interfaces.d.ts +0 -2
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +21 -21
- package/button-dropdown/item-element/styles.scoped.css +38 -38
- package/button-dropdown/item-element/styles.selectors.js +21 -21
- package/file-token-group/styles.css.js +23 -23
- package/file-token-group/styles.scoped.css +35 -35
- package/file-token-group/styles.selectors.js +23 -23
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +165 -165
- package/flashbar/styles.selectors.js +50 -50
- package/input/internal.d.ts +2 -0
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +5 -2
- package/input/internal.js.map +1 -1
- package/input/styles.css.js +18 -13
- package/input/styles.scoped.css +67 -31
- package/input/styles.selectors.js +18 -13
- package/internal/base-component/styles.scoped.css +5 -1
- package/internal/components/button-trigger/styles.css.js +14 -14
- package/internal/components/button-trigger/styles.scoped.css +29 -29
- package/internal/components/button-trigger/styles.selectors.js +14 -14
- package/internal/components/dropdown-status/styles.css.js +2 -2
- package/internal/components/dropdown-status/styles.scoped.css +4 -4
- package/internal/components/dropdown-status/styles.selectors.js +2 -2
- package/internal/components/selectable-item/styles.css.js +22 -22
- package/internal/components/selectable-item/styles.scoped.css +51 -51
- package/internal/components/selectable-item/styles.selectors.js +22 -22
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +3 -0
- package/internal/generated/styles/tokens.js +3 -0
- package/internal/generated/theming/index.cjs +39 -0
- package/internal/generated/theming/index.cjs.d.ts +18 -0
- package/internal/generated/theming/index.d.ts +18 -0
- package/internal/generated/theming/index.js +39 -0
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/pagination/index.d.ts +3 -1
- package/pagination/index.d.ts.map +1 -1
- package/pagination/index.js +4 -3
- package/pagination/index.js.map +1 -1
- package/pagination/interfaces.d.ts +31 -2
- package/pagination/interfaces.d.ts.map +1 -1
- package/pagination/interfaces.js.map +1 -1
- package/pagination/internal.d.ts +3 -14
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +78 -19
- package/pagination/internal.js.map +1 -1
- package/pagination/styles.css.js +11 -9
- package/pagination/styles.scoped.css +39 -24
- package/pagination/styles.selectors.js +11 -9
- package/popover/internal.d.ts +4 -0
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +23 -13
- package/popover/internal.js.map +1 -1
- package/prompt-input/internal.js +1 -1
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +26 -26
- package/prompt-input/styles.scoped.css +55 -55
- package/prompt-input/styles.selectors.js +26 -26
- package/property-filter/filtering-token/styles.css.js +18 -18
- package/property-filter/filtering-token/styles.scoped.css +42 -42
- package/property-filter/filtering-token/styles.selectors.js +18 -18
- package/property-filter/styles.css.js +39 -39
- package/property-filter/styles.scoped.css +43 -43
- package/property-filter/styles.selectors.js +39 -39
- package/segmented-control/styles.css.js +16 -16
- package/segmented-control/styles.scoped.css +33 -33
- package/segmented-control/styles.selectors.js +16 -16
- package/select/parts/filter.d.ts +1 -1
- package/select/parts/filter.d.ts.map +1 -1
- package/test-utils/dom/pagination/index.d.ts +15 -0
- package/test-utils/dom/pagination/index.js +22 -0
- package/test-utils/dom/pagination/index.js.map +1 -1
- package/test-utils/selectors/pagination/index.d.ts +15 -0
- package/test-utils/selectors/pagination/index.js +22 -0
- package/test-utils/selectors/pagination/index.js.map +1 -1
- package/textarea/styles.css.js +5 -5
- package/textarea/styles.scoped.css +14 -14
- package/textarea/styles.selectors.js +5 -5
- package/token/styles.css.js +14 -14
- package/token/styles.scoped.css +30 -30
- package/token/styles.selectors.js +14 -14
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"header": "
|
|
5
|
-
"disabled": "
|
|
6
|
-
"no-content-styling": "awsui_no-content-
|
|
7
|
-
"expandable-header": "awsui_expandable-
|
|
8
|
-
"rolled-down": "awsui_rolled-
|
|
9
|
-
"highlighted": "
|
|
10
|
-
"is-focused": "awsui_is-
|
|
11
|
-
"visual-refresh": "awsui_visual-
|
|
12
|
-
"category": "
|
|
13
|
-
"expandable": "
|
|
14
|
-
"variant-navigation": "awsui_variant-
|
|
15
|
-
"expand-icon": "awsui_expand-
|
|
16
|
-
"expand-icon-up": "awsui_expand-icon-
|
|
17
|
-
"expand-icon-right": "awsui_expand-icon-
|
|
18
|
-
"items-list-container": "awsui_items-list-
|
|
19
|
-
"in-dropdown": "awsui_in-
|
|
20
|
-
"icon-wrapper": "awsui_icon-
|
|
21
|
-
"header-content": "awsui_header-
|
|
4
|
+
"header": "awsui_header_16mm3_w116x_145",
|
|
5
|
+
"disabled": "awsui_disabled_16mm3_w116x_161",
|
|
6
|
+
"no-content-styling": "awsui_no-content-styling_16mm3_w116x_165",
|
|
7
|
+
"expandable-header": "awsui_expandable-header_16mm3_w116x_171",
|
|
8
|
+
"rolled-down": "awsui_rolled-down_16mm3_w116x_182",
|
|
9
|
+
"highlighted": "awsui_highlighted_16mm3_w116x_185",
|
|
10
|
+
"is-focused": "awsui_is-focused_16mm3_w116x_208",
|
|
11
|
+
"visual-refresh": "awsui_visual-refresh_16mm3_w116x_211",
|
|
12
|
+
"category": "awsui_category_16mm3_w116x_215",
|
|
13
|
+
"expandable": "awsui_expandable_16mm3_w116x_171",
|
|
14
|
+
"variant-navigation": "awsui_variant-navigation_16mm3_w116x_230",
|
|
15
|
+
"expand-icon": "awsui_expand-icon_16mm3_w116x_237",
|
|
16
|
+
"expand-icon-up": "awsui_expand-icon-up_16mm3_w116x_255",
|
|
17
|
+
"expand-icon-right": "awsui_expand-icon-right_16mm3_w116x_258",
|
|
18
|
+
"items-list-container": "awsui_items-list-container_16mm3_w116x_266",
|
|
19
|
+
"in-dropdown": "awsui_in-dropdown_16mm3_w116x_275",
|
|
20
|
+
"icon-wrapper": "awsui_icon-wrapper_16mm3_w116x_279",
|
|
21
|
+
"header-content": "awsui_header-content_16mm3_w116x_283"
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_header_16mm3_w116x_145:not(#\9) {
|
|
146
146
|
position: relative;
|
|
147
147
|
margin-block: 0;
|
|
148
148
|
margin-inline: 0;
|
|
@@ -154,38 +154,38 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
display: flex;
|
|
155
155
|
justify-content: space-between;
|
|
156
156
|
align-items: center;
|
|
157
|
-
padding-block: calc(var(--space-
|
|
157
|
+
padding-block: calc(var(--space-option-padding-vertical-d2srv9, 4px) + var(--border-item-width-miijiw, 2px) - var(--border-divider-list-width-tdfx1x, 1px));
|
|
158
158
|
padding-inline: calc(var(--space-button-horizontal-k0c786, 20px) + var(--border-item-width-miijiw, 2px));
|
|
159
159
|
z-index: 1;
|
|
160
160
|
}
|
|
161
|
-
.
|
|
161
|
+
.awsui_header_16mm3_w116x_145.awsui_disabled_16mm3_w116x_161:not(#\9) {
|
|
162
162
|
color: var(--color-text-dropdown-item-disabled-8m65hf, #b4b4bb);
|
|
163
163
|
cursor: default;
|
|
164
164
|
}
|
|
165
|
-
.
|
|
165
|
+
.awsui_header_16mm3_w116x_145.awsui_no-content-styling_16mm3_w116x_165:not(#\9) {
|
|
166
166
|
padding-block: calc(var(--border-item-width-miijiw, 2px) - var(--border-divider-list-width-tdfx1x, 1px));
|
|
167
167
|
padding-inline: var(--border-item-width-miijiw, 2px);
|
|
168
168
|
font-weight: normal;
|
|
169
169
|
color: inherit;
|
|
170
170
|
}
|
|
171
|
-
.
|
|
171
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171:not(#\9) {
|
|
172
172
|
border-block-start-color: var(--color-border-dropdown-group-ylcnh8, #c6c6cd);
|
|
173
173
|
border-block-end-color: var(--color-border-dropdown-group-ylcnh8, #c6c6cd);
|
|
174
174
|
cursor: pointer;
|
|
175
175
|
}
|
|
176
|
-
.
|
|
176
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171.awsui_disabled_16mm3_w116x_161:not(#\9) {
|
|
177
177
|
cursor: default;
|
|
178
178
|
}
|
|
179
|
-
.
|
|
179
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171:not(#\9):focus {
|
|
180
180
|
outline: none;
|
|
181
181
|
}
|
|
182
|
-
.
|
|
182
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171.awsui_rolled-down_16mm3_w116x_182:not(#\9) {
|
|
183
183
|
border-block-end-color: transparent;
|
|
184
184
|
}
|
|
185
|
-
.
|
|
185
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171.awsui_highlighted_16mm3_w116x_185:not(#\9) {
|
|
186
186
|
background-color: var(--color-background-dropdown-item-hover-yunepc, #f3f3f7);
|
|
187
187
|
color: var(--color-text-dropdown-item-highlighted-yr1px8, #0f141a);
|
|
188
|
-
padding-block: var(--space-
|
|
188
|
+
padding-block: var(--space-option-padding-vertical-d2srv9, 4px);
|
|
189
189
|
padding-inline: var(--space-button-horizontal-k0c786, 20px);
|
|
190
190
|
border-block: var(--border-item-width-miijiw, 2px) solid var(--color-border-dropdown-item-hover-aqfuxq, #8c8c94);
|
|
191
191
|
border-inline: var(--border-item-width-miijiw, 2px) solid var(--color-border-dropdown-item-hover-aqfuxq, #8c8c94);
|
|
@@ -195,46 +195,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
195
195
|
border-end-end-radius: var(--border-radius-item-iwaia5, 8px);
|
|
196
196
|
z-index: 2;
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171.awsui_highlighted_16mm3_w116x_185.awsui_no-content-styling_16mm3_w116x_165:not(#\9) {
|
|
199
199
|
padding-block: 0;
|
|
200
200
|
padding-inline: 0;
|
|
201
201
|
color: inherit;
|
|
202
202
|
}
|
|
203
|
-
.
|
|
203
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171.awsui_highlighted_16mm3_w116x_185.awsui_disabled_16mm3_w116x_161:not(#\9) {
|
|
204
204
|
background-color: var(--color-background-dropdown-item-dimmed-dhho03, transparent);
|
|
205
205
|
border-color: var(--color-border-dropdown-item-dimmed-hover-ga9sch, #8c8c94);
|
|
206
206
|
color: var(--color-text-dropdown-item-dimmed-tq8vh3, #b4b4bb);
|
|
207
207
|
}
|
|
208
|
-
.
|
|
208
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171.awsui_highlighted_16mm3_w116x_185.awsui_is-focused_16mm3_w116x_208:not(#\9) {
|
|
209
209
|
border-color: var(--color-border-dropdown-item-focused-zacqlp, #424650);
|
|
210
210
|
}
|
|
211
|
-
.
|
|
211
|
+
.awsui_header_16mm3_w116x_145.awsui_expandable-header_16mm3_w116x_171.awsui_highlighted_16mm3_w116x_185.awsui_is-focused_16mm3_w116x_208:not(#\9):not(.awsui_visual-refresh_16mm3_w116x_211) {
|
|
212
212
|
box-shadow: inset 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
.
|
|
215
|
+
.awsui_category_16mm3_w116x_215:not(#\9) {
|
|
216
216
|
list-style: none;
|
|
217
217
|
margin-block-start: calc(-1 * var(--border-divider-list-width-tdfx1x, 1px));
|
|
218
218
|
padding-block: 0;
|
|
219
219
|
padding-inline: 0;
|
|
220
220
|
}
|
|
221
|
-
.
|
|
221
|
+
.awsui_category_16mm3_w116x_215:not(#\9):first-child {
|
|
222
222
|
margin-block-start: 0;
|
|
223
223
|
}
|
|
224
|
-
.
|
|
224
|
+
.awsui_category_16mm3_w116x_215.awsui_expandable_16mm3_w116x_171:not(#\9) {
|
|
225
225
|
border-block-start: 0;
|
|
226
226
|
}
|
|
227
|
-
.
|
|
227
|
+
.awsui_category_16mm3_w116x_215:not(#\9):last-child {
|
|
228
228
|
border-block-end: none;
|
|
229
229
|
}
|
|
230
|
-
.
|
|
230
|
+
.awsui_category_16mm3_w116x_215.awsui_variant-navigation_16mm3_w116x_230:not(#\9) {
|
|
231
231
|
padding-block-start: var(--space-xxs-hwfkai, 4px);
|
|
232
232
|
}
|
|
233
|
-
.
|
|
233
|
+
.awsui_category_16mm3_w116x_215.awsui_variant-navigation_16mm3_w116x_230.awsui_expandable_16mm3_w116x_171:not(#\9) {
|
|
234
234
|
padding-block-start: 0;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
.awsui_expand-
|
|
237
|
+
.awsui_expand-icon_16mm3_w116x_237:not(#\9) {
|
|
238
238
|
position: relative;
|
|
239
239
|
inset-inline-end: calc(-1 * var(--space-s-tvghoh, 12px));
|
|
240
240
|
inline-size: var(--space-m-dsumyt, 16px);
|
|
@@ -243,27 +243,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
243
243
|
transition: transform var(--motion-duration-rotate-180-cxi9g7, 135ms) var(--motion-easing-rotate-180-7a58rc, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
244
244
|
}
|
|
245
245
|
@media (prefers-reduced-motion: reduce) {
|
|
246
|
-
.awsui_expand-
|
|
246
|
+
.awsui_expand-icon_16mm3_w116x_237:not(#\9) {
|
|
247
247
|
animation: none;
|
|
248
248
|
transition: none;
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
.awsui-motion-disabled .awsui_expand-
|
|
251
|
+
.awsui-motion-disabled .awsui_expand-icon_16mm3_w116x_237:not(#\9), .awsui-mode-entering .awsui_expand-icon_16mm3_w116x_237:not(#\9) {
|
|
252
252
|
animation: none;
|
|
253
253
|
transition: none;
|
|
254
254
|
}
|
|
255
|
-
.awsui_expand-icon-
|
|
255
|
+
.awsui_expand-icon-up_16mm3_w116x_255:not(#\9) {
|
|
256
256
|
transform: rotate(-180deg);
|
|
257
257
|
}
|
|
258
|
-
.awsui_expand-icon-
|
|
258
|
+
.awsui_expand-icon-right_16mm3_w116x_258:not(#\9) {
|
|
259
259
|
transform: rotate(-90deg);
|
|
260
260
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
261
261
|
}
|
|
262
|
-
.awsui_expand-icon-
|
|
262
|
+
.awsui_expand-icon-right_16mm3_w116x_258:not(#\9):dir(rtl) {
|
|
263
263
|
transform: rotate(90deg);
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
.awsui_items-list-
|
|
266
|
+
.awsui_items-list-container_16mm3_w116x_266:not(#\9) {
|
|
267
267
|
padding-block: 0;
|
|
268
268
|
padding-inline: 0;
|
|
269
269
|
margin-block-start: -1px;
|
|
@@ -272,15 +272,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
272
272
|
overflow-y: auto;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
.awsui_in-
|
|
275
|
+
.awsui_in-dropdown_16mm3_w116x_275:not(#\9) {
|
|
276
276
|
margin-block-end: -1px;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
.awsui_icon-
|
|
279
|
+
.awsui_icon-wrapper_16mm3_w116x_279:not(#\9) {
|
|
280
280
|
margin-inline-end: var(--space-xxs-hwfkai, 4px);
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
.awsui_header-
|
|
283
|
+
.awsui_header-content_16mm3_w116x_283:not(#\9) {
|
|
284
284
|
display: flex;
|
|
285
285
|
align-items: center;
|
|
286
286
|
}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"header": "
|
|
6
|
-
"disabled": "
|
|
7
|
-
"no-content-styling": "awsui_no-content-
|
|
8
|
-
"expandable-header": "awsui_expandable-
|
|
9
|
-
"rolled-down": "awsui_rolled-
|
|
10
|
-
"highlighted": "
|
|
11
|
-
"is-focused": "awsui_is-
|
|
12
|
-
"visual-refresh": "awsui_visual-
|
|
13
|
-
"category": "
|
|
14
|
-
"expandable": "
|
|
15
|
-
"variant-navigation": "awsui_variant-
|
|
16
|
-
"expand-icon": "awsui_expand-
|
|
17
|
-
"expand-icon-up": "awsui_expand-icon-
|
|
18
|
-
"expand-icon-right": "awsui_expand-icon-
|
|
19
|
-
"items-list-container": "awsui_items-list-
|
|
20
|
-
"in-dropdown": "awsui_in-
|
|
21
|
-
"icon-wrapper": "awsui_icon-
|
|
22
|
-
"header-content": "awsui_header-
|
|
5
|
+
"header": "awsui_header_16mm3_w116x_145",
|
|
6
|
+
"disabled": "awsui_disabled_16mm3_w116x_161",
|
|
7
|
+
"no-content-styling": "awsui_no-content-styling_16mm3_w116x_165",
|
|
8
|
+
"expandable-header": "awsui_expandable-header_16mm3_w116x_171",
|
|
9
|
+
"rolled-down": "awsui_rolled-down_16mm3_w116x_182",
|
|
10
|
+
"highlighted": "awsui_highlighted_16mm3_w116x_185",
|
|
11
|
+
"is-focused": "awsui_is-focused_16mm3_w116x_208",
|
|
12
|
+
"visual-refresh": "awsui_visual-refresh_16mm3_w116x_211",
|
|
13
|
+
"category": "awsui_category_16mm3_w116x_215",
|
|
14
|
+
"expandable": "awsui_expandable_16mm3_w116x_171",
|
|
15
|
+
"variant-navigation": "awsui_variant-navigation_16mm3_w116x_230",
|
|
16
|
+
"expand-icon": "awsui_expand-icon_16mm3_w116x_237",
|
|
17
|
+
"expand-icon-up": "awsui_expand-icon-up_16mm3_w116x_255",
|
|
18
|
+
"expand-icon-right": "awsui_expand-icon-right_16mm3_w116x_258",
|
|
19
|
+
"items-list-container": "awsui_items-list-container_16mm3_w116x_266",
|
|
20
|
+
"in-dropdown": "awsui_in-dropdown_16mm3_w116x_275",
|
|
21
|
+
"icon-wrapper": "awsui_icon-wrapper_16mm3_w116x_279",
|
|
22
|
+
"header-content": "awsui_header-content_16mm3_w116x_283"
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -97,8 +97,6 @@ export interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewpor
|
|
|
97
97
|
* The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.
|
|
98
98
|
*
|
|
99
99
|
* When returning `null`, the default styling will be applied.
|
|
100
|
-
*
|
|
101
|
-
* @awsuiSystem core
|
|
102
100
|
*/
|
|
103
101
|
renderItem?: ButtonDropdownProps.ItemRenderer;
|
|
104
102
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,kCAAkC,EAAE,MAAM,kEAAkE,CAAC;AAEtH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MA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;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ExpandToViewport } from '../dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute. **Deprecated**, has no effect.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n * - `dataAttributes` (Record<string, string>) - (Optional) Custom data attributes for the item element. Attribute names are automatically prefixed with \"data-\". The \"testid\" key is reserved.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `download` (boolean | string) - (Optional) Indicates that the link should be downloaded when clicked. Only works when `href` is also provided. If set to `true`, the browser will use the filename from the URL. If set to a string, that string will be used as the suggested filename.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * The item inside the props has a different shape depending on its type:\n *\n *\n * ### action\n *\n * - `type` ('action') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (Item) - The original item configuration.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### checkbox\n *\n * - `type` ('checkbox') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (CheckboxItem) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### group\n *\n * - `type` ('group') - The item type.\n * - `index` (number) - The item's position in the list.\n * - `option` (ItemGroup) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `expanded` (boolean) - Whether the group is expanded.\n * - `expandDirection` ('vertical' | 'horizontal') - The direction in which the group expands.\n *\n * When providing a custom `renderItem` implementation, it fully replaces the default visual rendering and content for that item.\n * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.\n *\n * When returning `null`, the default styling will be applied.\n *\n * @awsuiSystem core\n */\n renderItem?: ButtonDropdownProps.ItemRenderer;\n\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n */\n disabledReason?: string;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Controls expandability of the item groups.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n\n /**\n * Sets the button width to be 100% of the parent container width. Button content is centered.\n */\n fullWidth?: boolean;\n\n /**\n * Attributes to add to the native `button` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeTriggerAttributes?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n\n /**\n * Attributes to add to the native element of the `mainAction`.\n *\n * Specify either `button` for a standard main action, or `anchor` if `html` is set.\n *\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeMainActionAttributes?: {\n button?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n anchor?: NativeAttributes<React.AnchorHTMLAttributes<HTMLAnchorElement>>;\n };\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n\n export interface ActionRenderItem {\n type: 'action';\n index: number;\n option: Item;\n highlighted: boolean;\n disabled: boolean;\n parent: GroupRenderItem | null;\n }\n export interface CheckboxRenderItem {\n type: 'checkbox';\n index: number;\n option: CheckboxItem;\n disabled: boolean;\n highlighted: boolean;\n checked: boolean;\n parent: GroupRenderItem | null;\n }\n export interface GroupRenderItem {\n type: 'group';\n index: number;\n option: ItemGroup;\n disabled: boolean;\n highlighted: boolean;\n expanded: boolean;\n expandDirection: 'vertical' | 'horizontal';\n }\n\n export type RenderItem = ActionRenderItem | CheckboxRenderItem | GroupRenderItem;\n export type ItemRenderer = (props: { item: ButtonDropdownProps.RenderItem }) => ReactNode | null;\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n secondaryText?: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n /**\n * @deprecated Has no effect.\n */\n description?: string;\n href?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n labelTag?: string;\n dataAttributes?: Record<string, string>;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'download' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType' | 'secondaryText' | 'labelTag'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button. If a main action is defined this will focus that button.\n */\n focus(options?: FocusOptions): void;\n /**\n * Focuses the underlying native button for the dropdown.\n */\n focusDropdownTrigger(options?: FocusOptions): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface CategoryProps extends HighlightProps {\n index?: number;\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n hasExpandableGroups?: boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface ItemProps {\n index?: number;\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n /**\n * Used in breadcrumb-group: indicates that this breadcrumb item is the current page\n */\n isCurrentBreadcrumb?: boolean;\n}\n\nexport interface InternalCheckboxItem extends ButtonDropdownProps.CheckboxItem {\n badge?: boolean;\n}\n\ninterface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\ntype InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | InternalCheckboxItem | InternalItemGroup;\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Determines whether simple items should be displayed with the link styles.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n linkStyle?: boolean;\n\n /**\n * Determines whether the dropdown should take up the full available width.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n fullWidth?: boolean;\n\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n\n /**\n * Position of the button dropdown inside a list of elements, for example a button group\n */\n position?: string;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: string;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ExpandToViewport } from '../dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute. **Deprecated**, has no effect.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n * - `dataAttributes` (Record<string, string>) - (Optional) Custom data attributes for the item element. Attribute names are automatically prefixed with \"data-\". The \"testid\" key is reserved.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `download` (boolean | string) - (Optional) Indicates that the link should be downloaded when clicked. Only works when `href` is also provided. If set to `true`, the browser will use the filename from the URL. If set to a string, that string will be used as the suggested filename.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * The item inside the props has a different shape depending on its type:\n *\n *\n * ### action\n *\n * - `type` ('action') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (Item) - The original item configuration.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### checkbox\n *\n * - `type` ('checkbox') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (CheckboxItem) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n *\n * ### group\n *\n * - `type` ('group') - The item type.\n * - `index` (number) - The item's position in the list.\n * - `option` (ItemGroup) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `expanded` (boolean) - Whether the group is expanded.\n * - `expandDirection` ('vertical' | 'horizontal') - The direction in which the group expands.\n *\n * When providing a custom `renderItem` implementation, it fully replaces the default visual rendering and content for that item.\n * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.\n *\n * When returning `null`, the default styling will be applied.\n */\n renderItem?: ButtonDropdownProps.ItemRenderer;\n\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n */\n disabledReason?: string;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Controls expandability of the item groups.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n\n /**\n * Sets the button width to be 100% of the parent container width. Button content is centered.\n */\n fullWidth?: boolean;\n\n /**\n * Attributes to add to the native `button` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeTriggerAttributes?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n\n /**\n * Attributes to add to the native element of the `mainAction`.\n *\n * Specify either `button` for a standard main action, or `anchor` if `html` is set.\n *\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeMainActionAttributes?: {\n button?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n anchor?: NativeAttributes<React.AnchorHTMLAttributes<HTMLAnchorElement>>;\n };\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n\n export interface ActionRenderItem {\n type: 'action';\n index: number;\n option: Item;\n highlighted: boolean;\n disabled: boolean;\n parent: GroupRenderItem | null;\n }\n export interface CheckboxRenderItem {\n type: 'checkbox';\n index: number;\n option: CheckboxItem;\n disabled: boolean;\n highlighted: boolean;\n checked: boolean;\n parent: GroupRenderItem | null;\n }\n export interface GroupRenderItem {\n type: 'group';\n index: number;\n option: ItemGroup;\n disabled: boolean;\n highlighted: boolean;\n expanded: boolean;\n expandDirection: 'vertical' | 'horizontal';\n }\n\n export type RenderItem = ActionRenderItem | CheckboxRenderItem | GroupRenderItem;\n export type ItemRenderer = (props: { item: ButtonDropdownProps.RenderItem }) => ReactNode | null;\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n secondaryText?: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n /**\n * @deprecated Has no effect.\n */\n description?: string;\n href?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n labelTag?: string;\n dataAttributes?: Record<string, string>;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'download' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType' | 'secondaryText' | 'labelTag'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button. If a main action is defined this will focus that button.\n */\n focus(options?: FocusOptions): void;\n /**\n * Focuses the underlying native button for the dropdown.\n */\n focusDropdownTrigger(options?: FocusOptions): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface CategoryProps extends HighlightProps {\n index?: number;\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n hasExpandableGroups?: boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface ItemProps {\n index?: number;\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n /**\n * Used in breadcrumb-group: indicates that this breadcrumb item is the current page\n */\n isCurrentBreadcrumb?: boolean;\n}\n\nexport interface InternalCheckboxItem extends ButtonDropdownProps.CheckboxItem {\n badge?: boolean;\n}\n\ninterface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\ntype InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | InternalCheckboxItem | InternalItemGroup;\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Determines whether simple items should be displayed with the link styles.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n linkStyle?: boolean;\n\n /**\n * Determines whether the dropdown should take up the full available width.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n fullWidth?: boolean;\n\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n\n /**\n * Position of the button dropdown inside a list of elements, for example a button group\n */\n position?: string;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: string;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"item-element": "awsui_item-
|
|
5
|
-
"no-content-styling": "awsui_no-content-
|
|
6
|
-
"disabled": "
|
|
7
|
-
"show-divider": "awsui_show-
|
|
8
|
-
"highlighted": "
|
|
9
|
-
"is-focused": "awsui_is-
|
|
10
|
-
"visual-refresh": "awsui_visual-
|
|
11
|
-
"menu-item": "awsui_menu-
|
|
12
|
-
"link-style": "awsui_link-
|
|
13
|
-
"current-breadcrumb": "awsui_current-
|
|
14
|
-
"link-style-highlighted": "awsui_link-style-
|
|
15
|
-
"has-category-header": "awsui_has-category-
|
|
16
|
-
"item-tooltip-wrapper": "awsui_item-tooltip-
|
|
17
|
-
"has-checkmark": "awsui_has-
|
|
18
|
-
"icon": "
|
|
19
|
-
"checkmark": "
|
|
20
|
-
"external-icon": "awsui_external-
|
|
21
|
-
"content-wrapper": "awsui_content-
|
|
22
|
-
"main-row": "awsui_main-
|
|
23
|
-
"label-tag": "awsui_label-
|
|
24
|
-
"secondary-text": "awsui_secondary-
|
|
4
|
+
"item-element": "awsui_item-element_93a1u_18wnz_145",
|
|
5
|
+
"no-content-styling": "awsui_no-content-styling_93a1u_18wnz_157",
|
|
6
|
+
"disabled": "awsui_disabled_93a1u_18wnz_162",
|
|
7
|
+
"show-divider": "awsui_show-divider_93a1u_18wnz_169",
|
|
8
|
+
"highlighted": "awsui_highlighted_93a1u_18wnz_172",
|
|
9
|
+
"is-focused": "awsui_is-focused_93a1u_18wnz_187",
|
|
10
|
+
"visual-refresh": "awsui_visual-refresh_93a1u_18wnz_190",
|
|
11
|
+
"menu-item": "awsui_menu-item_93a1u_18wnz_194",
|
|
12
|
+
"link-style": "awsui_link-style_93a1u_18wnz_211",
|
|
13
|
+
"current-breadcrumb": "awsui_current-breadcrumb_93a1u_18wnz_247",
|
|
14
|
+
"link-style-highlighted": "awsui_link-style-highlighted_93a1u_18wnz_255",
|
|
15
|
+
"has-category-header": "awsui_has-category-header_93a1u_18wnz_261",
|
|
16
|
+
"item-tooltip-wrapper": "awsui_item-tooltip-wrapper_93a1u_18wnz_261",
|
|
17
|
+
"has-checkmark": "awsui_has-checkmark_93a1u_18wnz_261",
|
|
18
|
+
"icon": "awsui_icon_93a1u_18wnz_268",
|
|
19
|
+
"checkmark": "awsui_checkmark_93a1u_18wnz_272",
|
|
20
|
+
"external-icon": "awsui_external-icon_93a1u_18wnz_279",
|
|
21
|
+
"content-wrapper": "awsui_content-wrapper_93a1u_18wnz_283",
|
|
22
|
+
"main-row": "awsui_main-row_93a1u_18wnz_289",
|
|
23
|
+
"label-tag": "awsui_label-tag_93a1u_18wnz_296",
|
|
24
|
+
"secondary-text": "awsui_secondary-text_93a1u_18wnz_303"
|
|
25
25
|
};
|
|
26
26
|
|