@cloudscape-design/components-themeable 3.0.1006 → 3.0.1007

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.
Files changed (61) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/button/styles.scss +26 -17
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +75 -59
  4. package/lib/internal/scss/internal/styles/foundation/shadows.scss +3 -1
  5. package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
  6. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +32 -32
  7. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
  8. package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
  9. package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
  10. package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
  11. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
  12. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
  13. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
  14. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +17 -17
  15. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +39 -39
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +17 -17
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +21 -21
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +45 -45
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +21 -21
  23. package/lib/internal/template/button/index.d.ts.map +1 -1
  24. package/lib/internal/template/button/index.js +2 -2
  25. package/lib/internal/template/button/index.js.map +1 -1
  26. package/lib/internal/template/button/interfaces.d.ts +35 -0
  27. package/lib/internal/template/button/interfaces.d.ts.map +1 -1
  28. package/lib/internal/template/button/interfaces.js.map +1 -1
  29. package/lib/internal/template/button/internal.d.ts.map +1 -1
  30. package/lib/internal/template/button/internal.js +27 -3
  31. package/lib/internal/template/button/internal.js.map +1 -1
  32. package/lib/internal/template/button/styles.css.js +22 -22
  33. package/lib/internal/template/button/styles.scoped.css +211 -210
  34. package/lib/internal/template/button/styles.selectors.js +22 -22
  35. package/lib/internal/template/content-layout/styles.css.js +14 -14
  36. package/lib/internal/template/content-layout/styles.scoped.css +27 -27
  37. package/lib/internal/template/content-layout/styles.selectors.js +14 -14
  38. package/lib/internal/template/flashbar/styles.css.js +50 -50
  39. package/lib/internal/template/flashbar/styles.scoped.css +166 -166
  40. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  41. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +21 -21
  42. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +44 -44
  43. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +21 -21
  44. package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
  45. package/lib/internal/template/internal/components/dropdown/styles.scoped.css +38 -38
  46. package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
  47. package/lib/internal/template/internal/environment.js +1 -1
  48. package/lib/internal/template/internal/environment.json +1 -1
  49. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +76 -61
  50. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  51. package/lib/internal/template/internal/generated/custom-css-properties/index.js +75 -59
  52. package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
  53. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +12 -13
  54. package/lib/internal/template/internal/generated/theming/index.d.ts +12 -13
  55. package/lib/internal/template/slider/styles.css.js +26 -26
  56. package/lib/internal/template/slider/styles.scoped.css +86 -86
  57. package/lib/internal/template/slider/styles.selectors.js +26 -26
  58. package/lib/internal/template/spinner/styles.css.js +13 -13
  59. package/lib/internal/template/spinner/styles.scoped.css +39 -39
  60. package/lib/internal/template/spinner/styles.selectors.js +13 -13
  61. package/package.json +1 -1
@@ -1,26 +1,26 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_7nfqu_1gpfy_153",
5
- "has-adaptive-widths-default": "awsui_has-adaptive-widths-default_7nfqu_1gpfy_197",
6
- "has-adaptive-widths-dashboard": "awsui_has-adaptive-widths-dashboard_7nfqu_1gpfy_202",
7
- "drawer-expanded-mode": "awsui_drawer-expanded-mode_7nfqu_1gpfy_217",
8
- "navigation": "awsui_navigation_7nfqu_1gpfy_222",
9
- "tools": "awsui_tools_7nfqu_1gpfy_223",
10
- "global-tools": "awsui_global-tools_7nfqu_1gpfy_224",
11
- "tools-open": "awsui_tools-open_7nfqu_1gpfy_262",
12
- "split-panel-side": "awsui_split-panel-side_7nfqu_1gpfy_276",
13
- "split-panel-bottom": "awsui_split-panel-bottom_7nfqu_1gpfy_283",
14
- "panel-hidden": "awsui_panel-hidden_7nfqu_1gpfy_296",
15
- "toolbar-container": "awsui_toolbar-container_7nfqu_1gpfy_306",
16
- "notifications-container": "awsui_notifications-container_7nfqu_1gpfy_312",
17
- "notifications-background": "awsui_notifications-background_7nfqu_1gpfy_316",
18
- "main-landmark": "awsui_main-landmark_7nfqu_1gpfy_327",
19
- "main": "awsui_main_7nfqu_1gpfy_327",
20
- "main-disable-paddings": "awsui_main-disable-paddings_7nfqu_1gpfy_336",
21
- "content-header": "awsui_content-header_7nfqu_1gpfy_346",
22
- "content": "awsui_content_7nfqu_1gpfy_346",
23
- "unfocusable-mobile": "awsui_unfocusable-mobile_7nfqu_1gpfy_356",
24
- "hidden": "awsui_hidden_7nfqu_1gpfy_361"
4
+ "root": "awsui_root_7nfqu_1w5ew_153",
5
+ "has-adaptive-widths-default": "awsui_has-adaptive-widths-default_7nfqu_1w5ew_197",
6
+ "has-adaptive-widths-dashboard": "awsui_has-adaptive-widths-dashboard_7nfqu_1w5ew_202",
7
+ "drawer-expanded-mode": "awsui_drawer-expanded-mode_7nfqu_1w5ew_217",
8
+ "navigation": "awsui_navigation_7nfqu_1w5ew_222",
9
+ "tools": "awsui_tools_7nfqu_1w5ew_223",
10
+ "global-tools": "awsui_global-tools_7nfqu_1w5ew_224",
11
+ "tools-open": "awsui_tools-open_7nfqu_1w5ew_262",
12
+ "split-panel-side": "awsui_split-panel-side_7nfqu_1w5ew_276",
13
+ "split-panel-bottom": "awsui_split-panel-bottom_7nfqu_1w5ew_283",
14
+ "panel-hidden": "awsui_panel-hidden_7nfqu_1w5ew_296",
15
+ "toolbar-container": "awsui_toolbar-container_7nfqu_1w5ew_306",
16
+ "notifications-container": "awsui_notifications-container_7nfqu_1w5ew_312",
17
+ "notifications-background": "awsui_notifications-background_7nfqu_1w5ew_316",
18
+ "main-landmark": "awsui_main-landmark_7nfqu_1w5ew_327",
19
+ "main": "awsui_main_7nfqu_1w5ew_327",
20
+ "main-disable-paddings": "awsui_main-disable-paddings_7nfqu_1w5ew_336",
21
+ "content-header": "awsui_content-header_7nfqu_1w5ew_346",
22
+ "content": "awsui_content_7nfqu_1w5ew_346",
23
+ "unfocusable-mobile": "awsui_unfocusable-mobile_7nfqu_1w5ew_356",
24
+ "hidden": "awsui_hidden_7nfqu_1w5ew_361"
25
25
  };
26
26
 
