@cloudscape-design/components-themeable 3.0.1197 → 3.0.1198

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 (50) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  3. package/lib/internal/scss/progress-bar/styles.scss +0 -22
  4. package/lib/internal/template/autosuggest/autosuggest-option.d.ts +11 -1
  5. package/lib/internal/template/autosuggest/autosuggest-option.d.ts.map +1 -1
  6. package/lib/internal/template/autosuggest/autosuggest-option.js +71 -2
  7. package/lib/internal/template/autosuggest/autosuggest-option.js.map +1 -1
  8. package/lib/internal/template/autosuggest/index.d.ts.map +1 -1
  9. package/lib/internal/template/autosuggest/index.js +2 -2
  10. package/lib/internal/template/autosuggest/index.js.map +1 -1
  11. package/lib/internal/template/autosuggest/interfaces.d.ts +63 -1
  12. package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
  13. package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
  14. package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
  15. package/lib/internal/template/autosuggest/internal.js +2 -2
  16. package/lib/internal/template/autosuggest/internal.js.map +1 -1
  17. package/lib/internal/template/autosuggest/options-controller.js +1 -0
  18. package/lib/internal/template/autosuggest/options-controller.js.map +1 -1
  19. package/lib/internal/template/autosuggest/options-list.d.ts +2 -1
  20. package/lib/internal/template/autosuggest/options-list.d.ts.map +1 -1
  21. package/lib/internal/template/autosuggest/options-list.js +2 -2
  22. package/lib/internal/template/autosuggest/options-list.js.map +1 -1
  23. package/lib/internal/template/autosuggest/plain-list.d.ts +3 -2
  24. package/lib/internal/template/autosuggest/plain-list.d.ts.map +1 -1
  25. package/lib/internal/template/autosuggest/plain-list.js +6 -2
  26. package/lib/internal/template/autosuggest/plain-list.js.map +1 -1
  27. package/lib/internal/template/autosuggest/utils/parent-props.d.ts +11 -0
  28. package/lib/internal/template/autosuggest/utils/parent-props.d.ts.map +1 -0
  29. package/lib/internal/template/autosuggest/utils/parent-props.js +28 -0
  30. package/lib/internal/template/autosuggest/utils/parent-props.js.map +1 -0
  31. package/lib/internal/template/autosuggest/virtual-list.d.ts +1 -1
  32. package/lib/internal/template/autosuggest/virtual-list.d.ts.map +1 -1
  33. package/lib/internal/template/autosuggest/virtual-list.js +6 -2
  34. package/lib/internal/template/autosuggest/virtual-list.js.map +1 -1
  35. package/lib/internal/template/internal/base-component/styles.scoped.css +33 -30
  36. package/lib/internal/template/internal/environment.js +2 -2
  37. package/lib/internal/template/internal/environment.json +2 -2
  38. package/lib/internal/template/internal/generated/styles/tokens.d.ts +0 -2
  39. package/lib/internal/template/internal/generated/styles/tokens.js +2 -4
  40. package/lib/internal/template/internal/generated/theming/index.cjs +2 -64
  41. package/lib/internal/template/internal/generated/theming/index.js +2 -64
  42. package/lib/internal/template/progress-bar/interfaces.d.ts +1 -1
  43. package/lib/internal/template/progress-bar/interfaces.js.map +1 -1
  44. package/lib/internal/template/progress-bar/internal.d.ts.map +1 -1
  45. package/lib/internal/template/progress-bar/internal.js +1 -1
  46. package/lib/internal/template/progress-bar/internal.js.map +1 -1
  47. package/lib/internal/template/progress-bar/styles.css.js +18 -19
  48. package/lib/internal/template/progress-bar/styles.scoped.css +30 -42
  49. package/lib/internal/template/progress-bar/styles.selectors.js +18 -19
  50. package/package.json +1 -1
@@ -1411,18 +1411,10 @@ module.exports.preset = {
1411
1411
  "light": "{colorPrimary600}",
1412
1412
  "dark": "{colorPrimary400}"
1413
1413
  },
1414
- "colorBackgroundProgressBarValueInFlash": {
1415
- "light": "{colorWhite}",
1416
- "dark": "{colorWhite}"
1417
- },
1418
1414
  "colorBackgroundProgressBarDefault": {
1419
1415
  "light": "{colorNeutral250}",
1420
1416
  "dark": "{colorNeutral700}"
1421
1417
  },
