@cloudscape-design/components 3.0.316 → 3.0.318

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 (73) hide show
  1. package/app-layout/index.d.ts.map +1 -1
  2. package/app-layout/index.js +19 -2
  3. package/app-layout/index.js.map +1 -1
  4. package/app-layout/runtime-api.d.ts +8 -0
  5. package/app-layout/runtime-api.d.ts.map +1 -0
  6. package/app-layout/runtime-api.js +32 -0
  7. package/app-layout/runtime-api.js.map +1 -0
  8. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  9. package/expandable-section/expandable-section-header.js +24 -10
  10. package/expandable-section/expandable-section-header.js.map +1 -1
  11. package/expandable-section/interfaces.d.ts +1 -1
  12. package/expandable-section/interfaces.js.map +1 -1
  13. package/expandable-section/internal.d.ts.map +1 -1
  14. package/expandable-section/internal.js +2 -1
  15. package/expandable-section/internal.js.map +1 -1
  16. package/expandable-section/styles.css.js +31 -27
  17. package/expandable-section/styles.scoped.css +69 -57
  18. package/expandable-section/styles.selectors.js +31 -27
  19. package/expandable-section/utils.d.ts +3 -0
  20. package/expandable-section/utils.d.ts.map +1 -0
  21. package/expandable-section/utils.js +4 -0
  22. package/expandable-section/utils.js.map +1 -0
  23. package/header/internal.d.ts +5 -1
  24. package/header/internal.d.ts.map +1 -1
  25. package/header/internal.js +6 -1
  26. package/header/internal.js.map +1 -1
  27. package/internal/environment.js +1 -1
  28. package/internal/manifest.json +1 -1
  29. package/internal/plugins/api.d.ts +15 -0
  30. package/internal/plugins/api.d.ts.map +1 -0
  31. package/internal/plugins/api.js +50 -0
  32. package/internal/plugins/api.js.map +1 -0
  33. package/internal/plugins/drawers-controller.d.ts +17 -0
  34. package/internal/plugins/drawers-controller.d.ts.map +1 -0
  35. package/internal/plugins/drawers-controller.js +34 -0
  36. package/internal/plugins/drawers-controller.js.map +1 -0
  37. package/internal/plugins/index.d.ts +2 -0
  38. package/internal/plugins/index.d.ts.map +1 -0
  39. package/internal/plugins/index.js +4 -0
  40. package/internal/plugins/index.js.map +1 -0
  41. package/package.json +1 -1
  42. package/table/body-cell/td-element.d.ts +1 -1
  43. package/table/body-cell/td-element.d.ts.map +1 -1
  44. package/table/body-cell/td-element.js +1 -1
  45. package/table/body-cell/td-element.js.map +1 -1
  46. package/table/column-widths-utils.d.ts +3 -0
  47. package/table/column-widths-utils.d.ts.map +1 -0
  48. package/table/column-widths-utils.js +16 -0
  49. package/table/column-widths-utils.js.map +1 -0
  50. package/table/header-cell/index.d.ts +2 -2
  51. package/table/header-cell/index.d.ts.map +1 -1
  52. package/table/header-cell/index.js +1 -1
  53. package/table/header-cell/index.js.map +1 -1
  54. package/table/internal.d.ts.map +1 -1
  55. package/table/internal.js +14 -9
  56. package/table/internal.js.map +1 -1
  57. package/table/resizer/index.d.ts.map +1 -1
  58. package/table/resizer/index.js +2 -2
  59. package/table/resizer/index.js.map +1 -1
  60. package/table/thead.d.ts +1 -0
  61. package/table/thead.d.ts.map +1 -1
  62. package/table/thead.js +4 -4
  63. package/table/thead.js.map +1 -1
  64. package/table/use-column-widths.d.ts +10 -8
  65. package/table/use-column-widths.d.ts.map +1 -1
  66. package/table/use-column-widths.js +30 -47
  67. package/table/use-column-widths.js.map +1 -1
  68. package/table/use-sticky-columns.d.ts +6 -8
  69. package/table/use-sticky-columns.d.ts.map +1 -1
  70. package/table/use-sticky-columns.js +0 -1
  71. package/table/use-sticky-columns.js.map +1 -1
  72. package/test-utils/dom/app-layout/index.d.ts +1 -1
  73. package/test-utils/tsconfig.tsbuildinfo +1 -1
@@ -12,6 +12,7 @@ import { fireNonCancelableEvent } from '../internal/events';
12
12
  import styles from './styles.css.js';
13
13
  import { ExpandableSectionContainer } from './expandable-section-container';
14
14
  import { ExpandableSectionHeader } from './expandable-section-header';
15
+ import { variantSupportsDescription } from './utils';
15
16
  export default function InternalExpandableSection(_a) {
16
17
  var { expanded: controlledExpanded, defaultExpanded, onChange, variant = 'default', children, header, headerText, headerCounter, headerDescription, headerInfo, headerActions, headingTagOverride, disableContentPaddings, headerAriaLabel, __internalRootRef } = _a, props = __rest(_a, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "headerText", "headerCounter", "headerDescription", "headerInfo", "headerActions", "headingTagOverride", "disableContentPaddings", "headerAriaLabel", "__internalRootRef"]);
17
18
  const ref = useRef(null);
@@ -53,6 +54,6 @@ export default function InternalExpandableSection(_a) {
53
54
  };
54
55
  return (React.createElement(ExpandableSectionContainer, Object.assign({}, baseProps, { expanded: expanded, className: clsx(baseProps.className, styles.root), variant: variant, disableContentPaddings: disableContentPaddings, header: React.createElement(ExpandableSectionHeader, Object.assign({ id: triggerControlId, descriptionId: descriptionId, className: clsx(styles.header, styles[`header-${variant}`]), variant: variant, expanded: !!expanded, header: header, headerText: headerText, headerDescription: headerDescription, headerCounter: headerCounter, headerInfo: headerInfo, headerActions: headerActions, headingTagOverride: headingTagOverride }, triggerProps)), __internalRootRef: __internalRootRef }),
55
56
  React.createElement(CSSTransition, { in: expanded, timeout: 30, classNames: { enter: styles['content-enter'] }, nodeRef: ref },
56
- React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles[`content-${variant}`], expanded && styles['content-expanded']), role: "group", "aria-label": triggerProps.ariaLabel, "aria-labelledby": triggerProps.ariaLabelledBy, "aria-describedby": variant === 'container' && headerDescription ? descriptionId : undefined }, children))));
57
+ React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles[`content-${variant}`], expanded && styles['content-expanded']), role: "group", "aria-label": triggerProps.ariaLabel, "aria-labelledby": triggerProps.ariaLabelledBy, "aria-describedby": variantSupportsDescription(variant) && headerDescription ? descriptionId : undefined }, children))));
57
58
  }
