@cloudscape-design/components-themeable 3.0.1323 → 3.0.1325

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 (102) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/flashbar/styles.scss +25 -4
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  4. package/lib/internal/scss/side-navigation/styles.scss +17 -19
  5. package/lib/internal/template/alert/styles.css.js +27 -27
  6. package/lib/internal/template/alert/styles.scoped.css +44 -44
  7. package/lib/internal/template/alert/styles.selectors.js +27 -27
  8. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.d.ts.map +1 -1
  9. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +3 -3
  10. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
  11. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +1 -1
  12. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
  13. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +1 -1
  14. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  15. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +1 -1
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js +1 -1
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js.map +1 -1
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +3 -3
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +4 -4
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js +2 -2
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map +1 -1
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +2 -2
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js +1 -1
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js.map +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js +1 -1
  30. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js.map +1 -1
  31. package/lib/internal/template/box/styles.css.js +193 -193
  32. package/lib/internal/template/box/styles.scoped.css +242 -242
  33. package/lib/internal/template/box/styles.selectors.js +193 -193
  34. package/lib/internal/template/code-editor/styles.css.js +33 -33
  35. package/lib/internal/template/code-editor/styles.scoped.css +195 -195
  36. package/lib/internal/template/code-editor/styles.selectors.js +33 -33
  37. package/lib/internal/template/error-boundary/interfaces.d.ts +1 -0
  38. package/lib/internal/template/error-boundary/interfaces.d.ts.map +1 -1
  39. package/lib/internal/template/error-boundary/interfaces.js.map +1 -1
  40. package/lib/internal/template/error-boundary/internal.d.ts +1 -1
  41. package/lib/internal/template/error-boundary/internal.d.ts.map +1 -1
  42. package/lib/internal/template/error-boundary/internal.js +7 -3
  43. package/lib/internal/template/error-boundary/internal.js.map +1 -1
  44. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  45. package/lib/internal/template/flashbar/flash.js +2 -2
  46. package/lib/internal/template/flashbar/flash.js.map +1 -1
  47. package/lib/internal/template/flashbar/style.d.ts +3 -0
  48. package/lib/internal/template/flashbar/style.d.ts.map +1 -1
  49. package/lib/internal/template/flashbar/style.js +9 -0
  50. package/lib/internal/template/flashbar/style.js.map +1 -1
  51. package/lib/internal/template/flashbar/styles.css.js +50 -50
  52. package/lib/internal/template/flashbar/styles.scoped.css +169 -151
  53. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  54. package/lib/internal/template/form-field/styles.css.js +24 -24
  55. package/lib/internal/template/form-field/styles.scoped.css +40 -40
  56. package/lib/internal/template/form-field/styles.selectors.js +24 -24
  57. package/lib/internal/template/icon/styles.css.js +41 -41
  58. package/lib/internal/template/icon/styles.scoped.css +94 -94
  59. package/lib/internal/template/icon/styles.selectors.js +41 -41
  60. package/lib/internal/template/input/styles.css.js +18 -18
  61. package/lib/internal/template/input/styles.scoped.css +38 -38
  62. package/lib/internal/template/input/styles.selectors.js +18 -18
  63. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  64. package/lib/internal/template/internal/analytics/components/analytics-funnel.js +16 -5
  65. package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
  66. package/lib/internal/template/internal/base-component/styles.scoped.css +146 -88
  67. package/lib/internal/template/internal/components/button-trigger/styles.css.js +14 -14
  68. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +35 -35
  69. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +14 -14
  70. package/lib/internal/template/internal/environment.js +2 -2
  71. package/lib/internal/template/internal/environment.json +2 -2
  72. package/lib/internal/template/internal/generated/styles/tokens.d.ts +10 -0
  73. package/lib/internal/template/internal/generated/styles/tokens.js +23 -13
  74. package/lib/internal/template/internal/generated/theming/index.cjs +262 -21
  75. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +90 -0
  76. package/lib/internal/template/internal/generated/theming/index.d.ts +90 -0
  77. package/lib/internal/template/internal/generated/theming/index.js +262 -21
  78. package/lib/internal/template/popover/body.d.ts.map +1 -1
  79. package/lib/internal/template/popover/body.js +2 -2
  80. package/lib/internal/template/popover/body.js.map +1 -1
  81. package/lib/internal/template/prompt-input/styles.css.js +26 -26
  82. package/lib/internal/template/prompt-input/styles.scoped.css +61 -61
  83. package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
  84. package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
  85. package/lib/internal/template/side-navigation/parts.js +21 -14
  86. package/lib/internal/template/side-navigation/parts.js.map +1 -1
  87. package/lib/internal/template/side-navigation/styles.css.js +46 -46
  88. package/lib/internal/template/side-navigation/styles.scoped.css +85 -107
  89. package/lib/internal/template/side-navigation/styles.selectors.js +46 -46
  90. package/lib/internal/template/slider/styles.css.js +26 -26
  91. package/lib/internal/template/slider/styles.scoped.css +112 -112
  92. package/lib/internal/template/slider/styles.selectors.js +26 -26
  93. package/lib/internal/template/status-indicator/styles.css.js +24 -24
  94. package/lib/internal/template/status-indicator/styles.scoped.css +59 -59
  95. package/lib/internal/template/status-indicator/styles.selectors.js +24 -24
  96. package/lib/internal/template/textarea/styles.css.js +5 -5
  97. package/lib/internal/template/textarea/styles.scoped.css +17 -17
  98. package/lib/internal/template/textarea/styles.selectors.js +5 -5
  99. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
  100. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +23 -23
  101. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
  102. package/package.json +1 -1
@@ -2,38 +2,38 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "code-editor-refresh": "awsui_code-editor-refresh_1gl9c_c9qb5_158",
6
- "code-editor": "awsui_code-editor_1gl9c_c9qb5_158",
7
- "pane": "awsui_pane_1gl9c_c9qb5_704",
8
- "pane__close-container": "awsui_pane__close-container_1gl9c_c9qb5_715",
9
- "pane__list": "awsui_pane__list_1gl9c_c9qb5_720",
10
- "pane__table": "awsui_pane__table_1gl9c_c9qb5_727",
11
- "pane__item": "awsui_pane__item_1gl9c_c9qb5_733",
12
- "pane__cell": "awsui_pane__cell_1gl9c_c9qb5_733",
13
- "pane__item--highlighted": "awsui_pane__item--highlighted_1gl9c_c9qb5_747",
14
- "pane__location": "awsui_pane__location_1gl9c_c9qb5_768",
15
- "pane__description": "awsui_pane__description_1gl9c_c9qb5_768",
16
- "focus-lock": "awsui_focus-lock_1gl9c_c9qb5_783",
17
- "editor": "awsui_editor_1gl9c_c9qb5_827",
18
- "editor-refresh": "awsui_editor-refresh_1gl9c_c9qb5_857",
19
- "status-bar": "awsui_status-bar_1gl9c_c9qb5_862",
20
- "status-bar-with-hidden-pane": "awsui_status-bar-with-hidden-pane_1gl9c_c9qb5_871",
21
- "status-bar__left": "awsui_status-bar__left_1gl9c_c9qb5_875",
22
- "status-bar__right": "awsui_status-bar__right_1gl9c_c9qb5_882",
23
- "status-bar__language-mode": "awsui_status-bar__language-mode_1gl9c_c9qb5_886",
24
- "status-bar__cursor-position": "awsui_status-bar__cursor-position_1gl9c_c9qb5_886",
25
- "status-bar__cog-button": "awsui_status-bar__cog-button_1gl9c_c9qb5_892",
26
- "tab-list": "awsui_tab-list_1gl9c_c9qb5_897",
27
- "tab-button": "awsui_tab-button_1gl9c_c9qb5_902",
28
- "tab-button--refresh": "awsui_tab-button--refresh_1gl9c_c9qb5_935",
29
- "tab-button--warnings": "awsui_tab-button--warnings_1gl9c_c9qb5_938",
30
- "tab-button--active": "awsui_tab-button--active_1gl9c_c9qb5_947",
31
- "tab-button--disabled": "awsui_tab-button--disabled_1gl9c_c9qb5_963",
32
- "tab-button--divider": "awsui_tab-button--divider_1gl9c_c9qb5_996",
33
- "tab-button--errors": "awsui_tab-button--errors_1gl9c_c9qb5_1003",
34
- "count": "awsui_count_1gl9c_c9qb5_1012",
35
- "text": "awsui_text_1gl9c_c9qb5_1015",
36
- "loading-screen": "awsui_loading-screen_1gl9c_c9qb5_1037",
37
- "error-screen": "awsui_error-screen_1gl9c_c9qb5_1038"
5
+ "code-editor-refresh": "awsui_code-editor-refresh_1gl9c_14ry1_158",
6
+ "code-editor": "awsui_code-editor_1gl9c_14ry1_158",
7
+ "pane": "awsui_pane_1gl9c_14ry1_704",
8
+ "pane__close-container": "awsui_pane__close-container_1gl9c_14ry1_715",
9
+ "pane__list": "awsui_pane__list_1gl9c_14ry1_720",
10
+ "pane__table": "awsui_pane__table_1gl9c_14ry1_727",
11
+ "pane__item": "awsui_pane__item_1gl9c_14ry1_733",
12
+ "pane__cell": "awsui_pane__cell_1gl9c_14ry1_733",
13
+ "pane__item--highlighted": "awsui_pane__item--highlighted_1gl9c_14ry1_747",
14
+ "pane__location": "awsui_pane__location_1gl9c_14ry1_768",
15
+ "pane__description": "awsui_pane__description_1gl9c_14ry1_768",
16
+ "focus-lock": "awsui_focus-lock_1gl9c_14ry1_783",
17
+ "editor": "awsui_editor_1gl9c_14ry1_827",
18
+ "editor-refresh": "awsui_editor-refresh_1gl9c_14ry1_857",
19
+ "status-bar": "awsui_status-bar_1gl9c_14ry1_862",
20
+ "status-bar-with-hidden-pane": "awsui_status-bar-with-hidden-pane_1gl9c_14ry1_871",
21
+ "status-bar__left": "awsui_status-bar__left_1gl9c_14ry1_875",
22
+ "status-bar__right": "awsui_status-bar__right_1gl9c_14ry1_882",
23
+ "status-bar__language-mode": "awsui_status-bar__language-mode_1gl9c_14ry1_886",
24
+ "status-bar__cursor-position": "awsui_status-bar__cursor-position_1gl9c_14ry1_886",
25
+ "status-bar__cog-button": "awsui_status-bar__cog-button_1gl9c_14ry1_892",
26
+ "tab-list": "awsui_tab-list_1gl9c_14ry1_897",
27
+ "tab-button": "awsui_tab-button_1gl9c_14ry1_902",
28
+ "tab-button--refresh": "awsui_tab-button--refresh_1gl9c_14ry1_935",
29
+ "tab-button--warnings": "awsui_tab-button--warnings_1gl9c_14ry1_938",
30
+ "tab-button--active": "awsui_tab-button--active_1gl9c_14ry1_947",
31
+ "tab-button--disabled": "awsui_tab-button--disabled_1gl9c_14ry1_963",
32
+ "tab-button--divider": "awsui_tab-button--divider_1gl9c_14ry1_996",
33
+ "tab-button--errors": "awsui_tab-button--errors_1gl9c_14ry1_1003",
34
+ "count": "awsui_count_1gl9c_14ry1_1012",
35
+ "text": "awsui_text_1gl9c_14ry1_1015",
36
+ "loading-screen": "awsui_loading-screen_1gl9c_14ry1_1037",
37
+ "error-screen": "awsui_error-screen_1gl9c_14ry1_1038"
38
38
  };