1422
- "colorBackgroundProgressBarInFlash": {
1423
- "light": "{colorGreyOpaque25}",
1424
- "dark": "{colorGreyOpaque25}"
1425
- },
1426
1418
  "colorBackgroundSegmentActive": {
1427
1419
  "light": "{colorPrimary600}",
1428
1420
  "dark": "{colorPrimary400}"
@@ -3728,18 +3720,10 @@ module.exports.preset = {
3728
3720
  "light": "{colorPrimary400}",
3729
3721
  "dark": "{colorPrimary400}"
3730
3722
  },
3731
- "colorBackgroundProgressBarValueInFlash": {
3732
- "light": "{colorWhite}",
3733
- "dark": "{colorWhite}"
3734
- },
3735
3723
  "colorBackgroundProgressBarDefault": {
3736
3724
  "light": "{colorNeutral700}",
3737
3725
  "dark": "{colorNeutral700}"
3738
3726
  },
3739
- "colorBackgroundProgressBarInFlash": {
3740
- "light": "{colorGreyOpaque25}",
3741
- "dark": "{colorGreyOpaque25}"
3742
- },
3743
3727
  "colorBackgroundSegmentActive": {
3744
3728
  "light": "{colorPrimary400}",
3745
3729
  "dark": "{colorPrimary400}"
@@ -5053,18 +5037,10 @@ module.exports.preset = {
5053
5037
  "light": "{colorPrimary400}",
5054
5038
  "dark": "{colorPrimary400}"
5055
5039
  },
5056
- "colorBackgroundProgressBarValueInFlash": {
5057
- "light": "{colorWhite}",
5058
- "dark": "{colorWhite}"
5059
- },
5060
5040
  "colorBackgroundProgressBarDefault": {
5061
5041
  "light": "{colorNeutral700}",
5062
5042
  "dark": "{colorNeutral700}"
5063
5043
  },
5064
- "colorBackgroundProgressBarInFlash": {
5065
- "light": "{colorGreyOpaque25}",
5066
- "dark": "{colorGreyOpaque25}"
5067
- },
5068
5044
  "colorBackgroundSegmentActive": {
5069
5045
  "light": "{colorPrimary400}",
5070
5046
  "dark": "{colorPrimary400}"
@@ -6311,18 +6287,10 @@ module.exports.preset = {
6311
6287
  "dark": "{colorNeutral800}"
6312
6288
  },
6313
6289
  "colorBackgroundProgressBarValueDefault": {
6314
- "light": "{colorPrimary600}",
6315
- "dark": "{colorPrimary400}"
6316
- },
6317
- "colorBackgroundProgressBarValueInFlash": {
6318
6290
  "light": "{colorWhite}",
6319
6291
  "dark": "{colorWhite}"
6320
6292
  },
6321
6293
  "colorBackgroundProgressBarDefault": {
6322
- "light": "{colorNeutral250}",
6323
- "dark": "{colorNeutral700}"
6324
- },
6325
- "colorBackgroundProgressBarInFlash": {
6326
6294
  "light": "{colorGreyOpaque25}",
6327
6295
  "dark": "{colorGreyOpaque25}"
6328
6296
  },
@@ -7457,18 +7425,10 @@ module.exports.preset = {
7457
7425
  "dark": "{colorNeutral800}"
7458
7426
  },
7459
7427
  "colorBackgroundProgressBarValueDefault": {
7460
- "light": "{colorPrimary600}",
7461
- "dark": "{colorPrimary400}"
7462
- },
7463
- "colorBackgroundProgressBarValueInFlash": {
7464
7428
  "light": "{colorNeutral950}",
7465
7429
  "dark": "{colorNeutral950}"
7466
7430
  },
7467
7431
  "colorBackgroundProgressBarDefault": {
7468
- "light": "{colorNeutral250}",
7469
- "dark": "{colorNeutral700}"
7470
- },
7471
- "colorBackgroundProgressBarInFlash": {
7472
7432
  "light": "{colorGreyOpaque10}",
7473
7433
  "dark": "{colorGreyOpaque10}"
7474
7434
  },
@@ -8606,18 +8566,10 @@ module.exports.preset = {
8606
8566
  "light": "{colorPrimary600}",
8607
8567
  "dark": "{colorPrimary400}"
8608
8568
  },
8609
- "colorBackgroundProgressBarValueInFlash": {
8610
- "light": "{colorWhite}",
8611
- "dark": "{colorWhite}"
8612
- },
8613
8569
  "colorBackgroundProgressBarDefault": {
8614
8570
  "light": "{colorNeutral250}",
8615
8571
  "dark": "{colorNeutral700}"
8616
8572
  },
8617
- "colorBackgroundProgressBarInFlash": {
8618
- "light": "{colorGreyOpaque25}",
8619
- "dark": "{colorGreyOpaque25}"
8620
- },
8621
8573
  "colorBackgroundSegmentActive": {
8622
8574
  "light": "{colorPrimary600}",
8623
8575
  "dark": "{colorPrimary400}"
@@ -9754,18 +9706,10 @@ module.exports.preset = {
9754
9706
  "light": "{colorPrimary400}",
9755
9707
  "dark": "{colorPrimary400}"
9756
9708
  },
9757
- "colorBackgroundProgressBarValueInFlash": {
9758
- "light": "{colorWhite}",
9759
- "dark": "{colorWhite}"
9760
- },
9761
9709
  "colorBackgroundProgressBarDefault": {
9762
9710
  "light": "{colorNeutral700}",
9763
9711
  "dark": "{colorNeutral700}"
9764
9712
  },
9765
- "colorBackgroundProgressBarInFlash": {
9766
- "light": "{colorGreyOpaque25}",
9767
- "dark": "{colorGreyOpaque25}"
9768
- },
9769
9713
  "colorBackgroundSegmentActive": {
9770
9714
  "light": "{colorPrimary400}",
9771
9715
  "dark": "{colorPrimary400}"
@@ -10963,9 +10907,7 @@ module.exports.preset = {
10963
10907
  "colorBackgroundNotificationStackBarHover": "color",
10964
10908
  "colorBackgroundPopover": "color",
10965
10909
  "colorBackgroundProgressBarValueDefault": "color",
10966
- "colorBackgroundProgressBarValueInFlash": "color",
10967
10910
  "colorBackgroundProgressBarDefault": "color",
10968
- "colorBackgroundProgressBarInFlash": "color",
10969
10911
  "colorBackgroundSegmentActive": "color",
10970
10912
  "colorBackgroundSegmentDefault": "color",
10971
10913
  "colorBackgroundSegmentDisabled": "color",
@@ -12599,9 +12541,7 @@ module.exports.preset = {
12599
12541
  "colorBackgroundNotificationStackBarHover": "color-background-notification-stack-bar-hover",
12600
12542
  "colorBackgroundPopover": "color-background-popover",
12601
12543
  "colorBackgroundProgressBarValueDefault": "color-background-progress-bar-value-default",
12602
- "colorBackgroundProgressBarValueInFlash": "color-background-progress-bar-value-in-flash",
12603
12544
  "colorBackgroundProgressBarDefault": "color-background-progress-bar-default",
12604
- "colorBackgroundProgressBarInFlash": "color-background-progress-bar-in-flash",
12605
12545
  "colorBackgroundSegmentActive": "color-background-segment-active",
12606
12546
  "colorBackgroundSegmentDefault": "color-background-segment-default",
12607
12547
  "colorBackgroundSegmentDisabled": "color-background-segment-disabled",
@@ -13419,10 +13359,8 @@ module.exports.preset = {
13419
13359
  "colorBackgroundNotificationStackBarActive": "--color-background-notification-stack-bar-active-a4h9r8",
13420
13360
  "colorBackgroundNotificationStackBarHover": "--color-background-notification-stack-bar-hover-jh82oo",
13421
13361
  "colorBackgroundPopover": "--color-background-popover-e20fy8",
13422
- "colorBackgroundProgressBarValueDefault": "--color-background-progress-bar-value-default-9zs42p",
13423
- "colorBackgroundProgressBarValueInFlash": "--color-background-progress-bar-value-in-flash-q2h8w5",
13424
- "colorBackgroundProgressBarDefault": "--color-background-progress-bar-default-4755ec",
13425
- "colorBackgroundProgressBarInFlash": "--color-background-progress-bar-in-flash-f4k60b",
13362
+ "colorBackgroundProgressBarValueDefault": "--color-background-progress-bar-value-default-69ydqg",
13363
+ "colorBackgroundProgressBarDefault": "--color-background-progress-bar-default-j8kyxd",
13426
13364
  "colorBackgroundSegmentActive": "--color-background-segment-active-1u2ldl",
13427
13365
  "colorBackgroundSegmentDefault": "--color-background-segment-default-b0r494",
13428
13366
  "colorBackgroundSegmentDisabled": "--color-background-segment-disabled-m2a5t7",
@@ -1411,18 +1411,10 @@ export var preset = {
1411
1411
  "light": "{colorPrimary600}",
1412
1412
  "dark": "{colorPrimary400}"
1413
1413
  },
1414
- "colorBackgroundProgressBarValueInFlash": {
1415
- "light": "{colorWhite}",
1416
- "dark": "{colorWhite}"
1417
- },
1418
1414
  "colorBackgroundProgressBarDefault": {
1419
1415
  "light": "{colorNeutral250}",
1420
1416
  "dark": "{colorNeutral700}"
1421
1417
  },
1422
- "colorBackgroundProgressBarInFlash": {
1423
- "light": "{colorGreyOpaque25}",
1424
- "dark": "{colorGreyOpaque25}"
1425
- },
1426
1418
  "colorBackgroundSegmentActive": {
1427
1419
  "light": "{colorPrimary600}",
1428
1420
  "dark": "{colorPrimary400}"
@@ -3728,18 +3720,10 @@ export var preset = {
3728
3720
  "light": "{colorPrimary400}",
3729
3721
  "dark": "{colorPrimary400}"
3730
3722
  },
3731
- "colorBackgroundProgressBarValueInFlash": {
3732
- "light": "{colorWhite}",
3733
- "dark": "{colorWhite}"
3734
- },
3735
3723
  "colorBackgroundProgressBarDefault": {
3736
3724
  "light": "{colorNeutral700}",
3737
3725
  "dark": "{colorNeutral700}"
3738
3726
  },
3739
- "colorBackgroundProgressBarInFlash": {
3740
- "light": "{colorGreyOpaque25}",
3741
- "dark": "{colorGreyOpaque25}"
3742
- },
3743
3727
  "colorBackgroundSegmentActive": {
3744
3728
  "light": "{colorPrimary400}",
3745
3729
  "dark": "{colorPrimary400}"
@@ -5053,18 +5037,10 @@ export var preset = {
5053
5037
  "light": "{colorPrimary400}",
5054
5038
  "dark": "{colorPrimary400}"
5055
5039
  },
5056
- "colorBackgroundProgressBarValueInFlash": {
5057
- "light": "{colorWhite}",
5058
- "dark": "{colorWhite}"
5059
- },
5060
5040
  "colorBackgroundProgressBarDefault": {
5061
5041
  "light": "{colorNeutral700}",
5062
5042
  "dark": "{colorNeutral700}"
5063
5043
  },
5064
- "colorBackgroundProgressBarInFlash": {
5065
- "light": "{colorGreyOpaque25}",
5066
- "dark": "{colorGreyOpaque25}"
5067
- },
5068
5044
  "colorBackgroundSegmentActive": {
5069
5045
  "light": "{colorPrimary400}",
5070
5046
  "dark": "{colorPrimary400}"
@@ -6311,18 +6287,10 @@ export var preset = {
6311
6287
  "dark": "{colorNeutral800}"
6312
6288
  },
6313
6289
  "colorBackgroundProgressBarValueDefault": {
6314
- "light": "{colorPrimary600}",
6315
- "dark": "{colorPrimary400}"
6316
- },
6317
- "colorBackgroundProgressBarValueInFlash": {
6318
6290
  "light": "{colorWhite}",
6319
6291
  "dark": "{colorWhite}"
6320
6292
  },
6321
6293
  "colorBackgroundProgressBarDefault": {
6322
- "light": "{colorNeutral250}",
6323
- "dark": "{colorNeutral700}"
6324
- },
6325
- "colorBackgroundProgressBarInFlash": {
6326
6294
  "light": "{colorGreyOpaque25}",
6327
6295
  "dark": "{colorGreyOpaque25}"
6328
6296
  },
@@ -7457,18 +7425,10 @@ export var preset = {
7457
7425
  "dark": "{colorNeutral800}"
7458
7426
  },
7459
7427
  "colorBackgroundProgressBarValueDefault": {
7460
- "light": "{colorPrimary600}",
7461
- "dark": "{colorPrimary400}"
7462
- },
7463
- "colorBackgroundProgressBarValueInFlash": {
7464
7428
  "light": "{colorNeutral950}",
7465
7429
  "dark": "{colorNeutral950}"
7466
7430
  },
7467
7431
  "colorBackgroundProgressBarDefault": {
7468
- "light": "{colorNeutral250}",
7469
- "dark": "{colorNeutral700}"
7470
- },
7471
- "colorBackgroundProgressBarInFlash": {
7472
7432
  "light": "{colorGreyOpaque10}",
7473
7433
  "dark": "{colorGreyOpaque10}"
7474
7434
  },
@@ -8606,18 +8566,10 @@ export var preset = {
8606
8566
  "light": "{colorPrimary600}",
8607
8567
  "dark": "{colorPrimary400}"
8608
8568
  },
8609
- "colorBackgroundProgressBarValueInFlash": {
8610
- "light": "{colorWhite}",
8611
- "dark": "{colorWhite}"
8612
- },
8613
8569
  "colorBackgroundProgressBarDefault": {
8614
8570
  "light": "{colorNeutral250}",
8615
8571
  "dark": "{colorNeutral700}"
8616
8572
  },
8617
- "colorBackgroundProgressBarInFlash": {
8618
- "light": "{colorGreyOpaque25}",
8619
- "dark": "{colorGreyOpaque25}"
8620
- },
8621
8573
  "colorBackgroundSegmentActive": {
8622
8574
  "light": "{colorPrimary600}",
8623
8575
  "dark": "{colorPrimary400}"
@@ -9754,18 +9706,10 @@ export var preset = {
9754
9706
  "light": "{colorPrimary400}",
9755
9707
  "dark": "{colorPrimary400}"
9756
9708
  },
9757
- "colorBackgroundProgressBarValueInFlash": {
9758
- "light": "{colorWhite}",
9759
- "dark": "{colorWhite}"
9760
- },
9761
9709
  "colorBackgroundProgressBarDefault": {
9762
9710
  "light": "{colorNeutral700}",
9763
9711
  "dark": "{colorNeutral700}"
9764
9712
  },
9765
- "colorBackgroundProgressBarInFlash": {
9766
- "light": "{colorGreyOpaque25}",
9767
- "dark": "{colorGreyOpaque25}"
9768
- },
9769
9713
  "colorBackgroundSegmentActive": {
9770
9714
  "light": "{colorPrimary400}",
9771
9715
  "dark": "{colorPrimary400}"
@@ -10963,9 +10907,7 @@ export var preset = {
10963
10907
  "colorBackgroundNotificationStackBarHover": "color",
10964
10908
  "colorBackgroundPopover": "color",
10965
10909
  "colorBackgroundProgressBarValueDefault": "color",
10966
- "colorBackgroundProgressBarValueInFlash": "color",
10967
10910
  "colorBackgroundProgressBarDefault": "color",
10968
- "colorBackgroundProgressBarInFlash": "color",
10969
10911
  "colorBackgroundSegmentActive": "color",
10970
10912
  "colorBackgroundSegmentDefault": "color",
10971
10913
  "colorBackgroundSegmentDisabled": "color",
@@ -12599,9 +12541,7 @@ export var preset = {
12599
12541
  "colorBackgroundNotificationStackBarHover": "color-background-notification-stack-bar-hover",
12600
12542
  "colorBackgroundPopover": "color-background-popover",
12601
12543
  "colorBackgroundProgressBarValueDefault": "color-background-progress-bar-value-default",
12602
- "colorBackgroundProgressBarValueInFlash": "color-background-progress-bar-value-in-flash",
12603
12544
  "colorBackgroundProgressBarDefault": "color-background-progress-bar-default",
12604
- "colorBackgroundProgressBarInFlash": "color-background-progress-bar-in-flash",
12605
12545
  "colorBackgroundSegmentActive": "color-background-segment-active",
12606
12546
  "colorBackgroundSegmentDefault": "color-background-segment-default",
12607
12547
  "colorBackgroundSegmentDisabled": "color-background-segment-disabled",
@@ -13419,10 +13359,8 @@ export var preset = {
13419
13359
  "colorBackgroundNotificationStackBarActive": "--color-background-notification-stack-bar-active-a4h9r8",
13420
13360
  "colorBackgroundNotificationStackBarHover": "--color-background-notification-stack-bar-hover-jh82oo",
13421
13361
  "colorBackgroundPopover": "--color-background-popover-e20fy8",
13422
- "colorBackgroundProgressBarValueDefault": "--color-background-progress-bar-value-default-9zs42p",
13423
- "colorBackgroundProgressBarValueInFlash": "--color-background-progress-bar-value-in-flash-q2h8w5",
13424
- "colorBackgroundProgressBarDefault": "--color-background-progress-bar-default-4755ec",
13425
- "colorBackgroundProgressBarInFlash": "--color-background-progress-bar-in-flash-f4k60b",
13362
+ "colorBackgroundProgressBarValueDefault": "--color-background-progress-bar-value-default-69ydqg",
13363
+ "colorBackgroundProgressBarDefault": "--color-background-progress-bar-default-j8kyxd",
13426
13364
  "colorBackgroundSegmentActive": "--color-background-segment-active-1u2ldl",
13427
13365
  "colorBackgroundSegmentDefault": "--color-background-segment-default-b0r494",
13428
13366
  "colorBackgroundSegmentDisabled": "--color-background-segment-disabled-m2a5t7",
@@ -16,7 +16,7 @@ export interface ProgressBarProps extends BaseComponentProps {
16
16
  /**
17
17
  * Enables the correct styling of the progress bar in different contexts. You can set it to one of the following:
18
18
  *
19
- * - `"flash"` - Use this variatn when using the progress bar within a flash component.
19
+ * - `"flash"` - Use this variant when using the progress bar within a flash component.
20
20
  * Note that the result button isn't displayed when using this variant.
21
21
  * Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item instead of the result button provided by the progress bar.
22
22
  * - `"key-value"` - Use this variant when using the progress bar within the key-value pairs pattern.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/progress-bar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface ProgressBarProps extends BaseComponentProps {\n /**\n * Indicates the current progress as a percentage. The value must be between 0 and 100. Decimals are rounded.\n */\n value?: number;\n\n /**\n * Specifies the status of the progress bar. You can set it to one of the following:\n *\n * - `\"in-progress\"` - Displays a progress bar.\n * - `\"success\"` or `\"error\"` - Displays a result state and replaces the progress element with a status indicator,\n * `resultText`, and a result button.\n */\n status?: ProgressBarProps.Status;\n\n /**\n * Enables the correct styling of the progress bar in different contexts. You can set it to one of the following:\n *\n * - `\"flash\"` - Use this variatn when using the progress bar within a flash component.\n * Note that the result button isn't displayed when using this variant.\n * Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item instead of the result button provided by the progress bar.\n * - `\"key-value\"` - Use this variant when using the progress bar within the key-value pairs pattern.\n * - `\"standalone\"` Use in all other cases. This is the default value.\n */\n variant?: ProgressBarProps.Variant;\n\n /**\n * Specifies the text for the button that's displayed when the `status` is set to `error` or `success`.\n * If `resultButtonText` is empty, the result button isn't displayed.\n *\n * Note: If you use the `flash` variant, the result button isn't displayed.\n * Add a button using the `action` property of the flashbar item instead.\n */\n resultButtonText?: string;\n\n /**\n * Adds an `aria-label` to the progress bar.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the progress bar.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the progress bar.\n */\n ariaDescribedby?: string;\n\n /**\n * Short description of the operation that appears at the top of the component.\n *\n * Make sure that you always provide a label for accessibility.\n */\n label?: React.ReactNode;\n\n /**\n * More detailed information about the operation that appears below the label.\n */\n description?: React.ReactNode;\n\n /**\n * Information that's displayed below the progress bar or status text.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Content that's displayed when `status` is set to `error` or `success`.\n */\n resultText?: React.ReactNode;\n\n /**\n * Called when the user clicks the result state button.\n *\n * Note: If you are using the `flash` variant, the result button isn't displayed.\n * Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item instead.\n */\n onResultButtonClick?: NonCancelableEventHandler;\n\n /**\n * @awsuiSystem core\n */\n style?: ProgressBarProps.Style;\n}\n\nexport namespace ProgressBarProps {\n export type Status = 'in-progress' | 'success' | 'error';\n export type Variant = 'standalone' | 'flash' | 'key-value';\n\n export interface Style {\n progressBar?: {\n backgroundColor?: string;\n borderRadius?: string;\n height?: string;\n };\n progressValue?: {\n backgroundColor?: string;\n };\n progressPercentage?: {\n color?: string;\n fontSize?: string;\n fontWeight?: string;\n };\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/progress-bar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface ProgressBarProps extends BaseComponentProps {\n /**\n * Indicates the current progress as a percentage. The value must be between 0 and 100. Decimals are rounded.\n */\n value?: number;\n\n /**\n * Specifies the status of the progress bar. You can set it to one of the following:\n *\n * - `\"in-progress\"` - Displays a progress bar.\n * - `\"success\"` or `\"error\"` - Displays a result state and replaces the progress element with a status indicator,\n * `resultText`, and a result button.\n */\n status?: ProgressBarProps.Status;\n\n /**\n * Enables the correct styling of the progress bar in different contexts. You can set it to one of the following:\n *\n * - `\"flash\"` - Use this variant when using the progress bar within a flash component.\n * Note that the result button isn't displayed when using this variant.\n * Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item instead of the result button provided by the progress bar.\n * - `\"key-value\"` - Use this variant when using the progress bar within the key-value pairs pattern.\n * - `\"standalone\"` Use in all other cases. This is the default value.\n */\n variant?: ProgressBarProps.Variant;\n\n /**\n * Specifies the text for the button that's displayed when the `status` is set to `error` or `success`.\n * If `resultButtonText` is empty, the result button isn't displayed.\n *\n * Note: If you use the `flash` variant, the result button isn't displayed.\n * Add a button using the `action` property of the flashbar item instead.\n */\n resultButtonText?: string;\n\n /**\n * Adds an `aria-label` to the progress bar.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the progress bar.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the progress bar.\n */\n ariaDescribedby?: string;\n\n /**\n * Short description of the operation that appears at the top of the component.\n *\n * Make sure that you always provide a label for accessibility.\n */\n label?: React.ReactNode;\n\n /**\n * More detailed information about the operation that appears below the label.\n */\n description?: React.ReactNode;\n\n /**\n * Information that's displayed below the progress bar or status text.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Content that's displayed when `status` is set to `error` or `success`.\n */\n resultText?: React.ReactNode;\n\n /**\n * Called when the user clicks the result state button.\n *\n * Note: If you are using the `flash` variant, the result button isn't displayed.\n * Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item instead.\n */\n onResultButtonClick?: NonCancelableEventHandler;\n\n /**\n * @awsuiSystem core\n */\n style?: ProgressBarProps.Style;\n}\n\nexport namespace ProgressBarProps {\n export type Status = 'in-progress' | 'success' | 'error';\n export type Variant = 'standalone' | 'flash' | 'key-value';\n\n export interface Style {\n progressBar?: {\n backgroundColor?: string;\n borderRadius?: string;\n height?: string;\n };\n progressValue?: {\n backgroundColor?: string;\n };\n progressPercentage?: {\n color?: string;\n fontSize?: string;\n fontWeight?: string;\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC;CAChC;AAED,eAAO,MAAM,QAAQ,GAAI,yEAAyE,aAAa,gBAuC9G,CAAC;AAEF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,GAAI,oCAAoC,cAAc,gBAM3E,CAAC;AAYF,UAAU,gBAAgB;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,GAAI,8DAA8D,gBAAgB,gBAqBzG,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC;CAChC;AAED,eAAO,MAAM,QAAQ,GAAI,yEAAyE,aAAa,gBAmC9G,CAAC;AAEF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,GAAI,oCAAoC,cAAc,gBAM3E,CAAC;AAYF,UAAU,gBAAgB;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,GAAI,8DAA8D,gBAAgB,gBAqBzG,CAAC"}
@@ -18,7 +18,7 @@ export const Progress = ({ value, isInFlash, ariaLabel, ariaLabelledby, ariaDesc
18
18
  const progressValueStyles = getProgressValueStyles(style);
19
19
  const progressPercentageStyles = getProgressPercentageStyles(style);
20
20
  return (React.createElement("div", { className: styles['progress-container'] },
21
- React.createElement("progress", { className: clsx(styles.progress, progressValue >= MAX_VALUE && styles.complete, isInFlash && styles['progress-in-flash']), max: MAX_VALUE, value: progressValue, "aria-label": ariaLabel, "aria-labelledby": !ariaLabel ? ariaLabelledby : undefined, "aria-describedby": ariaDescribedby, style: {
21
+ React.createElement("progress", { className: clsx(styles.progress, progressValue >= MAX_VALUE && styles.complete), max: MAX_VALUE, value: progressValue, "aria-label": ariaLabel, "aria-labelledby": !ariaLabel ? ariaLabelledby : undefined, "aria-describedby": ariaDescribedby, style: {
22
22
  ...(progressBarStyles || {}),
23
23
  ...(progressValueStyles || {}),
24
24
  } }),
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/progress-bar/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElG,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,UAAkB,EAAE,UAAkB,EAAE,EAAE;IACtE,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;AAC3D,CAAC,CAAC;AAWF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,eA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AAC,OAAO;gBACvE,8BAAM,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,IAAG,UAAU,CAAQ,CACnC,CACrB;QACN,eAAe,IAAI,oBAAC,YAAY,IAAC,OAAO,EAAE,OAAO,IAAG,gBAAgB,CAAgB,CACjF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { BoxProps } from '../box/interfaces';\nimport InternalBox from '../box/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { ProgressBarProps } from './interfaces';\nimport { getProgressPercentageStyles, getProgressStyles, getProgressValueStyles } from './styles';\n\nimport styles from './styles.css.js';\n\nconst MAX_VALUE = 100;\n\nconst clamp = (value: number, lowerLimit: number, upperLimit: number) => {\n return Math.max(Math.min(value, upperLimit), lowerLimit);\n};\n\ninterface ProgressProps {\n value: number;\n isInFlash: boolean;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n style?: ProgressBarProps.Style;\n}\n\nexport const Progress = ({ value, isInFlash, ariaLabel, ariaLabelledby, ariaDescribedby, style }: ProgressProps) => {\n const roundedValue = Math.round(value);\n const progressValue = clamp(roundedValue, 0, MAX_VALUE);\n\n const progressBarStyles = getProgressStyles(style);\n const progressValueStyles = getProgressValueStyles(style);\n const progressPercentageStyles = getProgressPercentageStyles(style);\n\n return (\n <div className={styles['progress-container']}>\n <progress\n className={clsx(\n styles.progress,\n progressValue >= MAX_VALUE && styles.complete,\n isInFlash && styles['progress-in-flash']\n )}\n max={MAX_VALUE}\n value={progressValue}\n aria-label={ariaLabel}\n // Ensures aria-label takes precedence over aria-labelledby\n aria-labelledby={!ariaLabel ? ariaLabelledby : undefined}\n aria-describedby={ariaDescribedby}\n style={{\n ...(progressBarStyles || {}),\n ...(progressValueStyles || {}),\n }}\n />\n <span aria-hidden=\"true\" className={styles['percentage-container']}>\n <InternalBox\n className={styles.percentage}\n variant=\"small\"\n color={isInFlash ? 'inherit' : undefined}\n nativeAttributes={progressPercentageStyles ? { style: progressPercentageStyles } : undefined}\n >\n {`${progressValue}%`}\n </InternalBox>\n </span>\n </div>\n );\n};\n\ninterface SmallTextProps {\n color?: BoxProps.Color;\n id?: string;\n children: React.ReactNode;\n className?: string;\n}\n\nexport const SmallText = ({ color, children, className, id }: SmallTextProps) => {\n return (\n <InternalBox className={clsx(styles['word-wrap'], className)} variant=\"small\" display=\"block\" color={color} id={id}>\n {children}\n </InternalBox>\n );\n};\n\nconst ResultButton = ({ onClick, children }: ButtonProps) => {\n return (\n <div className={styles['result-button']}>\n <InternalButton formAction=\"none\" onClick={onClick}>\n {children}\n </InternalButton>\n </div>\n );\n};\n\ninterface ResultStateProps {\n isInFlash: boolean;\n resultText: React.ReactNode;\n resultButtonText?: string;\n status: ProgressBarProps.Status;\n onClick: () => void;\n}\n\nexport const ResultState = ({ isInFlash, resultText, resultButtonText, status, onClick }: ResultStateProps) => {\n const hasResultButton = !!resultButtonText;\n\n if (isInFlash) {\n return (\n <div className={styles[`result-container-${status}`]}>\n <span className={styles['result-text']}>{resultText}</span>\n </div>\n );\n }\n\n return (\n <div className={styles[`result-container-${status}`]}>\n <span className={clsx(hasResultButton && styles['with-result-button'])}>\n <InternalStatusIndicator type={status === 'success' ? 'success' : 'error'}>\n <span className={styles['result-text']}>{resultText}</span>\n </InternalStatusIndicator>\n </span>\n {hasResultButton && <ResultButton onClick={onClick}>{resultButtonText}</ResultButton>}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/progress-bar/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,WAAW,MAAM,iBAA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oB,EAAE,EAAE;IAC5G,MAAM,eAAe,GAAG,CAAC,CAAC,gBAAgB,CAAC;IAE3C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,MAAM,EAAE,CAAC;YAClD,8BAAM,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,IAAG,UAAU,CAAQ,CACvD,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,MAAM,EAAE,CAAC;QAClD,8BAAM,SAAS,EAAE,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC;YACpE,oBAAC,uBAAuB,IAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;gBACvE,8BAAM,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,IAAG,UAAU,CAAQ,CACnC,CACrB;QACN,eAAe,IAAI,oBAAC,YAAY,IAAC,OAAO,EAAE,OAAO,IAAG,gBAAgB,CAAgB,CACjF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { BoxProps } from '../box/interfaces';\nimport InternalBox from '../box/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { ProgressBarProps } from './interfaces';\nimport { getProgressPercentageStyles, getProgressStyles, getProgressValueStyles } from './styles';\n\nimport styles from './styles.css.js';\n\nconst MAX_VALUE = 100;\n\nconst clamp = (value: number, lowerLimit: number, upperLimit: number) => {\n return Math.max(Math.min(value, upperLimit), lowerLimit);\n};\n\ninterface ProgressProps {\n value: number;\n isInFlash: boolean;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n style?: ProgressBarProps.Style;\n}\n\nexport const Progress = ({ value, isInFlash, ariaLabel, ariaLabelledby, ariaDescribedby, style }: ProgressProps) => {\n const roundedValue = Math.round(value);\n const progressValue = clamp(roundedValue, 0, MAX_VALUE);\n\n const progressBarStyles = getProgressStyles(style);\n const progressValueStyles = getProgressValueStyles(style);\n const progressPercentageStyles = getProgressPercentageStyles(style);\n\n return (\n <div className={styles['progress-container']}>\n <progress\n className={clsx(styles.progress, progressValue >= MAX_VALUE && styles.complete)}\n max={MAX_VALUE}\n value={progressValue}\n aria-label={ariaLabel}\n // Ensures aria-label takes precedence over aria-labelledby\n aria-labelledby={!ariaLabel ? ariaLabelledby : undefined}\n aria-describedby={ariaDescribedby}\n style={{\n ...(progressBarStyles || {}),\n ...(progressValueStyles || {}),\n }}\n />\n <span aria-hidden=\"true\" className={styles['percentage-container']}>\n <InternalBox\n className={styles.percentage}\n variant=\"small\"\n color={isInFlash ? 'inherit' : undefined}\n nativeAttributes={progressPercentageStyles ? { style: progressPercentageStyles } : undefined}\n >\n {`${progressValue}%`}\n </InternalBox>\n </span>\n </div>\n );\n};\n\ninterface SmallTextProps {\n color?: BoxProps.Color;\n id?: string;\n children: React.ReactNode;\n className?: string;\n}\n\nexport const SmallText = ({ color, children, className, id }: SmallTextProps) => {\n return (\n <InternalBox className={clsx(styles['word-wrap'], className)} variant=\"small\" display=\"block\" color={color} id={id}>\n {children}\n </InternalBox>\n );\n};\n\nconst ResultButton = ({ onClick, children }: ButtonProps) => {\n return (\n <div className={styles['result-button']}>\n <InternalButton formAction=\"none\" onClick={onClick}>\n {children}\n </InternalButton>\n </div>\n );\n};\n\ninterface ResultStateProps {\n isInFlash: boolean;\n resultText: React.ReactNode;\n resultButtonText?: string;\n status: ProgressBarProps.Status;\n onClick: () => void;\n}\n\nexport const ResultState = ({ isInFlash, resultText, resultButtonText, status, onClick }: ResultStateProps) => {\n const hasResultButton = !!resultButtonText;\n\n if (isInFlash) {\n return (\n <div className={styles[`result-container-${status}`]}>\n <span className={styles['result-text']}>{resultText}</span>\n </div>\n );\n }\n\n return (\n <div className={styles[`result-container-${status}`]}>\n <span className={clsx(hasResultButton && styles['with-result-button'])}>\n <InternalStatusIndicator type={status === 'success' ? 'success' : 'error'}>\n <span className={styles['result-text']}>{resultText}</span>\n </InternalStatusIndicator>\n </span>\n {hasResultButton && <ResultButton onClick={onClick}>{resultButtonText}</ResultButton>}\n </div>\n );\n};\n"]}
@@ -1,24 +1,23 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "progress": "awsui_progress_11huc_a3ynd_189",
5
- "result-state": "awsui_result-state_11huc_a3ynd_203",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_a3ynd_1",
7
- "root": "awsui_root_11huc_a3ynd_225",
8
- "with-result-button": "awsui_with-result-button_11huc_a3ynd_257",
9
- "result-text": "awsui_result-text_11huc_a3ynd_261",
10
- "result-container-error": "awsui_result-container-error_11huc_a3ynd_265",
11
- "result-container-success": "awsui_result-container-success_11huc_a3ynd_265",
12
- "result-button": "awsui_result-button_11huc_a3ynd_269",
13
- "word-wrap": "awsui_word-wrap_11huc_a3ynd_275",
14
- "label-flash": "awsui_label-flash_11huc_a3ynd_280",
15
- "label-key-value": "awsui_label-key-value_11huc_a3ynd_284",
16
- "flash": "awsui_flash_11huc_a3ynd_292",
17
- "progress-container": "awsui_progress-container_11huc_a3ynd_296",
18
- "percentage-container": "awsui_percentage-container_11huc_a3ynd_303",
19
- "percentage": "awsui_percentage_11huc_a3ynd_303",
20
- "complete": "awsui_complete_11huc_a3ynd_349",
21
- "progress-in-flash": "awsui_progress-in-flash_11huc_a3ynd_362",
22
- "additional-info": "awsui_additional-info_11huc_a3ynd_375"
4
+ "progress": "awsui_progress_11huc_9eel8_189",
5
+ "result-state": "awsui_result-state_11huc_9eel8_203",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_9eel8_1",
7
+ "root": "awsui_root_11huc_9eel8_225",
8
+ "with-result-button": "awsui_with-result-button_11huc_9eel8_257",
9
+ "result-text": "awsui_result-text_11huc_9eel8_261",
10
+ "result-container-error": "awsui_result-container-error_11huc_9eel8_265",
11
+ "result-container-success": "awsui_result-container-success_11huc_9eel8_265",
12
+ "result-button": "awsui_result-button_11huc_9eel8_269",
13
+ "word-wrap": "awsui_word-wrap_11huc_9eel8_275",
14
+ "label-flash": "awsui_label-flash_11huc_9eel8_280",
15
+ "label-key-value": "awsui_label-key-value_11huc_9eel8_284",
16
+ "flash": "awsui_flash_11huc_9eel8_292",
17
+ "progress-container": "awsui_progress-container_11huc_9eel8_296",
18
+ "percentage-container": "awsui_percentage-container_11huc_9eel8_303",
19
+ "percentage": "awsui_percentage_11huc_9eel8_303",
20
+ "complete": "awsui_complete_11huc_9eel8_349",
21
+ "additional-info": "awsui_additional-info_11huc_9eel8_363"
23
22
  };
24
23