@cloudscape-design/components 3.0.606 → 3.0.608

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 (39) hide show
  1. package/annotation-context/annotation/styles.css.js +24 -24
  2. package/annotation-context/annotation/styles.scoped.css +30 -30
  3. package/annotation-context/annotation/styles.selectors.js +24 -24
  4. package/app-layout/notifications/styles.css.js +3 -3
  5. package/app-layout/notifications/styles.scoped.css +7 -7
  6. package/app-layout/notifications/styles.selectors.js +3 -3
  7. package/app-layout/visual-refresh/styles.css.js +81 -81
  8. package/app-layout/visual-refresh/styles.scoped.css +275 -286
  9. package/app-layout/visual-refresh/styles.selectors.js +81 -81
  10. package/content-layout/styles.css.js +7 -7
  11. package/content-layout/styles.scoped.css +13 -15
  12. package/content-layout/styles.selectors.js +7 -7
  13. package/flashbar/styles.css.js +47 -47
  14. package/flashbar/styles.scoped.css +171 -171
  15. package/flashbar/styles.selectors.js +47 -47
  16. package/form-field/internal.d.ts.map +1 -1
  17. package/form-field/internal.js +10 -6
  18. package/form-field/internal.js.map +1 -1
  19. package/internal/components/dropdown/styles.css.js +20 -20
  20. package/internal/components/dropdown/styles.scoped.css +39 -39
  21. package/internal/components/dropdown/styles.selectors.js +20 -20
  22. package/internal/environment.js +1 -1
  23. package/internal/environment.json +1 -1
  24. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  25. package/internal/generated/custom-css-properties/index.js +44 -46
  26. package/internal/generated/custom-css-properties/index.js.map +1 -1
  27. package/internal/manifest.json +1 -1
  28. package/package.json +1 -1
  29. package/popover/internal.js +1 -1
  30. package/popover/internal.js.map +1 -1
  31. package/popover/styles.css.js +50 -50
  32. package/popover/styles.scoped.css +64 -64
  33. package/popover/styles.selectors.js +50 -50
  34. package/spinner/styles.css.js +13 -13
  35. package/spinner/styles.scoped.css +39 -39
  36. package/spinner/styles.selectors.js +13 -13
  37. package/wizard/styles.css.js +32 -32
  38. package/wizard/styles.scoped.css +68 -68
  39. package/wizard/styles.selectors.js +32 -32
