@cloudscape-design/components 3.0.1193 → 3.0.1195

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 (36) hide show
  1. package/cards/index.d.ts.map +1 -1
  2. package/cards/index.js +8 -10
  3. package/cards/index.js.map +1 -1
  4. package/cards/styles.css.js +38 -39
  5. package/cards/styles.scoped.css +43 -158
  6. package/cards/styles.selectors.js +38 -39
  7. package/error-boundary/fallback.js +3 -3
  8. package/error-boundary/fallback.js.map +1 -1
  9. package/error-boundary/utils.d.ts +1 -0
  10. package/error-boundary/utils.d.ts.map +1 -1
  11. package/error-boundary/utils.js +23 -2
  12. package/error-boundary/utils.js.map +1 -1
  13. package/internal/base-component/styles.scoped.css +1 -1
  14. package/internal/components/card/index.d.ts +14 -0
  15. package/internal/components/card/index.d.ts.map +1 -0
  16. package/internal/components/card/index.js +16 -0
  17. package/internal/components/card/index.js.map +1 -0
  18. package/internal/components/card/interfaces.d.ts +44 -0
  19. package/internal/components/card/interfaces.d.ts.map +1 -0
  20. package/internal/components/card/interfaces.js +2 -0
  21. package/internal/components/card/interfaces.js.map +1 -0
  22. package/internal/components/card/styles.css.js +16 -0
  23. package/internal/components/card/styles.scoped.css +316 -0
  24. package/internal/components/card/styles.selectors.js +17 -0
  25. package/internal/components/chart-popover/index.js +1 -1
  26. package/internal/components/chart-popover/index.js.map +1 -1
  27. package/internal/environment.js +2 -2
  28. package/internal/environment.json +2 -2
  29. package/internal/manifest.json +1 -1
  30. package/package.json +1 -1
  31. package/test-utils/dom/cards/index.d.ts +0 -5
  32. package/test-utils/dom/cards/index.js +0 -5
  33. package/test-utils/dom/cards/index.js.map +1 -1
  34. package/test-utils/selectors/cards/index.d.ts +0 -5
  35. package/test-utils/selectors/cards/index.js +0 -5
  36. package/test-utils/selectors/cards/index.js.map +1 -1