@@ -150,7 +150,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
150
150
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
151
151
  SPDX-License-Identifier: Apache-2.0
152
152
  */
153
- .awsui_root_7nfqu_1gpfy_153:not(#\9) {
153
+ .awsui_root_7nfqu_1w5ew_153:not(#\9) {
154
154
  border-collapse: separate;
155
155
  border-spacing: 0;
156
156
  box-sizing: border-box;
@@ -183,90 +183,90 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
183
183
  -moz-osx-font-smoothing: auto;
184
184
  color: var(--color-text-body-default-5qid0u, #16191f);
185
185
  background-color: var(--color-background-layout-main-05m5y6, #f2f3f3);
186
- --awsui-max-content-width-xgujsu: 100%;
186
+ --awsui-max-content-width-kcc2gu: 100%;
187
187
  display: grid;
188
188
  grid-template-areas: "toolbar toolbar toolbar" ". notifications ." ". main .";
189
189
  grid-template-columns: var(--space-layout-content-horizontal-q3zhej, 40px) minmax(0, 1fr) var(--space-layout-content-horizontal-q3zhej, 40px);
190
190
  grid-template-rows: min-content min-content 1fr;
191
191
  }
192
192
  @media (min-width: 689px) {
193
- .awsui_root_7nfqu_1gpfy_153:not(#\9) {
193
+ .awsui_root_7nfqu_1w5ew_153:not(#\9) {
194
194
  grid-template-areas: "toolbar toolbar toolbar toolbar toolbar toolbar toolbar" "navigation . notifications . sideSplitPanel tools global-tools" "navigation . main . sideSplitPanel tools global-tools";
195
- grid-template-columns: min-content minmax(var(--space-layout-content-horizontal-q3zhej, 40px), 1fr) minmax(0, var(--awsui-max-content-width-xgujsu)) minmax(var(--space-layout-content-horizontal-q3zhej, 40px), 1fr) min-content min-content;
195
+ grid-template-columns: min-content minmax(var(--space-layout-content-horizontal-q3zhej, 40px), 1fr) minmax(0, var(--awsui-max-content-width-kcc2gu)) minmax(var(--space-layout-content-horizontal-q3zhej, 40px), 1fr) min-content min-content;
196
196
  grid-template-rows: min-content min-content 1fr min-content;
197
197
  }
198
- .awsui_root_7nfqu_1gpfy_153.awsui_has-adaptive-widths-default_7nfqu_1gpfy_197:not(#\9) {
199
- --awsui-max-content-width-xgujsu: 1620px;
198
+ .awsui_root_7nfqu_1w5ew_153.awsui_has-adaptive-widths-default_7nfqu_1w5ew_197:not(#\9) {
199
+ --awsui-max-content-width-kcc2gu: 1620px;
200
200
  }
201
201
  }
202
202
  @media (min-width: 689px) and (min-width: 1401px) {
203
- .awsui_root_7nfqu_1gpfy_153.awsui_has-adaptive-widths-dashboard_7nfqu_1gpfy_202:not(#\9) {
204
- --awsui-max-content-width-xgujsu: 1280px;
203
+ .awsui_root_7nfqu_1w5ew_153.awsui_has-adaptive-widths-dashboard_7nfqu_1w5ew_202:not(#\9) {
204
+ --awsui-max-content-width-kcc2gu: 1280px;
205
205
  }
206
206
  }
207
207
  @media (min-width: 689px) and (min-width: 1921px) {
208
- .awsui_root_7nfqu_1gpfy_153.awsui_has-adaptive-widths-dashboard_7nfqu_1gpfy_202:not(#\9) {
209
- --awsui-max-content-width-xgujsu: 1620px;
208
+ .awsui_root_7nfqu_1w5ew_153.awsui_has-adaptive-widths-dashboard_7nfqu_1w5ew_202:not(#\9) {
209
+ --awsui-max-content-width-kcc2gu: 1620px;
210
210
  }
211
211
  }
212
212
  @media (min-width: 689px) and (min-width: 2541px) {
213
- .awsui_root_7nfqu_1gpfy_153.awsui_has-adaptive-widths-dashboard_7nfqu_1gpfy_202:not(#\9) {
214
- --awsui-max-content-width-xgujsu: 2160px;
213
+ .awsui_root_7nfqu_1w5ew_153.awsui_has-adaptive-widths-dashboard_7nfqu_1w5ew_202:not(#\9) {
214
+ --awsui-max-content-width-kcc2gu: 2160px;
215
215
  }
216
216
  }
217
217
  @media (min-width: 689px) {
218
- .awsui_root_7nfqu_1gpfy_153.awsui_drawer-expanded-mode_7nfqu_1gpfy_217:not(#\9) {
218
+ .awsui_root_7nfqu_1w5ew_153.awsui_drawer-expanded-mode_7nfqu_1w5ew_217:not(#\9) {
219
219
  grid-template-columns: 0 0 0 0 0 0 auto;
220
220
  }
221
221
  }
222
222
 
223
- .awsui_navigation_7nfqu_1gpfy_222:not(#\9),
224
- .awsui_tools_7nfqu_1gpfy_223:not(#\9),
225
- .awsui_global-tools_7nfqu_1gpfy_224:not(#\9) {
223
+ .awsui_navigation_7nfqu_1w5ew_222:not(#\9),
224
+ .awsui_tools_7nfqu_1w5ew_223:not(#\9),
225
+ .awsui_global-tools_7nfqu_1w5ew_224:not(#\9) {
226
226
  grid-row: 1/-1;
227
227
  grid-column: 1/-1;
228
228
  background: var(--color-background-container-content-aemn43, #ffffff);
229
229
  opacity: 1;
230
230
  }
231
231
  @media (max-width: 688px) {
232
- .awsui_navigation_7nfqu_1gpfy_222:not(#\9),
233
- .awsui_tools_7nfqu_1gpfy_223:not(#\9),
234
- .awsui_global-tools_7nfqu_1gpfy_224:not(#\9) {
232
+ .awsui_navigation_7nfqu_1w5ew_222:not(#\9),
233
+ .awsui_tools_7nfqu_1w5ew_223:not(#\9),
234
+ .awsui_global-tools_7nfqu_1w5ew_224:not(#\9) {
235
235
  inline-size: 100%;
236
236
  }
237
237
  }
238
238
 
239
- .awsui_navigation_7nfqu_1gpfy_222:not(#\9) {
239
+ .awsui_navigation_7nfqu_1w5ew_222:not(#\9) {
240
240
  z-index: 830;
241
241
  }
242
242
  @media (min-width: 689px) {
243
- .awsui_navigation_7nfqu_1gpfy_222:not(#\9) {
243
+ .awsui_navigation_7nfqu_1w5ew_222:not(#\9) {
244
244
  grid-area: navigation;
245
- inline-size: var(--awsui-navigation-width-xgujsu);
245
+ inline-size: var(--awsui-navigation-width-kcc2gu);
246
246
  border-inline-end: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-ovzonx, #d5dbdb);
247
247
  }
248
248
  }
249
249
  @media (max-width: 688px) {
250
- .awsui_navigation_7nfqu_1gpfy_222:not(#\9) {
250
+ .awsui_navigation_7nfqu_1w5ew_222:not(#\9) {
251
251
  z-index: 1001;
252
252
  }
253
253
  }
254
254
 
255
255
  @media (min-width: 689px) {
256
- .awsui_tools_7nfqu_1gpfy_223:not(#\9) {
256
+ .awsui_tools_7nfqu_1w5ew_223:not(#\9) {
257
257
  grid-area: tools;
258
258
  /* stylelint-disable plugin/no-unsupported-browser-features */
259
259
  }
260
- .awsui_tools_7nfqu_1gpfy_223:not(#\9):not(:has(> [data-testid])) {
261
- inline-size: var(--awsui-tools-width-xgujsu);
260
+ .awsui_tools_7nfqu_1w5ew_223:not(#\9):not(:has(> [data-testid])) {
261
+ inline-size: var(--awsui-tools-width-kcc2gu);
262
262
  }
263
- .awsui_tools_7nfqu_1gpfy_223:not(#\9):not(:has(> [data-testid])).awsui_tools-open_7nfqu_1gpfy_262 {
263
+ .awsui_tools_7nfqu_1w5ew_223:not(#\9):not(:has(> [data-testid])).awsui_tools-open_7nfqu_1w5ew_262 {
264
264
  border-inline-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-ovzonx, #d5dbdb);
265
265
  }
266
266
  }
267
267
 
268
268
  @media (min-width: 689px) {
269
- .awsui_global-tools_7nfqu_1gpfy_224:not(#\9) {
269
+ .awsui_global-tools_7nfqu_1w5ew_224:not(#\9) {
270
270
  display: flex;
271
271
  grid-area: global-tools;
272
272
  justify-content: flex-end;
@@ -274,14 +274,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
274
274
  }
275
275
 
276
276
  @media (min-width: 689px) {
277
- .awsui_split-panel-side_7nfqu_1gpfy_276:not(#\9) {
277
+ .awsui_split-panel-side_7nfqu_1w5ew_276:not(#\9) {
278
278
  grid-area: sideSplitPanel;
279
279
  border-inline-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-ovzonx, #d5dbdb);
280
280
  opacity: 1;
281
281
  }
282
282
  }
283
283
 
284
- .awsui_split-panel-bottom_7nfqu_1gpfy_283:not(#\9) {
284
+ .awsui_split-panel-bottom_7nfqu_1w5ew_283:not(#\9) {
285
285
  position: sticky;
286
286
  z-index: 840;
287
287
  align-self: end;
@@ -289,76 +289,76 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
289
289
  grid-column: 1/-1;
290
290
  }
291
291
  @media (min-width: 689px) {
292
- .awsui_split-panel-bottom_7nfqu_1gpfy_283:not(#\9) {
292
+ .awsui_split-panel-bottom_7nfqu_1w5ew_283:not(#\9) {
293
293
  grid-column: 2/5;
294
294
  }
295
295
  }
296
296
 
297
- .awsui_panel-hidden_7nfqu_1gpfy_296:not(#\9) {
297
+ .awsui_panel-hidden_7nfqu_1w5ew_296:not(#\9) {
298
298
  border-block: none;
299
299
  border-inline: none;
300
300
  opacity: 0;
301
301
  z-index: 0;
302
302
  }
303
- .awsui_panel-hidden_7nfqu_1gpfy_296.awsui_navigation_7nfqu_1gpfy_222:not(#\9), .awsui_panel-hidden_7nfqu_1gpfy_296.awsui_tools_7nfqu_1gpfy_223:not(#\9), .awsui_panel-hidden_7nfqu_1gpfy_296.awsui_global-tools_7nfqu_1gpfy_224:not(#\9) {
303
+ .awsui_panel-hidden_7nfqu_1w5ew_296.awsui_navigation_7nfqu_1w5ew_222:not(#\9), .awsui_panel-hidden_7nfqu_1w5ew_296.awsui_tools_7nfqu_1w5ew_223:not(#\9), .awsui_panel-hidden_7nfqu_1w5ew_296.awsui_global-tools_7nfqu_1w5ew_224:not(#\9) {
304
304
  inline-size: 0px;
305
305
  }
306
306
 
307
- .awsui_toolbar-container_7nfqu_1gpfy_306:not(#\9) {
307
+ .awsui_toolbar-container_7nfqu_1w5ew_306:not(#\9) {
308
308
  grid-area: toolbar;
309
309
  block-size: 42px;
310
310
  border-block-end: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-ovzonx, #d5dbdb);
311
311
  }
312
312
 
313
- .awsui_notifications-container_7nfqu_1gpfy_312:not(#\9) {
313
+ .awsui_notifications-container_7nfqu_1w5ew_312:not(#\9) {
314
314
  grid-area: notifications;
315
315
  }
316
316
 
317
- .awsui_notifications-background_7nfqu_1gpfy_316:not(#\9) {
317
+ .awsui_notifications-background_7nfqu_1w5ew_316:not(#\9) {
318
318
  background: var(--color-background-layout-main-05m5y6, #f2f3f3);
319
319
  grid-area: notifications;
320
320
  grid-column: 1/-1;
321
321
  }
322
322
  @media (min-width: 689px) {
323
- .awsui_notifications-background_7nfqu_1gpfy_316:not(#\9) {
323
+ .awsui_notifications-background_7nfqu_1w5ew_316:not(#\9) {
324
324
  grid-column: 2/5;
325
325
  }
326
326
  }
327
327
 
328
- .awsui_main-landmark_7nfqu_1gpfy_327:not(#\9) {
328
+ .awsui_main-landmark_7nfqu_1w5ew_327:not(#\9) {
329
329
  display: contents;
330
330
  }
331
331
 
332
- .awsui_main_7nfqu_1gpfy_327:not(#\9) {
332
+ .awsui_main_7nfqu_1w5ew_327:not(#\9) {
333
333
  grid-area: main;
334
334
  margin-block-start: var(--space-scaled-s-gjhvjd, 12px);
335
335
  margin-block-end: var(--space-layout-content-bottom-iu1izz, 20px);
336
336
  }
337
- .awsui_main-disable-paddings_7nfqu_1gpfy_336:not(#\9) {
337
+ .awsui_main-disable-paddings_7nfqu_1w5ew_336:not(#\9) {
338
338
  margin-block: 0;
339
339
  grid-column: 1/-1;
340
340
  }
341
341
  @media (min-width: 689px) {
342
- .awsui_main-disable-paddings_7nfqu_1gpfy_336:not(#\9) {
342
+ .awsui_main-disable-paddings_7nfqu_1w5ew_336:not(#\9) {
343
343
  grid-column: 2/5;
344
344
  }
345
345
  }
346
346
 
347
- .awsui_content-header_7nfqu_1gpfy_346:not(#\9) {
347
+ .awsui_content-header_7nfqu_1w5ew_346:not(#\9) {
348
348
  margin-block-end: var(--space-content-header-padding-bottom-hjkugf, 16px);
349
349
  }
350
350
 
351
- .awsui_content_7nfqu_1gpfy_346:not(#\9) {
351
+ .awsui_content_7nfqu_1w5ew_346:not(#\9) {
352
352
  display: contents;
353
353
  }
354
354
 
355
355
  /* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
356
356
  @media (max-width: 688px) {
357
- .awsui_unfocusable-mobile_7nfqu_1gpfy_356 *:not(#\9) {
357
+ .awsui_unfocusable-mobile_7nfqu_1w5ew_356 *:not(#\9) {
358
358
  visibility: hidden;
359
359
  }
360
360
  }
361
361
 
362
- .awsui_hidden_7nfqu_1gpfy_361:not(#\9) {
362
+ .awsui_hidden_7nfqu_1w5ew_361:not(#\9) {
363
363
  display: none;
364
364
  }
@@ -2,26 +2,26 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_7nfqu_1gpfy_153",
6
- "has-adaptive-widths-default": "awsui_has-adaptive-widths-default_7nfqu_1gpfy_197",
7
- "has-adaptive-widths-dashboard": "awsui_has-adaptive-widths-dashboard_7nfqu_1gpfy_202",
8
- "drawer-expanded-mode": "awsui_drawer-expanded-mode_7nfqu_1gpfy_217",
9
- "navigation": "awsui_navigation_7nfqu_1gpfy_222",
10
- "tools": "awsui_tools_7nfqu_1gpfy_223",
11
- "global-tools": "awsui_global-tools_7nfqu_1gpfy_224",
12
- "tools-open": "awsui_tools-open_7nfqu_1gpfy_262",
13
- "split-panel-side": "awsui_split-panel-side_7nfqu_1gpfy_276",
14
- "split-panel-bottom": "awsui_split-panel-bottom_7nfqu_1gpfy_283",
15
- "panel-hidden": "awsui_panel-hidden_7nfqu_1gpfy_296",
16
- "toolbar-container": "awsui_toolbar-container_7nfqu_1gpfy_306",
17
- "notifications-container": "awsui_notifications-container_7nfqu_1gpfy_312",
18
- "notifications-background": "awsui_notifications-background_7nfqu_1gpfy_316",
19
- "main-landmark": "awsui_main-landmark_7nfqu_1gpfy_327",
20
- "main": "awsui_main_7nfqu_1gpfy_327",
21
- "main-disable-paddings": "awsui_main-disable-paddings_7nfqu_1gpfy_336",
22
- "content-header": "awsui_content-header_7nfqu_1gpfy_346",
23
- "content": "awsui_content_7nfqu_1gpfy_346",
24
- "unfocusable-mobile": "awsui_unfocusable-mobile_7nfqu_1gpfy_356",
25
- "hidden": "awsui_hidden_7nfqu_1gpfy_361"
5
+ "root": "awsui_root_7nfqu_1w5ew_153",
6
+ "has-adaptive-widths-default": "awsui_has-adaptive-widths-default_7nfqu_1w5ew_197",
7
+ "has-adaptive-widths-dashboard": "awsui_has-adaptive-widths-dashboard_7nfqu_1w5ew_202",
8
+ "drawer-expanded-mode": "awsui_drawer-expanded-mode_7nfqu_1w5ew_217",
9
+ "navigation": "awsui_navigation_7nfqu_1w5ew_222",
10
+ "tools": "awsui_tools_7nfqu_1w5ew_223",
11
+ "global-tools": "awsui_global-tools_7nfqu_1w5ew_224",
12
+ "tools-open": "awsui_tools-open_7nfqu_1w5ew_262",
13
+ "split-panel-side": "awsui_split-panel-side_7nfqu_1w5ew_276",
14
+ "split-panel-bottom": "awsui_split-panel-bottom_7nfqu_1w5ew_283",
15
+ "panel-hidden": "awsui_panel-hidden_7nfqu_1w5ew_296",
16
+ "toolbar-container": "awsui_toolbar-container_7nfqu_1w5ew_306",
17
+ "notifications-container": "awsui_notifications-container_7nfqu_1w5ew_312",
18
+ "notifications-background": "awsui_notifications-background_7nfqu_1w5ew_316",
19
+ "main-landmark": "awsui_main-landmark_7nfqu_1w5ew_327",
20
+ "main": "awsui_main_7nfqu_1w5ew_327",
21
+ "main-disable-paddings": "awsui_main-disable-paddings_7nfqu_1w5ew_336",
22
+ "content-header": "awsui_content-header_7nfqu_1w5ew_346",
23
+ "content": "awsui_content_7nfqu_1w5ew_346",
24
+ "unfocusable-mobile": "awsui_unfocusable-mobile_7nfqu_1w5ew_356",
25
+ "hidden": "awsui_hidden_7nfqu_1w5ew_361"
26
26
  };
27
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,QAAA,MAAM,MAAM,qFA4EX,CAAC;AAGF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,QAAA,MAAM,MAAM,qFA8EX,CAAC;AAGF,eAAe,MAAM,CAAC"}
@@ -7,13 +7,13 @@ import useBaseComponent from '../internal/hooks/use-base-component';
7
7
  import { applyDisplayName } from '../internal/utils/apply-display-name';
8
8
  import { InternalButton } from './internal';
9
9
  const Button = React.forwardRef((_a, ref) => {
10
- var { children, iconName, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, target, rel, external = false, download, formAction = 'submit', ariaLabel, ariaDescribedby, onClick, onFollow, ariaExpanded, ariaControls, fullWidth, form, i18nStrings } = _a, props = __rest(_a, ["children", "iconName", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "target", "rel", "external", "download", "formAction", "ariaLabel", "ariaDescribedby", "onClick", "onFollow", "ariaExpanded", "ariaControls", "fullWidth", "form", "i18nStrings"]);
10
+ var { children, iconName, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, target, rel, external = false, download, formAction = 'submit', ariaLabel, ariaDescribedby, onClick, onFollow, ariaExpanded, ariaControls, fullWidth, form, i18nStrings, style } = _a, props = __rest(_a, ["children", "iconName", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "target", "rel", "external", "download", "formAction", "ariaLabel", "ariaDescribedby", "onClick", "onFollow", "ariaExpanded", "ariaControls", "fullWidth", "form", "i18nStrings", "style"]);
11
11
  const baseComponentProps = useBaseComponent('Button', {
12
12
  props: { formAction, fullWidth, iconAlign, iconName, rel, target, external, variant, wrapText },
13
13
  metadata: { hasDisabledReason: Boolean(disabledReason) },
14
14
  });
15
15
  const baseProps = getBaseProps(props);
16
- return (React.createElement(InternalButton, Object.assign({}, baseProps, baseComponentProps, { ref: ref, iconName: iconName, iconAlign: iconAlign, iconUrl: iconUrl, iconSvg: iconSvg, iconAlt: iconAlt, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, wrapText: wrapText, href: href, target: target, rel: rel, external: external, download: download, formAction: formAction, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, onClick: onClick, onFollow: onFollow, ariaExpanded: ariaExpanded, ariaControls: ariaControls, fullWidth: fullWidth, form: form, i18nStrings: i18nStrings, __injectAnalyticsComponentMetadata: true }), children));
16
+ return (React.createElement(InternalButton, Object.assign({}, baseProps, baseComponentProps, { ref: ref, iconName: iconName, iconAlign: iconAlign, iconUrl: iconUrl, iconSvg: iconSvg, iconAlt: iconAlt, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, wrapText: wrapText, href: href, target: target, rel: rel, external: external, download: download, formAction: formAction, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, onClick: onClick, onFollow: onFollow, ariaExpanded: ariaExpanded, ariaControls: ariaControls, fullWidth: fullWidth, form: form, i18nStrings: i18nStrings, style: style, __injectAnalyticsComponentMetadata: true }), children));
17
17
  });
18
18
  applyDisplayName(Button, 'Button');
19
19
  export default Button;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAI5C,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CACE,EA6Bc,EACd,GAA+B,EAC/B,EAAE;QA/BF,EACE,QAAQ,EACR,QAAQ,EACR,SAAS,GAAG,MAAM,EAClB,OAAO,EACP,OAAO,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AAE,eAAe,EAChC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,kCAAkC,EAAE,IAAI,KAEvC,QAAQ,CACM,CAClB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACnC,eAAe,MAAM,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getBaseProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { ButtonProps } from './interfaces';\nimport { InternalButton } from './internal';\n\nexport { ButtonProps };\n\nconst Button = React.forwardRef(\n (\n {\n children,\n iconName,\n iconAlign = 'left',\n iconUrl,\n iconSvg,\n iconAlt,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n wrapText = true,\n href,\n target,\n rel,\n external = false,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n onClick,\n onFollow,\n ariaExpanded,\n ariaControls,\n fullWidth,\n form,\n i18nStrings,\n ...props\n }: ButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Button', {\n props: { formAction, fullWidth, iconAlign, iconName, rel, target, external, variant, wrapText },\n metadata: { hasDisabledReason: Boolean(disabledReason) },\n });\n const baseProps = getBaseProps(props);\n return (\n <InternalButton\n {...baseProps}\n {...baseComponentProps}\n ref={ref}\n iconName={iconName}\n iconAlign={iconAlign}\n iconUrl={iconUrl}\n iconSvg={iconSvg}\n iconAlt={iconAlt}\n variant={variant}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n disabledReason={disabledReason}\n wrapText={wrapText}\n href={href}\n target={target}\n rel={rel}\n external={external}\n download={download}\n formAction={formAction}\n ariaLabel={ariaLabel}\n ariaDescribedby={ariaDescribedby}\n onClick={onClick}\n onFollow={onFollow}\n ariaExpanded={ariaExpanded}\n ariaControls={ariaControls}\n fullWidth={fullWidth}\n form={form}\n i18nStrings={i18nStrings}\n __injectAnalyticsComponentMetadata={true}\n >\n {children}\n </InternalButton>\n );\n }\n);\n\napplyDisplayName(Button, 'Button');\nexport default Button;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAI5C,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CACE,EA8Bc,EACd,GAA+B,EAC/B,EAAE;QAhCF,EACE,QAAQ,EACR,QAAQ,EACR,SAAS,GAAG,MAAM,EAClB,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,GAAG,QAAQ,EAClB,OAAO,GAAG,KAAK,EACf,WAAW,EACX,QAAQ,GAAG,KAAK,EAChB,cAAc,EACd,QAAQ,GAAG,IAAI,EACf,IAAI,EACJ,MAAM,EACN,GAAG,EACH,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,UAAU,GAAG,QAAQ,EACrB,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,KAAK,OAEO,EADT,KAAK,cA7BV,wVA8BC,CADS;IAIV,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,QAAQ,EAA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DX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getBaseProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { ButtonProps } from './interfaces';\nimport { InternalButton } from './internal';\n\nexport { ButtonProps };\n\nconst Button = React.forwardRef(\n (\n {\n children,\n iconName,\n iconAlign = 'left',\n iconUrl,\n iconSvg,\n iconAlt,\n variant = 'normal',\n loading = false,\n loadingText,\n disabled = false,\n disabledReason,\n wrapText = true,\n href,\n target,\n rel,\n external = false,\n download,\n formAction = 'submit',\n ariaLabel,\n ariaDescribedby,\n onClick,\n onFollow,\n ariaExpanded,\n ariaControls,\n fullWidth,\n form,\n i18nStrings,\n style,\n ...props\n }: ButtonProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Button', {\n props: { formAction, fullWidth, iconAlign, iconName, rel, target, external, variant, wrapText },\n metadata: { hasDisabledReason: Boolean(disabledReason) },\n });\n const baseProps = getBaseProps(props);\n return (\n <InternalButton\n {...baseProps}\n {...baseComponentProps}\n ref={ref}\n iconName={iconName}\n iconAlign={iconAlign}\n iconUrl={iconUrl}\n iconSvg={iconSvg}\n iconAlt={iconAlt}\n variant={variant}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n disabledReason={disabledReason}\n wrapText={wrapText}\n href={href}\n target={target}\n rel={rel}\n external={external}\n download={download}\n formAction={formAction}\n ariaLabel={ariaLabel}\n ariaDescribedby={ariaDescribedby}\n onClick={onClick}\n onFollow={onFollow}\n ariaExpanded={ariaExpanded}\n ariaControls={ariaControls}\n fullWidth={fullWidth}\n form={form}\n i18nStrings={i18nStrings}\n style={style}\n __injectAnalyticsComponentMetadata={true}\n >\n {children}\n </InternalButton>\n );\n }\n);\n\napplyDisplayName(Button, 'Button');\nexport default Button;\n"]}
@@ -89,6 +89,10 @@ export interface BaseButtonProps {
89
89
  * @i18n
90
90
  */
91
91
  i18nStrings?: ButtonProps.I18nStrings;
92
+ /**
93
+ * @awsuiSystem core
94
+ */
95
+ style?: ButtonProps.Style;
92
96
  }
93
97
  export interface ButtonProps extends BaseComponentProps, BaseButtonProps {
94
98
  /**
@@ -174,5 +178,36 @@ export declare namespace ButtonProps {
174
178
  */
175
179
  focus(options?: FocusOptions): void;
176
180
  }
181
+ interface Style {
182
+ root?: {
183
+ background?: {
184
+ active?: string;
185
+ default?: string;
186
+ disabled?: string;
187
+ hover?: string;
188
+ };
189
+ borderColor?: {
190
+ active?: string;
191
+ default?: string;
192
+ disabled?: string;
193
+ hover?: string;
194
+ };
195
+ borderRadius?: string;
196
+ borderWidth?: string;
197
+ color?: {
198
+ active?: string;
199
+ default?: string;
200
+ disabled?: string;
201
+ hover?: string;
202
+ };
203
+ focusRing?: {
204
+ borderColor?: string;
205
+ borderRadius?: string;
206
+ borderWidth?: string;
207
+ };
208
+ paddingBlock?: string;
209
+ paddingInline?: string;
210
+ };
211
+ }
177
212
  }
178
213
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE/G,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,SA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,MAAM,CAAC;gBAClB,KAAK,CAAC,EAAE,MAAM,CAAC;aAChB,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;YACF,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;KACH;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button/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';\n\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler, ClickDetail as _ClickDetail } from '../internal/events';\n\nexport interface BaseButtonProps {\n /**\n * Renders the button as disabled and prevents clicks.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button is disabled (only when `disabled` is `true`).\n * If provided, the button becomes focusable.\n * Applicable for all button variants, except link.\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 users from clicking the button, but it can still be focused.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button is in a loading state.\n */\n loadingText?: string;\n /**\n * Displays an icon next to the text. You can use the `iconAlign` property to position the icon.\n */\n iconName?: IconProps.Name;\n /**\n * Specifies the URL of a custom icon. Use this property if the icon you want isn't available.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconUrl?: string;\n /**\n * Specifies the SVG of a custom icon.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`.\n * - has `viewBox=\"0 0 16 16\"`.\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n iconSvg?: React.ReactNode;\n\n /**\n * Adds `aria-label` to the button element. Use this to provide an accessible name for buttons\n * that don't have visible text, and to distinguish between multiple buttons with identical visible text.\n * The text will also be added to the `title` attribute of the button.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-describedby` to the button.\n */\n ariaDescribedby?: string;\n\n /**\n * Specifies if the `text` content wraps. If you set it to `false`, it prevents the text from wrapping.\n */\n wrapText?: boolean;\n\n /**\n * Text displayed in the button element.\n * @displayname text\n */\n children?: React.ReactNode;\n\n /**\n * Adds `aria-controls` to the button. Use when the button controls the contents or presence of an element.\n */\n ariaControls?: string;\n\n /**\n * Adds an external icon after the button label text.\n * If an href is provided, it opens the link in a new tab.\n */\n external?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `externalIconAriaLabel` - (optional) Specifies the aria-label for the external icon when `external` is set to `true`.\n * @i18n\n */\n i18nStrings?: ButtonProps.I18nStrings;\n}\n\nexport interface ButtonProps extends BaseComponentProps, BaseButtonProps {\n /**\n * Specifies the alignment of the icon.\n */\n iconAlign?: ButtonProps.IconAlign;\n\n /**\n * The form action that is performed by a button click.\n */\n formAction?: ButtonProps.FormAction;\n\n /**\n * Applies button styling to a link. Use this property if you need a link styled as a button (`variant=link`).\n * For example, if you have a 'help' button that links to a documentation page.\n */\n href?: string;\n\n /**\n * Specifies where to open the linked URL (for example, to open in a new browser window or tab use `_blank`).\n * This property only applies when an `href` is provided.\n */\n target?: string;\n\n /**\n * Adds a `rel` attribute to the link. By default, the component sets the `rel` attribute to \"noopener noreferrer\" when `target` is `\"_blank\"`.\n * If the `rel` property is provided, it overrides the default behavior.\n */\n rel?: string;\n\n /**\n * Specifies whether the linked URL, when selected, will prompt the user to download instead of navigate.\n * You can specify a string value that will be suggested as the name of the downloaded file.\n * This property only applies when an `href` is provided.\n **/\n download?: boolean | string;\n\n /** The id of the <form> element to associate with the button. The value of this attribute must be the id of a <form> in the same document.\n * Use when a button is not the descendant of a form element, such as when used in a modal.\n */\n form?: string;\n\n /**\n * Adds aria-expanded to the button element. Use when the button controls an expandable element.\n */\n ariaExpanded?: boolean;\n\n /**\n * Called when the user clicks on the button and the button is not disabled or in loading state.\n */\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n\n /**\n * Called when the user clicks on the button with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the button has an `href` set.\n */\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\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 /** Determines the general styling of the button as follows:\n * * `primary` for primary buttons.\n * * `normal` for secondary buttons.\n * * `link` for tertiary buttons.\n * * `icon` to display an icon only (no text).\n * * `inline-icon` to display an icon-only (no text) button within a text context.\n * * `inline-link` to display a tertiary button with no outer padding.\n */\n variant?: ButtonProps.Variant;\n\n /**\n * Specifies alternate text for a custom icon. We recommend that you provide this for accessibility.\n * This property is ignored if you use a predefined icon or if you set your custom icon using the `iconSvg` slot.\n */\n iconAlt?: string;\n}\n\nexport namespace ButtonProps {\n export type Variant = 'normal' | 'primary' | 'link' | 'icon' | 'inline-icon' | 'inline-link';\n export type ClickDetail = _ClickDetail;\n export type FollowDetail = BaseNavigationDetail;\n\n export type FormAction = 'submit' | 'none';\n\n export type IconAlign = 'left' | 'right';\n\n export interface I18nStrings {\n /**\n * Specifies the aria-label for the external icon when `external` is set to `true`.\n */\n externalIconAriaLabel?: string;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button.\n */\n focus(options?: FocusOptions): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button/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';\n\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler, ClickDetail as _ClickDetail } from '../internal/events';\n\nexport interface BaseButtonProps {\n /**\n * Renders the button as disabled and prevents clicks.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button is disabled (only when `disabled` is `true`).\n * If provided, the button becomes focusable.\n * Applicable for all button variants, except link.\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 users from clicking the button, but it can still be focused.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button is in a loading state.\n */\n loadingText?: string;\n /**\n * Displays an icon next to the text. You can use the `iconAlign` property to position the icon.\n */\n iconName?: IconProps.Name;\n /**\n * Specifies the URL of a custom icon. Use this property if the icon you want isn't available.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconUrl?: string;\n /**\n * Specifies the SVG of a custom icon.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`.\n * - has `viewBox=\"0 0 16 16\"`.\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n iconSvg?: React.ReactNode;\n\n /**\n * Adds `aria-label` to the button element. Use this to provide an accessible name for buttons\n * that don't have visible text, and to distinguish between multiple buttons with identical visible text.\n * The text will also be added to the `title` attribute of the button.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-describedby` to the button.\n */\n ariaDescribedby?: string;\n\n /**\n * Specifies if the `text` content wraps. If you set it to `false`, it prevents the text from wrapping.\n */\n wrapText?: boolean;\n\n /**\n * Text displayed in the button element.\n * @displayname text\n */\n children?: React.ReactNode;\n\n /**\n * Adds `aria-controls` to the button. Use when the button controls the contents or presence of an element.\n */\n ariaControls?: string;\n\n /**\n * Adds an external icon after the button label text.\n * If an href is provided, it opens the link in a new tab.\n */\n external?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `externalIconAriaLabel` - (optional) Specifies the aria-label for the external icon when `external` is set to `true`.\n * @i18n\n */\n i18nStrings?: ButtonProps.I18nStrings;\n\n /**\n * @awsuiSystem core\n */\n style?: ButtonProps.Style;\n}\n\nexport interface ButtonProps extends BaseComponentProps, BaseButtonProps {\n /**\n * Specifies the alignment of the icon.\n */\n iconAlign?: ButtonProps.IconAlign;\n\n /**\n * The form action that is performed by a button click.\n */\n formAction?: ButtonProps.FormAction;\n\n /**\n * Applies button styling to a link. Use this property if you need a link styled as a button (`variant=link`).\n * For example, if you have a 'help' button that links to a documentation page.\n */\n href?: string;\n\n /**\n * Specifies where to open the linked URL (for example, to open in a new browser window or tab use `_blank`).\n * This property only applies when an `href` is provided.\n */\n target?: string;\n\n /**\n * Adds a `rel` attribute to the link. By default, the component sets the `rel` attribute to \"noopener noreferrer\" when `target` is `\"_blank\"`.\n * If the `rel` property is provided, it overrides the default behavior.\n */\n rel?: string;\n\n /**\n * Specifies whether the linked URL, when selected, will prompt the user to download instead of navigate.\n * You can specify a string value that will be suggested as the name of the downloaded file.\n * This property only applies when an `href` is provided.\n **/\n download?: boolean | string;\n\n /** The id of the <form> element to associate with the button. The value of this attribute must be the id of a <form> in the same document.\n * Use when a button is not the descendant of a form element, such as when used in a modal.\n */\n form?: string;\n\n /**\n * Adds aria-expanded to the button element. Use when the button controls an expandable element.\n */\n ariaExpanded?: boolean;\n\n /**\n * Called when the user clicks on the button and the button is not disabled or in loading state.\n */\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n\n /**\n * Called when the user clicks on the button with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the button has an `href` set.\n */\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\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 /** Determines the general styling of the button as follows:\n * * `primary` for primary buttons.\n * * `normal` for secondary buttons.\n * * `link` for tertiary buttons.\n * * `icon` to display an icon only (no text).\n * * `inline-icon` to display an icon-only (no text) button within a text context.\n * * `inline-link` to display a tertiary button with no outer padding.\n */\n variant?: ButtonProps.Variant;\n\n /**\n * Specifies alternate text for a custom icon. We recommend that you provide this for accessibility.\n * This property is ignored if you use a predefined icon or if you set your custom icon using the `iconSvg` slot.\n */\n iconAlt?: string;\n}\n\nexport namespace ButtonProps {\n export type Variant = 'normal' | 'primary' | 'link' | 'icon' | 'inline-icon' | 'inline-link';\n export type ClickDetail = _ClickDetail;\n export type FollowDetail = BaseNavigationDetail;\n\n export type FormAction = 'submit' | 'none';\n\n export type IconAlign = 'left' | 'right';\n\n export interface I18nStrings {\n /**\n * Specifies the aria-label for the external icon when `external` is set to `true`.\n */\n externalIconAriaLabel?: string;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button.\n */\n focus(options?: FocusOptions): void;\n }\n\n export interface Style {\n root?: {\n background?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n paddingBlock?: string;\n paddingInline?: string;\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAwB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC/D,OAAO,CAAC,EACJ,WAAW,CAAC,SAAS,CAAC,GACtB,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,4BAA4B,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EACf,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC,GACnF,MAAM,CAAC,QAAQ,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,GAAG,0BAA0B,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;AA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e,cAAc,CAAC"}
@@ -14,6 +14,7 @@ import Tooltip from '../internal/components/tooltip/index.js';
14
14
  import { useButtonContext } from '../internal/context/button-context';
15
15
  import { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';
16
16
  import { fireCancelableEvent, isPlainLeftClick } from '../internal/events';
17
+ import customCssProps from '../internal/generated/custom-css-properties';
17
18
  import useForwardFocus from '../internal/hooks/forward-focus';
18
19
  import useHiddenDescription from '../internal/hooks/use-hidden-description';
19
20
  import { useModalContextLoadingButtonComponent } from '../internal/hooks/use-modal-component-analytics';
@@ -25,7 +26,8 @@ import analyticsSelectors from './analytics-metadata/styles.css.js';
25
26
  import styles from './styles.css.js';
26
27
  import testUtilStyles from './test-classes/styles.css.js';
27
28
  export const InternalButton = React.forwardRef((_a, ref) => {
28
- var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, external, target: targetOverride, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, i18nStrings, __nativeAttributes, __internalRootRef = null, __focusable = false, __injectAnalyticsComponentMetadata = false, __title, __emitPerformanceMarks = true, analyticsAction = 'click' } = _a, props = __rest(_a, ["children", "iconName", "__iconClass", "onClick", "onFollow", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "external", "target", "rel", "download", "formAction", "ariaLabel", "ariaDescribedby", "ariaExpanded", "ariaControls", "fullWidth", "badge", "i18nStrings", "__nativeAttributes", "__internalRootRef", "__focusable", "__injectAnalyticsComponentMetadata", "__title", "__emitPerformanceMarks", "analyticsAction"]);
29
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
30
+ var { children, iconName, __iconClass, onClick, onFollow, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, external, target: targetOverride, rel, download, formAction = 'submit', ariaLabel, ariaDescribedby, ariaExpanded, ariaControls, fullWidth, badge, i18nStrings, style, __nativeAttributes, __internalRootRef = null, __focusable = false, __injectAnalyticsComponentMetadata = false, __title, __emitPerformanceMarks = true, analyticsAction = 'click' } = _a, props = __rest(_a, ["children", "iconName", "__iconClass", "onClick", "onFollow", "iconAlign", "iconUrl", "iconSvg", "iconAlt", "variant", "loading", "loadingText", "disabled", "disabledReason", "wrapText", "href", "external", "target", "rel", "download", "formAction", "ariaLabel", "ariaDescribedby", "ariaExpanded", "ariaControls", "fullWidth", "badge", "i18nStrings", "style", "__nativeAttributes", "__internalRootRef", "__focusable", "__injectAnalyticsComponentMetadata", "__title", "__emitPerformanceMarks", "analyticsAction"]);
29
31
  const [showTooltip, setShowTooltip] = useState(false);
30
32
  checkSafeUrl('Button', href);
31
33
  const isAnchor = Boolean(href);
@@ -146,6 +148,28 @@ export const InternalButton = React.forwardRef((_a, ref) => {
146
148
  const disabledReasonContent = (React.createElement(React.Fragment, null,
147
149
  descriptionEl,
148
150
  showTooltip && (React.createElement(Tooltip, { className: testUtilStyles['disabled-reason-tooltip'], trackRef: buttonRef, value: disabledReason, onDismiss: () => setShowTooltip(false) }))));
151
+ const stylePropertiesAndVariables = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ borderRadius: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderRadius, borderWidth: (_c = style === null || style === void 0 ? void 0 : style.root) === null || _c === void 0 ? void 0 : _c.borderWidth, paddingBlock: (_d = style === null || style === void 0 ? void 0 : style.root) === null || _d === void 0 ? void 0 : _d.paddingBlock, paddingInline: (_e = style === null || style === void 0 ? void 0 : style.root) === null || _e === void 0 ? void 0 : _e.paddingInline }, (((_f = style === null || style === void 0 ? void 0 : style.root) === null || _f === void 0 ? void 0 : _f.background) && {
152
+ [customCssProps.styleBackgroundActive]: (_g = style.root.background) === null || _g === void 0 ? void 0 : _g.active,
153
+ [customCssProps.styleBackgroundDefault]: (_h = style.root.background) === null || _h === void 0 ? void 0 : _h.default,
154
+ [customCssProps.styleBackgroundDisabled]: (_j = style.root.background) === null || _j === void 0 ? void 0 : _j.disabled,
155
+ [customCssProps.styleBackgroundHover]: (_k = style.root.background) === null || _k === void 0 ? void 0 : _k.hover,
156
+ })), (((_l = style === null || style === void 0 ? void 0 : style.root) === null || _l === void 0 ? void 0 : _l.borderColor) && {
157
+ [customCssProps.styleBorderColorActive]: (_m = style.root.borderColor) === null || _m === void 0 ? void 0 : _m.active,
158
+ [customCssProps.styleBorderColorDefault]: (_o = style.root.borderColor) === null || _o === void 0 ? void 0 : _o.default,
159
+ [customCssProps.styleBorderColorDisabled]: (_p = style.root.borderColor) === null || _p === void 0 ? void 0 : _p.disabled,
160
+ [customCssProps.styleBorderColorHover]: (_q = style.root.borderColor) === null || _q === void 0 ? void 0 : _q.hover,
161
+ })), (((_r = style === null || style === void 0 ? void 0 : style.root) === null || _r === void 0 ? void 0 : _r.color) && {
162
+ [customCssProps.styleColorActive]: (_s = style.root.color) === null || _s === void 0 ? void 0 : _s.active,
163
+ [customCssProps.styleColorDefault]: (_t = style.root.color) === null || _t === void 0 ? void 0 : _t.default,
164
+ [customCssProps.styleColorDisabled]: (_u = style.root.color) === null || _u === void 0 ? void 0 : _u.disabled,
165
+ [customCssProps.styleColorHover]: (_v = style.root.color) === null || _v === void 0 ? void 0 : _v.hover,
166
+ })), (((_w = style === null || style === void 0 ? void 0 : style.root) === null || _w === void 0 ? void 0 : _w.focusRing) && {
167
+ [customCssProps.styleFocusRingBorderColor]: (_x = style.root.focusRing) === null || _x === void 0 ? void 0 : _x.borderColor,
168
+ [customCssProps.styleFocusRingBorderRadius]: (_y = style.root.focusRing) === null || _y === void 0 ? void 0 : _y.borderRadius,
169
+ [customCssProps.styleFocusRingBorderWidth]: (_z = style.root.focusRing) === null || _z === void 0 ? void 0 : _z.borderWidth,
170
+ })), (((_1 = (_0 = style === null || style === void 0 ? void 0 : style.root) === null || _0 === void 0 ? void 0 : _0.focusRing) === null || _1 === void 0 ? void 0 : _1.borderRadius) && {
171
+ [customCssProps.styleFocusRingBorderRadius]: style.root.focusRing.borderRadius,
172
+ }));
149
173
  if (isAnchor) {
150
174
  return (
151
175
  // https://github.com/yannickcr/eslint-plugin-react/issues/2962
@@ -153,13 +177,13 @@ export const InternalButton = React.forwardRef((_a, ref) => {
153
177
  React.createElement(React.Fragment, null,
154
178
  React.createElement("a", Object.assign({}, buttonProps, { href: href, target: target,
155
179
  // security recommendation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target
156
- rel: rel !== null && rel !== void 0 ? rel : (target === '_blank' ? 'noopener noreferrer' : undefined), "aria-disabled": isNotInteractive ? true : undefined, download: download }, disabledReasonProps),
180
+ rel: rel !== null && rel !== void 0 ? rel : (target === '_blank' ? 'noopener noreferrer' : undefined), "aria-disabled": isNotInteractive ? true : undefined, download: download }, disabledReasonProps, { style: stylePropertiesAndVariables }),
157
181
  buttonContent,
158
182
  isDisabledWithReason && disabledReasonContent),
159
183
  loading && loadingText && (React.createElement(InternalLiveRegion, { tagName: "span", hidden: true }, loadingText))));
160
184
  }
161
185
  return (React.createElement(React.Fragment, null,
162
- React.createElement("button", Object.assign({}, buttonProps, { type: formAction === 'none' ? 'button' : 'submit', disabled: disabled && !__focusable && !isDisabledWithReason, "aria-disabled": hasAriaDisabled ? true : undefined }, disabledReasonProps),
186
+ React.createElement("button", Object.assign({}, buttonProps, { type: formAction === 'none' ? 'button' : 'submit', disabled: disabled && !__focusable && !isDisabledWithReason, "aria-disabled": hasAriaDisabled ? true : undefined }, disabledReasonProps, { style: stylePropertiesAndVariables }),
163
187
  buttonContent,
164
188
  isDisabledWithReason && disabledReasonContent),
165
189
  loading && loadingText && (React.createElement(InternalLiveRegion, { tagName: "span", hidden: true }, loadingText))));