58
59
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["expandable-section/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,MA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ates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEvent, useCallback, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\nimport { fireNonCancelableEvent } from '../internal/events';\n\nimport { ExpandableSectionProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { ExpandableSectionContainer } from './expandable-section-container';\nimport { ExpandableSectionHeader } from './expandable-section-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\ntype InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;\n\nexport default function InternalExpandableSection({\n expanded: controlledExpanded,\n defaultExpanded,\n onChange,\n variant = 'default',\n children,\n header,\n headerText,\n headerCounter,\n headerDescription,\n headerInfo,\n headerActions,\n headingTagOverride,\n disableContentPaddings,\n headerAriaLabel,\n __internalRootRef,\n ...props\n}: InternalExpandableSectionProps) {\n const ref = useRef<HTMLDivElement>(null);\n const controlId = useUniqueId();\n const triggerControlId = `${controlId}-trigger`;\n const descriptionId = `${controlId}-description`;\n\n const baseProps = getBaseProps(props);\n const [expanded, setExpanded] = useControllable(controlledExpanded, onChange, defaultExpanded, {\n componentName: 'ExpandableSection',\n controlledProp: 'expanded',\n changeHandler: 'onChange',\n });\n\n const onExpandChange = useCallback(\n (expanded: boolean) => {\n setExpanded(expanded);\n fireNonCancelableEvent(onChange, { expanded });\n },\n [onChange, setExpanded]\n );\n\n const onClick = useCallback(() => {\n onExpandChange(!expanded);\n }, [onExpandChange, expanded]);\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent<Element>) => {\n const interactionKeys = [KeyCode.enter, KeyCode.space];\n\n if (interactionKeys.indexOf(event.keyCode) !== -1) {\n onExpandChange(!expanded);\n }\n },\n [onExpandChange, expanded]\n );\n\n const onKeyDown = useCallback((event: KeyboardEvent<Element>) => {\n if (event.keyCode === KeyCode.space) {\n // Prevent the page from scrolling when toggling the component with the space bar.\n event.preventDefault();\n }\n }, []);\n\n const triggerProps = {\n ariaControls: controlId,\n ariaLabel: headerAriaLabel,\n ariaLabelledBy: headerAriaLabel ? undefined : triggerControlId,\n onKeyUp,\n onKeyDown,\n onClick,\n };\n\n return (\n <ExpandableSectionContainer\n {...baseProps}\n expanded={expanded}\n className={clsx(baseProps.className, styles.root)}\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n header={\n <ExpandableSectionHeader\n id={triggerControlId}\n descriptionId={descriptionId}\n className={clsx(styles.header, styles[`header-${variant}`])}\n variant={variant}\n expanded={!!expanded}\n header={header}\n headerText={headerText}\n headerDescription={headerDescription}\n headerCounter={headerCounter}\n headerInfo={headerInfo}\n headerActions={headerActions}\n headingTagOverride={headingTagOverride}\n {...triggerProps}\n />\n }\n __internalRootRef={__internalRootRef}\n >\n <CSSTransition in={expanded} timeout={30} classNames={{ enter: styles['content-enter'] }} nodeRef={ref}>\n <div\n id={controlId}\n ref={ref}\n className={clsx(styles.content, styles[`content-${variant}`], expanded && styles['content-expanded'])}\n role=\"group\"\n aria-label={triggerProps.ariaLabel}\n aria-labelledby={triggerProps.ariaLabelledBy}\n aria-describedby={variant === 'container' && headerDescription ? descriptionId : undefined}\n >\n {children}\n </div>\n </CSSTransition>\n </ExpandableSectionContainer>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["expandable-section/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EA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,sBAAsB,EAC9C,MAAM,EACJ,oBAAC,uBAAuB,kBACtB,EAAE,EAAE,gBAAgB,EACpB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,EAC3D,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,CAAC,QAAQ,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,IAClC,YAAY,EAChB,EAEJ,iBAAiB,EAAE,iBAAiB;QAEpC,oBAAC,aAAa,IAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG;YACpG,6BACE,EAAE,EAAE,SAAS,EACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,EACrG,IAAI,EAAC,OAAO,gBACA,YAAY,CAAC,SAAS,qBACjB,YAAY,CAAC,cAAc,sBAC1B,0BAA0B,CAAC,OAAO,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,IAErG,QAAQ,CACL,CACQ,CACW,CAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEvent, useCallback, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { KeyCode } from '../internal/keycode';\nimport { fireNonCancelableEvent } from '../internal/events';\n\nimport { ExpandableSectionProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { ExpandableSectionContainer } from './expandable-section-container';\nimport { ExpandableSectionHeader } from './expandable-section-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { variantSupportsDescription } from './utils';\n\ntype InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;\n\nexport default function InternalExpandableSection({\n expanded: controlledExpanded,\n defaultExpanded,\n onChange,\n variant = 'default',\n children,\n header,\n headerText,\n headerCounter,\n headerDescription,\n headerInfo,\n headerActions,\n headingTagOverride,\n disableContentPaddings,\n headerAriaLabel,\n __internalRootRef,\n ...props\n}: InternalExpandableSectionProps) {\n const ref = useRef<HTMLDivElement>(null);\n const controlId = useUniqueId();\n const triggerControlId = `${controlId}-trigger`;\n const descriptionId = `${controlId}-description`;\n\n const baseProps = getBaseProps(props);\n const [expanded, setExpanded] = useControllable(controlledExpanded, onChange, defaultExpanded, {\n componentName: 'ExpandableSection',\n controlledProp: 'expanded',\n changeHandler: 'onChange',\n });\n\n const onExpandChange = useCallback(\n (expanded: boolean) => {\n setExpanded(expanded);\n fireNonCancelableEvent(onChange, { expanded });\n },\n [onChange, setExpanded]\n );\n\n const onClick = useCallback(() => {\n onExpandChange(!expanded);\n }, [onExpandChange, expanded]);\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent<Element>) => {\n const interactionKeys = [KeyCode.enter, KeyCode.space];\n\n if (interactionKeys.indexOf(event.keyCode) !== -1) {\n onExpandChange(!expanded);\n }\n },\n [onExpandChange, expanded]\n );\n\n const onKeyDown = useCallback((event: KeyboardEvent<Element>) => {\n if (event.keyCode === KeyCode.space) {\n // Prevent the page from scrolling when toggling the component with the space bar.\n event.preventDefault();\n }\n }, []);\n\n const triggerProps = {\n ariaControls: controlId,\n ariaLabel: headerAriaLabel,\n ariaLabelledBy: headerAriaLabel ? undefined : triggerControlId,\n onKeyUp,\n onKeyDown,\n onClick,\n };\n\n return (\n <ExpandableSectionContainer\n {...baseProps}\n expanded={expanded}\n className={clsx(baseProps.className, styles.root)}\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n header={\n <ExpandableSectionHeader\n id={triggerControlId}\n descriptionId={descriptionId}\n className={clsx(styles.header, styles[`header-${variant}`])}\n variant={variant}\n expanded={!!expanded}\n header={header}\n headerText={headerText}\n headerDescription={headerDescription}\n headerCounter={headerCounter}\n headerInfo={headerInfo}\n headerActions={headerActions}\n headingTagOverride={headingTagOverride}\n {...triggerProps}\n />\n }\n __internalRootRef={__internalRootRef}\n >\n <CSSTransition in={expanded} timeout={30} classNames={{ enter: styles['content-enter'] }} nodeRef={ref}>\n <div\n id={controlId}\n ref={ref}\n className={clsx(styles.content, styles[`content-${variant}`], expanded && styles['content-expanded'])}\n role=\"group\"\n aria-label={triggerProps.ariaLabel}\n aria-labelledby={triggerProps.ariaLabelledBy}\n aria-describedby={variantSupportsDescription(variant) && headerDescription ? descriptionId : undefined}\n >\n {children}\n </div>\n </CSSTransition>\n </ExpandableSectionContainer>\n );\n}\n"]}
@@ -1,32 +1,36 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "content-enter": "awsui_content-enter_gwq0h_ohtdp_97",
5
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_ohtdp_1",
6
- "trigger-expanded": "awsui_trigger-expanded_gwq0h_ohtdp_119",
7
- "icon": "awsui_icon_gwq0h_ohtdp_133",
8
- "root": "awsui_root_gwq0h_ohtdp_151",
9
- "expand-button": "awsui_expand-button_gwq0h_ohtdp_168",
10
- "expanded": "awsui_expanded_gwq0h_ohtdp_175",
11
- "icon-container": "awsui_icon-container_gwq0h_ohtdp_179",
12
- "icon-container-container": "awsui_icon-container-container_gwq0h_ohtdp_184",
13
- "wrapper": "awsui_wrapper_gwq0h_ohtdp_188",
14
- "wrapper-default": "awsui_wrapper-default_gwq0h_ohtdp_196",
15
- "wrapper-footer": "awsui_wrapper-footer_gwq0h_ohtdp_199",
16
- "wrapper-navigation": "awsui_wrapper-navigation_gwq0h_ohtdp_205",
17
- "wrapper-container": "awsui_wrapper-container_gwq0h_ohtdp_219",
18
- "wrapper-expanded": "awsui_wrapper-expanded_gwq0h_ohtdp_225",
19
- "header": "awsui_header_gwq0h_ohtdp_229",
20
- "header-wrapper": "awsui_header-wrapper_gwq0h_ohtdp_232",
21
- "header-button": "awsui_header-button_gwq0h_ohtdp_239",
22
- "header-container-button": "awsui_header-container-button_gwq0h_ohtdp_243",
23
- "with-interactive-elements": "awsui_with-interactive-elements_gwq0h_ohtdp_261",
24
- "header-container": "awsui_header-container_gwq0h_ohtdp_243",
25
- "header-navigation": "awsui_header-navigation_gwq0h_ohtdp_273",
26
- "content": "awsui_content_gwq0h_ohtdp_97",
27
- "content-default": "awsui_content-default_gwq0h_ohtdp_309",
28
- "content-footer": "awsui_content-footer_gwq0h_ohtdp_312",
29
- "content-expanded": "awsui_content-expanded_gwq0h_ohtdp_315",
30
- "focusable": "awsui_focusable_gwq0h_ohtdp_319"
4
+ "content-enter": "awsui_content-enter_gwq0h_1xfxl_97",
5
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_1xfxl_1",
6
+ "trigger-expanded": "awsui_trigger-expanded_gwq0h_1xfxl_119",
7
+ "icon": "awsui_icon_gwq0h_1xfxl_133",
8
+ "root": "awsui_root_gwq0h_1xfxl_151",
9
+ "expand-button": "awsui_expand-button_gwq0h_1xfxl_168",
10
+ "expanded": "awsui_expanded_gwq0h_1xfxl_175",
11
+ "icon-container": "awsui_icon-container_gwq0h_1xfxl_179",
12
+ "icon-container-container": "awsui_icon-container-container_gwq0h_1xfxl_184",
13
+ "wrapper": "awsui_wrapper_gwq0h_1xfxl_188",
14
+ "wrapper-default": "awsui_wrapper-default_gwq0h_1xfxl_195",
15
+ "wrapper-footer": "awsui_wrapper-footer_gwq0h_1xfxl_198",
16
+ "wrapper-navigation": "awsui_wrapper-navigation_gwq0h_1xfxl_204",
17
+ "wrapper-container": "awsui_wrapper-container_gwq0h_1xfxl_207",
18
+ "wrapper-expanded": "awsui_wrapper-expanded_gwq0h_1xfxl_224",
19
+ "header": "awsui_header_gwq0h_1xfxl_228",
20
+ "header-wrapper": "awsui_header-wrapper_gwq0h_1xfxl_231",
21
+ "header-deprecated": "awsui_header-deprecated_gwq0h_1xfxl_231",
22
+ "header-button": "awsui_header-button_gwq0h_1xfxl_241",
23
+ "header-container-button": "awsui_header-container-button_gwq0h_1xfxl_245",
24
+ "header-container": "awsui_header-container_gwq0h_1xfxl_245",
25
+ "header-navigation": "awsui_header-navigation_gwq0h_1xfxl_269",
26
+ "content": "awsui_content_gwq0h_1xfxl_97",
27
+ "content-default": "awsui_content-default_gwq0h_1xfxl_305",
28
+ "content-footer": "awsui_content-footer_gwq0h_1xfxl_308",
29
+ "content-expanded": "awsui_content-expanded_gwq0h_1xfxl_311",
30
+ "focusable": "awsui_focusable_gwq0h_1xfxl_315",
31
+ "click-target": "awsui_click-target_gwq0h_1xfxl_326",
32
+ "description-default": "awsui_description-default_gwq0h_1xfxl_333",
33
+ "description-footer": "awsui_description-footer_gwq0h_1xfxl_334",
34
+ "description-container": "awsui_description-container_gwq0h_1xfxl_338"
31
35
  };
32
36
 
@@ -94,10 +94,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_content-enter_gwq0h_ohtdp_97:not(#\9) {
98
- animation: awsui_awsui-motion-fade-in_gwq0h_ohtdp_1 var(--motion-duration-show-paced-uryptc, 180ms) var(--motion-easing-show-paced-tbgeqx, ease-out);
97
+ .awsui_content-enter_gwq0h_1xfxl_97:not(#\9) {
98
+ animation: awsui_awsui-motion-fade-in_gwq0h_1xfxl_1 var(--motion-duration-show-paced-uryptc, 180ms) var(--motion-easing-show-paced-tbgeqx, ease-out);
99
99
  }
100
- @keyframes awsui_awsui-motion-fade-in_gwq0h_ohtdp_1 {
100
+ @keyframes awsui_awsui-motion-fade-in_gwq0h_1xfxl_1 {
101
101
  from {
102
102
  opacity: 0.2;
103
103
  }
@@ -106,40 +106,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
106
106
  }
107
107
  }
108
108
  @media (prefers-reduced-motion: reduce) {
109
- .awsui_content-enter_gwq0h_ohtdp_97:not(#\9) {
109
+ .awsui_content-enter_gwq0h_1xfxl_97:not(#\9) {
110
110
  animation: none;
111
111
  transition: none;
112
112
  }
113
113
  }
114
- .awsui-motion-disabled .awsui_content-enter_gwq0h_ohtdp_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_ohtdp_97:not(#\9) {
114
+ .awsui-motion-disabled .awsui_content-enter_gwq0h_1xfxl_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_1xfxl_97:not(#\9) {
115
115
  animation: none;
116
116
  transition: none;
117
117
  }
118
118
 
119
- .awsui_trigger-expanded_gwq0h_ohtdp_119:not(#\9) {
119
+ .awsui_trigger-expanded_gwq0h_1xfxl_119:not(#\9) {
120
120
  transition: border-bottom-color var(--motion-duration-show-paced-uryptc, 180ms) var(--motion-easing-show-paced-tbgeqx, ease-out);
121
121
  }
122
122
  @media (prefers-reduced-motion: reduce) {
123
- .awsui_trigger-expanded_gwq0h_ohtdp_119:not(#\9) {
123
+ .awsui_trigger-expanded_gwq0h_1xfxl_119:not(#\9) {
124
124
  animation: none;
125
125
  transition: none;
126
126
  }
127
127
  }
128
- .awsui-motion-disabled .awsui_trigger-expanded_gwq0h_ohtdp_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_ohtdp_119:not(#\9) {
128
+ .awsui-motion-disabled .awsui_trigger-expanded_gwq0h_1xfxl_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_1xfxl_119:not(#\9) {
129
129
  animation: none;
130
130
  transition: none;
131
131
  }
132
132
 
133
- .awsui_icon_gwq0h_ohtdp_133:not(#\9) {
133
+ .awsui_icon_gwq0h_1xfxl_133:not(#\9) {
134
134
  transition: transform var(--motion-duration-rotate-90-jfxxiy, 135ms) var(--motion-easing-rotate-90-ax5lt7, cubic-bezier(0.165, 0.84, 0.44, 1));
135
135
  }
136
136
  @media (prefers-reduced-motion: reduce) {
137
- .awsui_icon_gwq0h_ohtdp_133:not(#\9) {
137
+ .awsui_icon_gwq0h_1xfxl_133:not(#\9) {
138
138
  animation: none;
139
139
  transition: none;
140
140
  }
141
141
  }
142
- .awsui-motion-disabled .awsui_icon_gwq0h_ohtdp_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_ohtdp_133:not(#\9) {
142
+ .awsui-motion-disabled .awsui_icon_gwq0h_1xfxl_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_1xfxl_133:not(#\9) {
143
143
  animation: none;
144
144
  transition: none;
145
145
  }
@@ -148,7 +148,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
148
148
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
149
149
  SPDX-License-Identifier: Apache-2.0
150
150
  */
151
- .awsui_root_gwq0h_ohtdp_151:not(#\9) {
151
+ .awsui_root_gwq0h_1xfxl_151:not(#\9) {
152
152
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
153
153
  border-collapse: separate;
154
154
  border-spacing: 0;
@@ -191,89 +191,91 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
191
191
  display: block;
192
192
  }
193
193
 
194
- .awsui_expand-button_gwq0h_ohtdp_168:not(#\9) {
194
+ .awsui_expand-button_gwq0h_1xfxl_168:not(#\9) {
195
195
  /* used in test-utils */
196
196
  }
197
197
 
198
- .awsui_icon_gwq0h_ohtdp_133:not(#\9) {
198
+ .awsui_icon_gwq0h_1xfxl_133:not(#\9) {
199
199
  transform: rotate(-90deg);
200
200
  }
201
- .awsui_icon_gwq0h_ohtdp_133.awsui_expanded_gwq0h_ohtdp_175:not(#\9) {
201
+ .awsui_icon_gwq0h_1xfxl_133.awsui_expanded_gwq0h_1xfxl_175:not(#\9) {
202
202
  transform: rotate(0deg);
203
203
  }
204
204
 
205
- .awsui_icon-container_gwq0h_ohtdp_179:not(#\9) {
205
+ .awsui_icon-container_gwq0h_1xfxl_179:not(#\9) {
206
206
  position: relative;
207
207
  margin-left: calc((var(--font-body-m-line-height-rfgrp9, 22px) - var(--size-icon-normal-jq6jat, 16px)) / -2);
208
208
  margin-right: calc(var(--space-xxs-ja5cp8, 4px) + var(--border-divider-list-width-um3zli, 1px));
209
209
  }
210
- .awsui_icon-container-container_gwq0h_ohtdp_184:not(#\9) {
210
+ .awsui_icon-container-container_gwq0h_1xfxl_184:not(#\9) {
211
211
  margin-right: var(--space-xs-edba2s, 8px);
212
212
  }
213
213
 
214
- .awsui_wrapper_gwq0h_ohtdp_188:not(#\9) {
214
+ .awsui_wrapper_gwq0h_1xfxl_188:not(#\9) {
215
215
  box-sizing: border-box;
216
- display: flex;
217
216
  border: none;
218
217
  width: 100%;
219
218
  line-height: var(--font-body-m-line-height-rfgrp9, 22px);
220
219
  text-align: left;
221
220
  }
222
- .awsui_wrapper-default_gwq0h_ohtdp_196:not(#\9) {
221
+ .awsui_wrapper-default_gwq0h_1xfxl_195:not(#\9) {
223
222
  padding: var(--space-scaled-xxs-t2t62i, 4px) var(--space-xxs-ja5cp8, 4px);
224
223
  }
225
- .awsui_wrapper-footer_gwq0h_ohtdp_199:not(#\9) {
224
+ .awsui_wrapper-footer_gwq0h_1xfxl_198:not(#\9) {
226
225
  padding: var(--space-scaled-xxs-t2t62i, 4px) 0;
227
226
  }
228
- .awsui_wrapper-default_gwq0h_ohtdp_196:not(#\9), .awsui_wrapper-footer_gwq0h_ohtdp_199:not(#\9) {
227
+ .awsui_wrapper-default_gwq0h_1xfxl_195:not(#\9), .awsui_wrapper-footer_gwq0h_1xfxl_198:not(#\9) {
229
228
  border: var(--border-divider-section-width-orq175, 2px) solid transparent;
230
229
  }
231
- .awsui_wrapper-navigation_gwq0h_ohtdp_205:not(#\9) {
230
+ .awsui_wrapper-navigation_gwq0h_1xfxl_204:not(#\9) {
232
231
  border-left: var(--border-divider-section-width-orq175, 2px) solid transparent;
233
232
  }
234
- .awsui_wrapper-default_gwq0h_ohtdp_196:not(#\9), .awsui_wrapper-navigation_gwq0h_ohtdp_205:not(#\9), .awsui_wrapper-footer_gwq0h_ohtdp_199:not(#\9) {
235
- color: var(--color-text-expandable-section-default-fvf8va, #000716);
233
+ .awsui_wrapper-navigation_gwq0h_1xfxl_204:not(#\9), .awsui_wrapper-container_gwq0h_1xfxl_207:not(#\9) {
234
+ display: flex;
236
235
  font-weight: var(--font-heading-s-weight-5y5giq, 800);
236
+ }
237
+ .awsui_wrapper-default_gwq0h_1xfxl_195:not(#\9), .awsui_wrapper-navigation_gwq0h_1xfxl_204:not(#\9), .awsui_wrapper-footer_gwq0h_1xfxl_198:not(#\9) {
238
+ color: var(--color-text-expandable-section-default-fvf8va, #000716);
237
239
  -webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
238
240
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-pa2uqe, grayscale);
239
241
  font-size: var(--font-expandable-heading-size-mkp9vq, 16px);
240
242
  letter-spacing: var(--font-heading-s-letter-spacing-j4vcrt, -0.005em);
241
243
  }
242
- .awsui_wrapper-default_gwq0h_ohtdp_196:not(#\9):hover, .awsui_wrapper-navigation_gwq0h_ohtdp_205:not(#\9):hover, .awsui_wrapper-footer_gwq0h_ohtdp_199:not(#\9):hover {
243
- color: var(--color-text-expandable-section-hover-o9ggrx, #0972d3);
244
- }
245
- .awsui_wrapper-container_gwq0h_ohtdp_219:not(#\9) {
244
+ .awsui_wrapper-container_gwq0h_1xfxl_207:not(#\9) {
246
245
  padding: var(--space-container-header-vertical-di96ce, 12px) var(--space-container-horizontal-jxdgil, 20px);
247
246
  }
248
- body[data-awsui-focus-visible=true] .awsui_wrapper-container_gwq0h_ohtdp_219:not(#\9):focus {
247
+ body[data-awsui-focus-visible=true] .awsui_wrapper-container_gwq0h_1xfxl_207:not(#\9):focus {
249
248
  padding: calc(var(--space-scaled-s-913kwi, 12px) - var(--border-divider-section-width-orq175, 2px)) calc(var(--space-l-f4l5gr, 20px) - var(--border-divider-section-width-orq175, 2px));
250
249
  }
251
- .awsui_wrapper-default_gwq0h_ohtdp_196.awsui_wrapper-expanded_gwq0h_ohtdp_225:not(#\9) {
250
+ .awsui_wrapper-default_gwq0h_1xfxl_195.awsui_wrapper-expanded_gwq0h_1xfxl_224:not(#\9) {
252
251
  border-bottom-color: var(--color-border-divider-default-9o8zql, #e9ebed);
253
252
  }
254
253
 
255
- .awsui_header_gwq0h_ohtdp_229:not(#\9) {
254
+ .awsui_header_gwq0h_1xfxl_228:not(#\9) {
255
+ /* used in test-utils */
256
+ }
257
+ .awsui_header-wrapper_gwq0h_1xfxl_231:not(#\9), .awsui_header-deprecated_gwq0h_1xfxl_231:not(#\9) {
256
258
  display: flex;
259
+ font-weight: var(--font-heading-s-weight-5y5giq, 800);
257
260
  }
258
- .awsui_header-wrapper_gwq0h_ohtdp_232:not(#\9) {
259
- font-weight: inherit;
261
+ .awsui_header-wrapper_gwq0h_1xfxl_231:not(#\9) {
260
262
  font-size: inherit;
261
263
  letter-spacing: inherit;
262
264
  margin: 0;
263
265
  padding: 0;
264
266
  }
265
- .awsui_header-button_gwq0h_ohtdp_239:not(#\9) {
267
+ .awsui_header-button_gwq0h_1xfxl_241:not(#\9) {
266
268
  box-sizing: border-box;
267
269
  display: flex;
268
270
  }
269
- body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_ohtdp_239:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_ohtdp_243:not(#\9):focus {
271
+ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_1xfxl_241:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1xfxl_245:not(#\9):focus {
270
272
  position: relative;
271
273
  }
272
- body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_ohtdp_239:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_ohtdp_243:not(#\9):focus {
274
+ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_1xfxl_241:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1xfxl_245:not(#\9):focus {
273
275
  outline: 2px dotted transparent;
274
276
  outline-offset: calc(0px - 1px);
275
277
  }
276
- body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_ohtdp_239:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_ohtdp_243:not(#\9):focus::before {
278
+ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_1xfxl_241:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_header-container-button_gwq0h_1xfxl_245:not(#\9):focus::before {
277
279
  content: " ";
278
280
  display: block;
279
281
  position: absolute;
@@ -284,19 +286,13 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_ohtdp_239:not(#\9
284
286
  border-radius: var(--border-radius-control-default-focus-ring-muizvi, 4px);
285
287
  box-shadow: 0 0 0 2px var(--color-border-item-focused-4t19h5, #0972d3);
286
288
  }
287
- .awsui_header_gwq0h_ohtdp_229:not(#\9):not(.awsui_with-interactive-elements_gwq0h_ohtdp_261) {
288
- cursor: pointer;
289
- }
290
- .awsui_header-container_gwq0h_ohtdp_243:not(#\9) {
289
+ .awsui_header-container_gwq0h_1xfxl_245:not(#\9) {
291
290
  width: 100%;
292
291
  }
293
- .awsui_header-container_gwq0h_ohtdp_243 > .awsui_icon-container_gwq0h_ohtdp_179:not(#\9) {
292
+ .awsui_header-container_gwq0h_1xfxl_245 > .awsui_icon-container_gwq0h_1xfxl_179:not(#\9) {
294
293
  margin-top: var(--space-expandable-section-icon-offset-top-qfofw6, 4px);
295
294
  }
296
- .awsui_header-container_gwq0h_ohtdp_243.awsui_with-interactive-elements_gwq0h_ohtdp_261 .awsui_header-container-button_gwq0h_ohtdp_243:not(#\9) {
297
- cursor: pointer;
298
- }
299
- .awsui_header-navigation_gwq0h_ohtdp_273 > .awsui_icon-container_gwq0h_ohtdp_179:not(#\9) {
295
+ .awsui_header-navigation_gwq0h_1xfxl_269 > .awsui_icon-container_gwq0h_1xfxl_179:not(#\9) {
300
296
  display: inline-flex;
301
297
  cursor: pointer;
302
298
  color: var(--color-text-expandable-section-navigation-icon-default-lzmj1u, #414d5c);
@@ -307,17 +303,17 @@ body[data-awsui-focus-visible=true] .awsui_header-button_gwq0h_ohtdp_239:not(#\9
307
303
  text-decoration: none;
308
304
  flex-direction: column;
309
305
  }
310
- .awsui_header-navigation_gwq0h_ohtdp_273 > .awsui_icon-container_gwq0h_ohtdp_179:not(#\9):hover {
306
+ .awsui_header-navigation_gwq0h_1xfxl_269 > .awsui_icon-container_gwq0h_1xfxl_179:not(#\9):hover {
311
307
  color: var(--color-text-expandable-section-hover-o9ggrx, #0972d3);
312
308
  }
313
- body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_ohtdp_273 > .awsui_icon-container_gwq0h_ohtdp_179:not(#\9):focus {
309
+ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_1xfxl_269 > .awsui_icon-container_gwq0h_1xfxl_179:not(#\9):focus {
314
310
  position: relative;
315
311
  }
316
- body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_ohtdp_273 > .awsui_icon-container_gwq0h_ohtdp_179:not(#\9):focus {
312
+ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_1xfxl_269 > .awsui_icon-container_gwq0h_1xfxl_179:not(#\9):focus {
317
313
  outline: 2px dotted transparent;
318
314
  outline-offset: calc(2px - 1px);
319
315
  }
320
- body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_ohtdp_273 > .awsui_icon-container_gwq0h_ohtdp_179:not(#\9):focus::before {
316
+ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_1xfxl_269 > .awsui_icon-container_gwq0h_1xfxl_179:not(#\9):focus::before {
321
317
  content: " ";
322
318
  display: block;
323
319
  position: absolute;
@@ -329,26 +325,42 @@ body[data-awsui-focus-visible=true] .awsui_header-navigation_gwq0h_ohtdp_273 > .
329
325
  box-shadow: 0 0 0 2px var(--color-border-item-focused-4t19h5, #0972d3);
330
326
  }
331
327
 
332
- .awsui_content_gwq0h_ohtdp_97:not(#\9) {
328
+ .awsui_content_gwq0h_1xfxl_97:not(#\9) {
333
329
  display: none;
334
330
  }
335
- .awsui_content-default_gwq0h_ohtdp_309:not(#\9) {
331
+ .awsui_content-default_gwq0h_1xfxl_305:not(#\9) {
336
332
  padding: var(--space-scaled-xs-wbfgrv, 8px) 0;
337
333
  }
338
- .awsui_content-footer_gwq0h_ohtdp_312:not(#\9) {
334
+ .awsui_content-footer_gwq0h_1xfxl_308:not(#\9) {
339
335
  padding: var(--space-xs-edba2s, 8px) 0;
340
336
  }
341
- .awsui_content-expanded_gwq0h_ohtdp_315:not(#\9) {
337
+ .awsui_content-expanded_gwq0h_1xfxl_311:not(#\9) {
342
338
  display: block;
343
339
  }
344
340
 
345
- .awsui_focusable_gwq0h_ohtdp_319:not(#\9):focus {
341
+ .awsui_focusable_gwq0h_1xfxl_315:not(#\9):focus {
346
342
  outline: none;
347
343
  text-decoration: none;
348
344
  }
349
- body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_ohtdp_319:not(#\9):focus {
345
+ body[data-awsui-focus-visible=true] .awsui_focusable_gwq0h_1xfxl_315:not(#\9):focus {
350
346
  outline: 2px dotted transparent;
351
347
  border: var(--border-field-width-riro62, 2px) solid var(--color-border-item-focused-4t19h5, #0972d3);
352
348
  border-radius: var(--border-radius-control-default-focus-ring-muizvi, 4px);
353
349
  box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-cwek11, 0px) var(--color-border-item-focused-4t19h5, #0972d3);
350
+ }
351
+
352
+ .awsui_click-target_gwq0h_1xfxl_326:not(#\9) {
353
+ cursor: pointer;
354
+ }
355
+ .awsui_click-target_gwq0h_1xfxl_326:not(#\9):not(.awsui_wrapper-container_gwq0h_1xfxl_207):not(.awsui_header-container-button_gwq0h_1xfxl_245):hover {
356
+ color: var(--color-text-expandable-section-hover-o9ggrx, #0972d3);
357
+ }
358
+
359
+ .awsui_description-default_gwq0h_1xfxl_333:not(#\9),
360
+ .awsui_description-footer_gwq0h_1xfxl_334:not(#\9) {
361
+ padding-left: calc(var(--size-icon-normal-jq6jat, 16px) + (var(--font-body-m-line-height-rfgrp9, 22px) - var(--size-icon-normal-jq6jat, 16px)) / -2 + var(--space-xxs-ja5cp8, 4px) + var(--border-divider-list-width-um3zli, 1px));
362
+ }
363
+
364
+ .awsui_description-container_gwq0h_1xfxl_338:not(#\9) {
365
+ padding-left: calc(var(--size-icon-medium-x0iee8, 20px) + (var(--font-body-m-line-height-rfgrp9, 22px) - var(--size-icon-normal-jq6jat, 16px)) / -2 + var(--space-xs-edba2s, 8px));
354
366
  }
@@ -2,32 +2,36 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "content-enter": "awsui_content-enter_gwq0h_ohtdp_97",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_ohtdp_1",
7
- "trigger-expanded": "awsui_trigger-expanded_gwq0h_ohtdp_119",
8
- "icon": "awsui_icon_gwq0h_ohtdp_133",
9
- "root": "awsui_root_gwq0h_ohtdp_151",
10
- "expand-button": "awsui_expand-button_gwq0h_ohtdp_168",
11
- "expanded": "awsui_expanded_gwq0h_ohtdp_175",
12
- "icon-container": "awsui_icon-container_gwq0h_ohtdp_179",
13
- "icon-container-container": "awsui_icon-container-container_gwq0h_ohtdp_184",
14
- "wrapper": "awsui_wrapper_gwq0h_ohtdp_188",
15
- "wrapper-default": "awsui_wrapper-default_gwq0h_ohtdp_196",
16
- "wrapper-footer": "awsui_wrapper-footer_gwq0h_ohtdp_199",
17
- "wrapper-navigation": "awsui_wrapper-navigation_gwq0h_ohtdp_205",
18
- "wrapper-container": "awsui_wrapper-container_gwq0h_ohtdp_219",
19
- "wrapper-expanded": "awsui_wrapper-expanded_gwq0h_ohtdp_225",
20
- "header": "awsui_header_gwq0h_ohtdp_229",
21
- "header-wrapper": "awsui_header-wrapper_gwq0h_ohtdp_232",
22
- "header-button": "awsui_header-button_gwq0h_ohtdp_239",
23
- "header-container-button": "awsui_header-container-button_gwq0h_ohtdp_243",
24
- "with-interactive-elements": "awsui_with-interactive-elements_gwq0h_ohtdp_261",
25
- "header-container": "awsui_header-container_gwq0h_ohtdp_243",
26
- "header-navigation": "awsui_header-navigation_gwq0h_ohtdp_273",
27
- "content": "awsui_content_gwq0h_ohtdp_97",
28
- "content-default": "awsui_content-default_gwq0h_ohtdp_309",
29
- "content-footer": "awsui_content-footer_gwq0h_ohtdp_312",
30
- "content-expanded": "awsui_content-expanded_gwq0h_ohtdp_315",
31
- "focusable": "awsui_focusable_gwq0h_ohtdp_319"
5
+ "content-enter": "awsui_content-enter_gwq0h_1xfxl_97",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_1xfxl_1",
7
+ "trigger-expanded": "awsui_trigger-expanded_gwq0h_1xfxl_119",
8
+ "icon": "awsui_icon_gwq0h_1xfxl_133",
9
+ "root": "awsui_root_gwq0h_1xfxl_151",
10
+ "expand-button": "awsui_expand-button_gwq0h_1xfxl_168",
11
+ "expanded": "awsui_expanded_gwq0h_1xfxl_175",
12
+ "icon-container": "awsui_icon-container_gwq0h_1xfxl_179",
13
+ "icon-container-container": "awsui_icon-container-container_gwq0h_1xfxl_184",
14
+ "wrapper": "awsui_wrapper_gwq0h_1xfxl_188",
15
+ "wrapper-default": "awsui_wrapper-default_gwq0h_1xfxl_195",
16
+ "wrapper-footer": "awsui_wrapper-footer_gwq0h_1xfxl_198",
17
+ "wrapper-navigation": "awsui_wrapper-navigation_gwq0h_1xfxl_204",
18
+ "wrapper-container": "awsui_wrapper-container_gwq0h_1xfxl_207",
19
+ "wrapper-expanded": "awsui_wrapper-expanded_gwq0h_1xfxl_224",
20
+ "header": "awsui_header_gwq0h_1xfxl_228",
21
+ "header-wrapper": "awsui_header-wrapper_gwq0h_1xfxl_231",
22
+ "header-deprecated": "awsui_header-deprecated_gwq0h_1xfxl_231",
23
+ "header-button": "awsui_header-button_gwq0h_1xfxl_241",
24
+ "header-container-button": "awsui_header-container-button_gwq0h_1xfxl_245",
25
+ "header-container": "awsui_header-container_gwq0h_1xfxl_245",
26
+ "header-navigation": "awsui_header-navigation_gwq0h_1xfxl_269",
27
+ "content": "awsui_content_gwq0h_1xfxl_97",
28
+ "content-default": "awsui_content-default_gwq0h_1xfxl_305",
29
+ "content-footer": "awsui_content-footer_gwq0h_1xfxl_308",
30
+ "content-expanded": "awsui_content-expanded_gwq0h_1xfxl_311",
31
+ "focusable": "awsui_focusable_gwq0h_1xfxl_315",
32
+ "click-target": "awsui_click-target_gwq0h_1xfxl_326",
33
+ "description-default": "awsui_description-default_gwq0h_1xfxl_333",
34
+ "description-footer": "awsui_description-footer_gwq0h_1xfxl_334",
35
+ "description-container": "awsui_description-container_gwq0h_1xfxl_338"
32
36
  };
33
37
 
@@ -0,0 +1,3 @@
1
+ import { ExpandableSectionProps } from './interfaces';
2
+ export declare function variantSupportsDescription(variant: ExpandableSectionProps.Variant): boolean;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"lib/default/","sources":["expandable-section/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,sBAAsB,CAAC,OAAO,WAEjF"}
@@ -0,0 +1,4 @@
1
+ export function variantSupportsDescription(variant) {
2
+ return variant === 'container' || variant === 'default' || variant === 'footer';
3
+ }
4
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"lib/default/","sources":["expandable-section/utils.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,0BAA0B,CAAC,OAAuC;IAChF,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,QAAQ,CAAC;AAClF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ExpandableSectionProps } from './interfaces';\n\nexport function variantSupportsDescription(variant: ExpandableSectionProps.Variant) {\n return variant === 'container' || variant === 'default' || variant === 'footer';\n}\n"]}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
3
  import { HeaderProps } from './interfaces';
4
4
  import { SomeRequired } from '../internal/types';
@@ -6,5 +6,9 @@ interface InternalHeaderProps extends SomeRequired<HeaderProps, 'variant'>, Inte
6
6
  __disableActionsWrapping?: boolean;
7
7
  }
8
8
  export default function InternalHeader({ variant, headingTagOverride, children, actions, counter, description, info, __internalRootRef, __disableActionsWrapping, ...restProps }: InternalHeaderProps): JSX.Element;
9
+ export declare function Description({ children, variantOverride }: {
10
+ children: React.ReactNode;
11
+ variantOverride: string;
12
+ }): JSX.Element | null;
9
13
  export {};
10
14
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,UAAU,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IACpG,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAAI,EACJ,iBAAwB,EACxB,wBAAwB,EACxB,GAAG,SAAS,EACb,EAAE,mBAAmB,eA8ErB"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,UAAU,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IACpG,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAAI,EACJ,iBAAwB,EACxB,wBAAwB,EACxB,GAAG,SAAS,EACb,EAAE,mBAAmB,eAoErB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,sBAgBhH"}
@@ -31,7 +31,12 @@ export default function InternalHeader(_a) {
31
31
  " ",
32
32
  counter)),
33
33
  React.createElement(InfoLinkLabelContext.Provider, { value: headingId }, info && React.createElement("span", { className: styles.info }, info))),
34
- description && (React.createElement("p", { className: clsx(styles.description, styles[`description-variant-${variantOverride}`], isRefresh && styles[`description-variant-${variantOverride}-refresh`]) }, description))),
34
+ React.createElement(Description, { variantOverride: variantOverride }, description)),
35
35
  actions && (React.createElement("div", { className: clsx(styles.actions, styles[`actions-variant-${variantOverride}`], isRefresh && styles[`actions-variant-${variantOverride}-refresh`]) }, actions))));
36
36
  }
37
+ export function Description({ children, variantOverride }) {
38
+ const isRefresh = useVisualRefresh();
39
+ return ((children && (React.createElement("p", { className: clsx(styles.description, styles[`description-variant-${variantOverride}`], isRefresh && styles[`description-variant-${variantOverride}-refresh`]) }, children))) ||
40
+ null);
41
+ }
37
42
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAMhG,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAWjB;QAXiB,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAA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ClE,IAEA,OAAO,CACJ,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useContext } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { StickyHeaderContext } from '../container/use-sticky-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { HeaderProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { DATA_ATTR_FUNNEL_KEY, FUNNEL_KEY_SUBSTEP_NAME } from '../internal/analytics/selectors';\n\ninterface InternalHeaderProps extends SomeRequired<HeaderProps, 'variant'>, InternalBaseComponentProps {\n __disableActionsWrapping?: boolean;\n}\n\nexport default function InternalHeader({\n variant,\n headingTagOverride,\n children,\n actions,\n counter,\n description,\n info,\n __internalRootRef = null,\n __disableActionsWrapping,\n ...restProps\n}: InternalHeaderProps) {\n const isMobile = useMobile();\n const HeadingTag = headingTagOverride ?? (variant === 'awsui-h1-sticky' ? 'h1' : variant);\n const { isStuck } = useContext(StickyHeaderContext);\n const baseProps = getBaseProps(restProps);\n const isRefresh = useVisualRefresh();\n const headingId = useUniqueId('heading');\n // If is mobile there is no need to have the dynamic variant because it's scrolled out of view\n const dynamicVariant = !isMobile && isStuck ? 'h2' : 'h1';\n const variantOverride = variant === 'awsui-h1-sticky' ? (isRefresh ? dynamicVariant : 'h2') : variant;\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n styles[`root-variant-${variantOverride}`],\n isRefresh && styles[`root-variant-${variantOverride}-refresh`],\n !actions && [styles[`root-no-actions`]],\n description && [styles[`root-has-description`]],\n __disableActionsWrapping && [styles['root-no-wrap']]\n )}\n ref={__internalRootRef}\n >\n <div\n className={clsx(\n styles.main,\n styles[`main-variant-${variantOverride}`],\n isRefresh && styles[`main-variant-${variantOverride}-refresh`]\n )}\n >\n <div\n className={clsx(\n styles.title,\n styles[`title-variant-${variantOverride}`],\n isRefresh && styles[`title-variant-${variantOverride}-refresh`]\n )}\n >\n <HeadingTag className={clsx(styles.heading, styles[`heading-variant-${variantOverride}`])}>\n <span\n {...{ [DATA_ATTR_FUNNEL_KEY]: FUNNEL_KEY_SUBSTEP_NAME }}\n className={clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`])}\n id={headingId}\n >\n {children}\n </span>\n {counter !== undefined && <span className={styles.counter}> {counter}</span>}\n </HeadingTag>\n <InfoLinkLabelContext.Provider value={headingId}>\n {info && <span className={styles.info}>{info}</span>}\n </InfoLinkLabelContext.Provider>\n </div>\n {description && (\n <p\n className={clsx(\n styles.description,\n styles[`description-variant-${variantOverride}`],\n isRefresh && styles[`description-variant-${variantOverride}-refresh`]\n )}\n >\n {description}\n </p>\n )}\n </div>\n {actions && (\n <div\n className={clsx(\n styles.actions,\n styles[`actions-variant-${variantOverride}`],\n isRefresh && styles[`actions-variant-${variantOverride}-refresh`]\n )}\n >\n {actions}\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,SAAS,EAA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IAAG,WAAW,CAAe,CACtE;QACL,OAAO,IAAI,CACV,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,mBAAmB,eAAe,EAAE,CAAC,EAC5C,SAAS,IAAI,MAAM,CAAC,mBAAmB,eAAe,UAAU,CAAC,CAClE,IAEA,OAAO,CACJ,CACP,CACG,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,eAAe,EAA0D;IAC/G,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,CACL,CAAC,QAAQ,IAAI,CACX,2BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,uBAAuB,eAAe,EAAE,CAAC,EAChD,SAAS,IAAI,MAAM,CAAC,uBAAuB,eAAe,UAAU,CAAC,CACtE,IAEA,QAAQ,CACP,CACL,CAAC;QACF,IAAI,CACL,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useContext } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { StickyHeaderContext } from '../container/use-sticky-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { HeaderProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { DATA_ATTR_FUNNEL_KEY, FUNNEL_KEY_SUBSTEP_NAME } from '../internal/analytics/selectors';\n\ninterface InternalHeaderProps extends SomeRequired<HeaderProps, 'variant'>, InternalBaseComponentProps {\n __disableActionsWrapping?: boolean;\n}\n\nexport default function InternalHeader({\n variant,\n headingTagOverride,\n children,\n actions,\n counter,\n description,\n info,\n __internalRootRef = null,\n __disableActionsWrapping,\n ...restProps\n}: InternalHeaderProps) {\n const isMobile = useMobile();\n const HeadingTag = headingTagOverride ?? (variant === 'awsui-h1-sticky' ? 'h1' : variant);\n const { isStuck } = useContext(StickyHeaderContext);\n const baseProps = getBaseProps(restProps);\n const isRefresh = useVisualRefresh();\n const headingId = useUniqueId('heading');\n // If is mobile there is no need to have the dynamic variant because it's scrolled out of view\n const dynamicVariant = !isMobile && isStuck ? 'h2' : 'h1';\n const variantOverride = variant === 'awsui-h1-sticky' ? (isRefresh ? dynamicVariant : 'h2') : variant;\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n styles[`root-variant-${variantOverride}`],\n isRefresh && styles[`root-variant-${variantOverride}-refresh`],\n !actions && [styles[`root-no-actions`]],\n description && [styles[`root-has-description`]],\n __disableActionsWrapping && [styles['root-no-wrap']]\n )}\n ref={__internalRootRef}\n >\n <div\n className={clsx(\n styles.main,\n styles[`main-variant-${variantOverride}`],\n isRefresh && styles[`main-variant-${variantOverride}-refresh`]\n )}\n >\n <div\n className={clsx(\n styles.title,\n styles[`title-variant-${variantOverride}`],\n isRefresh && styles[`title-variant-${variantOverride}-refresh`]\n )}\n >\n <HeadingTag className={clsx(styles.heading, styles[`heading-variant-${variantOverride}`])}>\n <span\n {...{ [DATA_ATTR_FUNNEL_KEY]: FUNNEL_KEY_SUBSTEP_NAME }}\n className={clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`])}\n id={headingId}\n >\n {children}\n </span>\n {counter !== undefined && <span className={styles.counter}> {counter}</span>}\n </HeadingTag>\n <InfoLinkLabelContext.Provider value={headingId}>\n {info && <span className={styles.info}>{info}</span>}\n </InfoLinkLabelContext.Provider>\n </div>\n <Description variantOverride={variantOverride}>{description}</Description>\n </div>\n {actions && (\n <div\n className={clsx(\n styles.actions,\n styles[`actions-variant-${variantOverride}`],\n isRefresh && styles[`actions-variant-${variantOverride}-refresh`]\n )}\n >\n {actions}\n </div>\n )}\n </div>\n );\n}\n\nexport function Description({ children, variantOverride }: { children: React.ReactNode; variantOverride: string }) {\n const isRefresh = useVisualRefresh();\n return (\n (children && (\n <p\n className={clsx(\n styles.description,\n styles[`description-variant-${variantOverride}`],\n isRefresh && styles[`description-variant-${variantOverride}-refresh`]\n )}\n >\n {children}\n </p>\n )) ||\n null\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
 
2
2
  export var PACKAGE_SOURCE = 'components';
3
- export var PACKAGE_VERSION = '3.0.0 (ec2ddd9)';
3
+ export var PACKAGE_VERSION = '3.0.0 (f9029ce)';
4
4
  export var THEME = 'open-source-visual-refresh';
5
5
  export var ALWAYS_VISUAL_REFRESH = true;
6
6
 
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "ec2ddd92e84dd4ed9500a850fbb19ba4c3641366"
2
+ "commit": "f9029ce3e6cc9c6b859b2cbbece2c21c3bd1e4d1"
3
3
  }
@@ -0,0 +1,15 @@
1
+ import { DrawerConfig, DrawersRegistrationListener } from './drawers-controller';
2
+ interface AwsuiPluginApiPublic {
3
+ appLayout: {
4
+ registerDrawer(config: DrawerConfig): void;
5
+ };
6
+ }
7
+ interface AwsuiPluginApiInternal {
8
+ appLayout: {
9
+ clearRegisteredDrawers(): void;
10
+ onDrawersRegistered(listener: DrawersRegistrationListener): () => void;
11
+ };
12
+ }
13
+ export declare const awsuiPlugins: AwsuiPluginApiPublic, awsuiPluginsInternal: AwsuiPluginApiInternal;
14
+ export {};
15
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"lib/default/","sources":["internal/plugins/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAqB,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAIpG,UAAU,oBAAoB;IAC5B,SAAS,EAAE;QACT,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;KAC5C,CAAC;CACH;AACD,UAAU,sBAAsB;IAC9B,SAAS,EAAE;QACT,sBAAsB,IAAI,IAAI,CAAC;QAC/B,mBAAmB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,MAAM,IAAI,CAAC;KACxE,CAAC;CACH;AA0CD,eAAO,MAAQ,YAAY,wBAAE,oBAAoB,wBAAc,CAAC"}