39
39
 
@@ -95,5 +95,6 @@ export interface BuiltInErrorBoundaryProps {
95
95
  }
96
96
  export interface AppLayoutBuiltInErrorBoundaryProps extends BuiltInErrorBoundaryProps {
97
97
  renderFallback?: ErrorBoundaryProps['renderFallback'];
98
+ appLayoutPart?: string;
98
99
  }
99
100
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,aAAa,KAAK,IAAI,CAAC;IAE5D;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,aAAa,KAAK,KAAK,CAAC,SAAS,CAAC;IAE9E;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC;IAE7C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,aAAa;QAC5B,MAAM,CAAC,EAAE,KAAK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AAW,kCAAmC,SAAQ,yBAAyB;IACnF,cAAc,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/error-boundary/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ErrorInfo } from 'react';\n\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface ErrorBoundaryProps extends BaseComponentProps {\n /**\n * Optional identifier for the error boundary instance.\n *\n * When provided, the identifier is included in the `onError` callback payload.\n * In the rendered output, the boundary wraps its content in a `<div>` with the\n * attribute `data-awsui-boundary-id={errorBoundaryId}` to support debugging.\n */\n errorBoundaryId?: string;\n\n /**\n * Callback invoked when an error is intercepted by the boundary.\n * Use this function to record, log, or report errors (for example, to telemetry or monitoring systems).\n *\n * The callback receives a `detail` object containing:\n * * `error` (Error): The thrown error instance.\n * * `errorInfo` (React.ErrorInfo): Additional metadata captured by React.\n * * `errorBoundaryId` (optional, string): The boundary identifier, if defined.\n */\n onError: (detail: ErrorBoundaryProps.OnErrorDetail) => void;\n\n /**\n * Controls how nested error boundaries behave.\n *\n * Several components—such as app layout, container, and modal include built-in\n * error boundaries. These boundaries activate automatically when they detect\n * an ancestor boundary, inheriting configuration from the closest one.\n *\n * When `suppressNested` is set to `true`, nested built-in error boundaries\n * and nested standalone error boundaries with `suppressible=true` are disabled,\n * so the errors propagate further up and are captured by this error boundary.\n */\n suppressNested?: boolean;\n\n /**\n * When set to `true`, this error boundary can be suppressed by another error\n * boundary with `suppressNested=true`, rendered above in the components tree.\n */\n suppressible?: boolean;\n\n /**\n * Optional custom renderer for the fallback UI displayed when an error occurs.\n *\n * The function receives the default slots derived from i18n configuration:\n * * `header` (ReactNode): The fallback header text.\n * * `description` (ReactNode): The fallback description text.\n * * `action` (ReactNode): The fallback action element (a refresh button by default).\n *\n * Return a React node to fully override the default fallback presentation.\n */\n renderFallback?: (props: ErrorBoundaryProps.FallbackProps) => React.ReactNode;\n\n /**\n * Localized strings and components used in the fallback UI.\n *\n * * `headerText` (string): Header text displayed in the fallback view.\n * * `descriptionText` (string): Description text displayed in the fallback view. Supports embedding inline\n * feedback actions by including `<Feedback>` pseudo-tags when `components.Feedback` is provided.\n * * `refreshActionText` (string): Text for the default refresh action button.\n * * `components.Feedback` (React.ComponentType<I18nFeedbackProps>): A component used to render\n * inline feedback actions within the description text.\n *\n * @i18n\n */\n i18nStrings?: ErrorBoundaryProps.I18nStrings;\n\n /**\n * Child content rendered when no error has been captured.\n */\n children: React.ReactNode;\n}\n\nexport namespace ErrorBoundaryProps {\n export interface FallbackProps {\n header?: React.ReactNode;\n description?: React.ReactNode;\n action?: React.ReactNode;\n }\n\n export interface I18nStrings {\n headerText?: string;\n descriptionText?: string;\n refreshActionText?: string;\n components?: {\n Feedback?: React.ComponentType<I18nFeedbackProps>;\n };\n }\n\n export interface I18nFeedbackProps {\n children: React.ReactNode;\n }\n\n export interface OnErrorDetail {\n error: Error;\n errorInfo: ErrorInfo;\n errorBoundaryId?: string;\n }\n}\n\nexport interface BuiltInErrorBoundaryProps {\n children: React.ReactNode;\n wrapper?: (content: React.ReactNode) => React.ReactNode;\n suppressNested?: boolean;\n}\n\nexport interface AppLayoutBuiltInErrorBoundaryProps extends BuiltInErrorBoundaryProps {\n renderFallback?: ErrorBoundaryProps['renderFallback'];\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/error-boundary/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ErrorInfo } from 'react';\n\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface ErrorBoundaryProps extends BaseComponentProps {\n /**\n * Optional identifier for the error boundary instance.\n *\n * When provided, the identifier is included in the `onError` callback payload.\n * In the rendered output, the boundary wraps its content in a `<div>` with the\n * attribute `data-awsui-boundary-id={errorBoundaryId}` to support debugging.\n */\n errorBoundaryId?: string;\n\n /**\n * Callback invoked when an error is intercepted by the boundary.\n * Use this function to record, log, or report errors (for example, to telemetry or monitoring systems).\n *\n * The callback receives a `detail` object containing:\n * * `error` (Error): The thrown error instance.\n * * `errorInfo` (React.ErrorInfo): Additional metadata captured by React.\n * * `errorBoundaryId` (optional, string): The boundary identifier, if defined.\n */\n onError: (detail: ErrorBoundaryProps.OnErrorDetail) => void;\n\n /**\n * Controls how nested error boundaries behave.\n *\n * Several components—such as app layout, container, and modal include built-in\n * error boundaries. These boundaries activate automatically when they detect\n * an ancestor boundary, inheriting configuration from the closest one.\n *\n * When `suppressNested` is set to `true`, nested built-in error boundaries\n * and nested standalone error boundaries with `suppressible=true` are disabled,\n * so the errors propagate further up and are captured by this error boundary.\n */\n suppressNested?: boolean;\n\n /**\n * When set to `true`, this error boundary can be suppressed by another error\n * boundary with `suppressNested=true`, rendered above in the components tree.\n */\n suppressible?: boolean;\n\n /**\n * Optional custom renderer for the fallback UI displayed when an error occurs.\n *\n * The function receives the default slots derived from i18n configuration:\n * * `header` (ReactNode): The fallback header text.\n * * `description` (ReactNode): The fallback description text.\n * * `action` (ReactNode): The fallback action element (a refresh button by default).\n *\n * Return a React node to fully override the default fallback presentation.\n */\n renderFallback?: (props: ErrorBoundaryProps.FallbackProps) => React.ReactNode;\n\n /**\n * Localized strings and components used in the fallback UI.\n *\n * * `headerText` (string): Header text displayed in the fallback view.\n * * `descriptionText` (string): Description text displayed in the fallback view. Supports embedding inline\n * feedback actions by including `<Feedback>` pseudo-tags when `components.Feedback` is provided.\n * * `refreshActionText` (string): Text for the default refresh action button.\n * * `components.Feedback` (React.ComponentType<I18nFeedbackProps>): A component used to render\n * inline feedback actions within the description text.\n *\n * @i18n\n */\n i18nStrings?: ErrorBoundaryProps.I18nStrings;\n\n /**\n * Child content rendered when no error has been captured.\n */\n children: React.ReactNode;\n}\n\nexport namespace ErrorBoundaryProps {\n export interface FallbackProps {\n header?: React.ReactNode;\n description?: React.ReactNode;\n action?: React.ReactNode;\n }\n\n export interface I18nStrings {\n headerText?: string;\n descriptionText?: string;\n refreshActionText?: string;\n components?: {\n Feedback?: React.ComponentType<I18nFeedbackProps>;\n };\n }\n\n export interface I18nFeedbackProps {\n children: React.ReactNode;\n }\n\n export interface OnErrorDetail {\n error: Error;\n errorInfo: ErrorInfo;\n errorBoundaryId?: string;\n }\n}\n\nexport interface BuiltInErrorBoundaryProps {\n children: React.ReactNode;\n wrapper?: (content: React.ReactNode) => React.ReactNode;\n suppressNested?: boolean;\n}\n\nexport interface AppLayoutBuiltInErrorBoundaryProps extends BuiltInErrorBoundaryProps {\n renderFallback?: ErrorBoundaryProps['renderFallback'];\n appLayoutPart?: string;\n}\n"]}
@@ -13,6 +13,6 @@ interface InternalErrorBoundaryProps extends SomeRequired<ErrorBoundaryProps, 's
13
13
  }