@@ -1,50 +1,48 @@
1
1
  const customCSSPropertiesMap = {
2
- breadcrumbsGap: '--awsui-breadcrumbs-gap-iof9y8',
3
- contentGapLeft: '--awsui-content-gap-left-iof9y8',
4
- contentGapRight: '--awsui-content-gap-right-iof9y8',
5
- contentHeight: '--awsui-content-height-iof9y8',
6
- containerFirstGap: '--awsui-container-first-gap-iof9y8',
7
- containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-iof9y8',
8
- defaultMaxContentWidth: '--awsui-default-max-content-width-iof9y8',
9
- defaultMinContentWidth: '--awsui-default-min-content-width-iof9y8',
10
- drawerSize: '--awsui-drawer-size-iof9y8',
11
- footerHeight: '--awsui-footer-height-iof9y8',
12
- headerGap: '--awsui-header-gap-iof9y8',
13
- headerHeight: '--awsui-header-height-iof9y8',
14
- layoutWidth: '--awsui-layout-width-iof9y8',
15
- mainGap: '--awsui-main-gap-iof9y8',
16
- mainOffsetLeft: '--awsui-main-offset-left-iof9y8',
17
- mainTemplateRows: '--awsui-main-template-rows-iof9y8',
18
- maxContentWidth: '--awsui-max-content-width-iof9y8',
19
- minContentWidth: '--awsui-min-content-width-iof9y8',
20
- mobileBarHeight: '--awsui-mobile-bar-height-iof9y8',
21
- notificationsGap: '--awsui-notifications-gap-iof9y8',
22
- notificationsHeight: '--awsui-notifications-height-iof9y8',
23
- offsetTop: '--awsui-offset-top-iof9y8',
24
- offsetTopWithNotifications: '--awsui-offset-top-with-notifications-iof9y8',
25
- overlapHeight: '--awsui-overlap-height-iof9y8',
26
- navigationWidth: '--awsui-navigation-width-iof9y8',
27
- splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-iof9y8',
28
- splitPanelReportedSize: '--awsui-split-panel-reported-size-iof9y8',
29
- splitPanelHeight: '--awsui-split-panel-height-iof9y8',
30
- splitPanelMinWidth: '--awsui-split-panel-min-width-iof9y8',
31
- splitPanelMaxWidth: '--awsui-split-panel-max-width-iof9y8',
32
- toolsMaxWidth: '--awsui-tools-max-width-iof9y8',
33
- toolsWidth: '--awsui-tools-width-iof9y8',
34
- toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-iof9y8',
35
- contentScrollMargin: '--awsui-content-scroll-margin-iof9y8',
36
- flashbarStackDepth: '--awsui-flashbar-stack-depth-iof9y8',
37
- flashbarStackIndex: '--awsui-flashbar-stack-index-iof9y8',
38
- flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-iof9y8',
39
- stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-iof9y8',
40
- stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-iof9y8',
41
- dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-iof9y8',
42
- spinnerRotatorFrom: '--awsui-spinner-rotator-from-iof9y8',
43
- spinnerRotatorTo: '--awsui-spinner-rotator-to-iof9y8',
44
- spinnerLineLeftFrom: '--awsui-spinner-line-left-from-iof9y8',
45
- spinnerLineLeftTo: '--awsui-spinner-line-left-to-iof9y8',
46
- spinnerLineRightFrom: '--awsui-spinner-line-right-from-iof9y8',
47
- spinnerLineRightTo: '--awsui-spinner-line-right-to-iof9y8',
2
+ breadcrumbsGap: '--awsui-breadcrumbs-gap-lgosor',
3
+ contentGapLeft: '--awsui-content-gap-left-lgosor',
4
+ contentGapRight: '--awsui-content-gap-right-lgosor',
5
+ contentHeight: '--awsui-content-height-lgosor',
6
+ defaultMaxContentWidth: '--awsui-default-max-content-width-lgosor',
7
+ defaultMinContentWidth: '--awsui-default-min-content-width-lgosor',
8
+ drawerSize: '--awsui-drawer-size-lgosor',
9
+ footerHeight: '--awsui-footer-height-lgosor',
10
+ headerGap: '--awsui-header-gap-lgosor',
11
+ headerHeight: '--awsui-header-height-lgosor',
12
+ layoutWidth: '--awsui-layout-width-lgosor',
13
+ mainGap: '--awsui-main-gap-lgosor',
14
+ mainOffsetLeft: '--awsui-main-offset-left-lgosor',
15
+ mainTemplateRows: '--awsui-main-template-rows-lgosor',
16
+ maxContentWidth: '--awsui-max-content-width-lgosor',
17
+ minContentWidth: '--awsui-min-content-width-lgosor',
18
+ mobileBarHeight: '--awsui-mobile-bar-height-lgosor',
19
+ notificationsGap: '--awsui-notifications-gap-lgosor',
20
+ notificationsHeight: '--awsui-notifications-height-lgosor',
21
+ offsetTop: '--awsui-offset-top-lgosor',
22
+ offsetTopWithNotifications: '--awsui-offset-top-with-notifications-lgosor',
23
+ overlapHeight: '--awsui-overlap-height-lgosor',
24
+ navigationWidth: '--awsui-navigation-width-lgosor',
25
+ splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-lgosor',
26
+ splitPanelReportedSize: '--awsui-split-panel-reported-size-lgosor',
27
+ splitPanelHeight: '--awsui-split-panel-height-lgosor',
28
+ splitPanelMinWidth: '--awsui-split-panel-min-width-lgosor',
29
+ splitPanelMaxWidth: '--awsui-split-panel-max-width-lgosor',
30
+ toolsMaxWidth: '--awsui-tools-max-width-lgosor',
31
+ toolsWidth: '--awsui-tools-width-lgosor',
32
+ toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-lgosor',
33
+ contentScrollMargin: '--awsui-content-scroll-margin-lgosor',
34
+ flashbarStackDepth: '--awsui-flashbar-stack-depth-lgosor',
35
+ flashbarStackIndex: '--awsui-flashbar-stack-index-lgosor',
36
+ flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-lgosor',
37
+ stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-lgosor',
38
+ stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-lgosor',
39
+ dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-lgosor',
40
+ spinnerRotatorFrom: '--awsui-spinner-rotator-from-lgosor',
41
+ spinnerRotatorTo: '--awsui-spinner-rotator-to-lgosor',
42
+ spinnerLineLeftFrom: '--awsui-spinner-line-left-from-lgosor',
43
+ spinnerLineLeftTo: '--awsui-spinner-line-left-to-lgosor',
44
+ spinnerLineRightFrom: '--awsui-spinner-line-right-from-lgosor',
45
+ spinnerLineRightTo: '--awsui-spinner-line-right-to-lgosor',
48
46
  };
