@cloudscape-design/components-themeable 3.0.117 → 3.0.118

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 (113) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/expandable-section/styles.scss +0 -19
  3. package/lib/internal/scss/flashbar/styles.scss +10 -41
  4. package/lib/internal/scss/wizard/styles.scss +0 -9
  5. package/lib/internal/template/area-chart/model/use-chart-model.d.ts.map +1 -1
  6. package/lib/internal/template/area-chart/model/use-chart-model.js +1 -2
  7. package/lib/internal/template/area-chart/model/use-chart-model.js.map +1 -1
  8. package/lib/internal/template/area-chart/model/utils.d.ts +6 -0
  9. package/lib/internal/template/area-chart/model/utils.d.ts.map +1 -1
  10. package/lib/internal/template/area-chart/model/utils.js +52 -0
  11. package/lib/internal/template/area-chart/model/utils.js.map +1 -1
  12. package/lib/internal/template/button/index.d.ts.map +1 -1
  13. package/lib/internal/template/button/index.js +2 -2
  14. package/lib/internal/template/button/index.js.map +1 -1
  15. package/lib/internal/template/button/interfaces.d.ts +0 -4
  16. package/lib/internal/template/button/interfaces.d.ts.map +1 -1
  17. package/lib/internal/template/button/interfaces.js.map +1 -1
  18. package/lib/internal/template/button/internal.d.ts.map +1 -1
  19. package/lib/internal/template/button/internal.js +5 -10
  20. package/lib/internal/template/button/internal.js.map +1 -1
  21. package/lib/internal/template/button-dropdown/index.d.ts.map +1 -1
  22. package/lib/internal/template/button-dropdown/index.js +2 -2
  23. package/lib/internal/template/button-dropdown/index.js.map +1 -1
  24. package/lib/internal/template/button-dropdown/interfaces.d.ts +0 -4
  25. package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
  26. package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
  27. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  28. package/lib/internal/template/button-dropdown/internal.js +2 -2
  29. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  30. package/lib/internal/template/cards/index.d.ts.map +1 -1
  31. package/lib/internal/template/cards/index.js +1 -3
  32. package/lib/internal/template/cards/index.js.map +1 -1
  33. package/lib/internal/template/code-editor/index.d.ts.map +1 -1
  34. package/lib/internal/template/code-editor/index.js +1 -3
  35. package/lib/internal/template/code-editor/index.js.map +1 -1
  36. package/lib/internal/template/expandable-section/expandable-section-header.d.ts +4 -12
  37. package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
  38. package/lib/internal/template/expandable-section/expandable-section-header.js +11 -51
  39. package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
  40. package/lib/internal/template/expandable-section/interfaces.d.ts +3 -21
  41. package/lib/internal/template/expandable-section/interfaces.d.ts.map +1 -1
  42. package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
  43. package/lib/internal/template/expandable-section/internal.d.ts +1 -1
  44. package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
  45. package/lib/internal/template/expandable-section/internal.js +2 -2
  46. package/lib/internal/template/expandable-section/internal.js.map +1 -1
  47. package/lib/internal/template/expandable-section/styles.css.js +20 -21
  48. package/lib/internal/template/expandable-section/styles.scoped.css +39 -56
  49. package/lib/internal/template/expandable-section/styles.selectors.js +20 -21
  50. package/lib/internal/template/flashbar/flash.d.ts +3 -3
  51. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  52. package/lib/internal/template/flashbar/flash.js +15 -31
  53. package/lib/internal/template/flashbar/flash.js.map +1 -1
  54. package/lib/internal/template/flashbar/index.d.ts.map +1 -1
  55. package/lib/internal/template/flashbar/index.js +14 -61
  56. package/lib/internal/template/flashbar/index.js.map +1 -1
  57. package/lib/internal/template/flashbar/interfaces.d.ts +0 -16
  58. package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
  59. package/lib/internal/template/flashbar/interfaces.js.map +1 -1
  60. package/lib/internal/template/flashbar/styles.css.js +29 -33
  61. package/lib/internal/template/flashbar/styles.scoped.css +112 -151
  62. package/lib/internal/template/flashbar/styles.selectors.js +29 -33
  63. package/lib/internal/template/help-panel/index.d.ts.map +1 -1
  64. package/lib/internal/template/help-panel/index.js +1 -3
  65. package/lib/internal/template/help-panel/index.js.map +1 -1
  66. package/lib/internal/template/internal/components/chart-status-container/index.d.ts +2 -2
  67. package/lib/internal/template/internal/components/chart-status-container/index.d.ts.map +1 -1
  68. package/lib/internal/template/internal/components/chart-status-container/index.js +3 -2
  69. package/lib/internal/template/internal/components/chart-status-container/index.js.map +1 -1
  70. package/lib/internal/template/internal/components/live-region/index.d.ts +1 -2
  71. package/lib/internal/template/internal/components/live-region/index.d.ts.map +1 -1
  72. package/lib/internal/template/internal/components/live-region/index.js +5 -6
  73. package/lib/internal/template/internal/components/live-region/index.js.map +1 -1
  74. package/lib/internal/template/internal/environment.js +1 -1
  75. package/lib/internal/template/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
  76. package/lib/internal/template/s3-resource-selector/s3-in-context/index.js +1 -3
  77. package/lib/internal/template/s3-resource-selector/s3-in-context/index.js.map +1 -1
  78. package/lib/internal/template/side-navigation/internal.js +2 -2
  79. package/lib/internal/template/side-navigation/internal.js.map +1 -1
  80. package/lib/internal/template/table/internal.d.ts.map +1 -1
  81. package/lib/internal/template/table/internal.js +1 -3
  82. package/lib/internal/template/table/internal.js.map +1 -1
  83. package/lib/internal/template/tag-editor/index.d.ts.map +1 -1
  84. package/lib/internal/template/tag-editor/index.js +1 -3
  85. package/lib/internal/template/tag-editor/index.js.map +1 -1
  86. package/lib/internal/template/test-utils/dom/flashbar/flash.js +1 -1
  87. package/lib/internal/template/test-utils/dom/flashbar/flash.js.map +1 -1
  88. package/lib/internal/template/test-utils/dom/flashbar/index.js +1 -1
  89. package/lib/internal/template/test-utils/dom/flashbar/index.js.map +1 -1
  90. package/lib/internal/template/test-utils/selectors/flashbar/flash.js +1 -1
  91. package/lib/internal/template/test-utils/selectors/flashbar/flash.js.map +1 -1
  92. package/lib/internal/template/test-utils/selectors/flashbar/index.js +1 -1
  93. package/lib/internal/template/test-utils/selectors/flashbar/index.js.map +1 -1
  94. package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
  95. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.js +1 -1
  96. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  97. package/lib/internal/template/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  98. package/lib/internal/template/tutorial-panel/components/tutorial-list/index.js +1 -3
  99. package/lib/internal/template/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  100. package/lib/internal/template/wizard/index.d.ts.map +1 -1
  101. package/lib/internal/template/wizard/index.js +20 -2
  102. package/lib/internal/template/wizard/index.js.map +1 -1
  103. package/lib/internal/template/wizard/styles.css.js +31 -32
  104. package/lib/internal/template/wizard/styles.scoped.css +58 -70
  105. package/lib/internal/template/wizard/styles.selectors.js +31 -32
  106. package/lib/internal/template/wizard/wizard-form.d.ts.map +1 -1
  107. package/lib/internal/template/wizard/wizard-form.js +3 -15
  108. package/lib/internal/template/wizard/wizard-form.js.map +1 -1
  109. package/package.json +1 -1
  110. package/lib/internal/template/internal/utils/throttle.d.ts +0 -10
  111. package/lib/internal/template/internal/utils/throttle.d.ts.map +0 -1
  112. package/lib/internal/template/internal/utils/throttle.js +0 -57
  113. package/lib/internal/template/internal/utils/throttle.js.map +0 -1