14
14
  export declare function InternalErrorBoundary({ children, suppressNested, suppressible, __internalRootRef, ...props }: InternalErrorBoundaryProps): JSX.Element;
15
15
  export declare function BuiltInErrorBoundary({ wrapper, suppressNested, children }: BuiltInErrorBoundaryProps): JSX.Element;
16
- export declare function AppLayoutBuiltInErrorBoundary({ wrapper, suppressNested, children, renderFallback, }: AppLayoutBuiltInErrorBoundaryProps): JSX.Element;
16
+ export declare function AppLayoutBuiltInErrorBoundary({ wrapper, suppressNested, children, renderFallback, appLayoutPart, }: AppLayoutBuiltInErrorBoundaryProps): JSX.Element;
17
17
  export {};
18
18
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/internal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AA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AAC,EACzE,0BAA0B;CAAG;AAEjC,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,0BAA0B,eA8B5B;AAED,wBAAgB,oBAAoB,CAAC,EAAE,OAAO,EAAE,cAAsB,EAAE,QAAQ,EAAE,EAAE,yBAAyB,eAa5G;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,OAAO,EACP,cAAsB,EACtB,QAAQ,EACR,cAA4B,EAC5B,aAAa,GACd,EAAE,kCAAkC,eAuBpC"}
@@ -2,6 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { Component, createContext, useContext, useState } from 'react';
4
4
  import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
5
+ import { metrics } from '../internal/metrics';
5
6
  import { ErrorBoundaryFallback } from './fallback';
6
7
  import styles from './styles.css.js';
7
8
  const RootSuppressed = Symbol();