49
47
  export default customCSSPropertiesMap;
50
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,8BAA8B,EAAE,kDAAkD;IAClF,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,UAAU,EAAE,4BAA4B;IACxC,YAAY,EAAE,8BAA8B;IAC5C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,yBAAyB;IAClC,cAAc,EAAE,iCAAiC;IACjD,gBAAgB,EAAE,mCAAmC;IACrD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;IACpD,mBAAmB,EAAE,qCAAqC;IAC1D,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;IACzD,0BAA0B,EAAE,8CAA8C;IAC1E,gCAAgC,EAAE,oDAAoD;IACtF,uCAAuC,EAAE,4DAA4D;IACrG,uBAAuB,EAAE,2CAA2C;IACpE,kBAAkB,EAAE,qCAAqC;IACzD,gBAAgB,EAAE,mCAAmC;IACrD,mBAAmB,EAAE,uCAAuC;IAC5D,iBAAiB,EAAE,qCAAqC;IACxD,oBAAoB,EAAE,wCAAwC;IAC9D,kBAAkB,EAAE,sCAAsC;CAC3D,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n breadcrumbsGap: '--awsui-breadcrumbs-gap-iof9y8',\n contentGapLeft: '--awsui-content-gap-left-iof9y8',\n contentGapRight: '--awsui-content-gap-right-iof9y8',\n contentHeight: '--awsui-content-height-iof9y8',\n containerFirstGap: '--awsui-container-first-gap-iof9y8',\n containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-iof9y8',\n defaultMaxContentWidth: '--awsui-default-max-content-width-iof9y8',\n defaultMinContentWidth: '--awsui-default-min-content-width-iof9y8',\n drawerSize: '--awsui-drawer-size-iof9y8',\n footerHeight: '--awsui-footer-height-iof9y8',\n headerGap: '--awsui-header-gap-iof9y8',\n headerHeight: '--awsui-header-height-iof9y8',\n layoutWidth: '--awsui-layout-width-iof9y8',\n mainGap: '--awsui-main-gap-iof9y8',\n mainOffsetLeft: '--awsui-main-offset-left-iof9y8',\n mainTemplateRows: '--awsui-main-template-rows-iof9y8',\n maxContentWidth: '--awsui-max-content-width-iof9y8',\n minContentWidth: '--awsui-min-content-width-iof9y8',\n mobileBarHeight: '--awsui-mobile-bar-height-iof9y8',\n notificationsGap: '--awsui-notifications-gap-iof9y8',\n notificationsHeight: '--awsui-notifications-height-iof9y8',\n offsetTop: '--awsui-offset-top-iof9y8',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-iof9y8',\n overlapHeight: '--awsui-overlap-height-iof9y8',\n navigationWidth: '--awsui-navigation-width-iof9y8',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-iof9y8',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-iof9y8',\n splitPanelHeight: '--awsui-split-panel-height-iof9y8',\n splitPanelMinWidth: '--awsui-split-panel-min-width-iof9y8',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-iof9y8',\n toolsMaxWidth: '--awsui-tools-max-width-iof9y8',\n toolsWidth: '--awsui-tools-width-iof9y8',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-iof9y8',\n contentScrollMargin: '--awsui-content-scroll-margin-iof9y8',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-iof9y8',\n flashbarStackIndex: '--awsui-flashbar-stack-index-iof9y8',\n flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-iof9y8',\n stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-iof9y8',\n stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-iof9y8',\n dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-iof9y8',\n spinnerRotatorFrom: '--awsui-spinner-rotator-from-iof9y8',\n spinnerRotatorTo: '--awsui-spinner-rotator-to-iof9y8',\n spinnerLineLeftFrom: '--awsui-spinner-line-left-from-iof9y8',\n spinnerLineLeftTo: '--awsui-spinner-line-left-to-iof9y8',\n spinnerLineRightFrom: '--awsui-spinner-line-right-from-iof9y8',\n spinnerLineRightTo: '--awsui-spinner-line-right-to-iof9y8',\n};\nexport default customCSSPropertiesMap;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,sBA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gap-lgosor',\n contentGapLeft: '--awsui-content-gap-left-lgosor',\n contentGapRight: '--awsui-content-gap-right-lgosor',\n contentHeight: '--awsui-content-height-lgosor',\n defaultMaxContentWidth: '--awsui-default-max-content-width-lgosor',\n defaultMinContentWidth: '--awsui-default-min-content-width-lgosor',\n drawerSize: '--awsui-drawer-size-lgosor',\n footerHeight: '--awsui-footer-height-lgosor',\n headerGap: '--awsui-header-gap-lgosor',\n headerHeight: '--awsui-header-height-lgosor',\n layoutWidth: '--awsui-layout-width-lgosor',\n mainGap: '--awsui-main-gap-lgosor',\n mainOffsetLeft: '--awsui-main-offset-left-lgosor',\n mainTemplateRows: '--awsui-main-template-rows-lgosor',\n maxContentWidth: '--awsui-max-content-width-lgosor',\n minContentWidth: '--awsui-min-content-width-lgosor',\n mobileBarHeight: '--awsui-mobile-bar-height-lgosor',\n notificationsGap: '--awsui-notifications-gap-lgosor',\n notificationsHeight: '--awsui-notifications-height-lgosor',\n offsetTop: '--awsui-offset-top-lgosor',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-lgosor',\n overlapHeight: '--awsui-overlap-height-lgosor',\n navigationWidth: '--awsui-navigation-width-lgosor',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-lgosor',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-lgosor',\n splitPanelHeight: '--awsui-split-panel-height-lgosor',\n splitPanelMinWidth: '--awsui-split-panel-min-width-lgosor',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-lgosor',\n toolsMaxWidth: '--awsui-tools-max-width-lgosor',\n toolsWidth: '--awsui-tools-width-lgosor',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-lgosor',\n contentScrollMargin: '--awsui-content-scroll-margin-lgosor',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-lgosor',\n flashbarStackIndex: '--awsui-flashbar-stack-index-lgosor',\n flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-lgosor',\n stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-lgosor',\n stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-lgosor',\n dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-lgosor',\n spinnerRotatorFrom: '--awsui-spinner-rotator-from-lgosor',\n spinnerRotatorTo: '--awsui-spinner-rotator-to-lgosor',\n spinnerLineLeftFrom: '--awsui-spinner-line-left-from-lgosor',\n spinnerLineLeftTo: '--awsui-spinner-line-left-to-lgosor',\n spinnerLineRightFrom: '--awsui-spinner-line-right-from-lgosor',\n spinnerLineRightTo: '--awsui-spinner-line-right-to-lgosor',\n};\nexport default customCSSPropertiesMap;\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "95f08236b52406f58767197b6185d8bda48e64cf"
2
+ "commit": "395d6a9a132d11ccfa111ec91b456e870872a1e8"
3
3
  }