@@ -2,44 +2,43 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "card-inner": "awsui_card-inner_p8a6i_flb7q_161",
6
- "root": "awsui_root_p8a6i_flb7q_193",
7
- "header-variant-full-page": "awsui_header-variant-full-page_p8a6i_flb7q_232",
8
- "header-refresh": "awsui_header-refresh_p8a6i_flb7q_232",
9
- "list": "awsui_list_p8a6i_flb7q_239",
10
- "list-grid-1": "awsui_list-grid-1_p8a6i_flb7q_250",
11
- "card": "awsui_card_p8a6i_flb7q_161",
12
- "list-grid-2": "awsui_list-grid-2_p8a6i_flb7q_253",
13
- "list-grid-3": "awsui_list-grid-3_p8a6i_flb7q_256",
14
- "list-grid-4": "awsui_list-grid-4_p8a6i_flb7q_259",
15
- "list-grid-5": "awsui_list-grid-5_p8a6i_flb7q_262",
16
- "list-grid-6": "awsui_list-grid-6_p8a6i_flb7q_265",
17
- "list-grid-7": "awsui_list-grid-7_p8a6i_flb7q_268",
18
- "list-grid-8": "awsui_list-grid-8_p8a6i_flb7q_271",
19
- "list-grid-9": "awsui_list-grid-9_p8a6i_flb7q_274",
20
- "list-grid-10": "awsui_list-grid-10_p8a6i_flb7q_277",
21
- "list-grid-11": "awsui_list-grid-11_p8a6i_flb7q_280",
22
- "list-grid-12": "awsui_list-grid-12_p8a6i_flb7q_283",
23
- "list-grid-13": "awsui_list-grid-13_p8a6i_flb7q_286",
24
- "list-grid-14": "awsui_list-grid-14_p8a6i_flb7q_289",
25
- "list-grid-15": "awsui_list-grid-15_p8a6i_flb7q_292",
26
- "list-grid-16": "awsui_list-grid-16_p8a6i_flb7q_295",
27
- "list-grid-17": "awsui_list-grid-17_p8a6i_flb7q_298",
28
- "list-grid-18": "awsui_list-grid-18_p8a6i_flb7q_301",
29
- "list-grid-19": "awsui_list-grid-19_p8a6i_flb7q_304",
30
- "list-grid-20": "awsui_list-grid-20_p8a6i_flb7q_307",
31
- "selection-control": "awsui_selection-control_p8a6i_flb7q_311",
32
- "loading": "awsui_loading_p8a6i_flb7q_321",
33
- "empty": "awsui_empty_p8a6i_flb7q_322",
34
- "has-header": "awsui_has-header_p8a6i_flb7q_329",
35
- "refresh": "awsui_refresh_p8a6i_flb7q_332",
36
- "card-header": "awsui_card-header_p8a6i_flb7q_404",
37
- "card-header-inner": "awsui_card-header-inner_p8a6i_flb7q_412",
38
- "card-selectable": "awsui_card-selectable_p8a6i_flb7q_416",
39
- "card-selected": "awsui_card-selected_p8a6i_flb7q_419",
40
- "section": "awsui_section_p8a6i_flb7q_427",
41
- "section-header": "awsui_section-header_p8a6i_flb7q_435",
42
- "section-content": "awsui_section-content_p8a6i_flb7q_441",
43
- "footer-pagination": "awsui_footer-pagination_p8a6i_flb7q_451"
5
+ "root": "awsui_root_p8a6i_1f3e4_145",
6
+ "header-variant-full-page": "awsui_header-variant-full-page_p8a6i_1f3e4_177",
7
+ "header-refresh": "awsui_header-refresh_p8a6i_1f3e4_177",
8
+ "list": "awsui_list_p8a6i_1f3e4_184",
9
+ "list-grid-1": "awsui_list-grid-1_p8a6i_1f3e4_195",
10
+ "card": "awsui_card_p8a6i_1f3e4_195",
11
+ "list-grid-2": "awsui_list-grid-2_p8a6i_1f3e4_198",
12
+ "list-grid-3": "awsui_list-grid-3_p8a6i_1f3e4_201",
13
+ "list-grid-4": "awsui_list-grid-4_p8a6i_1f3e4_204",
14
+ "list-grid-5": "awsui_list-grid-5_p8a6i_1f3e4_207",
15
+ "list-grid-6": "awsui_list-grid-6_p8a6i_1f3e4_210",
16
+ "list-grid-7": "awsui_list-grid-7_p8a6i_1f3e4_213",
17
+ "list-grid-8": "awsui_list-grid-8_p8a6i_1f3e4_216",
18
+ "list-grid-9": "awsui_list-grid-9_p8a6i_1f3e4_219",
19
+ "list-grid-10": "awsui_list-grid-10_p8a6i_1f3e4_222",
20
+ "list-grid-11": "awsui_list-grid-11_p8a6i_1f3e4_225",
21
+ "list-grid-12": "awsui_list-grid-12_p8a6i_1f3e4_228",
22
+ "list-grid-13": "awsui_list-grid-13_p8a6i_1f3e4_231",
23
+ "list-grid-14": "awsui_list-grid-14_p8a6i_1f3e4_234",
24
+ "list-grid-15": "awsui_list-grid-15_p8a6i_1f3e4_237",
25
+ "list-grid-16": "awsui_list-grid-16_p8a6i_1f3e4_240",
26
+ "list-grid-17": "awsui_list-grid-17_p8a6i_1f3e4_243",
27
+ "list-grid-18": "awsui_list-grid-18_p8a6i_1f3e4_246",
28
+ "list-grid-19": "awsui_list-grid-19_p8a6i_1f3e4_249",
29
+ "list-grid-20": "awsui_list-grid-20_p8a6i_1f3e4_252",
30
+ "selection-control": "awsui_selection-control_p8a6i_1f3e4_256",
31
+ "loading": "awsui_loading_p8a6i_1f3e4_266",
32
+ "empty": "awsui_empty_p8a6i_1f3e4_267",
33
+ "has-header": "awsui_has-header_p8a6i_1f3e4_274",
34
+ "refresh": "awsui_refresh_p8a6i_1f3e4_277",
35
+ "card-header": "awsui_card-header_p8a6i_1f3e4_293",
36
+ "card-header-inner": "awsui_card-header-inner_p8a6i_1f3e4_301",
37
+ "card-header-inner-selectable": "awsui_card-header-inner-selectable_p8a6i_1f3e4_304",
38
+ "card-selected": "awsui_card-selected_p8a6i_1f3e4_307",
39
+ "section": "awsui_section_p8a6i_1f3e4_311",
40
+ "section-header": "awsui_section-header_p8a6i_1f3e4_318",
41
+ "section-content": "awsui_section-content_p8a6i_1f3e4_324",
42
+ "footer-pagination": "awsui_footer-pagination_p8a6i_1f3e4_336"
44
43
  };
45
44
 
@@ -7,7 +7,7 @@ import InternalAlert from '../alert/internal';
7
7
  import InternalButton from '../button/internal';
8
8
  import { useInternalI18n } from '../i18n/context';
9
9
  import { getBaseProps } from '../internal/base-component';
10
- import { refreshPage } from './utils';
10
+ import { canUseRefresh, refreshPage } from './utils';
11
11
  import styles from './styles.css.js';
12
12
  import testUtilStyles from './test-classes/styles.css.js';
13
13
  export function ErrorBoundaryFallback({ i18nStrings = {}, renderFallback, ...props }) {
@@ -18,8 +18,8 @@ export function ErrorBoundaryFallback({ i18nStrings = {}, renderFallback, ...pro
18
18
  React.createElement(DefaultHeaderContent, { i18nStrings: i18nStrings }))),
19
19
  description: (React.createElement("div", { className: clsx(styles.description, testUtilStyles.description) },
20
20
  React.createElement(DefaultDescriptionContent, { i18nStrings: i18nStrings }))),
21
- action: (React.createElement("div", { className: clsx(styles.action, testUtilStyles.action) },
22
- React.createElement(DefaultActionContent, { i18nStrings: i18nStrings }))),
21
+ action: canUseRefresh() ? (React.createElement("div", { className: clsx(styles.action, testUtilStyles.action) },
22
+ React.createElement(DefaultActionContent, { i18nStrings: i18nStrings }))) : null,
23
23
  };