@@ -34,14 +35,17 @@ export function BuiltInErrorBoundary({ wrapper, suppressNested = false, children
34
35
  return !thisSuppressed ? (React.createElement(ErrorBoundaryImpl, { ...context, wrapper: wrapper },
35
36
  React.createElement(ErrorBoundariesContext.Provider, { value: { ...context, suppressed: nextSuppressed } }, children))) : (React.createElement(React.Fragment, null, children));
36
37
  }
37
- export function AppLayoutBuiltInErrorBoundary({ wrapper, suppressNested = false, children, renderFallback = () => React.createElement(React.Fragment, null), }) {
38
+ export function AppLayoutBuiltInErrorBoundary({ wrapper, suppressNested = false, children, renderFallback = () => React.createElement(React.Fragment, null), appLayoutPart, }) {
38
39
  const context = useContext(ErrorBoundariesContext);
39
40
  const thisSuppressed = context.suppressed === true || context.suppressed === RootSuppressed;
40
41
  const nextSuppressed = suppressNested || thisSuppressed;
41
42
  return (React.createElement(ErrorBoundaryImpl, { ...context, wrapper: wrapper, renderFallback: renderFallback, className: styles['app-layout-part-fallback'], onError: error => {
42
- var _a;
43
+ var _a, _b, _c;
43
44
  (_a = context === null || context === void 0 ? void 0 : context.onError) === null || _a === void 0 ? void 0 : _a.call(context, error);
44
- // TODO Implement cloudscape error reporting
45
+ metrics.sendOpsMetricObject('awsui-app-layout-error-boundary-fired', {
46
+ errorMessage: (_c = (_b = error === null || error === void 0 ? void 0 : error.error) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : '',
47
+ appLayoutPart: appLayoutPart !== null && appLayoutPart !== void 0 ? appLayoutPart : '',
48
+ });
45
49
  } },
46
50
  React.createElement(ErrorBoundariesContext.Provider, { value: { ...context, suppressed: nextSuppressed, renderFallback } }, children)));
47
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/error-boundary/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAI7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGnD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC,MAAM,cAAc,GAAG,MAAM,EAAE,CAAC;AAEhC,MAAM,sBAAsB,GAAG,aAAa,CAI1C;IACA,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,UAAU,EAAE,cAAc;CAC3B,CAAC,CAAC;AAMH,MAAM,UAAU,qBAAqB,CAAC,EACpC,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,GAAG,KAAK,EACmB;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,KAAK,IAAI,IAAI,YAAY,CAAC;IACnE,MAAM,cAAc,GAAG,cAAc,IAAI,cAAc,CAAC;IAExD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC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,CAAC,wBAAwB;QAC7B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,iBAAiB,CAAC,KAAY,EAAE,SAA0B;;QACxD,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,OAAO,mDAAG,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED,MAAM;;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAClD,MAAM,QAAQ,GAAG,oBAAC,qBAAqB,OAAK,IAAI,CAAC,KAAK,GAAI,CAAC;YAC3D,OAAO,MAAA,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,OAAO,mDAAG,QAAQ,CAAC,mCAAI,QAAQ,CAAC;QACpD,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Component, createContext, useContext, useState } from 'react';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { ErrorBoundaryFallback } from './fallback';\nimport { AppLayoutBuiltInErrorBoundaryProps, BuiltInErrorBoundaryProps, ErrorBoundaryProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\n// Helper methods attached to the component's root node for e2e testing.\ndeclare global {\n interface HTMLElement {\n __awsui__?: { forceError?(): void; clearForcedError?(): void };\n }\n}\n\nconst RootSuppressed = Symbol();\n\nconst ErrorBoundariesContext = createContext<\n Pick<ErrorBoundaryProps, 'renderFallback' | 'i18nStrings' | 'onError' | 'errorBoundaryId'> & {\n suppressed: boolean | typeof RootSuppressed;\n }\n>({\n onError: () => {},\n suppressed: RootSuppressed,\n});\n\ninterface InternalErrorBoundaryProps\n extends SomeRequired<ErrorBoundaryProps, 'suppressNested' | 'suppressible'>,\n InternalBaseComponentProps {}\n\nexport function InternalErrorBoundary({\n children,\n suppressNested,\n suppressible,\n __internalRootRef,\n ...props\n}: InternalErrorBoundaryProps) {\n const context = useContext(ErrorBoundariesContext);\n const thisSuppressed = context.suppressed === true && suppressible;\n const nextSuppressed = suppressNested || thisSuppressed;\n\n const [forcedError, setForcedError] = useState(false);\n const setElement = (node: null | HTMLDivElement) => {\n if (node) {\n if (!node.__awsui__) {\n node.__awsui__ = {};\n }\n node.__awsui__.forceError = () => setForcedError(true);\n node.__awsui__.clearForcedError = () => setForcedError(false);\n }\n };\n const mergedRef = useMergeRefs(setElement, __internalRootRef);\n\n return (\n <div ref={mergedRef} className={styles['error-boundary']} data-awsui-boundary-id={props.errorBoundaryId}>\n {!thisSuppressed ? (\n <ErrorBoundaryImpl {...props} forcedError={forcedError}>\n <ErrorBoundariesContext.Provider value={{ ...props, suppressed: nextSuppressed }}>\n {children}\n </ErrorBoundariesContext.Provider>\n </ErrorBoundaryImpl>\n ) : (\n <>{children}</>\n )}\n </div>\n );\n}\n\nexport function BuiltInErrorBoundary({ wrapper, suppressNested = false, children }: BuiltInErrorBoundaryProps) {\n const context = useContext(ErrorBoundariesContext);\n const thisSuppressed = context.suppressed === true || context.suppressed === RootSuppressed;\n const nextSuppressed = suppressNested || thisSuppressed;\n return !thisSuppressed ? (\n <ErrorBoundaryImpl {...context} wrapper={wrapper}>\n <ErrorBoundariesContext.Provider value={{ ...context, suppressed: nextSuppressed }}>\n {children}\n </ErrorBoundariesContext.Provider>\n </ErrorBoundaryImpl>\n ) : (\n <>{children}</>\n );\n}\n\nexport function AppLayoutBuiltInErrorBoundary({\n wrapper,\n suppressNested = false,\n children,\n renderFallback = () => <></>,\n}: AppLayoutBuiltInErrorBoundaryProps) {\n const context = useContext(ErrorBoundariesContext);\n const thisSuppressed = context.suppressed === true || context.suppressed === RootSuppressed;\n const nextSuppressed = suppressNested || thisSuppressed;\n return (\n <ErrorBoundaryImpl\n {...context}\n wrapper={wrapper}\n renderFallback={renderFallback}\n className={styles['app-layout-part-fallback']}\n onError={error => {\n context?.onError?.(error);\n // TODO Implement cloudscape error reporting\n }}\n >\n <ErrorBoundariesContext.Provider value={{ ...context, suppressed: nextSuppressed, renderFallback }}>\n {children}\n </ErrorBoundariesContext.Provider>\n </ErrorBoundaryImpl>\n );\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n}\n\ninterface ErrorBoundaryImplProps extends ErrorBoundaryProps {\n wrapper?: (content: React.ReactNode) => React.ReactNode;\n forcedError?: boolean;\n}\n\nclass ErrorBoundaryImpl extends Component<ErrorBoundaryImplProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryImplProps) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError() {\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n this.props.onError?.({ error, errorInfo, errorBoundaryId: this.props.errorBoundaryId });\n }\n\n render() {\n if (this.state.hasError || this.props.forcedError) {\n const fallback = <ErrorBoundaryFallback {...this.props} />;\n return this.props.wrapper?.(fallback) ?? fallback;\n }\n return this.props.children;\n }\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/error-boundary/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAG7E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGnD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC,MAAM,cAAc,GAAG,M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mCAAI,QAAQ,CAAC;QACpD,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Component, createContext, useContext, useState } from 'react';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { metrics } from '../internal/metrics';\nimport { SomeRequired } from '../internal/types';\nimport { ErrorBoundaryFallback } from './fallback';\nimport { AppLayoutBuiltInErrorBoundaryProps, BuiltInErrorBoundaryProps, ErrorBoundaryProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\n// Helper methods attached to the component's root node for e2e testing.\ndeclare global {\n interface HTMLElement {\n __awsui__?: { forceError?(): void; clearForcedError?(): void };\n }\n}\n\nconst RootSuppressed = Symbol();\n\nconst ErrorBoundariesContext = createContext<\n Pick<ErrorBoundaryProps, 'renderFallback' | 'i18nStrings' | 'onError' | 'errorBoundaryId'> & {\n suppressed: boolean | typeof RootSuppressed;\n }\n>({\n onError: () => {},\n suppressed: RootSuppressed,\n});\n\ninterface InternalErrorBoundaryProps\n extends SomeRequired<ErrorBoundaryProps, 'suppressNested' | 'suppressible'>,\n InternalBaseComponentProps {}\n\nexport function InternalErrorBoundary({\n children,\n suppressNested,\n suppressible,\n __internalRootRef,\n ...props\n}: InternalErrorBoundaryProps) {\n const context = useContext(ErrorBoundariesContext);\n const thisSuppressed = context.suppressed === true && suppressible;\n const nextSuppressed = suppressNested || thisSuppressed;\n\n const [forcedError, setForcedError] = useState(false);\n const setElement = (node: null | HTMLDivElement) => {\n if (node) {\n if (!node.__awsui__) {\n node.__awsui__ = {};\n }\n node.__awsui__.forceError = () => setForcedError(true);\n node.__awsui__.clearForcedError = () => setForcedError(false);\n }\n };\n const mergedRef = useMergeRefs(setElement, __internalRootRef);\n\n return (\n <div ref={mergedRef} className={styles['error-boundary']} data-awsui-boundary-id={props.errorBoundaryId}>\n {!thisSuppressed ? (\n <ErrorBoundaryImpl {...props} forcedError={forcedError}>\n <ErrorBoundariesContext.Provider value={{ ...props, suppressed: nextSuppressed }}>\n {children}\n </ErrorBoundariesContext.Provider>\n </ErrorBoundaryImpl>\n ) : (\n <>{children}</>\n )}\n </div>\n );\n}\n\nexport function BuiltInErrorBoundary({ wrapper, suppressNested = false, children }: BuiltInErrorBoundaryProps) {\n const context = useContext(ErrorBoundariesContext);\n const thisSuppressed = context.suppressed === true || context.suppressed === RootSuppressed;\n const nextSuppressed = suppressNested || thisSuppressed;\n return !thisSuppressed ? (\n <ErrorBoundaryImpl {...context} wrapper={wrapper}>\n <ErrorBoundariesContext.Provider value={{ ...context, suppressed: nextSuppressed }}>\n {children}\n </ErrorBoundariesContext.Provider>\n </ErrorBoundaryImpl>\n ) : (\n <>{children}</>\n );\n}\n\nexport function AppLayoutBuiltInErrorBoundary({\n wrapper,\n suppressNested = false,\n children,\n renderFallback = () => <></>,\n appLayoutPart,\n}: AppLayoutBuiltInErrorBoundaryProps) {\n const context = useContext(ErrorBoundariesContext);\n const thisSuppressed = context.suppressed === true || context.suppressed === RootSuppressed;\n const nextSuppressed = suppressNested || thisSuppressed;\n return (\n <ErrorBoundaryImpl\n {...context}\n wrapper={wrapper}\n renderFallback={renderFallback}\n className={styles['app-layout-part-fallback']}\n onError={error => {\n context?.onError?.(error);\n metrics.sendOpsMetricObject('awsui-app-layout-error-boundary-fired', {\n errorMessage: error?.error?.message ?? '',\n appLayoutPart: appLayoutPart ?? '',\n });\n }}\n >\n <ErrorBoundariesContext.Provider value={{ ...context, suppressed: nextSuppressed, renderFallback }}>\n {children}\n </ErrorBoundariesContext.Provider>\n </ErrorBoundaryImpl>\n );\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n}\n\ninterface ErrorBoundaryImplProps extends ErrorBoundaryProps {\n wrapper?: (content: React.ReactNode) => React.ReactNode;\n forcedError?: boolean;\n}\n\nclass ErrorBoundaryImpl extends Component<ErrorBoundaryImplProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryImplProps) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError() {\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n this.props.onError?.({ error, errorInfo, errorBoundaryId: this.props.errorBoundaryId });\n }\n\n render() {\n if (this.state.hasError || this.props.forcedError) {\n const fallback = <ErrorBoundaryFallback {...this.props} />;\n return this.props.wrapper?.(fallback) ?? fallback;\n }\n return this.props.children;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AA6BtC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAoD7C,eAAO,MAAM,uBAAuB,GAAI,OAAO,WAAW,GAAG,IAAI,SAYhE,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,QAYzE;AAED,UAAU,UAAW,SAAQ,aAAa,CAAC,iBAAiB;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC;IACxC,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,eAAO,MAAM,KAAK,mFAoLjB,CAAC"}
1
+ {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AA6BtC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAoD7C,eAAO,MAAM,uBAAuB,GAAI,OAAO,WAAW,GAAG,IAAI,SAYhE,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,QAYzE;AAED,UAAU,UAAW,SAAQ,aAAa,CAAC,iBAAiB;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC;IACxC,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,eAAO,MAAM,KAAK,mFAwLjB,CAAC"}
@@ -16,7 +16,7 @@ import { createUseDiscoveredAction, createUseDiscoveredContent } from '../intern
16
16
  import useContainerWidth from '../internal/utils/use-container-width';
17
17
  import InternalLiveRegion from '../live-region/internal';
18
18
  import InternalSpinner from '../spinner/internal';
19
- import { getDismissButtonStyles, getFlashStyles } from './style';
19
+ import { getDismissButtonStyles, getFlashIconStyles, getFlashStyles } from './style';
20
20
  import analyticsSelectors from './analytics-metadata/styles.css.js';
21
21
  import styles from './styles.css.js';
22
22
  const ICON_TYPES = {
@@ -105,7 +105,7 @@ export const Flash = React.forwardRef(({ id, header, content, dismissible, dismi
105
105
  }, getVisualContextClassname(type === 'warning' && !loading ? 'flashbar-warning' : 'flashbar'), initialHidden && styles['initial-hidden']), style: getFlashStyles(style, effectiveType), ...(ariaRole ? { role: ariaRole, 'aria-live': 'off' } : {}), ...analyticsAttributes },
106
106
  React.createElement("div", { className: styles['flash-body'] },
107
107
  React.createElement("div", { className: styles['flash-focus-container'], tabIndex: -1, role: "group", "aria-labelledby": `${flashIconId} ${flashMessageId}` },
108
- React.createElement("div", { className: clsx(styles['flash-icon'], styles['flash-text']), id: flashIconId }, icon),
108
+ React.createElement("div", { className: clsx(styles['flash-icon'], styles['flash-text']), id: flashIconId, style: getFlashIconStyles(style, effectiveType) }, icon),
109
109
  React.createElement("div", { className: clsx(styles['flash-message'], styles['flash-text']), id: flashMessageId },
110
110
  React.createElement("div", { className: clsx(styles['flash-header'], headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']), ref: headerRef }, header),
111
111
  React.createElement("div", { className: clsx(styles['header-replacement'], headerReplacementType !== 'replaced' && styles.hidden), ref: replacementHeaderRef }),
@@ -1 +1 @@
1
- {"version":3,"file":"flash.js","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAGjH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,4BAA4B,EAC5B,wCAAwC,GACzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,C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kB,IAAC,OAAO,EAAE,CAAC,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,CAAC,GAAI,CAC1F,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport {\n useComponentMetadata,\n useMergeRefs,\n useUniqueId,\n warnOnce,\n} from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\nimport { AnalyticsMetadata } from '@cloudscape-design/component-toolkit/internal/base-component/metrics/interfaces';\n\nimport { ActionsWrapper } from '../alert/actions-wrapper';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalIcon from '../icon/internal';\nimport {\n DATA_ATTR_ANALYTICS_FLASHBAR,\n DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS,\n} from '../internal/analytics/selectors';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport { PACKAGE_VERSION } from '../internal/environment';\nimport { isDevelopment } from '../internal/is-development';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport InternalLiveRegion from '../live-region/internal';\nimport InternalSpinner from '../spinner/internal';\nimport { GeneratedAnalyticsMetadataFlashbarDismiss } from './analytics-metadata/interfaces';\nimport { FlashbarProps } from './interfaces';\nimport { getDismissButtonStyles, getFlashStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst ICON_TYPES = {\n success: 'status-positive',\n warning: 'status-warning',\n info: 'status-info',\n error: 'status-negative',\n 'in-progress': 'status-in-progress',\n} as const;\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.flashbar.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('flash', awsuiPluginsInternal.flashContent);\n\nfunction dismissButton(\n dismissLabel: FlashbarProps.MessageDefinition['dismissLabel'],\n onDismiss: FlashbarProps.MessageDefinition['onDismiss'],\n style?: FlashbarProps.Style,\n type?: string,\n ref?: React.Ref<ButtonProps.Ref>,\n id?: string,\n onDismissed?: (id?: string, persistenceConfig?: FlashbarProps.PersistenceConfig) => void,\n persistenceConfig?: FlashbarProps.PersistenceConfig\n) {\n return (\n <div\n className={styles['dismiss-button-wrapper']}\n {...getAnalyticsMetadataAttribute({ action: 'dismiss' } as Partial<GeneratedAnalyticsMetadataFlashbarDismiss>)}\n >\n <InternalButton\n ref={ref}\n onClick={event => {\n if (onDismiss) {\n onDismiss(event);\n }\n if (onDismissed) {\n onDismissed(id, persistenceConfig);\n }\n }}\n className={styles['dismiss-button']}\n variant=\"flashbar-icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissLabel}\n style={getDismissButtonStyles(style, type)}\n />\n </div>\n );\n}\nexport const focusFlashFocusableArea = (flash: HTMLElement | null) => {\n if (!flash) {\n return;\n }\n const dismissButton = flash.querySelector(`.${styles['dismiss-button']}`);\n const focusContainer = flash.querySelector(`.${styles['flash-focus-container']}`);\n\n if (dismissButton) {\n (dismissButton as HTMLElement).focus();\n } else if (focusContainer) {\n (focusContainer as HTMLElement).focus();\n }\n};\n\nexport function focusFlashById(element: HTMLElement | null, itemId: string) {\n if (!element) {\n return;\n }\n\n const flashElement = element.querySelector<HTMLElement>(`[data-itemid=\"${CSS.escape(itemId)}\"]`);\n if (!flashElement) {\n return;\n }\n\n const focusContainer = flashElement.querySelector<HTMLElement>(`.${styles['flash-focus-container']}`);\n focusContainer?.focus();\n}\n\ninterface FlashProps extends FlashbarProps.MessageDefinition {\n className: string;\n transitionState?: string;\n i18nStrings?: FlashbarProps.I18nStrings;\n style?: FlashbarProps.Style;\n rootRef?: React.Ref<HTMLDivElement>;\n onDismissed?: (id?: string) => void;\n}\n\nexport const Flash = React.forwardRef(\n (\n {\n id,\n header,\n content,\n dismissible,\n dismissLabel,\n loading,\n action,\n buttonText,\n onButtonClick,\n onDismiss,\n className,\n transitionState,\n ariaRole,\n i18nStrings,\n type = 'info',\n analyticsMetadata,\n style,\n rootRef,\n onDismissed,\n persistenceConfig,\n ...props\n }: FlashProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (isDevelopment) {\n if (buttonText && !onButtonClick) {\n warnOnce(\n 'Flashbar',\n `You provided a \\`buttonText\\` prop without an \\`onButtonClick\\` handler. This will render a non-interactive action button.`\n );\n }\n\n if (dismissible && !onDismiss) {\n warnOnce(\n 'Flashbar',\n `You have set the \\`dismissible\\` prop without an \\`onDismiss\\` handler. This will render a non-interactive dismiss button.`\n );\n }\n }\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n\n const elementRef = useComponentMetadata('Flash', PACKAGE_VERSION, analyticsMetadata as AnalyticsMetadata);\n\n // Merge all refs including the rootRef if provided\n const mergedRef = useMergeRefs(ref, rootRef, elementRef, containerMeasureRef);\n const flashIconId = useUniqueId('flash-icon');\n const flashMessageId = useUniqueId('flash-message');\n\n const headerRefObject = useRef<HTMLDivElement>(null);\n const contentRefObject = useRef<HTMLDivElement>(null);\n const dismissButtonRefObject = useRef<ButtonProps.Ref>(null);\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children: content });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent, headerRefObject);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent, contentRefObject);\n\n const statusIconAriaLabel =\n props.statusIconAriaLabel ||\n i18nStrings?.[`${loading || type === 'in-progress' ? 'inProgress' : type}IconAriaLabel`];\n\n const iconType = ICON_TYPES[type];\n const icon = loading ? (\n <span role=\"img\" aria-label={statusIconAriaLabel}>\n <InternalSpinner />\n </span>\n ) : (\n <InternalIcon name={iconType} ariaLabel={statusIconAriaLabel} />\n );\n\n const effectiveType = loading ? 'info' : type;\n\n const analyticsAttributes: Record<string, string> = { [DATA_ATTR_ANALYTICS_FLASHBAR]: effectiveType };\n\n if (analyticsMetadata?.suppressFlowMetricEvents) {\n analyticsAttributes[DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS] = 'true';\n }\n\n return (\n <div\n ref={mergedRef}\n data-itemid={id}\n className={clsx(\n styles.flash,\n styles[`flash-type-${effectiveType}`],\n className,\n transitionState && {\n [styles.enter]: transitionState === 'enter',\n [styles.entering]: transitionState === 'entering',\n [styles.entered]: transitionState === 'entered',\n [styles.exit]: transitionState === 'exit',\n [styles.exiting]: transitionState === 'exiting',\n [styles.exited]: transitionState === 'exited',\n },\n getVisualContextClassname(type === 'warning' && !loading ? 'flashbar-warning' : 'flashbar'),\n initialHidden && styles['initial-hidden']\n )}\n style={getFlashStyles(style, effectiveType)}\n {...(ariaRole ? { role: ariaRole, 'aria-live': 'off' } : {})}\n {...analyticsAttributes}\n >\n <div className={styles['flash-body']}>\n <div\n className={styles['flash-focus-container']}\n tabIndex={-1}\n role=\"group\"\n aria-labelledby={`${flashIconId} ${flashMessageId}`}\n >\n <div className={clsx(styles['flash-icon'], styles['flash-text'])} id={flashIconId}>\n {icon}\n </div>\n <div className={clsx(styles['flash-message'], styles['flash-text'])} id={flashMessageId}>\n <div\n className={clsx(\n styles['flash-header'],\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(styles['header-replacement'], headerReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(\n styles['flash-content'],\n contentReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={contentRef}\n >\n {content}\n </div>\n <div\n className={clsx(styles['content-replacement'], contentReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles['action-button-wrapper']}\n testUtilClasses={{ actionSlot: styles['action-slot'], actionButton: styles['action-button'] }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={onButtonClick}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible &&\n dismissButton(\n dismissLabel,\n onDismiss,\n style,\n effectiveType,\n dismissButtonRefObject,\n id,\n onDismissed,\n persistenceConfig\n )}\n {ariaRole === 'status' && (\n <InternalLiveRegion sources={[statusIconAriaLabel, headerRefObject, contentRefObject]} />\n )}\n </div>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"flash.js","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAGjH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,4BAA4B,EAC5B,wCAAwC,GACzC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,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EACZ,SAAS,EACT,KAAK,EACL,aAAa,EACb,sBAAsB,EACtB,EAAE,EACF,WAAW,EACX,iBAAiB,CAClB;QACF,QAAQ,KAAK,QAAQ,IAAI,CACxB,oBAAC,kBAAkB,IAAC,OAAO,EAAE,CAAC,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,CAAC,GAAI,CAC1F,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport {\n useComponentMetadata,\n useMergeRefs,\n useUniqueId,\n warnOnce,\n} from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\nimport { AnalyticsMetadata } from '@cloudscape-design/component-toolkit/internal/base-component/metrics/interfaces';\n\nimport { ActionsWrapper } from '../alert/actions-wrapper';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalIcon from '../icon/internal';\nimport {\n DATA_ATTR_ANALYTICS_FLASHBAR,\n DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS,\n} from '../internal/analytics/selectors';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport { PACKAGE_VERSION } from '../internal/environment';\nimport { isDevelopment } from '../internal/is-development';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport InternalLiveRegion from '../live-region/internal';\nimport InternalSpinner from '../spinner/internal';\nimport { GeneratedAnalyticsMetadataFlashbarDismiss } from './analytics-metadata/interfaces';\nimport { FlashbarProps } from './interfaces';\nimport { getDismissButtonStyles, getFlashIconStyles, getFlashStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst ICON_TYPES = {\n success: 'status-positive',\n warning: 'status-warning',\n info: 'status-info',\n error: 'status-negative',\n 'in-progress': 'status-in-progress',\n} as const;\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.flashbar.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('flash', awsuiPluginsInternal.flashContent);\n\nfunction dismissButton(\n dismissLabel: FlashbarProps.MessageDefinition['dismissLabel'],\n onDismiss: FlashbarProps.MessageDefinition['onDismiss'],\n style?: FlashbarProps.Style,\n type?: string,\n ref?: React.Ref<ButtonProps.Ref>,\n id?: string,\n onDismissed?: (id?: string, persistenceConfig?: FlashbarProps.PersistenceConfig) => void,\n persistenceConfig?: FlashbarProps.PersistenceConfig\n) {\n return (\n <div\n className={styles['dismiss-button-wrapper']}\n {...getAnalyticsMetadataAttribute({ action: 'dismiss' } as Partial<GeneratedAnalyticsMetadataFlashbarDismiss>)}\n >\n <InternalButton\n ref={ref}\n onClick={event => {\n if (onDismiss) {\n onDismiss(event);\n }\n if (onDismissed) {\n onDismissed(id, persistenceConfig);\n }\n }}\n className={styles['dismiss-button']}\n variant=\"flashbar-icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissLabel}\n style={getDismissButtonStyles(style, type)}\n />\n </div>\n );\n}\nexport const focusFlashFocusableArea = (flash: HTMLElement | null) => {\n if (!flash) {\n return;\n }\n const dismissButton = flash.querySelector(`.${styles['dismiss-button']}`);\n const focusContainer = flash.querySelector(`.${styles['flash-focus-container']}`);\n\n if (dismissButton) {\n (dismissButton as HTMLElement).focus();\n } else if (focusContainer) {\n (focusContainer as HTMLElement).focus();\n }\n};\n\nexport function focusFlashById(element: HTMLElement | null, itemId: string) {\n if (!element) {\n return;\n }\n\n const flashElement = element.querySelector<HTMLElement>(`[data-itemid=\"${CSS.escape(itemId)}\"]`);\n if (!flashElement) {\n return;\n }\n\n const focusContainer = flashElement.querySelector<HTMLElement>(`.${styles['flash-focus-container']}`);\n focusContainer?.focus();\n}\n\ninterface FlashProps extends FlashbarProps.MessageDefinition {\n className: string;\n transitionState?: string;\n i18nStrings?: FlashbarProps.I18nStrings;\n style?: FlashbarProps.Style;\n rootRef?: React.Ref<HTMLDivElement>;\n onDismissed?: (id?: string) => void;\n}\n\nexport const Flash = React.forwardRef(\n (\n {\n id,\n header,\n content,\n dismissible,\n dismissLabel,\n loading,\n action,\n buttonText,\n onButtonClick,\n onDismiss,\n className,\n transitionState,\n ariaRole,\n i18nStrings,\n type = 'info',\n analyticsMetadata,\n style,\n rootRef,\n onDismissed,\n persistenceConfig,\n ...props\n }: FlashProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (isDevelopment) {\n if (buttonText && !onButtonClick) {\n warnOnce(\n 'Flashbar',\n `You provided a \\`buttonText\\` prop without an \\`onButtonClick\\` handler. This will render a non-interactive action button.`\n );\n }\n\n if (dismissible && !onDismiss) {\n warnOnce(\n 'Flashbar',\n `You have set the \\`dismissible\\` prop without an \\`onDismiss\\` handler. This will render a non-interactive dismiss button.`\n );\n }\n }\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n\n const elementRef = useComponentMetadata('Flash', PACKAGE_VERSION, analyticsMetadata as AnalyticsMetadata);\n\n // Merge all refs including the rootRef if provided\n const mergedRef = useMergeRefs(ref, rootRef, elementRef, containerMeasureRef);\n const flashIconId = useUniqueId('flash-icon');\n const flashMessageId = useUniqueId('flash-message');\n\n const headerRefObject = useRef<HTMLDivElement>(null);\n const contentRefObject = useRef<HTMLDivElement>(null);\n const dismissButtonRefObject = useRef<ButtonProps.Ref>(null);\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children: content });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent, headerRefObject);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent, contentRefObject);\n\n const statusIconAriaLabel =\n props.statusIconAriaLabel ||\n i18nStrings?.[`${loading || type === 'in-progress' ? 'inProgress' : type}IconAriaLabel`];\n\n const iconType = ICON_TYPES[type];\n const icon = loading ? (\n <span role=\"img\" aria-label={statusIconAriaLabel}>\n <InternalSpinner />\n </span>\n ) : (\n <InternalIcon name={iconType} ariaLabel={statusIconAriaLabel} />\n );\n\n const effectiveType = loading ? 'info' : type;\n\n const analyticsAttributes: Record<string, string> = { [DATA_ATTR_ANALYTICS_FLASHBAR]: effectiveType };\n\n if (analyticsMetadata?.suppressFlowMetricEvents) {\n analyticsAttributes[DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS] = 'true';\n }\n\n return (\n <div\n ref={mergedRef}\n data-itemid={id}\n className={clsx(\n styles.flash,\n styles[`flash-type-${effectiveType}`],\n className,\n transitionState && {\n [styles.enter]: transitionState === 'enter',\n [styles.entering]: transitionState === 'entering',\n [styles.entered]: transitionState === 'entered',\n [styles.exit]: transitionState === 'exit',\n [styles.exiting]: transitionState === 'exiting',\n [styles.exited]: transitionState === 'exited',\n },\n getVisualContextClassname(type === 'warning' && !loading ? 'flashbar-warning' : 'flashbar'),\n initialHidden && styles['initial-hidden']\n )}\n style={getFlashStyles(style, effectiveType)}\n {...(ariaRole ? { role: ariaRole, 'aria-live': 'off' } : {})}\n {...analyticsAttributes}\n >\n <div className={styles['flash-body']}>\n <div\n className={styles['flash-focus-container']}\n tabIndex={-1}\n role=\"group\"\n aria-labelledby={`${flashIconId} ${flashMessageId}`}\n >\n <div\n className={clsx(styles['flash-icon'], styles['flash-text'])}\n id={flashIconId}\n style={getFlashIconStyles(style, effectiveType)}\n >\n {icon}\n </div>\n <div className={clsx(styles['flash-message'], styles['flash-text'])} id={flashMessageId}>\n <div\n className={clsx(\n styles['flash-header'],\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(styles['header-replacement'], headerReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(\n styles['flash-content'],\n contentReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={contentRef}\n >\n {content}\n </div>\n <div\n className={clsx(styles['content-replacement'], contentReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles['action-button-wrapper']}\n testUtilClasses={{ actionSlot: styles['action-slot'], actionButton: styles['action-button'] }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={onButtonClick}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible &&\n dismissButton(\n dismissLabel,\n onDismiss,\n style,\n effectiveType,\n dismissButtonRefObject,\n id,\n onDismissed,\n persistenceConfig\n )}\n {ariaRole === 'status' && (\n <InternalLiveRegion sources={[statusIconAriaLabel, headerRefObject, contentRefObject]} />\n )}\n </div>\n );\n }\n);\n"]}
@@ -7,6 +7,9 @@ export declare function getCollapsibleFlashStyles(style: FlashbarProps['style'],
7
7
  borderWidth: string | undefined;
8
8
  color: string | undefined;
9
9
  } | undefined;
10
+ export declare function getFlashIconStyles(style: FlashbarProps['style'] | undefined, type?: string): {
11
+ color: string;
12
+ } | undefined;
10
13
  export declare function getFlashStyles(style: FlashbarProps['style'] | undefined, type?: string): {
11
14
  background?: string | undefined;
12
15
  borderColor?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/flashbar/style.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,MAAe;;;;;;;cA4B7F;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,GAAE,MAAe;;;;;;;cAqB9F;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,MAAe;;;;;;;;;;;;;cAqC1F;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;;;cA2CrE"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/flashbar/style.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,MAAe;;;;;;;cA4B7F;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,GAAE,MAAe;;cAQlG;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,GAAE,MAAe;;;;;;;cAqB9F;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,MAAe;;;;;;;;;;;;;cAqC1F;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;;;cA2CrE"}
@@ -25,6 +25,15 @@ export function getCollapsibleFlashStyles(style, type = 'info') {
25
25
  color,
26
26
  };
27
27
  }
28
+ export function getFlashIconStyles(style, type = 'info') {
29
+ var _a, _b, _c, _d;
30
+ if (SYSTEM !== 'core' || !style) {
31
+ return undefined;
32
+ }
33
+ const styleKey = getStylePropertyKey(type);
34
+ const color = ((_b = (_a = style === null || style === void 0 ? void 0 : style.item) === null || _a === void 0 ? void 0 : _a.root) === null || _b === void 0 ? void 0 : _b.color) && ((_d = (_c = style === null || style === void 0 ? void 0 : style.item) === null || _c === void 0 ? void 0 : _c.root) === null || _d === void 0 ? void 0 : _d.color[styleKey]);
35
+ return color ? { color } : undefined;
36
+ }
28
37
  export function getFlashStyles(style, type = 'info') {
29
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
30
39
  if (SYSTEM !== 'core' || !style) {
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/flashbar/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,UAAU,yBAAyB,CAAC,KAA6B,EAAE,OAAe,MAAM;;IAC5F,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QAChC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,IAA0B,CAAC,CAAC;IACjE,MAAM,UAAU,GACd,CAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,IAAI,0CAAE,UAAU,MAAI,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,IAAI,0CAAE,UAAU,CAAC,QAAmD,CAAC,CAAA,CAAC;IAEtH,MAAM,WAAW,GACf,CAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,IAAI,0CAAE,WAAW;SAC9B,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,IAAI,0CAAE,WAAW,CAAC,QAAoD,CAAC,CAAA,CAAC;IAEvF,MAAM,YAAY,GAAG,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,IAAI,0CAAE,YAAY,C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AAyB,CAAC,EAAE,OAAA,OAAA,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,4CAAE,YAAY,4CAAE,SAAS,4CAAE,WAAW;SACzG,CAAC;QACF,GAAG,CAAC,CAAA,OAAA,OAAA,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,4CAAE,YAAY,4CAAE,SAAS,4CAAE,YAAY,KAAI;YACnE,CAAC,cAAc,CAAC,0BAA0B,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,SAAS,CAAC,YAAY;SACvG,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { FlashbarProps } from './interfaces';\nimport { getStylePropertyKey } from './utils';\n\nexport function getCollapsibleFlashStyles(style: FlashbarProps['style'], type: string = 'info') {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n const styleKey = getStylePropertyKey(type as FlashbarProps.Type);\n const background =\n style?.item?.root?.background && style?.item?.root?.background[styleKey as keyof typeof style.item.root.background];\n\n const borderColor =\n style?.item?.root?.borderColor &&\n style?.item?.root?.borderColor[styleKey as keyof typeof style.item.root.borderColor];\n\n const borderRadius = style?.item?.root?.borderRadius;\n\n const borderWidth = style?.item?.root?.borderWidth;\n\n const borderStyle = style?.item?.root?.borderWidth && 'solid';\n\n const color = style?.item?.root?.color && style?.item?.root?.color[styleKey as keyof typeof style.item.root.color];\n\n return {\n background,\n borderColor,\n borderRadius,\n borderStyle,\n borderWidth,\n color,\n };\n}\n\nexport function getFlashStyles(style: FlashbarProps['style'] | undefined, type: string = 'info') {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n const focusRingBorderColor =\n style?.item?.root?.focusRing?.borderColor &&\n style.item.root.focusRing.borderColor[\n getStylePropertyKey(type as FlashbarProps.Type) as keyof typeof style.item.root.focusRing.borderColor\n ];\n\n return {\n ...getCollapsibleFlashStyles(style, type),\n ...(style?.item?.root?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: focusRingBorderColor,\n [customCssProps.styleFocusRingBorderRadius]: style.item.root.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style.item.root.focusRing?.borderWidth,\n }),\n ...(style?.item?.root?.focusRing?.borderRadius && {\n [customCssProps.styleFocusRingBorderRadius]: style.item.root.focusRing.borderRadius,\n }),\n };\n}\n\nexport function getDismissButtonStyles(style: FlashbarProps['style'], type: string = 'info') {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n const styleKey = getStylePropertyKey(type as FlashbarProps.Type);\n const activeColor =\n style?.item?.dismissButton?.color?.active &&\n style.item.dismissButton.color.active[styleKey as keyof typeof style.item.dismissButton.color.active];\n\n const defaultColor =\n style?.item?.dismissButton?.color?.default &&\n style.item.dismissButton.color.default[styleKey as keyof typeof style.item.dismissButton.color.default];\n\n const hoverColor =\n style?.item?.dismissButton?.color?.hover &&\n style.item.dismissButton.color.hover[styleKey as keyof typeof style.item.dismissButton.color.hover];\n\n const focusRingBorderColor =\n style?.item?.dismissButton?.focusRing?.borderColor &&\n style.item.dismissButton.focusRing.borderColor[\n styleKey as keyof typeof style.item.dismissButton.focusRing.borderColor\n ];\n\n return {\n root: {\n color: {\n active: activeColor,\n default: defaultColor,\n hover: hoverColor,\n },\n focusRing: {\n borderColor: focusRingBorderColor,\n borderRadius: style?.item?.dismissButton?.focusRing?.borderRadius,\n borderWidth: style?.item?.dismissButton?.focusRing?.borderWidth,\n },\n },\n };\n}\n\nexport function getNotificationBarStyles(style: FlashbarProps['style']) {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n return {\n borderRadius: style?.notificationBar?.root?.borderRadius,\n borderWidth: style?.notificationBar?.root?.borderWidth,\n ...(style?.notificationBar?.root?.background?.active && {\n [customCssProps.styleBackgroundActive]: style.notificationBar.root.background.active,\n }),\n ...(style?.notificationBar?.root?.background?.default && {\n [customCssProps.styleBackgroundDefault]: style.notificationBar.root.background.default,\n }),\n ...(style?.notificationBar?.root?.background?.hover && {\n [customCssProps.styleBackgroundHover]: style.notificationBar.root.background.hover,\n }),\n ...(style?.notificationBar?.root?.borderColor?.active && {\n [customCssProps.styleBorderColorActive]: style.notificationBar.root.borderColor.active,\n }),\n ...(style?.notificationBar?.root?.borderColor?.default && {\n [customCssProps.styleBorderColorDefault]: style.notificationBar.root.borderColor.default,\n }),\n ...(style?.notificationBar?.root?.borderColor?.hover && {\n [customCssProps.styleBorderColorHover]: style.notificationBar.root.borderColor.hover,\n }),\n ...(style?.notificationBar?.root?.color?.active && {\n [customCssProps.styleColorActive]: style.notificationBar.root.color.active,\n }),\n ...(style?.notificationBar?.root?.color?.default && {\n [customCssProps.styleColorDefault]: style.notificationBar.root.color.default,\n }),\n ...(style?.notificationBar?.root?.color?.hover && {\n [customCssProps.styleColorHover]: style.notificationBar.root.color.hover,\n }),\n ...(style?.notificationBar?.expandButton?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: style?.notificationBar?.expandButton?.focusRing?.borderColor,\n [customCssProps.styleFocusRingBorderRadius]: style?.notificationBar?.expandButton?.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style?.notificationBar?.expandButton?.focusRing?.borderWidth,\n }),\n ...(style?.notificationBar?.expandButton?.focusRing?.borderRadius && {\n [customCssProps.styleFocusRingBorderRadius]: style.notificationBar.expandButton.focusRing.borderRadius,\n }),\n };\n}\n"]}
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/flashbar/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,UAAU,y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eAAe,4CAAE,YAAY,4CAAE,SAAS,4CAAE,YAAY;YAC1G,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,OAAA,OAAA,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,4CAAE,YAAY,4CAAE,SAAS,4CAAE,WAAW;SACzG,CAAC;QACF,GAAG,CAAC,CAAA,OAAA,OAAA,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,4CAAE,YAAY,4CAAE,SAAS,4CAAE,YAAY,KAAI;YACnE,CAAC,cAAc,CAAC,0BAA0B,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,SAAS,CAAC,YAAY;SACvG,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { FlashbarProps } from './interfaces';\nimport { getStylePropertyKey } from './utils';\n\nexport function getCollapsibleFlashStyles(style: FlashbarProps['style'], type: string = 'info') {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n const styleKey = getStylePropertyKey(type as FlashbarProps.Type);\n const background =\n style?.item?.root?.background && style?.item?.root?.background[styleKey as keyof typeof style.item.root.background];\n\n const borderColor =\n style?.item?.root?.borderColor &&\n style?.item?.root?.borderColor[styleKey as keyof typeof style.item.root.borderColor];\n\n const borderRadius = style?.item?.root?.borderRadius;\n\n const borderWidth = style?.item?.root?.borderWidth;\n\n const borderStyle = style?.item?.root?.borderWidth && 'solid';\n\n const color = style?.item?.root?.color && style?.item?.root?.color[styleKey as keyof typeof style.item.root.color];\n\n return {\n background,\n borderColor,\n borderRadius,\n borderStyle,\n borderWidth,\n color,\n };\n}\n\nexport function getFlashIconStyles(style: FlashbarProps['style'] | undefined, type: string = 'info') {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n const styleKey = getStylePropertyKey(type as FlashbarProps.Type);\n const color = style?.item?.root?.color && style?.item?.root?.color[styleKey as keyof typeof style.item.root.color];\n\n return color ? { color } : undefined;\n}\n\nexport function getFlashStyles(style: FlashbarProps['style'] | undefined, type: string = 'info') {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n const focusRingBorderColor =\n style?.item?.root?.focusRing?.borderColor &&\n style.item.root.focusRing.borderColor[\n getStylePropertyKey(type as FlashbarProps.Type) as keyof typeof style.item.root.focusRing.borderColor\n ];\n\n return {\n ...getCollapsibleFlashStyles(style, type),\n ...(style?.item?.root?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: focusRingBorderColor,\n [customCssProps.styleFocusRingBorderRadius]: style.item.root.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style.item.root.focusRing?.borderWidth,\n }),\n ...(style?.item?.root?.focusRing?.borderRadius && {\n [customCssProps.styleFocusRingBorderRadius]: style.item.root.focusRing.borderRadius,\n }),\n };\n}\n\nexport function getDismissButtonStyles(style: FlashbarProps['style'], type: string = 'info') {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n const styleKey = getStylePropertyKey(type as FlashbarProps.Type);\n const activeColor =\n style?.item?.dismissButton?.color?.active &&\n style.item.dismissButton.color.active[styleKey as keyof typeof style.item.dismissButton.color.active];\n\n const defaultColor =\n style?.item?.dismissButton?.color?.default &&\n style.item.dismissButton.color.default[styleKey as keyof typeof style.item.dismissButton.color.default];\n\n const hoverColor =\n style?.item?.dismissButton?.color?.hover &&\n style.item.dismissButton.color.hover[styleKey as keyof typeof style.item.dismissButton.color.hover];\n\n const focusRingBorderColor =\n style?.item?.dismissButton?.focusRing?.borderColor &&\n style.item.dismissButton.focusRing.borderColor[\n styleKey as keyof typeof style.item.dismissButton.focusRing.borderColor\n ];\n\n return {\n root: {\n color: {\n active: activeColor,\n default: defaultColor,\n hover: hoverColor,\n },\n focusRing: {\n borderColor: focusRingBorderColor,\n borderRadius: style?.item?.dismissButton?.focusRing?.borderRadius,\n borderWidth: style?.item?.dismissButton?.focusRing?.borderWidth,\n },\n },\n };\n}\n\nexport function getNotificationBarStyles(style: FlashbarProps['style']) {\n if (SYSTEM !== 'core' || !style) {\n return undefined;\n }\n return {\n borderRadius: style?.notificationBar?.root?.borderRadius,\n borderWidth: style?.notificationBar?.root?.borderWidth,\n ...(style?.notificationBar?.root?.background?.active && {\n [customCssProps.styleBackgroundActive]: style.notificationBar.root.background.active,\n }),\n ...(style?.notificationBar?.root?.background?.default && {\n [customCssProps.styleBackgroundDefault]: style.notificationBar.root.background.default,\n }),\n ...(style?.notificationBar?.root?.background?.hover && {\n [customCssProps.styleBackgroundHover]: style.notificationBar.root.background.hover,\n }),\n ...(style?.notificationBar?.root?.borderColor?.active && {\n [customCssProps.styleBorderColorActive]: style.notificationBar.root.borderColor.active,\n }),\n ...(style?.notificationBar?.root?.borderColor?.default && {\n [customCssProps.styleBorderColorDefault]: style.notificationBar.root.borderColor.default,\n }),\n ...(style?.notificationBar?.root?.borderColor?.hover && {\n [customCssProps.styleBorderColorHover]: style.notificationBar.root.borderColor.hover,\n }),\n ...(style?.notificationBar?.root?.color?.active && {\n [customCssProps.styleColorActive]: style.notificationBar.root.color.active,\n }),\n ...(style?.notificationBar?.root?.color?.default && {\n [customCssProps.styleColorDefault]: style.notificationBar.root.color.default,\n }),\n ...(style?.notificationBar?.root?.color?.hover && {\n [customCssProps.styleColorHover]: style.notificationBar.root.color.hover,\n }),\n ...(style?.notificationBar?.expandButton?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: style?.notificationBar?.expandButton?.focusRing?.borderColor,\n [customCssProps.styleFocusRingBorderRadius]: style?.notificationBar?.expandButton?.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style?.notificationBar?.expandButton?.focusRing?.borderWidth,\n }),\n ...(style?.notificationBar?.expandButton?.focusRing?.borderRadius && {\n [customCssProps.styleFocusRingBorderRadius]: style.notificationBar.expandButton.focusRing.borderRadius,\n }),\n };\n}\n"]}
@@ -1,55 +1,55 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "flash-with-motion": "awsui_flash-with-motion_1q84n_b2j4j_157",
5
- "enter": "awsui_enter_1q84n_b2j4j_157",
6
- "flash-body": "awsui_flash-body_1q84n_b2j4j_171",
7
- "flash-message": "awsui_flash-message_1q84n_b2j4j_171",
8
- "flash-header": "awsui_flash-header_1q84n_b2j4j_171",
9
- "flash-content": "awsui_flash-content_1q84n_b2j4j_172",
10
- "action-button-wrapper": "awsui_action-button-wrapper_1q84n_b2j4j_173",
11
- "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_b2j4j_174",
12
- "flash-icon": "awsui_flash-icon_1q84n_b2j4j_197",
13
- "entering": "awsui_entering_1q84n_b2j4j_210",
14
- "entered": "awsui_entered_1q84n_b2j4j_231",
15
- "exiting": "awsui_exiting_1q84n_b2j4j_336",
16
- "stack": "awsui_stack_1q84n_b2j4j_370",
17
- "animation-running": "awsui_animation-running_1q84n_b2j4j_370",
18
- "item": "awsui_item_1q84n_b2j4j_370",
19
- "flash-list-item": "awsui_flash-list-item_1q84n_b2j4j_371",
20
- "notification-bar": "awsui_notification-bar_1q84n_b2j4j_372",
21
- "collapsed": "awsui_collapsed_1q84n_b2j4j_392",
22
- "animation-ready": "awsui_animation-ready_1q84n_b2j4j_392",
23
- "expanded-only": "awsui_expanded-only_1q84n_b2j4j_392",
24
- "expanded": "awsui_expanded_1q84n_b2j4j_392",
25
- "flash": "awsui_flash_1q84n_b2j4j_157",
26
- "collapsible": "awsui_collapsible_1q84n_b2j4j_448",
27
- "short-list": "awsui_short-list_1q84n_b2j4j_454",
28
- "visual-refresh": "awsui_visual-refresh_1q84n_b2j4j_454",
29
- "status": "awsui_status_1q84n_b2j4j_601",
30
- "header": "awsui_header_1q84n_b2j4j_601",
31
- "item-count": "awsui_item-count_1q84n_b2j4j_602",
32
- "button": "awsui_button_1q84n_b2j4j_603",
33
- "type-count": "awsui_type-count_1q84n_b2j4j_636",
34
- "count-number": "awsui_count-number_1q84n_b2j4j_636",
35
- "icon": "awsui_icon_1q84n_b2j4j_674",
36
- "floating": "awsui_floating_1q84n_b2j4j_715",
37
- "flashbar": "awsui_flashbar_1q84n_b2j4j_719",
38
- "initial-hidden": "awsui_initial-hidden_1q84n_b2j4j_778",
39
- "flash-list": "awsui_flash-list_1q84n_b2j4j_371",
40
- "flash-focus-container": "awsui_flash-focus-container_1q84n_b2j4j_802",
41
- "flash-text": "awsui_flash-text_1q84n_b2j4j_832",
42
- "hidden": "awsui_hidden_1q84n_b2j4j_851",
43
- "header-replacement": "awsui_header-replacement_1q84n_b2j4j_856",
44
- "content-replacement": "awsui_content-replacement_1q84n_b2j4j_861",
45
- "dismiss-button": "awsui_dismiss-button_1q84n_b2j4j_174",
46
- "action-wrapped": "awsui_action-wrapped_1q84n_b2j4j_879",
47
- "action-button": "awsui_action-button_1q84n_b2j4j_173",
48
- "action-slot": "awsui_action-slot_1q84n_b2j4j_886",
49
- "flash-type-success": "awsui_flash-type-success_1q84n_b2j4j_890",
50
- "flash-type-error": "awsui_flash-type-error_1q84n_b2j4j_894",
51
- "flash-type-info": "awsui_flash-type-info_1q84n_b2j4j_898",
52
- "flash-type-in-progress": "awsui_flash-type-in-progress_1q84n_b2j4j_899",
53
- "flash-type-warning": "awsui_flash-type-warning_1q84n_b2j4j_903"
4
+ "flash-with-motion": "awsui_flash-with-motion_1q84n_my9pl_157",
5
+ "enter": "awsui_enter_1q84n_my9pl_157",
6
+ "flash-body": "awsui_flash-body_1q84n_my9pl_171",
7
+ "flash-message": "awsui_flash-message_1q84n_my9pl_171",
8
+ "flash-header": "awsui_flash-header_1q84n_my9pl_171",
9
+ "flash-content": "awsui_flash-content_1q84n_my9pl_172",
10
+ "action-button-wrapper": "awsui_action-button-wrapper_1q84n_my9pl_173",
11
+ "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_my9pl_174",
12
+ "flash-icon": "awsui_flash-icon_1q84n_my9pl_197",
13
+ "entering": "awsui_entering_1q84n_my9pl_210",
14
+ "entered": "awsui_entered_1q84n_my9pl_231",
15
+ "exiting": "awsui_exiting_1q84n_my9pl_336",
16
+ "stack": "awsui_stack_1q84n_my9pl_370",
17
+ "animation-running": "awsui_animation-running_1q84n_my9pl_370",
18
+ "item": "awsui_item_1q84n_my9pl_370",
19
+ "flash-list-item": "awsui_flash-list-item_1q84n_my9pl_371",
20
+ "notification-bar": "awsui_notification-bar_1q84n_my9pl_372",
21
+ "collapsed": "awsui_collapsed_1q84n_my9pl_392",
22
+ "animation-ready": "awsui_animation-ready_1q84n_my9pl_392",
23
+ "expanded-only": "awsui_expanded-only_1q84n_my9pl_392",
24
+ "expanded": "awsui_expanded_1q84n_my9pl_392",
25
+ "flash": "awsui_flash_1q84n_my9pl_157",
26
+ "collapsible": "awsui_collapsible_1q84n_my9pl_448",
27
+ "short-list": "awsui_short-list_1q84n_my9pl_454",
28
+ "visual-refresh": "awsui_visual-refresh_1q84n_my9pl_454",
29
+ "status": "awsui_status_1q84n_my9pl_601",
30
+ "header": "awsui_header_1q84n_my9pl_601",
31
+ "item-count": "awsui_item-count_1q84n_my9pl_602",
32
+ "button": "awsui_button_1q84n_my9pl_603",
33
+ "type-count": "awsui_type-count_1q84n_my9pl_636",
34
+ "count-number": "awsui_count-number_1q84n_my9pl_636",
35
+ "icon": "awsui_icon_1q84n_my9pl_674",
36
+ "floating": "awsui_floating_1q84n_my9pl_715",
37
+ "flashbar": "awsui_flashbar_1q84n_my9pl_719",
38
+ "initial-hidden": "awsui_initial-hidden_1q84n_my9pl_779",
39
+ "flash-list": "awsui_flash-list_1q84n_my9pl_371",
40
+ "flash-focus-container": "awsui_flash-focus-container_1q84n_my9pl_803",
41
+ "flash-text": "awsui_flash-text_1q84n_my9pl_833",
42
+ "hidden": "awsui_hidden_1q84n_my9pl_852",
43
+ "header-replacement": "awsui_header-replacement_1q84n_my9pl_857",
44
+ "content-replacement": "awsui_content-replacement_1q84n_my9pl_862",
45
+ "dismiss-button": "awsui_dismiss-button_1q84n_my9pl_174",
46
+ "action-wrapped": "awsui_action-wrapped_1q84n_my9pl_880",
47
+ "action-button": "awsui_action-button_1q84n_my9pl_173",
48
+ "action-slot": "awsui_action-slot_1q84n_my9pl_887",
49
+ "flash-type-success": "awsui_flash-type-success_1q84n_my9pl_891",
50
+ "flash-type-error": "awsui_flash-type-error_1q84n_my9pl_899",
51
+ "flash-type-info": "awsui_flash-type-info_1q84n_my9pl_907",
52
+ "flash-type-in-progress": "awsui_flash-type-in-progress_1q84n_my9pl_908",
53
+ "flash-type-warning": "awsui_flash-type-warning_1q84n_my9pl_917"
54
54
  };
55
55