package/package.json CHANGED
@@ -116,7 +116,7 @@
116
116
  "./internal/base-component/index.js",
117
117
  "./internal/base-component/styles.css.js"
118
118
  ],
119
- "version": "3.0.606",
119
+ "version": "3.0.608",
120
120
  "repository": {
121
121
  "type": "git",
122
122
  "url": "https://github.com/cloudscape-design/components.git"
@@ -88,7 +88,7 @@ function InternalPopover(_a, ref) {
88
88
  };
89
89
  const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);
90
90
  const referrerId = useUniqueId();
91
- const popoverContent = (React.createElement("div", { "aria-live": dismissButton ? undefined : 'polite', "aria-atomic": dismissButton ? undefined : true, className: clsx(popoverClasses, styles['popover-content']), "data-awsui-referrer-id": referrerId }, visible && (React.createElement(PopoverContainer, { size: size, fixedWidth: fixedWidth, position: position, trackRef: triggerRef, arrow: position => React.createElement(Arrow, { position: position }), renderWithPortal: renderWithPortal, zIndex: renderWithPortal ? 7000 : undefined },
91
+ const popoverContent = (React.createElement("div", { "aria-live": dismissButton ? undefined : 'polite', "aria-atomic": dismissButton ? undefined : true, className: clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content']), "data-awsui-referrer-id": referrerId }, visible && (React.createElement(PopoverContainer, { size: size, fixedWidth: fixedWidth, position: position, trackRef: triggerRef, arrow: position => React.createElement(Arrow, { position: position }), renderWithPortal: renderWithPortal, zIndex: renderWithPortal ? 7000 : undefined },
92
92
  React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
93
93
  React.createElement(PopoverBody, { dismissButton: dismissButton, dismissAriaLabel: dismissAriaLabel, header: header, onDismiss: onDismiss, overflowVisible: "both" }, content))))));
94
94
  const mergedRef = useMergeRefs(popoverRef, __internalRootRef);
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAEnD,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,WAAW,MAAM,QAAQ,CAAC;AAEjC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAA6B,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,C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C,CAAC,SAAS;QAE3C,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE;YACtE,oBAAC,WAAW,IACV,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,eAAe,EAAC,MAAM,IAErB,OAAO,CACI,CACqB,CACpB,CACpB,CACG,CACP,CAAC;IAEF,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAE9D,OAAO,CACL,8CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,EACjD,GAAG,EAAE,SAAS,EACd,WAAW,EAAE,GAAG,EAAE;YAChB,gFAAgF;YAChF,YAAY,CAAC,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE;gBAChD,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,gDACM,YAAY,IAChB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAC,QAAQ,mBACC,QAAQ,EACtB,EAAE,EAAE,UAAU,gBACF,gBAAgB;YAE5B,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,QAAQ,CAAQ,CACzD,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACnB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useInternalI18n } from '../i18n/context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n triggerAriaLabel,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n // useCapture=false makes sure this listener is called after the one attached to the element.\n // the options.capture notation is unsupported by IE.\n document.addEventListener('mousedown', onDocumentClick, false);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, false);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, styles['popover-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button\n {...triggerProps}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n <span className={styles['trigger-inner-text']}>{children}</span>\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n </span>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAEnD,OAAO,gBAAgB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AAE,EAAE,UAAU,gBACF,gBAAgB;YAE5B,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,QAAQ,CAAQ,CACzD,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACnB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useInternalI18n } from '../i18n/context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { useSingleTabStopNavigation } from '../internal/context/single-tab-stop-navigation-context';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n triggerAriaLabel,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n // useCapture=false makes sure this listener is called after the one attached to the element.\n // the options.capture notation is unsupported by IE.\n document.addEventListener('mousedown', onDocumentClick, false);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, false);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button\n {...triggerProps}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n <span className={styles['trigger-inner-text']}>{children}</span>\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n </span>\n );\n}\n"]}
@@ -1,55 +1,55 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "arrow": "awsui_arrow_xjuzf_ekpfy_197",
5
- "arrow-outer": "awsui_arrow-outer_xjuzf_ekpfy_201",
6
- "arrow-inner": "awsui_arrow-inner_xjuzf_ekpfy_201",
7
- "refresh": "awsui_refresh_xjuzf_ekpfy_231",
8
- "arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_ekpfy_241",
9
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_ekpfy_241",
10
- "arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_ekpfy_244",
11
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_ekpfy_244",
12
- "arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_ekpfy_247",
13
- "arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_ekpfy_247",
14
- "arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_ekpfy_247",
15
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_ekpfy_247",
16
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_ekpfy_250",
17
- "arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_ekpfy_250",
18
- "arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_ekpfy_250",
19
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_ekpfy_250",
20
- "body": "awsui_body_xjuzf_ekpfy_352",
21
- "body-overflow-visible": "awsui_body-overflow-visible_xjuzf_ekpfy_391",
22
- "has-dismiss": "awsui_has-dismiss_xjuzf_ekpfy_395",
23
- "dismiss": "awsui_dismiss_xjuzf_ekpfy_400",
24
- "dismiss-control": "awsui_dismiss-control_xjuzf_ekpfy_408",
25
- "header-row": "awsui_header-row_xjuzf_ekpfy_412",
26
- "header": "awsui_header_xjuzf_ekpfy_412",
27
- "content": "awsui_content_xjuzf_ekpfy_438",
28
- "content-overflow-visible": "awsui_content-overflow-visible_xjuzf_ekpfy_446",
29
- "container": "awsui_container_xjuzf_ekpfy_548",
30
- "container-body": "awsui_container-body_xjuzf_ekpfy_556",
31
- "container-body-variant-annotation": "awsui_container-body-variant-annotation_xjuzf_ekpfy_599",
32
- "container-body-size-small": "awsui_container-body-size-small_xjuzf_ekpfy_604",
33
- "fixed-width": "awsui_fixed-width_xjuzf_ekpfy_607",
34
- "container-body-size-medium": "awsui_container-body-size-medium_xjuzf_ekpfy_611",
35
- "container-body-size-large": "awsui_container-body-size-large_xjuzf_ekpfy_618",
36
- "container-arrow": "awsui_container-arrow_xjuzf_ekpfy_630",
37
- "container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_ekpfy_634",
38
- "container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_ekpfy_634",
39
- "container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_ekpfy_646",
40
- "container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_ekpfy_646",
41
- "container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_ekpfy_658",
42
- "container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_ekpfy_658",
43
- "container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_ekpfy_658",
44
- "container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_ekpfy_658",
45
- "container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_ekpfy_674",
46
- "container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_ekpfy_678",
47
- "container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_ekpfy_682",
48
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_ekpfy_1",
49
- "root": "awsui_root_xjuzf_ekpfy_828",
50
- "trigger": "awsui_trigger_xjuzf_ekpfy_864",
51
- "trigger-type-text": "awsui_trigger-type-text_xjuzf_ekpfy_871",
52
- "trigger-inner-text": "awsui_trigger-inner-text_xjuzf_ekpfy_906",
53
- "popover-content": "awsui_popover-content_xjuzf_ekpfy_910"
4
+ "arrow": "awsui_arrow_xjuzf_1xq78_197",
5
+ "arrow-outer": "awsui_arrow-outer_xjuzf_1xq78_201",
6
+ "arrow-inner": "awsui_arrow-inner_xjuzf_1xq78_201",
7
+ "refresh": "awsui_refresh_xjuzf_1xq78_231",
8
+ "arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_1xq78_241",
9
+ "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_1xq78_241",
10
+ "arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_1xq78_244",
11
+ "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_1xq78_244",
12
+ "arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_1xq78_247",
13
+ "arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_1xq78_247",
14
+ "arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_1xq78_247",
15
+ "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_1xq78_247",
16
+ "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_1xq78_250",
17
+ "arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_1xq78_250",
18
+ "arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_1xq78_250",
19
+ "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_1xq78_250",
20
+ "body": "awsui_body_xjuzf_1xq78_352",
21
+ "body-overflow-visible": "awsui_body-overflow-visible_xjuzf_1xq78_391",
22
+ "has-dismiss": "awsui_has-dismiss_xjuzf_1xq78_395",
23
+ "dismiss": "awsui_dismiss_xjuzf_1xq78_400",
24
+ "dismiss-control": "awsui_dismiss-control_xjuzf_1xq78_408",
25
+ "header-row": "awsui_header-row_xjuzf_1xq78_412",
26
+ "header": "awsui_header_xjuzf_1xq78_412",
27
+ "content": "awsui_content_xjuzf_1xq78_438",
28
+ "content-overflow-visible": "awsui_content-overflow-visible_xjuzf_1xq78_446",
29
+ "container": "awsui_container_xjuzf_1xq78_548",
30
+ "container-body": "awsui_container-body_xjuzf_1xq78_556",
31
+ "container-body-variant-annotation": "awsui_container-body-variant-annotation_xjuzf_1xq78_599",
32
+ "container-body-size-small": "awsui_container-body-size-small_xjuzf_1xq78_604",
33
+ "fixed-width": "awsui_fixed-width_xjuzf_1xq78_607",
34
+ "container-body-size-medium": "awsui_container-body-size-medium_xjuzf_1xq78_611",
35
+ "container-body-size-large": "awsui_container-body-size-large_xjuzf_1xq78_618",
36
+ "container-arrow": "awsui_container-arrow_xjuzf_1xq78_630",
37
+ "container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_1xq78_634",
38
+ "container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_1xq78_634",
39
+ "container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_1xq78_646",
40
+ "container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_1xq78_646",
41
+ "container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_1xq78_658",
42
+ "container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_1xq78_658",
43
+ "container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_1xq78_658",
44
+ "container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_1xq78_658",
45
+ "container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_1xq78_674",
46
+ "container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_1xq78_678",
47
+ "container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_1xq78_682",
48
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_1xq78_1",
49
+ "root": "awsui_root_xjuzf_1xq78_828",
50
+ "trigger": "awsui_trigger_xjuzf_1xq78_864",
51
+ "trigger-type-text": "awsui_trigger-type-text_xjuzf_1xq78_871",
52
+ "trigger-inner-text": "awsui_trigger-inner-text_xjuzf_1xq78_906",
53
+ "popover-inline-content": "awsui_popover-inline-content_xjuzf_1xq78_910"
54
54
  };
55
55