24
24
  return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, testUtilStyles.fallback) }, (_a = renderFallback === null || renderFallback === void 0 ? void 0 : renderFallback(defaultSlots)) !== null && _a !== void 0 ? _a : (React.createElement(InternalAlert, { type: "error", header: defaultSlots.header, action: defaultSlots.action }, defaultSlots.description))));
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fallback.js","sourceRoot":"","sources":["../../../src/error-boundary/fallback.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AAEnD,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,MAAM,UAAU,qBAAqB,CAAC,EACpC,WAAW,GAAG,EAAE,EAChB,cAAc,EACd,GAAG,KAAK,EACmD;;IAC3D,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACt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,WAAW,EAAoD;IAC7F,MAAM,IAAI,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAC/C,OAAO,CACL,oBAAC,cAAc,IAAC,QAAQ,EAAC,SAAS,EAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC,gBAAgB,CAAC,IACjG,IAAI,CAAC,+BAA+B,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,iBAAiB,CAAC,CACvD,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\nimport IntlMessageFormat from 'intl-messageformat';\n\nimport InternalAlert from '../alert/internal';\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { ErrorBoundaryProps } from './interfaces';\nimport { refreshPage } from './utils';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport function ErrorBoundaryFallback({\n i18nStrings = {},\n renderFallback,\n ...props\n}: Pick<ErrorBoundaryProps, 'renderFallback' | 'i18nStrings'>) {\n const baseProps = getBaseProps(props);\n const defaultSlots = {\n header: (\n <div className={clsx(styles.header, testUtilStyles.header)}>\n <DefaultHeaderContent i18nStrings={i18nStrings} />\n </div>\n ),\n description: (\n <div className={clsx(styles.description, testUtilStyles.description)}>\n <DefaultDescriptionContent i18nStrings={i18nStrings} />\n </div>\n ),\n action: (\n <div className={clsx(styles.action, testUtilStyles.action)}>\n <DefaultActionContent i18nStrings={i18nStrings} />\n </div>\n ),\n };\n return (\n <div {...baseProps} className={clsx(baseProps.className, testUtilStyles.fallback)}>\n {renderFallback?.(defaultSlots) ?? (\n <InternalAlert type=\"error\" header={defaultSlots.header} action={defaultSlots.action}>\n {defaultSlots.description}\n </InternalAlert>\n )}\n </div>\n );\n}\n\nfunction DefaultHeaderContent({ i18nStrings }: { i18nStrings: ErrorBoundaryProps.I18nStrings }) {\n const i18n = useInternalI18n('error-boundary');\n return <>{i18n('i18nStrings.headerText', i18nStrings?.headerText)}</>;\n}\n\nfunction DefaultDescriptionContent({\n i18nStrings: { descriptionText, components: { Feedback } = {} } = {},\n}: {\n i18nStrings: ErrorBoundaryProps.I18nStrings;\n}) {\n const i18n = useInternalI18n('error-boundary');\n\n // Dependencies for the intl-format function, where the pseudo-tags are declared as functions from parsed chunks.\n const formatArgs = Feedback\n ? {\n hasFeedback: true,\n Feedback: (chunks: React.ReactNode[]) => (\n <span className={testUtilStyles['feedback-action']}>\n <Feedback>{chunks[0] ?? ''}</Feedback>\n </span>\n ),\n }\n : { hasFeedback: false, Feedback: () => <></> };\n\n // This ensures that the description string provided via i18nStrings also supports the <Feedback> injection,\n // because the i18n() helper propagates the second argument as is, without applying intl-format to it.\n // We wrap the format with try-catch to avoid intl errors caused by incorrectly referenced components.\n function safeFormat(descriptionText?: string) {\n try {\n return descriptionText ? new IntlMessageFormat(descriptionText).format(formatArgs) : undefined;\n } catch {\n return descriptionText;\n }\n }\n const message = i18n('i18nStrings.descriptionText', safeFormat(descriptionText), format => format(formatArgs));\n\n // When the description includes <Feedback>, then the translated message is represented as an array of strings and\n // React elements that require keys when rendering to avoid React warnings.\n return (\n <>\n {Array.isArray(message) ? message.map((chunk, i) => <React.Fragment key={i}>{chunk}</React.Fragment>) : message}\n </>\n );\n}\n\nfunction DefaultActionContent({ i18nStrings }: { i18nStrings?: ErrorBoundaryProps.I18nStrings }) {\n const i18n = useInternalI18n('error-boundary');\n return (\n <InternalButton iconName=\"refresh\" onClick={refreshPage} className={testUtilStyles['refresh-action']}>\n {i18n('i18nStrings.refreshActionText', i18nStrings?.refreshActionText)}\n </InternalButton>\n );\n}\n"]}
1
+ {"version":3,"file":"fallback.js","sourceRoot":"","sources":["../../../src/error-boundary/fallback.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,M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AAe,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACjG,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,eAAe,CAAC;QACzB,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,6BAA6B,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAE/G,kHAAkH;IAClH,2EAA2E;IAC3E,OAAO,CACL,0CACG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,CAAC,IAAG,KAAK,CAAkB,CAAC,CAAC,CAAC,CAAC,OAAO,CAC9G,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,EAAE,WAAW,EAAoD;IAC7F,MAAM,IAAI,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAC/C,OAAO,CACL,oBAAC,cAAc,IAAC,QAAQ,EAAC,SAAS,EAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC,gBAAgB,CAAC,IACjG,IAAI,CAAC,+BAA+B,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,iBAAiB,CAAC,CACvD,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\nimport IntlMessageFormat from 'intl-messageformat';\n\nimport InternalAlert from '../alert/internal';\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { ErrorBoundaryProps } from './interfaces';\nimport { canUseRefresh, refreshPage } from './utils';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport function ErrorBoundaryFallback({\n i18nStrings = {},\n renderFallback,\n ...props\n}: Pick<ErrorBoundaryProps, 'renderFallback' | 'i18nStrings'>) {\n const baseProps = getBaseProps(props);\n const defaultSlots = {\n header: (\n <div className={clsx(styles.header, testUtilStyles.header)}>\n <DefaultHeaderContent i18nStrings={i18nStrings} />\n </div>\n ),\n description: (\n <div className={clsx(styles.description, testUtilStyles.description)}>\n <DefaultDescriptionContent i18nStrings={i18nStrings} />\n </div>\n ),\n action: canUseRefresh() ? (\n <div className={clsx(styles.action, testUtilStyles.action)}>\n <DefaultActionContent i18nStrings={i18nStrings} />\n </div>\n ) : null,\n };\n return (\n <div {...baseProps} className={clsx(baseProps.className, testUtilStyles.fallback)}>\n {renderFallback?.(defaultSlots) ?? (\n <InternalAlert type=\"error\" header={defaultSlots.header} action={defaultSlots.action}>\n {defaultSlots.description}\n </InternalAlert>\n )}\n </div>\n );\n}\n\nfunction DefaultHeaderContent({ i18nStrings }: { i18nStrings: ErrorBoundaryProps.I18nStrings }) {\n const i18n = useInternalI18n('error-boundary');\n return <>{i18n('i18nStrings.headerText', i18nStrings?.headerText)}</>;\n}\n\nfunction DefaultDescriptionContent({\n i18nStrings: { descriptionText, components: { Feedback } = {} } = {},\n}: {\n i18nStrings: ErrorBoundaryProps.I18nStrings;\n}) {\n const i18n = useInternalI18n('error-boundary');\n\n // Dependencies for the intl-format function, where the pseudo-tags are declared as functions from parsed chunks.\n const formatArgs = Feedback\n ? {\n hasFeedback: true,\n Feedback: (chunks: React.ReactNode[]) => (\n <span className={testUtilStyles['feedback-action']}>\n <Feedback>{chunks[0] ?? ''}</Feedback>\n </span>\n ),\n }\n : { hasFeedback: false, Feedback: () => <></> };\n\n // This ensures that the description string provided via i18nStrings also supports the <Feedback> injection,\n // because the i18n() helper propagates the second argument as is, without applying intl-format to it.\n // We wrap the format with try-catch to avoid intl errors caused by incorrectly referenced components.\n function safeFormat(descriptionText?: string) {\n try {\n return descriptionText ? new IntlMessageFormat(descriptionText).format(formatArgs) : undefined;\n } catch {\n return descriptionText;\n }\n }\n const message = i18n('i18nStrings.descriptionText', safeFormat(descriptionText), format => format(formatArgs));\n\n // When the description includes <Feedback>, then the translated message is represented as an array of strings and\n // React elements that require keys when rendering to avoid React warnings.\n return (\n <>\n {Array.isArray(message) ? message.map((chunk, i) => <React.Fragment key={i}>{chunk}</React.Fragment>) : message}\n </>\n );\n}\n\nfunction DefaultActionContent({ i18nStrings }: { i18nStrings?: ErrorBoundaryProps.I18nStrings }) {\n const i18n = useInternalI18n('error-boundary');\n return (\n <InternalButton iconName=\"refresh\" onClick={refreshPage} className={testUtilStyles['refresh-action']}>\n {i18n('i18nStrings.refreshActionText', i18nStrings?.refreshActionText)}\n </InternalButton>\n );\n}\n"]}
@@ -1 +1,2 @@
1
+ export declare function canUseRefresh(): boolean;
1
2
  export declare function refreshPage(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,SAE1B"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,IAAI,OAAO,CAQvC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAMlC"}
@@ -1,7 +1,28 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- /* istanbul ignore next */
3
+ // The default refresh action reloads the top window to avoid iframe lifecycle getting out of sync with the parent page.
4
+ // This is not possible from cross-origin iframes, in which case the default refresh action must be hidden.
5
+ export function canUseRefresh() {
6
+ try {
7
+ // In cross-origin iframes, accessing top.location can throw a SecurityError.
8
+ void getTopWindow().location.href;
9
+ return true;
10
+ }
11
+ catch {
12
+ return false;
13
+ }
14
+ }
4
15
  export function refreshPage() {
5
- window.location.reload();
16
+ try {
17
+ getTopWindow().location.reload();
18
+ }
19
+ catch {
20
+ // noop
21
+ }
22
+ }
23
+ // In browsers, window.top is always defined, but it is treated as optional by our current DOM types.
24
+ function getTopWindow() {
25
+ var _a;
26
+ return (_a = window.top) !== null && _a !== void 0 ? _a : window;
6
27
  }
7
28
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/error-boundary/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,0BAA0B;AAC1B,MAAM,UAAU,WAAW;IACzB,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n/* istanbul ignore next */\nexport function refreshPage() {\n window.location.reload();\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/error-boundary/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,wHAAwH;AACxH,2GAA2G;AAC3G,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC;QACH,6EAA6E;QAC7E,KAAK,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,IAAI,CAAC;QACH,YAAY,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;AACH,CAAC;AAED,qGAAqG;AACrG,SAAS,YAAY;;IACnB,OAAO,MAAA,MAAM,CAAC,GAAG,mCAAI,MAAM,CAAC;AAC9B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// The default refresh action reloads the top window to avoid iframe lifecycle getting out of sync with the parent page.\n// This is not possible from cross-origin iframes, in which case the default refresh action must be hidden.\nexport function canUseRefresh(): boolean {\n try {\n // In cross-origin iframes, accessing top.location can throw a SecurityError.\n void getTopWindow().location.href;\n return true;\n } catch {\n return false;\n }\n}\n\nexport function refreshPage(): void {\n try {\n getTopWindow().location.reload();\n } catch {\n // noop\n }\n}\n\n// In browsers, window.top is always defined, but it is treated as optional by our current DOM types.\nfunction getTopWindow(): Window {\n return window.top ?? window;\n}\n"]}
@@ -2034,5 +2034,5 @@ body {
2034
2034
  }
2035
2035
  }
2036
2036
  :root {
2037
- --awsui-version-info-ed206118: true;
2037
+ --awsui-version-info-62efe831: true;
2038
2038
  }
@@ -0,0 +1,14 @@
1
+ import { InternalCardProps } from './interfaces';
2
+ export default function Card({
3
+ actions,
4
+ selected,
5
+ children,
6
+ className,
7
+ header,
8
+ description,
9
+ icon,
10
+ metadataAttributes,
11
+ onClick,
12
+ disableHeaderPaddings,
13
+ disableContentPaddings
14
+ }: InternalCardProps): JSX.Element;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/card/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIjD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,MAAM,EACN,WAAW,EACX,IAAI,EACJ,kBAAkB,EAClB,OAAO,EACP,qBAAqB,EACrB,sBAAsB,GACvB,EAAE,iBAAiB,eAqCnB"}
@@ -0,0 +1,16 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React from 'react';
4
+ import clsx from 'clsx';
5
+ import { useVisualRefresh } from '../../hooks/use-visual-mode';
6
+ import InternalStructuredItem from '../structured-item';
7
+ import styles from './styles.css.js';
8
+ export default function Card({ actions, selected, children, className, header, description, icon, metadataAttributes, onClick, disableHeaderPaddings, disableContentPaddings, }) {
9
+ const isRefresh = useVisualRefresh();
10
+ const headerRowEmpty = !header && !description && !icon && !actions;
11
+ return (React.createElement("div", { className: clsx(className, styles.root, selected && styles.selected, headerRowEmpty && styles['no-header'], !children && styles['no-content'], isRefresh && styles.refresh), ...metadataAttributes, onClick: onClick },
12
+ React.createElement("div", { className: clsx(styles.header, disableHeaderPaddings && styles['no-padding'], !!actions && styles['with-actions']) },
13
+ React.createElement(InternalStructuredItem, { content: header && React.createElement("div", { className: styles['header-inner'] }, header), secondaryContent: description && React.createElement("div", { className: styles.description }, description), icon: icon, actions: actions, disablePaddings: disableHeaderPaddings, wrapActions: false })),
14
+ React.createElement("div", { className: clsx(styles.body, disableContentPaddings && styles['no-padding']) }, children)));
15
+ }
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/card/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,sBAAsB,MAAM,oBAAoB,CAAC;AAGxD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,MAAM,EACN,WAAW,EACX,IAAI,EACJ,kBAAkB,EAClB,OAAO,EACP,qBAAqB,EACrB,sBAAsB,GACJ;IAClB,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IAErC,MAAM,cAAc,GAAG,CAAC,MAAM,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC;IAEpE,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,SAAS,EACT,MAAM,CAAC,IAAI,EACX,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAC3B,cAAc,IAAI,MAAM,CAAC,WAAW,CAAC,EACrC,CAAC,QAAQ,IAAI,MAAM,CAAC,YAAY,CAAC,EACjC,SAAS,IAAI,MAAM,CAAC,OAAO,CAC5B,KACG,kBAAkB,EACtB,OAAO,EAAE,OAAO;QAEhB,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,MAAM,EACb,qBAAqB,IAAI,MAAM,CAAC,YAAY,CAAC,EAC7C,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC,cAAc,CAAC,CACpC;YAED,oBAAC,sBAAsB,IACrB,OAAO,EAAE,MAAM,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAAG,MAAM,CAAO,EACzE,gBAAgB,EAAE,WAAW,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,WAAW,IAAG,WAAW,CAAO,EACxF,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,qBAAqB,EACtC,WAAW,EAAE,KAAK,GAClB,CACE;QACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAsB,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,IAAG,QAAQ,CAAO,CAC/F,CACP,CAAC;AACJ,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 { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport InternalStructuredItem from '../structured-item';\nimport { InternalCardProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport default function Card({\n actions,\n selected,\n children,\n className,\n header,\n description,\n icon,\n metadataAttributes,\n onClick,\n disableHeaderPaddings,\n disableContentPaddings,\n}: InternalCardProps) {\n const isRefresh = useVisualRefresh();\n\n const headerRowEmpty = !header && !description && !icon && !actions;\n\n return (\n <div\n className={clsx(\n className,\n styles.root,\n selected && styles.selected,\n headerRowEmpty && styles['no-header'],\n !children && styles['no-content'],\n isRefresh && styles.refresh\n )}\n {...metadataAttributes}\n onClick={onClick}\n >\n <div\n className={clsx(\n styles.header,\n disableHeaderPaddings && styles['no-padding'],\n !!actions && styles['with-actions']\n )}\n >\n <InternalStructuredItem\n content={header && <div className={styles['header-inner']}>{header}</div>}\n secondaryContent={description && <div className={styles.description}>{description}</div>}\n icon={icon}\n actions={actions}\n disablePaddings={disableHeaderPaddings}\n wrapActions={false}\n />\n </div>\n <div className={clsx(styles.body, disableContentPaddings && styles['no-padding'])}>{children}</div>\n </div>\n );\n}\n"]}
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { BaseComponentProps } from '../../base-component';
3
+ export interface BaseCardProps extends BaseComponentProps {
4
+ /**
5
+ * Heading text.
6
+ */
7
+ header?: React.ReactNode;
8
+ /**
9
+ * Supplementary text below the heading.
10
+ */
11
+ description?: React.ReactNode;
12
+ /**
13
+ * Specifies actions for the card.
14
+ */
15
+ actions?: React.ReactNode;
16
+ /**
17
+ * Primary content displayed in the card.
18
+ */
19
+ children?: React.ReactNode;
20
+ /**
21
+ * Icon which will be displayed at the top of the card,
22
+ * aligned with the start of the content.
23
+ */
24
+ icon?: React.ReactNode;
25
+ /**
26
+ * Determines whether the card header has padding. If `true`, removes the default padding from the header.
27
+ */
28
+ disableHeaderPaddings?: boolean;
29
+ /**
30
+ * Determines whether the card content has padding. If `true`, removes the default padding from the content area.
31
+ */
32
+ disableContentPaddings?: boolean;
33
+ }
34
+ export interface InternalCardProps extends BaseCardProps {
35
+ /**
36
+ * Called when the user clicks on the card.
37
+ */
38
+ onClick?: React.MouseEventHandler<HTMLElement>;
39
+ /**
40
+ * Specifies whether the card is in active state.
41
+ */
42
+ selected?: boolean;
43
+ metadataAttributes?: Record<string, string | undefined>;
44
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/card/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAE/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACzD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/card/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../../base-component';\n\nexport interface BaseCardProps extends BaseComponentProps {\n /**\n * Heading text.\n */\n header?: React.ReactNode;\n\n /**\n * Supplementary text below the heading.\n */\n description?: React.ReactNode;\n\n /**\n * Specifies actions for the card.\n */\n actions?: React.ReactNode;\n\n /**\n * Primary content displayed in the card.\n */\n children?: React.ReactNode;\n\n /**\n * Icon which will be displayed at the top of the card,\n * aligned with the start of the content.\n */\n icon?: React.ReactNode;\n\n /**\n * Determines whether the card header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n * Determines whether the card content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n}\n\nexport interface InternalCardProps extends BaseCardProps {\n /**\n * Called when the user clicks on the card.\n */\n onClick?: React.MouseEventHandler<HTMLElement>;\n\n /**\n * Specifies whether the card is in active state.\n */\n selected?: boolean;\n\n metadataAttributes?: Record<string, string | undefined>;\n}\n"]}
@@ -0,0 +1,16 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "root": "awsui_root_1xxz5_z70nj_153",
5
+ "refresh": "awsui_refresh_1xxz5_z70nj_258",
6
+ "header": "awsui_header_1xxz5_z70nj_266",
7
+ "no-padding": "awsui_no-padding_1xxz5_z70nj_266",
8
+ "with-actions": "awsui_with-actions_1xxz5_z70nj_270",
9
+ "header-inner": "awsui_header-inner_1xxz5_z70nj_278",
10
+ "body": "awsui_body_1xxz5_z70nj_287",
11
+ "no-header": "awsui_no-header_1xxz5_z70nj_297",
12
+ "no-content": "awsui_no-content_1xxz5_z70nj_298",
13
+ "selected": "awsui_selected_1xxz5_z70nj_306",
14
+ "description": "awsui_description_1xxz5_z70nj_314"
15
+ };
16
+
@@ -0,0 +1,316 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /*
6
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
+ SPDX-License-Identifier: Apache-2.0
8
+ */
9
+ /*
10
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
+ SPDX-License-Identifier: Apache-2.0
12
+ */
13
+ /*
14
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
15
+ SPDX-License-Identifier: Apache-2.0
16
+ */
17
+ /*
18
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
+ SPDX-License-Identifier: Apache-2.0
20
+ */
21
+ /*
22
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
23
+ SPDX-License-Identifier: Apache-2.0
24
+ */
25
+ /*
26
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
27
+ SPDX-License-Identifier: Apache-2.0
28
+ */
29
+ /*
30
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
31
+ SPDX-License-Identifier: Apache-2.0
32
+ */
33
+ /*
34
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
35
+ SPDX-License-Identifier: Apache-2.0
36
+ */
37
+ /*
38
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
39
+ SPDX-License-Identifier: Apache-2.0
40
+ */
41
+ /*
42
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
43
+ SPDX-License-Identifier: Apache-2.0
44
+ */
45
+ /*
46
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
47
+ SPDX-License-Identifier: Apache-2.0
48
+ */
49
+ /*
50
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
+ SPDX-License-Identifier: Apache-2.0
52
+ */
53
+ /*
54
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
55
+ SPDX-License-Identifier: Apache-2.0
56
+ */
57
+ /*
58
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
59
+ SPDX-License-Identifier: Apache-2.0
60
+ */
61
+ /*
62
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
63
+ SPDX-License-Identifier: Apache-2.0
64
+ */
65
+ /*
66
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
67
+ SPDX-License-Identifier: Apache-2.0
68
+ */
69
+ /*
70
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
71
+ SPDX-License-Identifier: Apache-2.0
72
+ */
73
+ /*
74
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
75
+ SPDX-License-Identifier: Apache-2.0
76
+ */
77
+ /*
78
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
79
+ SPDX-License-Identifier: Apache-2.0
80
+ */
81
+ /*
82
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
83
+ SPDX-License-Identifier: Apache-2.0
84
+ */
85
+ /*
86
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
87
+ SPDX-License-Identifier: Apache-2.0
88
+ */
89
+ /*
90
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
+ SPDX-License-Identifier: Apache-2.0
92
+ */
93
+ /*
94
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
+ SPDX-License-Identifier: Apache-2.0
96
+ */
97
+ /*
98
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
99
+ SPDX-License-Identifier: Apache-2.0
100
+ */
101
+ /*
102
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
103
+ SPDX-License-Identifier: Apache-2.0
104
+ */
105
+ /*
106
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
107
+ SPDX-License-Identifier: Apache-2.0
108
+ */
109
+ /*
110
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
111
+ SPDX-License-Identifier: Apache-2.0
112
+ */
113
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
114
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
115
+ /*
116
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
117
+ SPDX-License-Identifier: Apache-2.0
118
+ */
119
+ /*
120
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
121
+ SPDX-License-Identifier: Apache-2.0
122
+ */
123
+ /*
124
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
125
+ SPDX-License-Identifier: Apache-2.0
126
+ */
127
+ /*
128
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
129
+ SPDX-License-Identifier: Apache-2.0
130
+ */
131
+ /*
132
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
133
+ SPDX-License-Identifier: Apache-2.0
134
+ */
135
+ /*
136
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
137
+ SPDX-License-Identifier: Apache-2.0
138
+ */
139
+ /*
140
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
141
+ SPDX-License-Identifier: Apache-2.0
142
+ */
143
+ /* Style used for links in slots/components that are text heavy, to help links stand out among
144
+ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
+ /*
146
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
147
+ SPDX-License-Identifier: Apache-2.0
148
+ */
149
+ /*
150
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
151
+ SPDX-License-Identifier: Apache-2.0
152
+ */
153
+ .awsui_root_1xxz5_z70nj_153:not(#\9) {
154
+ transition-property: background-color;
155
+ transition-duration: var(--motion-duration-transition-show-paced-t8d1os, 180ms);
156
+ transition-timing-function: var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
157
+ }
158
+ @media (prefers-reduced-motion: reduce) {
159
+ .awsui_root_1xxz5_z70nj_153:not(#\9) {
160
+ animation: none;
161
+ transition: none;
162
+ }
163
+ }
164
+ .awsui-motion-disabled .awsui_root_1xxz5_z70nj_153:not(#\9), .awsui-mode-entering .awsui_root_1xxz5_z70nj_153:not(#\9) {
165
+ animation: none;
166
+ transition: none;
167
+ }
168
+
169
+ .awsui_root_1xxz5_z70nj_153:not(#\9)::before {
170
+ transition-property: border-top-color, border-right-color, border-bottom-color, border-left-color;
171
+ transition-duration: var(--motion-duration-transition-show-paced-t8d1os, 180ms);
172
+ transition-timing-function: var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
173
+ }
174
+ @media (prefers-reduced-motion: reduce) {
175
+ .awsui_root_1xxz5_z70nj_153:not(#\9)::before {
176
+ animation: none;
177
+ transition: none;
178
+ }
179
+ }
180
+ .awsui-motion-disabled .awsui_root_1xxz5_z70nj_153:not(#\9)::before, .awsui-mode-entering .awsui_root_1xxz5_z70nj_153:not(#\9)::before {
181
+ animation: none;
182
+ transition: none;
183
+ }
184
+
185
+ .awsui_root_1xxz5_z70nj_153:not(#\9) {
186
+ border-collapse: separate;
187
+ border-spacing: 0;
188
+ box-sizing: border-box;
189
+ caption-side: top;
190
+ cursor: auto;
191
+ direction: inherit;
192
+ empty-cells: show;
193
+ font-family: serif;
194
+ font-style: normal;
195
+ font-variant: normal;
196
+ font-stretch: normal;
197
+ hyphens: none;
198
+ letter-spacing: normal;
199
+ list-style: disc outside none;
200
+ tab-size: 8;
201
+ text-align: start;
202
+ text-indent: 0;
203
+ text-shadow: none;
204
+ text-transform: none;
205
+ visibility: visible;
206
+ white-space: normal;
207
+ word-spacing: normal;
208
+ font-size: var(--font-size-body-m-a7nh2n, 14px);
209
+ line-height: var(--line-height-body-m-2mh3ke, 20px);
210
+ color: var(--color-text-body-default-vvtq8u, #0f141a);
211
+ font-weight: 400;
212
+ font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
213
+ -webkit-font-smoothing: auto;
214
+ -moz-osx-font-smoothing: auto;
215
+ box-sizing: border-box;
216
+ position: relative;
217
+ background-color: var(--color-background-container-content-6u8rvp, #ffffff);
218
+ min-inline-size: 0;
219
+ border-start-start-radius: var(--border-radius-container-nsfwmm, 16px);
220
+ border-start-end-radius: var(--border-radius-container-nsfwmm, 16px);
221
+ border-end-start-radius: var(--border-radius-container-nsfwmm, 16px);
222
+ border-end-end-radius: var(--border-radius-container-nsfwmm, 16px);
223
+ box-sizing: border-box;
224
+ }
225
+ .awsui_root_1xxz5_z70nj_153:not(#\9)::before {
226
+ content: "";
227
+ position: absolute;
228
+ inset-inline-start: 0px;
229
+ inset-block-start: 0px;
230
+ inline-size: 100%;
231
+ block-size: 100%;
232
+ pointer-events: none;
233
+ background: transparent;
234
+ box-sizing: border-box;
235
+ border-color: transparent;
236
+ border-block-start: var(--border-container-top-width-n1eke6, 0px) solid var(--color-border-container-top-k3vmoz, transparent);
237
+ border-start-start-radius: var(--border-radius-container-nsfwmm, 16px);
238
+ border-start-end-radius: var(--border-radius-container-nsfwmm, 16px);
239
+ border-end-start-radius: var(--border-radius-container-nsfwmm, 16px);
240
+ border-end-end-radius: var(--border-radius-container-nsfwmm, 16px);
241
+ z-index: 1;
242
+ }
243
+ .awsui_root_1xxz5_z70nj_153:not(#\9)::after {
244
+ content: "";
245
+ position: absolute;
246
+ inset-inline-start: 0px;
247
+ inset-block-start: 0px;
248
+ inline-size: 100%;
249
+ block-size: 100%;
250
+ pointer-events: none;
251
+ background: transparent;
252
+ box-sizing: border-box;
253
+ border-start-start-radius: var(--border-radius-container-nsfwmm, 16px);
254
+ border-start-end-radius: var(--border-radius-container-nsfwmm, 16px);
255
+ border-end-start-radius: var(--border-radius-container-nsfwmm, 16px);
256
+ border-end-end-radius: var(--border-radius-container-nsfwmm, 16px);
257
+ }
258
+ .awsui_root_1xxz5_z70nj_153:not(#\9):not(.awsui_refresh_1xxz5_z70nj_258)::after {
259
+ box-shadow: var(--shadow-container-53ltfv, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
260
+ }
261
+ .awsui_root_1xxz5_z70nj_153.awsui_refresh_1xxz5_z70nj_258:not(#\9)::after {
262
+ border-block: solid var(--border-divider-section-width-uwo8my, 1px) var(--color-border-divider-default-nr68jt, #c6c6cd);
263
+ border-inline: solid var(--border-divider-section-width-uwo8my, 1px) var(--color-border-divider-default-nr68jt, #c6c6cd);
264
+ }
265
+
266
+ .awsui_header_1xxz5_z70nj_266:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266) {
267
+ padding-block-end: var(--space-xxs-hwfkai, 4px);
268
+ padding-inline-start: var(--space-card-horizontal-8o8t31, 20px);
269
+ }
270
+ .awsui_header_1xxz5_z70nj_266:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266):not(.awsui_with-actions_1xxz5_z70nj_270) {
271
+ padding-block-start: calc(var(--space-card-vertical-uad0cc, 16px) - var(--space-scaled-xxs-pfm1nx, 4px));
272
+ padding-inline-end: var(--space-card-horizontal-8o8t31, 20px);
273
+ }
274
+ .awsui_header_1xxz5_z70nj_266:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266).awsui_with-actions_1xxz5_z70nj_270 {
275
+ padding-block-start: calc(var(--space-card-vertical-uad0cc, 16px) - var(--space-scaled-xxs-pfm1nx, 4px) - var(--space-scaled-xxs-pfm1nx, 4px));
276
+ padding-inline-end: calc(var(--space-card-horizontal-8o8t31, 20px) - var(--space-xxs-hwfkai, 4px));
277
+ }
278
+ .awsui_header-inner_1xxz5_z70nj_278:not(#\9) {
279
+ font-size: var(--font-size-heading-s-zp08en, 16px);
280
+ line-height: var(--line-height-heading-s-hmi4vc, 20px);
281
+ letter-spacing: var(--letter-spacing-heading-s-4st9ep, -0.005em);
282
+ font-weight: var(--font-weight-heading-s-lcx0ai, 700);
283
+ -webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
284
+ -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
285
+ }
286
+
287
+ .awsui_body_1xxz5_z70nj_287:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266) {
288
+ padding-block-start: var(--space-xxs-hwfkai, 4px);
289
+ padding-block-end: var(--space-card-vertical-uad0cc, 16px);
290
+ padding-inline: var(--space-card-horizontal-8o8t31, 20px);
291
+ }
292
+ .awsui_body_1xxz5_z70nj_287.awsui_no-padding_1xxz5_z70nj_266:not(#\9) {
293
+ border-end-start-radius: var(--border-radius-container-nsfwmm, 16px);
294
+ border-end-end-radius: var(--border-radius-container-nsfwmm, 16px);
295
+ }
296
+
297
+ .awsui_no-header_1xxz5_z70nj_297 > .awsui_header_1xxz5_z70nj_266:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266),
298
+ .awsui_no-content_1xxz5_z70nj_298 > .awsui_header_1xxz5_z70nj_266:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266) {
299
+ padding-block-end: 0;
300
+ }
301
+ .awsui_no-header_1xxz5_z70nj_297 > .awsui_body_1xxz5_z70nj_287:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266),
302
+ .awsui_no-content_1xxz5_z70nj_298 > .awsui_body_1xxz5_z70nj_287:not(#\9):not(.awsui_no-padding_1xxz5_z70nj_266) {
303
+ padding-block-start: 0;
304
+ }
305
+
306
+ .awsui_selected_1xxz5_z70nj_306:not(#\9) {
307
+ background-color: var(--color-background-item-selected-9gppru, #f0fbff);
308
+ }
309
+ .awsui_selected_1xxz5_z70nj_306:not(#\9)::before {
310
+ border-block: var(--border-item-width-miijiw, 2px) solid var(--color-border-item-selected-wl5ttm, #006ce0);
311
+ border-inline: var(--border-item-width-miijiw, 2px) solid var(--color-border-item-selected-wl5ttm, #006ce0);
312
+ }
313
+
314
+ .awsui_description_1xxz5_z70nj_314:not(#\9) {
315
+ color: var(--color-text-heading-secondary-iwtvf6, #424650);
316
+ }