@@ -4,62 +4,22 @@ import useFocusVisible from '../internal/hooks/focus-visible';
4
4
  import InternalIcon from '../icon/internal';
5
5
  import clsx from 'clsx';
6
6
  import styles from './styles.css.js';
7
- import InternalHeader from '../header/internal';
8
- import ScreenreaderOnly from '../internal/components/screenreader-only';
9
- import { generateUniqueId } from '../internal/hooks/use-unique-id';
10
- import { isDevelopment } from '../internal/is-development';
11
- import { warnOnce } from '../internal/logging';
12
- var ExpandableDefaultHeader = function (_a) {
13
- var id = _a.id, className = _a.className, onClick = _a.onClick, ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, expanded = _a.expanded, children = _a.children, icon = _a.icon, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown;
14
- var focusVisible = useFocusVisible();
15
- return (React.createElement("div", __assign({ id: id, role: "button", className: className, tabIndex: 0, onKeyUp: onKeyUp, onKeyDown: onKeyDown, onClick: onClick, "aria-label": ariaLabel, "aria-controls": ariaControls, "aria-expanded": expanded }, focusVisible),
16
- React.createElement("div", { className: styles['icon-container'] }, icon),
17
- children));
18
- };
19
- var ExpandableNavigationHeader = function (_a) {
20
- var id = _a.id, className = _a.className, onClick = _a.onClick, ariaLabelledBy = _a.ariaLabelledBy, ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, expanded = _a.expanded, children = _a.children, icon = _a.icon;
21
- var focusVisible = useFocusVisible();
22
- return (React.createElement("div", { id: id, className: className, onClick: onClick },
23
- React.createElement("button", __assign({ className: styles['icon-container'], "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, "aria-controls": ariaControls, "aria-expanded": expanded }, focusVisible), icon),
24
- children));
25
- };
26
- var ExpandableContainerHeader = function (_a) {
27
- var id = _a.id, className = _a.className, onClick = _a.onClick, ariaLabel = _a.ariaLabel, ariaControls = _a.ariaControls, expanded = _a.expanded, children = _a.children, icon = _a.icon, headerDescription = _a.headerDescription, headerCounter = _a.headerCounter, headingTagOverride = _a.headingTagOverride, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown;
28
- var focusVisible = useFocusVisible();
29
- var screenreaderContentId = generateUniqueId('expandable-section-header-content-');
30
- return (React.createElement("div", __assign({ id: id, className: className, onClick: onClick }, focusVisible),
31
- React.createElement(InternalHeader, { variant: 'h2', description: headerDescription, counter: headerCounter, headingTagOverride: headingTagOverride },
32
- React.createElement("span", { className: styles['header-container-button'], role: "button", tabIndex: 0, onKeyUp: onKeyUp, onKeyDown: onKeyDown, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : screenreaderContentId, "aria-controls": ariaControls, "aria-expanded": expanded },
33
- React.createElement("span", { className: styles['icon-container'] }, icon),
34
- React.createElement("span", null, children))),
35
- React.createElement(ScreenreaderOnly, { id: screenreaderContentId },
36
- children,
37
- " ",
38
- headerCounter,
39
- " ",
40
- headerDescription)));
41
- };
42
7
  export var ExpandableSectionHeader = function (_a) {
43
- var id = _a.id, className = _a.className, variant = _a.variant, header = _a.header, headerText = _a.headerText, headerDescription = _a.headerDescription, headerCounter = _a.headerCounter, headingTagOverride = _a.headingTagOverride, expanded = _a.expanded, ariaControls = _a.ariaControls, ariaLabel = _a.ariaLabel, ariaLabelledBy = _a.ariaLabelledBy, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onClick = _a.onClick;
8
+ var id = _a.id, className = _a.className, variant = _a.variant, children = _a.children, expanded = _a.expanded, ariaControls = _a.ariaControls, ariaLabel = _a.ariaLabel, ariaLabelledBy = _a.ariaLabelledBy, onKeyUp = _a.onKeyUp, onKeyDown = _a.onKeyDown, onClick = _a.onClick;
9
+ var focusVisible = useFocusVisible();
44
10
  var icon = (React.createElement(InternalIcon, { size: variant === 'container' ? 'medium' : 'normal', className: clsx(styles.icon, expanded && styles.expanded), name: "caret-down-filled" }));
45
- var defaultHeaderProps = {
46
- id: id,
47
- icon: icon,
48
- expanded: expanded,
49
- ariaControls: ariaControls,
50
- ariaLabel: ariaLabel,
51
- onClick: onClick
11
+ var ariaAttributes = {
12
+ 'aria-controls': ariaControls,
13
+ 'aria-expanded': expanded
52
14
  };
53
15
  var triggerClassName = clsx(styles.trigger, styles["trigger-".concat(variant)], expanded && styles['trigger-expanded']);
54
16
  if (variant === 'navigation') {
55
- return (React.createElement(ExpandableNavigationHeader, __assign({ className: clsx(className, triggerClassName), ariaLabelledBy: ariaLabelledBy }, defaultHeaderProps), headerText !== null && headerText !== void 0 ? headerText : header));
56
- }
57
- if (variant === 'container' && headerText) {
58
- return (React.createElement(ExpandableContainerHeader, __assign({ className: clsx(className, triggerClassName, expanded && styles.expanded), headerDescription: headerDescription, headerCounter: headerCounter, headingTagOverride: headingTagOverride, onKeyUp: onKeyUp, onKeyDown: onKeyDown }, defaultHeaderProps), headerText));
17
+ return (React.createElement("div", { id: id, className: clsx(className, triggerClassName), onClick: onClick },
18
+ React.createElement("button", __assign({ className: styles['icon-container'], type: "button", "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel }, focusVisible, ariaAttributes), icon),
19
+ children));
59
20
  }
60
- if (variant === 'container' && header && isDevelopment) {
61
- warnOnce('ExpandableSection', 'Use `headerText` instead of `header` to provide the button within the heading for a11y.');
62
- }
63
- return (React.createElement(ExpandableDefaultHeader, __assign({ className: clsx(className, triggerClassName, styles.focusable, expanded && styles.expanded), onKeyUp: onKeyUp, onKeyDown: onKeyDown }, defaultHeaderProps), headerText !== null && headerText !== void 0 ? headerText : header));
21
+ return (React.createElement("div", __assign({ id: id, role: "button", className: clsx(className, triggerClassName, styles.focusable, expanded && styles.expanded), tabIndex: 0, onKeyUp: onKeyUp, onKeyDown: onKeyDown, onClick: onClick, "aria-label": ariaLabel }, focusVisible, ariaAttributes),
22
+ React.createElement("div", { className: styles['icon-container'] }, icon),
23
+ children));
64
24
  };
65
25
  //# sourceMappingURL=expandable-section-header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expandable-section-header.js","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":";AAGA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAClF,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,gBAAgB,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAA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S,IAChB,kBAAkB,GAErB,UAAU,CACe,CAC7B,CAAC;KACH;IAED,IAAI,OAAO,KAAK,WAAW,IAAI,MAAM,IAAI,aAAa,EAAE;QACtD,QAAQ,CACN,mBAAmB,EACnB,yFAAyF,CAC1F,CAAC;KACH;IAED,OAAO,CACL,oBAAC,uBAAuB,aACtB,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,IAChB,kBAAkB,GAErB,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,MAAM,CACG,CAC3B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ExpandableSectionProps } from './interfaces';\nimport React, { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';\nimport useFocusVisible from '../internal/hooks/focus-visible';\nimport InternalIcon from '../icon/internal';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport InternalHeader from '../header/internal';\nimport ScreenreaderOnly from '../internal/components/screenreader-only';\nimport { generateUniqueId } from '../internal/hooks/use-unique-id';\nimport { isDevelopment } from '../internal/is-development';\nimport { warnOnce } from '../internal/logging';\n\ninterface ExpandableDefaultHeaderProps {\n id: string;\n className?: string;\n children?: ReactNode;\n expanded: boolean;\n ariaControls: string;\n ariaLabel?: string;\n onKeyUp: KeyboardEventHandler;\n onKeyDown: KeyboardEventHandler;\n onClick: MouseEventHandler;\n icon: JSX.Element;\n}\n\ninterface ExpandableNavigationHeaderProps extends Omit<ExpandableDefaultHeaderProps, 'onKeyUp' | 'onKeyDown'> {\n ariaLabelledBy?: string;\n}\n\ninterface ExpandableContainerHeaderProps extends ExpandableDefaultHeaderProps {\n headerDescription?: ReactNode;\n headerCounter?: string;\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n}\n\ninterface ExpandableSectionHeaderProps extends Omit<ExpandableDefaultHeaderProps, 'children' | 'icon'> {\n variant: ExpandableSectionProps.Variant;\n header?: ReactNode;\n headerText?: ReactNode;\n headerDescription?: ReactNode;\n headerCounter?: string;\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n ariaLabelledBy?: string;\n}\n\nconst ExpandableDefaultHeader = ({\n id,\n className,\n onClick,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n onKeyUp,\n onKeyDown,\n}: ExpandableDefaultHeaderProps) => {\n const focusVisible = useFocusVisible();\n return (\n <div\n id={id}\n role=\"button\"\n className={className}\n tabIndex={0}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n onClick={onClick}\n aria-label={ariaLabel}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n {...focusVisible}\n >\n <div className={styles['icon-container']}>{icon}</div>\n {children}\n </div>\n );\n};\n\nconst ExpandableNavigationHeader = ({\n id,\n className,\n onClick,\n ariaLabelledBy,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n}: ExpandableNavigationHeaderProps) => {\n const focusVisible = useFocusVisible();\n return (\n <div id={id} className={className} onClick={onClick}>\n <button\n className={styles['icon-container']}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n {...focusVisible}\n >\n {icon}\n </button>\n {children}\n </div>\n );\n};\n\nconst ExpandableContainerHeader = ({\n id,\n className,\n onClick,\n ariaLabel,\n ariaControls,\n expanded,\n children,\n icon,\n headerDescription,\n headerCounter,\n headingTagOverride,\n onKeyUp,\n onKeyDown,\n}: ExpandableContainerHeaderProps) => {\n const focusVisible = useFocusVisible();\n const screenreaderContentId = generateUniqueId('expandable-section-header-content-');\n return (\n <div id={id} className={className} onClick={onClick} {...focusVisible}>\n <InternalHeader\n variant={'h2'}\n description={headerDescription}\n counter={headerCounter}\n headingTagOverride={headingTagOverride}\n >\n <span\n className={styles['header-container-button']}\n role=\"button\"\n tabIndex={0}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n aria-label={ariaLabel}\n // Do not use aria-labelledby={id} but ScreenreaderOnly because safari+VO does not read headerText in this case.\n aria-labelledby={ariaLabel ? undefined : screenreaderContentId}\n aria-controls={ariaControls}\n aria-expanded={expanded}\n >\n <span className={styles['icon-container']}>{icon}</span>\n <span>{children}</span>\n </span>\n </InternalHeader>\n <ScreenreaderOnly id={screenreaderContentId}>\n {children} {headerCounter} {headerDescription}\n </ScreenreaderOnly>\n </div>\n );\n};\n\nexport const ExpandableSectionHeader = ({\n id,\n className,\n variant,\n header,\n headerText,\n headerDescription,\n headerCounter,\n headingTagOverride,\n expanded,\n ariaControls,\n ariaLabel,\n ariaLabelledBy,\n onKeyUp,\n onKeyDown,\n onClick,\n}: ExpandableSectionHeaderProps) => {\n const icon = (\n <InternalIcon\n size={variant === 'container' ? 'medium' : 'normal'}\n className={clsx(styles.icon, expanded && styles.expanded)}\n name=\"caret-down-filled\"\n />\n );\n const defaultHeaderProps = {\n id: id,\n icon: icon,\n expanded: expanded,\n ariaControls: ariaControls,\n ariaLabel: ariaLabel,\n onClick: onClick,\n };\n\n const triggerClassName = clsx(styles.trigger, styles[`trigger-${variant}`], expanded && styles['trigger-expanded']);\n if (variant === 'navigation') {\n return (\n <ExpandableNavigationHeader\n className={clsx(className, triggerClassName)}\n ariaLabelledBy={ariaLabelledBy}\n {...defaultHeaderProps}\n >\n {headerText ?? header}\n </ExpandableNavigationHeader>\n );\n }\n\n if (variant === 'container' && headerText) {\n return (\n <ExpandableContainerHeader\n className={clsx(className, triggerClassName, expanded && styles.expanded)}\n headerDescription={headerDescription}\n headerCounter={headerCounter}\n headingTagOverride={headingTagOverride}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n {...defaultHeaderProps}\n >\n {headerText}\n </ExpandableContainerHeader>\n );\n }\n\n if (variant === 'container' && header && isDevelopment) {\n warnOnce(\n 'ExpandableSection',\n 'Use `headerText` instead of `header` to provide the button within the heading for a11y.'\n );\n }\n\n return (\n <ExpandableDefaultHeader\n className={clsx(className, triggerClassName, styles.focusable, expanded && styles.expanded)}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n {...defaultHeaderProps}\n >\n {headerText ?? header}\n </ExpandableDefaultHeader>\n );\n};\n"]}
1
+ {"version":3,"file":"expandable-section-header.js","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":";AAGA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAClF,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgBrC,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,EAYT;QAX7B,EAAE,QAAA,EACF,SAAS,eAAA,EACT,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,OAAO,aAAA,EACP,SAAS,eAAA,EACT,OAAO,aAAA;IAEP,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,IAAM,IAAI,GAAG,CACX,oBAAC,YAAY,IACX,IAAI,EAAE,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EACnD,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EACzD,IAAI,EAAC,mBAAmB,GACxB,CACH,CAAC;IACF,IAAM,cAAc,GAAG;QACrB,eAAe,EAAE,YAAY;QAC7B,eAAe,EAAE,QAAQ;KAC1B,CAAC;IAEF,IAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,kBAAW,OAAO,CAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACpH,IAAI,OAAO,KAAK,YAAY,EAAE;QAC5B,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO;YACzE,yCACE,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,IAAI,EAAC,QAAQ,qBACI,cAAc,gBACnB,SAAS,IACjB,YAAY,EACZ,cAAc,GAEjB,IAAI,CACE;YACR,QAAQ,CACL,CACP,CAAC;KACH;IAED,OAAO,CACL,sCACE,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,EAC3F,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,gBACJ,SAAS,IACjB,YAAY,EACZ,cAAc;QAElB,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAG,IAAI,CAAO;QACrD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ExpandableSectionProps } from './interfaces';\nimport React, { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';\nimport useFocusVisible from '../internal/hooks/focus-visible';\nimport InternalIcon from '../icon/internal';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\ninterface ExpandableSectionHeaderProps {\n id: string;\n className?: string;\n variant: ExpandableSectionProps.Variant;\n children?: ReactNode;\n expanded: boolean;\n ariaControls: string;\n ariaLabelledBy?: string;\n ariaLabel?: string;\n onKeyUp: KeyboardEventHandler;\n onKeyDown: KeyboardEventHandler;\n onClick: MouseEventHandler;\n}\n\nexport const ExpandableSectionHeader = ({\n id,\n className,\n variant,\n children,\n expanded,\n ariaControls,\n ariaLabel,\n ariaLabelledBy,\n onKeyUp,\n onKeyDown,\n onClick,\n}: ExpandableSectionHeaderProps) => {\n const focusVisible = useFocusVisible();\n\n const icon = (\n <InternalIcon\n size={variant === 'container' ? 'medium' : 'normal'}\n className={clsx(styles.icon, expanded && styles.expanded)}\n name=\"caret-down-filled\"\n />\n );\n const ariaAttributes = {\n 'aria-controls': ariaControls,\n 'aria-expanded': expanded,\n };\n\n const triggerClassName = clsx(styles.trigger, styles[`trigger-${variant}`], expanded && styles['trigger-expanded']);\n if (variant === 'navigation') {\n return (\n <div id={id} className={clsx(className, triggerClassName)} onClick={onClick}>\n <button\n className={styles['icon-container']}\n type=\"button\"\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n {...focusVisible}\n {...ariaAttributes}\n >\n {icon}\n </button>\n {children}\n </div>\n );\n }\n\n return (\n <div\n id={id}\n role=\"button\"\n className={clsx(className, triggerClassName, styles.focusable, expanded && styles.expanded)}\n tabIndex={0}\n onKeyUp={onKeyUp}\n onKeyDown={onKeyDown}\n onClick={onClick}\n aria-label={ariaLabel}\n {...focusVisible}\n {...ariaAttributes}\n >\n <div className={styles['icon-container']}>{icon}</div>\n {children}\n </div>\n );\n};\n"]}
@@ -6,7 +6,6 @@ export declare namespace ExpandableSectionProps {
6
6
  interface ChangeDetail {
7
7
  expanded: boolean;
8
8
  }
9
- type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';
10
9
  }
11
10
  export interface ExpandableSectionProps extends BaseComponentProps {
12
11
  /**
@@ -37,28 +36,11 @@ export interface ExpandableSectionProps extends BaseComponentProps {
37
36
  */
38
37
  children?: React.ReactNode;
39
38
  /**
40
- * **Deprecated**, use headerText instead.
41
- * @deprecated
39
+ * Heading displayed above the content text.
40
+ *
41
+ * When using the container variant, use the Header component. Otherwise, use plain text.
42
42
  */
43
43
  header?: React.ReactNode;
44
- /**
45
- * Heading displayed above the content text. When using the container variant, use it with additional header props. Otherwise, use plain text.
46
- */
47
- headerText?: React.ReactNode;
48
- /**
49
- * Supplementary text below the heading. Use with container variant.
50
- */
51
- headerDescription?: string;
52
- /**
53
- * Specifies secondary text that's displayed to the right of the heading title. Use with container variant.
54
- * Behaves similar to the Header component counter.
55
- */
56
- headerCounter?: string;
57
- /**
58
- * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements)
59
- * h2. Use with container variant.
60
- */
61
- headingTagOverride?: ExpandableSectionProps.HeadingTag;
62
44
  /**
63
45
  * Adds `aria-label` to the header element.
64
46
  * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;IACxE,UAAiB,YAAY;QAC3B,QAAQ,EAAE,OAAO,CAAC;KACnB;IACD,KAAY,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3D;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;SAOK;IACL,OAAO,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC;IAEzC;;OAEG;IACH,sBAAsB,CAAC,EAAE,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IAE3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;CAC3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/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';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * **Deprecated**, use headerText instead.\n * @deprecated\n */\n header?: React.ReactNode;\n\n /**\n * Heading displayed above the content text. When using the container variant, use it with additional header props. Otherwise, use plain text.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with container variant.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements)\n * h2. Use with container variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/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';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export type Variant = 'default' | 'footer' | 'container' | 'navigation';\n export interface ChangeDetail {\n expanded: boolean;\n }\n}\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * Heading displayed above the content text.\n *\n * When using the container variant, use the Header component. Otherwise, use plain text.\n */\n header?: React.ReactNode;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { ExpandableSectionProps } from './interfaces';
2
2
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
3
  declare type InternalExpandableSectionProps = ExpandableSectionProps & InternalBaseComponentProps;
4
- export default function InternalExpandableSection({ expanded: controlledExpanded, defaultExpanded, onChange, variant, children, header, headerText, headerCounter, headerDescription, headingTagOverride, disableContentPaddings, headerAriaLabel, __internalRootRef, ...props }: InternalExpandableSectionProps): JSX.Element;
4
+ export default function InternalExpandableSection({ expanded: controlledExpanded, defaultExpanded, onChange, variant, children, header, disableContentPaddings, headerAriaLabel, __internalRootRef, ...props }: InternalExpandableSectionProps): JSX.Element;
5
5
  export {};
6
6
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/internal.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,aAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,eAwFhC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/internal.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,aAAK,8BAA8B,GAAG,sBAAsB,GAAG,0BAA0B,CAAC;AAE1F,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,eAAe,EACf,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,MAAM,EACN,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,8BAA8B,eAqFhC"}
@@ -13,7 +13,7 @@ import styles from './styles.css.js';
13
13
  import { ExpandableSectionContainer } from './expandable-section-container';
14
14
  import { ExpandableSectionHeader } from './expandable-section-header';
15
15
  export default function InternalExpandableSection(_a) {
16
- var controlledExpanded = _a.expanded, defaultExpanded = _a.defaultExpanded, onChange = _a.onChange, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, children = _a.children, header = _a.header, headerText = _a.headerText, headerCounter = _a.headerCounter, headerDescription = _a.headerDescription, headingTagOverride = _a.headingTagOverride, disableContentPaddings = _a.disableContentPaddings, headerAriaLabel = _a.headerAriaLabel, __internalRootRef = _a.__internalRootRef, props = __rest(_a, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "headerText", "headerCounter", "headerDescription", "headingTagOverride", "disableContentPaddings", "headerAriaLabel", "__internalRootRef"]);
16
+ var controlledExpanded = _a.expanded, defaultExpanded = _a.defaultExpanded, onChange = _a.onChange, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, children = _a.children, header = _a.header, disableContentPaddings = _a.disableContentPaddings, headerAriaLabel = _a.headerAriaLabel, __internalRootRef = _a.__internalRootRef, props = __rest(_a, ["expanded", "defaultExpanded", "onChange", "variant", "children", "header", "disableContentPaddings", "headerAriaLabel", "__internalRootRef"]);
17
17
  var ref = useRef(null);
18
18
  var controlId = useUniqueId();
19
19
  var triggerControlId = "".concat(controlId, "-trigger");
@@ -50,7 +50,7 @@ export default function InternalExpandableSection(_a) {
50
50
  onKeyDown: onKeyDown,
51
51
  onClick: onClick
52
52
  };
53
- return (React.createElement(ExpandableSectionContainer, __assign({}, baseProps, { expanded: expanded, className: clsx(baseProps.className, styles.root), variant: variant, disableContentPaddings: disableContentPaddings, header: React.createElement(ExpandableSectionHeader, __assign({ id: triggerControlId, className: clsx(styles.header, styles["header-".concat(variant)]), variant: variant, expanded: !!expanded, header: header, headerText: headerText, headerDescription: headerDescription, headerCounter: headerCounter, headingTagOverride: headingTagOverride }, triggerProps)), __internalRootRef: __internalRootRef }),
53
+ return (React.createElement(ExpandableSectionContainer, __assign({}, baseProps, { expanded: expanded, className: clsx(baseProps.className, styles.root), variant: variant, disableContentPaddings: disableContentPaddings, header: React.createElement(ExpandableSectionHeader, __assign({ id: triggerControlId, className: clsx(styles.header, styles["header-".concat(variant)]), variant: variant, expanded: !!expanded }, triggerProps), header), __internalRootRef: __internalRootRef }),
54
54
  React.createElement(CSSTransition, { "in": expanded, timeout: 30, classNames: { enter: styles['content-enter'] }, nodeRef: ref },
55
55
  React.createElement("div", { id: controlId, ref: ref, className: clsx(styles.content, styles["content-".concat(variant)], expanded && styles['content-expanded']), role: "group", "aria-label": triggerProps.ariaLabel, "aria-labelledby": triggerProps.ariaLabelledBy }, children))));
56
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/expandable-section/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,MAAM,EAAE,MA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B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,EACjD,OAAO,EAAE,OAAO,EAChB,sBAAsB,EAAE,sBAAsB,EAC9C,MAAM,EACJ,oBAAC,uBAAuB,aACtB,EAAE,EAAE,gBAAgB,EACpB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,iBAAU,OAAO,CAAE,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,kBAAkB,EAAE,kBAAkB,IAClC,YAAY,EAChB,EAEJ,iBAAiB,EAAE,iBAAiB;QAEpC,oBAAC,aAAa,IAAC,IAAE,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,kBAAW,OAAO,CAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,EACrG,IAAI,EAAC,OAAO,gBACA,YAAY,CAAC,SAAS,qBACjB,YAAY,CAAC,cAAc,IAE3C,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';\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 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\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 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 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 >\n {children}\n </div>\n </CSSTransition>\n </ExpandableSectionContainer>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/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,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6B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pG,6BACE,EAAE,EAAE,SAAS,EACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,kBAAW,OAAO,CAAE,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,EACrG,IAAI,EAAC,OAAO,gBACA,YAAY,CAAC,SAAS,qBACjB,YAAY,CAAC,cAAc,IAE3C,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';\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 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\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 className={clsx(styles.header, styles[`header-${variant}`])}\n variant={variant}\n expanded={!!expanded}\n {...triggerProps}\n >\n {header}\n </ExpandableSectionHeader>\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 >\n {children}\n </div>\n </CSSTransition>\n </ExpandableSectionContainer>\n );\n}\n"]}
@@ -1,26 +1,25 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "content-enter": "awsui_content-enter_gwq0h_o4wp5_97",
5
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_o4wp5_1",
6
- "trigger-expanded": "awsui_trigger-expanded_gwq0h_o4wp5_119",
7
- "icon": "awsui_icon_gwq0h_o4wp5_133",
8
- "root": "awsui_root_gwq0h_o4wp5_151",
9
- "expanded": "awsui_expanded_gwq0h_o4wp5_169",
10
- "icon-container": "awsui_icon-container_gwq0h_o4wp5_173",
11
- "trigger": "awsui_trigger_gwq0h_o4wp5_119",
12
- "trigger-default": "awsui_trigger-default_gwq0h_o4wp5_188",
13
- "trigger-footer": "awsui_trigger-footer_gwq0h_o4wp5_191",
14
- "trigger-navigation": "awsui_trigger-navigation_gwq0h_o4wp5_197",
15
- "trigger-container": "awsui_trigger-container_gwq0h_o4wp5_209",
16
- "header": "awsui_header_gwq0h_o4wp5_219",
17
- "header-container": "awsui_header-container_gwq0h_o4wp5_222",
18
- "header-container-button": "awsui_header-container-button_gwq0h_o4wp5_238",
19
- "header-navigation": "awsui_header-navigation_gwq0h_o4wp5_246",
20
- "content": "awsui_content_gwq0h_o4wp5_97",
21
- "content-default": "awsui_content-default_gwq0h_o4wp5_282",
22
- "content-footer": "awsui_content-footer_gwq0h_o4wp5_285",
23
- "content-expanded": "awsui_content-expanded_gwq0h_o4wp5_288",
24
- "focusable": "awsui_focusable_gwq0h_o4wp5_292"
4
+ "content-enter": "awsui_content-enter_gwq0h_lnh1z_97",
5
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_lnh1z_1",
6
+ "trigger-expanded": "awsui_trigger-expanded_gwq0h_lnh1z_119",
7
+ "icon": "awsui_icon_gwq0h_lnh1z_133",
8
+ "root": "awsui_root_gwq0h_lnh1z_151",
9
+ "expanded": "awsui_expanded_gwq0h_lnh1z_169",
10
+ "icon-container": "awsui_icon-container_gwq0h_lnh1z_173",
11
+ "trigger": "awsui_trigger_gwq0h_lnh1z_119",
12
+ "trigger-default": "awsui_trigger-default_gwq0h_lnh1z_188",
13
+ "trigger-footer": "awsui_trigger-footer_gwq0h_lnh1z_191",
14
+ "trigger-navigation": "awsui_trigger-navigation_gwq0h_lnh1z_197",
15
+ "trigger-container": "awsui_trigger-container_gwq0h_lnh1z_209",
16
+ "header": "awsui_header_gwq0h_lnh1z_219",
17
+ "header-container": "awsui_header-container_gwq0h_lnh1z_222",
18
+ "header-navigation": "awsui_header-navigation_gwq0h_lnh1z_229",
19
+ "content": "awsui_content_gwq0h_lnh1z_97",
20
+ "content-default": "awsui_content-default_gwq0h_lnh1z_265",
21
+ "content-footer": "awsui_content-footer_gwq0h_lnh1z_268",
22
+ "content-expanded": "awsui_content-expanded_gwq0h_lnh1z_271",
23
+ "focusable": "awsui_focusable_gwq0h_lnh1z_275"
25
24
  };
26
25
 
@@ -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_o4wp5_97:not(#\9) {
98
- animation: awsui_awsui-motion-fade-in_gwq0h_o4wp5_1 var(--motion-duration-show-paced-7wspqf, 180ms) var(--motion-easing-show-paced-wj4ybn, ease-out);
97
+ .awsui_content-enter_gwq0h_lnh1z_97:not(#\9) {
98
+ animation: awsui_awsui-motion-fade-in_gwq0h_lnh1z_1 var(--motion-duration-show-paced-7wspqf, 180ms) var(--motion-easing-show-paced-wj4ybn, ease-out);
99
99
  }
100
- @keyframes awsui_awsui-motion-fade-in_gwq0h_o4wp5_1 {
100
+ @keyframes awsui_awsui-motion-fade-in_gwq0h_lnh1z_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_o4wp5_97:not(#\9) {
109
+ .awsui_content-enter_gwq0h_lnh1z_97:not(#\9) {
110
110
  animation: none;
111
111
  transition: none;
112
112
  }
113
113
  }
114
- .awsui-motion-disabled .awsui_content-enter_gwq0h_o4wp5_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_o4wp5_97:not(#\9) {
114
+ .awsui-motion-disabled .awsui_content-enter_gwq0h_lnh1z_97:not(#\9), .awsui-mode-entering .awsui_content-enter_gwq0h_lnh1z_97:not(#\9) {
115
115
  animation: none;
116
116
  transition: none;
117
117
  }
118
118
 
119
- .awsui_trigger-expanded_gwq0h_o4wp5_119:not(#\9) {
119
+ .awsui_trigger-expanded_gwq0h_lnh1z_119:not(#\9) {
120
120
  transition: border-bottom-color var(--motion-duration-show-paced-7wspqf, 180ms) var(--motion-easing-show-paced-wj4ybn, ease-out);
121
121
  }
122
122
  @media (prefers-reduced-motion: reduce) {
123
- .awsui_trigger-expanded_gwq0h_o4wp5_119:not(#\9) {
123
+ .awsui_trigger-expanded_gwq0h_lnh1z_119:not(#\9) {
124
124
  animation: none;
125
125
  transition: none;
126
126
  }
127
127
  }
128
- .awsui-motion-disabled .awsui_trigger-expanded_gwq0h_o4wp5_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_o4wp5_119:not(#\9) {
128
+ .awsui-motion-disabled .awsui_trigger-expanded_gwq0h_lnh1z_119:not(#\9), .awsui-mode-entering .awsui_trigger-expanded_gwq0h_lnh1z_119:not(#\9) {
129
129
  animation: none;
130
130
  transition: none;
131
131
  }
132
132
 
133
- .awsui_icon_gwq0h_o4wp5_133:not(#\9) {
133
+ .awsui_icon_gwq0h_lnh1z_133:not(#\9) {
134
134
  transition: transform var(--motion-duration-rotate-90-ux18sr, 135ms) var(--motion-easing-rotate-90-eoew89, cubic-bezier(0.165, 0.84, 0.44, 1));
135
135
  }
136
136
  @media (prefers-reduced-motion: reduce) {
137
- .awsui_icon_gwq0h_o4wp5_133:not(#\9) {
137
+ .awsui_icon_gwq0h_lnh1z_133:not(#\9) {
138
138
  animation: none;
139
139
  transition: none;
140
140
  }
141
141
  }
142
- .awsui-motion-disabled .awsui_icon_gwq0h_o4wp5_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_o4wp5_133:not(#\9) {
142
+ .awsui-motion-disabled .awsui_icon_gwq0h_lnh1z_133:not(#\9), .awsui-mode-entering .awsui_icon_gwq0h_lnh1z_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_o4wp5_151:not(#\9) {
151
+ .awsui_root_gwq0h_lnh1z_151:not(#\9) {
152
152
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
153
153
  border-collapse: separate;
154
154
  border-spacing: 0;
@@ -189,20 +189,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
189
189
  display: block;
190
190
  }
191
191
 
192
- .awsui_icon_gwq0h_o4wp5_133:not(#\9) {
192
+ .awsui_icon_gwq0h_lnh1z_133:not(#\9) {
193
193
  transform: rotate(-90deg);
194
194
  }
195
- .awsui_icon_gwq0h_o4wp5_133.awsui_expanded_gwq0h_o4wp5_169:not(#\9) {
195
+ .awsui_icon_gwq0h_lnh1z_133.awsui_expanded_gwq0h_lnh1z_169:not(#\9) {
196
196
  transform: rotate(0deg);
197
197
  }
198
198
 
199
- .awsui_icon-container_gwq0h_o4wp5_173:not(#\9) {
199
+ .awsui_icon-container_gwq0h_lnh1z_173:not(#\9) {
200
200
  position: relative;
201
201
  margin-left: calc((var(--font-body-m-line-height-i7xxvv, 22px) - var(--size-icon-normal-j1z5fn, 16px)) / -2);
202
202
  margin-right: calc(var(--space-xxs-ynfts5, 4px) + var(--border-divider-list-width-hacikr, 1px));
203
203
  }
204
204
 
205
- .awsui_trigger_gwq0h_o4wp5_119:not(#\9) {
205
+ .awsui_trigger_gwq0h_lnh1z_119:not(#\9) {
206
206
  cursor: pointer;
207
207
  box-sizing: border-box;
208
208
  display: flex;
@@ -211,65 +211,48 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
211
211
  line-height: var(--font-body-m-line-height-i7xxvv, 22px);
212
212
  text-align: left;
213
213
  }
214
- .awsui_trigger-default_gwq0h_o4wp5_188:not(#\9) {
214
+ .awsui_trigger-default_gwq0h_lnh1z_188:not(#\9) {
215
215
  padding: var(--space-scaled-xxs-95dhkm, 4px) var(--space-xxs-ynfts5, 4px);
216
216
  }
217
- .awsui_trigger-footer_gwq0h_o4wp5_191:not(#\9) {
217
+ .awsui_trigger-footer_gwq0h_lnh1z_191:not(#\9) {
218
218
  padding: var(--space-scaled-xxs-95dhkm, 4px) 0;
219
219
  }
220
- .awsui_trigger-default_gwq0h_o4wp5_188:not(#\9), .awsui_trigger-footer_gwq0h_o4wp5_191:not(#\9) {
220
+ .awsui_trigger-default_gwq0h_lnh1z_188:not(#\9), .awsui_trigger-footer_gwq0h_lnh1z_191:not(#\9) {
221
221
  border: var(--border-divider-section-width-5a4cv1, 1px) solid transparent;
222
222
  }
223
- .awsui_trigger-navigation_gwq0h_o4wp5_197:not(#\9) {
223
+ .awsui_trigger-navigation_gwq0h_lnh1z_197:not(#\9) {
224
224
  border-left: var(--border-divider-section-width-5a4cv1, 1px) solid transparent;
225
225
  }
226
- .awsui_trigger-default_gwq0h_o4wp5_188:not(#\9), .awsui_trigger-navigation_gwq0h_o4wp5_197:not(#\9), .awsui_trigger-footer_gwq0h_o4wp5_191:not(#\9) {
226
+ .awsui_trigger-default_gwq0h_lnh1z_188:not(#\9), .awsui_trigger-navigation_gwq0h_lnh1z_197:not(#\9), .awsui_trigger-footer_gwq0h_lnh1z_191:not(#\9) {
227
227
  color: var(--color-text-expandable-section-default-muap7v, #545b64);
228
228
  font-weight: var(--font-heading-s-weight-1ygwuy, 700);
229
229
  font-size: var(--font-expandable-heading-size-6cp6jd, 14px);
230
230
  letter-spacing: var(--font-heading-s-letter-spacing-i014lh, normal);
231
231
  }
232
- .awsui_trigger-default_gwq0h_o4wp5_188:not(#\9):hover, .awsui_trigger-navigation_gwq0h_o4wp5_197:not(#\9):hover, .awsui_trigger-footer_gwq0h_o4wp5_191:not(#\9):hover {
232
+ .awsui_trigger-default_gwq0h_lnh1z_188:not(#\9):hover, .awsui_trigger-navigation_gwq0h_lnh1z_197:not(#\9):hover, .awsui_trigger-footer_gwq0h_lnh1z_191:not(#\9):hover {
233
233
  color: var(--color-text-expandable-section-hover-fhlqd8, #16191f);
234
234
  }
235
- .awsui_trigger-container_gwq0h_o4wp5_209:not(#\9) {
235
+ .awsui_trigger-container_gwq0h_lnh1z_209:not(#\9) {
236
236
  padding: var(--space-container-header-vertical-0bd19u, 12px) var(--space-container-horizontal-tlw03i, 20px);
237
237
  }
238
- .awsui_trigger-container_gwq0h_o4wp5_209[data-awsui-focus-visible=true]:not(#\9):focus {
238
+ .awsui_trigger-container_gwq0h_lnh1z_209[data-awsui-focus-visible=true]:not(#\9):focus {
239
239
  padding: calc(var(--space-scaled-s-cu1hzn, 12px) - var(--border-divider-section-width-5a4cv1, 1px)) calc(var(--space-l-4vl6xu, 20px) - var(--border-divider-section-width-5a4cv1, 1px));
240
240
  }
241
- .awsui_trigger-default_gwq0h_o4wp5_188.awsui_trigger-expanded_gwq0h_o4wp5_119:not(#\9) {
241
+ .awsui_trigger-default_gwq0h_lnh1z_188.awsui_trigger-expanded_gwq0h_lnh1z_119:not(#\9) {
242
242
  border-bottom-color: var(--color-border-divider-default-k96bks, #eaeded);
243
243
  }
244
244
 
245
- .awsui_header_gwq0h_o4wp5_219:not(#\9) {
245
+ .awsui_header_gwq0h_lnh1z_219:not(#\9) {
246
246
  display: flex;
247
247
  }
248
- .awsui_header-container_gwq0h_o4wp5_222:not(#\9) {
248
+ .awsui_header-container_gwq0h_lnh1z_222:not(#\9) {
249
249
  width: 100%;
250
250
  }
251
- .awsui_header-container_gwq0h_o4wp5_222 > .awsui_icon-container_gwq0h_o4wp5_173:not(#\9) {
251
+ .awsui_header-container_gwq0h_lnh1z_222 > .awsui_icon-container_gwq0h_lnh1z_173:not(#\9) {
252
252
  margin-top: var(--space-expandable-section-icon-offset-top-jo3eu8, 8px);
253
253
  margin-right: var(--space-xs-rsr2qu, 8px);
254
254
  }
255
- .awsui_header-container_gwq0h_o4wp5_222[data-awsui-focus-visible=true]:not(#\9):focus-within {
256
- outline: none;
257
- text-decoration: none;
258
- padding: calc(var(--space-scaled-s-cu1hzn, 12px) - var(--border-divider-section-width-5a4cv1, 1px)) calc(var(--space-l-4vl6xu, 20px) - var(--border-divider-section-width-5a4cv1, 1px));
259
- outline: 2px dotted transparent;
260
- border: var(--border-field-width-y6x4sn, 1px) solid var(--color-border-item-focused-n5kd8g, #0073bb);
261
- border-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
262
- box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-glnuoy, 1px) var(--color-border-item-focused-n5kd8g, #0073bb);
263
- }
264
- .awsui_header-container-button_gwq0h_o4wp5_238:not(#\9):focus {
265
- outline: none;
266
- text-decoration: none;
267
- }
268
- .awsui_header-container-button_gwq0h_o4wp5_238 > .awsui_icon-container_gwq0h_o4wp5_173:not(#\9) {
269
- margin-top: var(--space-expandable-section-icon-offset-top-jo3eu8, 8px);
270
- margin-right: var(--space-xs-rsr2qu, 8px);
271
- }
272
- .awsui_header-navigation_gwq0h_o4wp5_246 > .awsui_icon-container_gwq0h_o4wp5_173:not(#\9) {
255
+ .awsui_header-navigation_gwq0h_lnh1z_229 > .awsui_icon-container_gwq0h_lnh1z_173:not(#\9) {
273
256
  display: inline-flex;
274
257
  cursor: pointer;
275
258
  color: var(--color-text-expandable-section-navigation-icon-default-xyvmb6, #879596);
@@ -280,17 +263,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
280
263
  text-decoration: none;
281
264
  flex-direction: column;
282
265
  }
283
- .awsui_header-navigation_gwq0h_o4wp5_246 > .awsui_icon-container_gwq0h_o4wp5_173:not(#\9):hover {
266
+ .awsui_header-navigation_gwq0h_lnh1z_229 > .awsui_icon-container_gwq0h_lnh1z_173:not(#\9):hover {
284
267
  color: var(--color-text-expandable-section-hover-fhlqd8, #16191f);
285
268
  }
286
- .awsui_header-navigation_gwq0h_o4wp5_246 > .awsui_icon-container_gwq0h_o4wp5_173[data-awsui-focus-visible=true]:not(#\9):focus {
269
+ .awsui_header-navigation_gwq0h_lnh1z_229 > .awsui_icon-container_gwq0h_lnh1z_173[data-awsui-focus-visible=true]:not(#\9):focus {
287
270
  position: relative;
288
271
  }
289
- .awsui_header-navigation_gwq0h_o4wp5_246 > .awsui_icon-container_gwq0h_o4wp5_173[data-awsui-focus-visible=true]:not(#\9):focus {
272
+ .awsui_header-navigation_gwq0h_lnh1z_229 > .awsui_icon-container_gwq0h_lnh1z_173[data-awsui-focus-visible=true]:not(#\9):focus {
290
273
  outline: 2px dotted transparent;
291
274
  outline-offset: calc(2px - 1px);
292
275
  }
293
- .awsui_header-navigation_gwq0h_o4wp5_246 > .awsui_icon-container_gwq0h_o4wp5_173[data-awsui-focus-visible=true]:not(#\9):focus::before {
276
+ .awsui_header-navigation_gwq0h_lnh1z_229 > .awsui_icon-container_gwq0h_lnh1z_173[data-awsui-focus-visible=true]:not(#\9):focus::before {
294
277
  content: " ";
295
278
  display: block;
296
279
  position: absolute;
@@ -302,24 +285,24 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
302
285
  box-shadow: 0 0 0 2px var(--color-border-item-focused-n5kd8g, #0073bb);
303
286
  }
304
287
 
305
- .awsui_content_gwq0h_o4wp5_97:not(#\9) {
288
+ .awsui_content_gwq0h_lnh1z_97:not(#\9) {
306
289
  display: none;
307
290
  }
308
- .awsui_content-default_gwq0h_o4wp5_282:not(#\9) {
291
+ .awsui_content-default_gwq0h_lnh1z_265:not(#\9) {
309
292
  padding: var(--space-scaled-xs-6859qs, 8px) 0;
310
293
  }
311
- .awsui_content-footer_gwq0h_o4wp5_285:not(#\9) {
294
+ .awsui_content-footer_gwq0h_lnh1z_268:not(#\9) {
312
295
  padding: var(--space-xs-rsr2qu, 8px) 0;
313
296
  }
314
- .awsui_content-expanded_gwq0h_o4wp5_288:not(#\9) {
297
+ .awsui_content-expanded_gwq0h_lnh1z_271:not(#\9) {
315
298
  display: block;
316
299
  }
317
300
 
318
- .awsui_focusable_gwq0h_o4wp5_292:not(#\9):focus {
301
+ .awsui_focusable_gwq0h_lnh1z_275:not(#\9):focus {
319
302
  outline: none;
320
303
  text-decoration: none;
321
304
  }
322
- .awsui_focusable_gwq0h_o4wp5_292[data-awsui-focus-visible=true]:not(#\9):focus {
305
+ .awsui_focusable_gwq0h_lnh1z_275[data-awsui-focus-visible=true]:not(#\9):focus {
323
306
  outline: 2px dotted transparent;
324
307
  border: var(--border-field-width-y6x4sn, 1px) solid var(--color-border-item-focused-n5kd8g, #0073bb);
325
308
  border-radius: var(--border-radius-control-default-focus-ring-hekmgc, 2px);
@@ -2,26 +2,25 @@
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_o4wp5_97",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_o4wp5_1",
7
- "trigger-expanded": "awsui_trigger-expanded_gwq0h_o4wp5_119",
8
- "icon": "awsui_icon_gwq0h_o4wp5_133",
9
- "root": "awsui_root_gwq0h_o4wp5_151",
10
- "expanded": "awsui_expanded_gwq0h_o4wp5_169",
11
- "icon-container": "awsui_icon-container_gwq0h_o4wp5_173",
12
- "trigger": "awsui_trigger_gwq0h_o4wp5_119",
13
- "trigger-default": "awsui_trigger-default_gwq0h_o4wp5_188",
14
- "trigger-footer": "awsui_trigger-footer_gwq0h_o4wp5_191",
15
- "trigger-navigation": "awsui_trigger-navigation_gwq0h_o4wp5_197",
16
- "trigger-container": "awsui_trigger-container_gwq0h_o4wp5_209",
17
- "header": "awsui_header_gwq0h_o4wp5_219",
18
- "header-container": "awsui_header-container_gwq0h_o4wp5_222",
19
- "header-container-button": "awsui_header-container-button_gwq0h_o4wp5_238",
20
- "header-navigation": "awsui_header-navigation_gwq0h_o4wp5_246",
21
- "content": "awsui_content_gwq0h_o4wp5_97",
22
- "content-default": "awsui_content-default_gwq0h_o4wp5_282",
23
- "content-footer": "awsui_content-footer_gwq0h_o4wp5_285",
24
- "content-expanded": "awsui_content-expanded_gwq0h_o4wp5_288",
25
- "focusable": "awsui_focusable_gwq0h_o4wp5_292"
5
+ "content-enter": "awsui_content-enter_gwq0h_lnh1z_97",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_gwq0h_lnh1z_1",
7
+ "trigger-expanded": "awsui_trigger-expanded_gwq0h_lnh1z_119",
8
+ "icon": "awsui_icon_gwq0h_lnh1z_133",
9
+ "root": "awsui_root_gwq0h_lnh1z_151",
10
+ "expanded": "awsui_expanded_gwq0h_lnh1z_169",
11
+ "icon-container": "awsui_icon-container_gwq0h_lnh1z_173",
12
+ "trigger": "awsui_trigger_gwq0h_lnh1z_119",
13
+ "trigger-default": "awsui_trigger-default_gwq0h_lnh1z_188",
14
+ "trigger-footer": "awsui_trigger-footer_gwq0h_lnh1z_191",
15
+ "trigger-navigation": "awsui_trigger-navigation_gwq0h_lnh1z_197",
16
+ "trigger-container": "awsui_trigger-container_gwq0h_lnh1z_209",
17
+ "header": "awsui_header_gwq0h_lnh1z_219",
18
+ "header-container": "awsui_header-container_gwq0h_lnh1z_222",
19
+ "header-navigation": "awsui_header-navigation_gwq0h_lnh1z_229",
20
+ "content": "awsui_content_gwq0h_lnh1z_97",
21
+ "content-default": "awsui_content-default_gwq0h_lnh1z_265",
22
+ "content-footer": "awsui_content-footer_gwq0h_lnh1z_268",
23
+ "content-expanded": "awsui_content-expanded_gwq0h_lnh1z_271",
24
+ "focusable": "awsui_focusable_gwq0h_lnh1z_275"
26
25
  };
27
26
 
@@ -1,9 +1,9 @@
1
1
  import { FlashbarProps } from './interfaces';
2
2
  import React from 'react';
3
- export declare const focusFlashById: import("../internal/utils/throttle").ThrottledFunction<(element: HTMLElement | null, itemId: string) => void>;
4
- export interface FlashProps extends FlashbarProps.MessageDefinition {
3
+ interface Flash extends FlashbarProps.MessageDefinition {
5
4
  className: string;
6
5
  transitionState?: string;
7
6
  }
8
- export declare const Flash: React.ForwardRefExoticComponent<FlashProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const Flash: React.ForwardRefExoticComponent<Flash & React.RefAttributes<HTMLDivElement>>;
8
+ export {};
9
9
  //# sourceMappingURL=flash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAkD1B,eAAO,MAAM,cAAc,mEACf,WAAW,GAAG,IAAI,UAAU,MAAM,UAM7C,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,aAAa,CAAC,iBAAiB;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,mFAgGjB,CAAC"}
1
+ {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AA6C1B,UAAU,KAAM,SAAQ,aAAa,CAAC,iBAAiB;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,8EA4EjB,CAAC"}