@cloudscape-design/components 3.0.1042 → 3.0.1044

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 (75) hide show
  1. package/alert/index.d.ts.map +1 -1
  2. package/alert/index.js +12 -87
  3. package/alert/interfaces.d.ts +45 -0
  4. package/alert/interfaces.d.ts.map +1 -1
  5. package/alert/interfaces.js.map +1 -1
  6. package/alert/internal-do-not-use-core.js +93 -0
  7. package/alert/internal-do-not-use-core.js.map +1 -0
  8. package/alert/internal.d.ts +1 -0
  9. package/alert/internal.d.ts.map +1 -1
  10. package/alert/internal.js +4 -3
  11. package/alert/internal.js.map +1 -1
  12. package/alert/style.d.ts +22 -0
  13. package/alert/style.d.ts.map +1 -0
  14. package/alert/style.js +36 -0
  15. package/alert/style.js.map +1 -0
  16. package/alert/styles.css.js +27 -27
  17. package/alert/styles.scoped.css +47 -46
  18. package/alert/styles.selectors.js +27 -27
  19. package/button-dropdown/internal.d.ts.map +1 -1
  20. package/button-dropdown/internal.js +2 -2
  21. package/button-dropdown/internal.js.map +1 -1
  22. package/container/index.js +1 -1
  23. package/container/interfaces.d.ts +45 -0
  24. package/container/interfaces.d.ts.map +1 -1
  25. package/container/interfaces.js.map +1 -1
  26. package/container/internal.d.ts +1 -0
  27. package/container/internal.d.ts.map +1 -1
  28. package/container/internal.js +9 -7
  29. package/container/internal.js.map +1 -1
  30. package/container/style.d.ts +6 -0
  31. package/container/style.d.ts.map +1 -0
  32. package/container/style.js +58 -0
  33. package/container/style.js.map +1 -0
  34. package/internal/base-component/styles.scoped.css +1 -1
  35. package/internal/components/button-trigger/styles.css.js +13 -13
  36. package/internal/components/button-trigger/styles.scoped.css +36 -31
  37. package/internal/components/button-trigger/styles.selectors.js +13 -13
  38. package/internal/environment.js +2 -2
  39. package/internal/environment.json +2 -2
  40. package/internal/manifest.json +1 -1
  41. package/package.json +1 -2
  42. package/alert/index.js.map +0 -1
  43. package/test-utils/dom/top-navigation/1.0-beta/index.d.ts +0 -28
  44. package/test-utils/dom/top-navigation/1.0-beta/index.js +0 -72
  45. package/test-utils/dom/top-navigation/1.0-beta/index.js.map +0 -1
  46. package/test-utils/selectors/top-navigation/1.0-beta/index.d.ts +0 -28
  47. package/test-utils/selectors/top-navigation/1.0-beta/index.js +0 -72
  48. package/test-utils/selectors/top-navigation/1.0-beta/index.js.map +0 -1
  49. package/top-navigation/1.0-beta/index.d.ts +0 -12
  50. package/top-navigation/1.0-beta/index.d.ts.map +0 -1
  51. package/top-navigation/1.0-beta/index.js +0 -19
  52. package/top-navigation/1.0-beta/index.js.map +0 -1
  53. package/top-navigation/1.0-beta/interfaces.d.ts +0 -102
  54. package/top-navigation/1.0-beta/interfaces.d.ts.map +0 -1
  55. package/top-navigation/1.0-beta/interfaces.js +0 -2
  56. package/top-navigation/1.0-beta/interfaces.js.map +0 -1
  57. package/top-navigation/1.0-beta/internal.d.ts +0 -13
  58. package/top-navigation/1.0-beta/internal.d.ts.map +0 -1
  59. package/top-navigation/1.0-beta/internal.js +0 -93
  60. package/top-navigation/1.0-beta/internal.js.map +0 -1
  61. package/top-navigation/1.0-beta/parts/overflow-menu.d.ts +0 -20
  62. package/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +0 -1
  63. package/top-navigation/1.0-beta/parts/overflow-menu.js +0 -54
  64. package/top-navigation/1.0-beta/parts/overflow-menu.js.map +0 -1
  65. package/top-navigation/1.0-beta/parts/utility.d.ts +0 -14
  66. package/top-navigation/1.0-beta/parts/utility.d.ts.map +0 -1
  67. package/top-navigation/1.0-beta/parts/utility.js +0 -56
  68. package/top-navigation/1.0-beta/parts/utility.js.map +0 -1
  69. package/top-navigation/1.0-beta/styles.css.js +0 -28
  70. package/top-navigation/1.0-beta/styles.scoped.css +0 -360
  71. package/top-navigation/1.0-beta/styles.selectors.js +0 -29
  72. package/top-navigation/1.0-beta/use-top-navigation.d.ts +0 -29
  73. package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +0 -1
  74. package/top-navigation/1.0-beta/use-top-navigation.js +0 -154
  75. package/top-navigation/1.0-beta/use-top-navigation.js.map +0 -1
@@ -11,6 +11,7 @@ import { ContainerHeaderContextProvider } from '../internal/context/container-he
11
11
  import { useModalContext } from '../internal/context/modal-context';
12
12
  import { useMobile } from '../internal/hooks/use-mobile';
13
13
  import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
14
+ import { getContentStyles, getFooterStyles, getHeaderStyles, getMediaStyles, getRootStyles } from './style';
14
15
  import { StickyHeaderContext, useStickyHeader } from './use-sticky-header';
15
16
  import analyticsSelectors from './analytics-metadata/styles.css.js';
16
17
  import styles from './styles.css.js';
@@ -22,7 +23,7 @@ export function InternalContainerAsSubstep(props) {
22
23
  }
23
24
  export default function InternalContainer(_a) {
24
25
  var _b;
25
- var { header, footer, children, variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, disableFooterPaddings = false, fitHeight, media, __stickyOffset, __mobileStickyOffset, __stickyHeader = false, __internalRootRef = null, __disableFooterDivider = false, __hiddenContent = false, __headerRef, __fullPage = false, __disableStickyMobile = true, __funnelSubStepProps, __subStepRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "disableFooterPaddings", "fitHeight", "media", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
26
+ var { header, footer, children, variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, disableFooterPaddings = false, fitHeight, media, style, __stickyOffset, __mobileStickyOffset, __stickyHeader = false, __internalRootRef = null, __disableFooterDivider = false, __hiddenContent = false, __headerRef, __fullPage = false, __disableStickyMobile = true, __funnelSubStepProps, __subStepRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "disableFooterPaddings", "fitHeight", "media", "style", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
26
27
  const isMobile = useMobile();
27
28
  const isRefresh = useVisualRefresh();
28
29
  const baseProps = getBaseProps(restProps);
@@ -38,12 +39,13 @@ export default function InternalContainer(_a) {
38
39
  const shouldHaveStickyStyles = isSticky && !isMobile;
39
40
  const hasMedia = !!(media === null || media === void 0 ? void 0 : media.content);
40
41
  const mediaPosition = (_b = media === null || media === void 0 ? void 0 : media.position) !== null && _b !== void 0 ? _b : 'top';
41
- return (React.createElement("div", Object.assign({}, baseProps, __funnelSubStepProps, { className: clsx(baseProps.className, styles.root, styles[`variant-${variant}`], fitHeight && styles['fit-height'], hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']), shouldHaveStickyStyles && [styles['sticky-enabled']], shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']], isRefresh && styles.refresh), ref: mergedRef }, getAnalyticsLabelAttribute(`.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`)),
42
- hasMedia && (React.createElement("div", { className: clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media), style: mediaPosition === 'top' ? { height: (media === null || media === void 0 ? void 0 : media.height) || '' } : { width: (media === null || media === void 0 ? void 0 : media.width) || '' } }, media.content)),
42
+ return (React.createElement("div", Object.assign({}, baseProps, __funnelSubStepProps, { className: clsx(baseProps.className, styles.root, styles[`variant-${variant}`], fitHeight && styles['fit-height'], hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']), shouldHaveStickyStyles && [styles['sticky-enabled']], shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']], isRefresh && styles.refresh), ref: mergedRef }, getAnalyticsLabelAttribute(`.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`), { style: getRootStyles(style) }),
43
+ hasMedia && (React.createElement("div", { className: clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media), style: mediaPosition === 'top'
44
+ ? Object.assign(Object.assign({}, getMediaStyles(mediaPosition, style)), { height: (media === null || media === void 0 ? void 0 : media.height) || '' }) : Object.assign(Object.assign({}, getMediaStyles(mediaPosition, style)), { width: (media === null || media === void 0 ? void 0 : media.width) || '' }) }, media.content)),
43
45
  React.createElement("div", { id: contentId, ref: __subStepRef, className: clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height']) },
44
46
  header && (React.createElement(ContainerHeaderContextProvider, null,
45
47
  React.createElement(StickyHeaderContext.Provider, { value: { isStuck, isStuckAtBottom } },
46
- React.createElement("div", Object.assign({ className: clsx(isRefresh && styles.refresh, styles.header, analyticsSelectors.header, styles[`header-variant-${variant}`], {
48
+ React.createElement("div", { className: clsx(isRefresh && styles.refresh, styles.header, analyticsSelectors.header, styles[`header-variant-${variant}`], {
47
49
  [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,
48
50
  [styles['header-sticky-enabled']]: isSticky,
49
51
  [styles['header-dynamic-height']]: hasDynamicHeight,
@@ -52,17 +54,17 @@ export default function InternalContainer(_a) {
52
54
  [styles['with-hidden-content']]: !children || __hiddenContent,
53
55
  [styles['header-with-media']]: hasMedia,
54
56
  [styles['header-full-page']]: __fullPage && isRefresh,
55
- }) }, stickyStyles, { ref: headerMergedRef }),
57
+ }), ref: headerMergedRef, style: Object.assign(Object.assign({}, stickyStyles.style), getHeaderStyles(style)) },
56
58
  isStuck && !isMobile && isRefresh && __fullPage && React.createElement("div", { className: styles['header-cover'] }),
57
59
  header)))),
58
60
  React.createElement("div", { className: clsx(styles.content, fitHeight && styles['content-fit-height']) },
59
61
  React.createElement("div", { className: clsx(styles['content-inner'], testStyles['content-inner'], {
60
62
  [styles['with-paddings']]: !disableContentPaddings,
61
63
  [styles['with-header']]: !!header,
62
- }) }, children)),
64
+ }), style: getContentStyles(style) }, children)),
63
65
  footer && (React.createElement("div", { className: clsx(styles.footer, {
64
66
  [styles['with-divider']]: !__disableFooterDivider,
65
67
  [styles['with-paddings']]: !disableFooterPaddings,
66
- }) }, footer)))));
68
+ }), style: getFooterStyles(style) }, footer)))));
67
69
  }
68
70
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAwBtD,MAAM,UAAU,0BAA0B,CAAC,KAA6B;IACtE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAC9D,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,OAAO,CACL,oBAAC,iBA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BAAqB,CAAC,CAAC,EAAE,CAAC,QAAQ,IAAI,eAAe;4BAC7D,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,QAAQ;4BACvC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,EAAE,UAAU,IAAI,SAAS;yBACtD,CACF,IACG,YAAY,IAChB,GAAG,EAAE,eAAe;wBAEnB,OAAO,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,UAAU,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,GAAQ;wBACjG,MAAM,CACH,CACuB,CACA,CAClC;YACD,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC;gBAC7E,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE;wBACpE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,sBAAsB;wBAClD,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM;qBAClC,CAAC,IAED,QAAQ,CACL,CACF;YACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC7B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,sBAAsB;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,qBAAqB;iBAClD,CAAC,IAED,MAAM,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsLabelAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { ContainerProps } from './interfaces';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n disableFooterPaddings?: boolean;\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n disableFooterPaddings = false,\n fitHeight,\n media,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const isRefresh = useVisualRefresh();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, isStuckAtBottom, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile,\n __fullPage && isRefresh && !isMobile\n );\n const contentId = useUniqueId();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, __headerRef);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const mediaPosition = media?.position ?? 'top';\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n {...getAnalyticsLabelAttribute(\n `.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`\n )}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={mediaPosition === 'top' ? { height: media?.height || '' } : { width: media?.width || '' }}\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck, isStuckAtBottom }}>\n <div\n className={clsx(\n isRefresh && styles.refresh,\n styles.header,\n analyticsSelectors.header,\n styles[`header-variant-${variant}`],\n {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n [styles['header-full-page']]: __fullPage && isRefresh,\n }\n )}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {isStuck && !isMobile && isRefresh && __fullPage && <div className={styles['header-cover']}></div>}\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div className={clsx(styles.content, fitHeight && styles['content-fit-height'])}>\n <div\n className={clsx(styles['content-inner'], testStyles['content-inner'], {\n [styles['with-paddings']]: !disableContentPaddings,\n [styles['with-header']]: !!header,\n })}\n >\n {children}\n </div>\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AA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IAAI,UAAU,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,GAAQ;wBACjG,MAAM,CACH,CACuB,CACA,CAClC;YACD,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC;gBAC7E,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE;wBACpE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,sBAAsB;wBAClD,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM;qBAClC,CAAC,EACF,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAE7B,QAAQ,CACL,CACF;YACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC7B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,sBAAsB;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,qBAAqB;iBAClD,CAAC,EACF,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,IAE5B,MAAM,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsLabelAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { ContainerProps } from './interfaces';\nimport { getContentStyles, getFooterStyles, getHeaderStyles, getMediaStyles, getRootStyles } from './style';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n disableFooterPaddings?: boolean;\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n disableFooterPaddings = false,\n fitHeight,\n media,\n style,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const isRefresh = useVisualRefresh();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, isStuckAtBottom, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile,\n __fullPage && isRefresh && !isMobile\n );\n const contentId = useUniqueId();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, __headerRef);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const mediaPosition = media?.position ?? 'top';\n\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n {...getAnalyticsLabelAttribute(\n `.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`\n )}\n style={getRootStyles(style)}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={\n mediaPosition === 'top'\n ? { ...getMediaStyles(mediaPosition, style), height: media?.height || '' }\n : { ...getMediaStyles(mediaPosition, style), width: media?.width || '' }\n }\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck, isStuckAtBottom }}>\n <div\n className={clsx(\n isRefresh && styles.refresh,\n styles.header,\n analyticsSelectors.header,\n styles[`header-variant-${variant}`],\n {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n [styles['header-full-page']]: __fullPage && isRefresh,\n }\n )}\n ref={headerMergedRef}\n style={{\n ...stickyStyles.style,\n ...getHeaderStyles(style),\n }}\n >\n {isStuck && !isMobile && isRefresh && __fullPage && <div className={styles['header-cover']}></div>}\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div className={clsx(styles.content, fitHeight && styles['content-fit-height'])}>\n <div\n className={clsx(styles['content-inner'], testStyles['content-inner'], {\n [styles['with-paddings']]: !disableContentPaddings,\n [styles['with-header']]: !!header,\n })}\n style={getContentStyles(style)}\n >\n {children}\n </div>\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !disableFooterPaddings,\n })}\n style={getFooterStyles(style)}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { ContainerProps } from './interfaces';
2
+ export declare function getRootStyles(style: ContainerProps.Style | undefined): {};
3
+ export declare function getContentStyles(style: ContainerProps.Style | undefined): {};
4
+ export declare function getHeaderStyles(style: ContainerProps.Style | undefined): {};
5
+ export declare function getFooterStyles(style: ContainerProps.Style | undefined): {};
6
+ export declare function getMediaStyles(mediaPosition: string, style: ContainerProps.Style | undefined): {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/container/style.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAcpE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAWvE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAatE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAatE;AAED,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,GAAG,SAAS,MAY5F"}
@@ -0,0 +1,58 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { SYSTEM } from '../internal/environment';
4
+ export function getRootStyles(style) {
5
+ var _a, _b, _c, _d, _e;
6
+ let properties = {};
7
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.root)) {
8
+ properties = {
9
+ background: (_a = style.root) === null || _a === void 0 ? void 0 : _a.background,
10
+ borderColor: (_b = style.root) === null || _b === void 0 ? void 0 : _b.borderColor,
11
+ borderRadius: (_c = style.root) === null || _c === void 0 ? void 0 : _c.borderRadius,
12
+ borderWidth: (_d = style.root) === null || _d === void 0 ? void 0 : _d.borderWidth,
13
+ boxShadow: (_e = style.root) === null || _e === void 0 ? void 0 : _e.boxShadow,
14
+ };
15
+ }
16
+ return properties;
17
+ }
18
+ export function getContentStyles(style) {
19
+ var _a, _b;
20
+ let properties = {};
21
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.content)) {
22
+ properties = {
23
+ paddingBlock: (_a = style.content) === null || _a === void 0 ? void 0 : _a.paddingBlock,
24
+ paddingInline: (_b = style.content) === null || _b === void 0 ? void 0 : _b.paddingInline,
25
+ };
26
+ }
27
+ return properties;
28
+ }
29
+ export function getHeaderStyles(style) {
30
+ var _a, _b, _c, _d, _e, _f;
31
+ let properties = {};
32
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.header)) {
33
+ properties = Object.assign(Object.assign(Object.assign({}, (((_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.background) && { background: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.background })), (((_c = style === null || style === void 0 ? void 0 : style.root) === null || _c === void 0 ? void 0 : _c.borderRadius) && { background: (_d = style === null || style === void 0 ? void 0 : style.root) === null || _d === void 0 ? void 0 : _d.borderRadius })), { paddingBlock: (_e = style.header) === null || _e === void 0 ? void 0 : _e.paddingBlock, paddingInline: (_f = style.header) === null || _f === void 0 ? void 0 : _f.paddingInline });
34
+ }
35
+ return properties;
36
+ }
37
+ export function getFooterStyles(style) {
38
+ var _a, _b, _c, _d, _e, _f, _g, _h;
39
+ let properties = {};
40
+ if (SYSTEM === 'core' && (style === null || style === void 0 ? void 0 : style.footer)) {
41
+ properties = {
42
+ borderColor: (_b = (_a = style.footer) === null || _a === void 0 ? void 0 : _a.divider) === null || _b === void 0 ? void 0 : _b.borderColor,
43
+ borderWidth: (_d = (_c = style.footer) === null || _c === void 0 ? void 0 : _c.divider) === null || _d === void 0 ? void 0 : _d.borderWidth,
44
+ paddingBlock: (_f = (_e = style.footer) === null || _e === void 0 ? void 0 : _e.root) === null || _f === void 0 ? void 0 : _f.paddingBlock,
45
+ paddingInline: (_h = (_g = style.footer) === null || _g === void 0 ? void 0 : _g.root) === null || _h === void 0 ? void 0 : _h.paddingInline,
46
+ };
47
+ }
48
+ return properties;
49
+ }
50
+ export function getMediaStyles(mediaPosition, style) {
51
+ var _a, _b;
52
+ let properties = {};
53
+ if (SYSTEM === 'core' && ((_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.borderRadius)) {
54
+ properties = Object.assign(Object.assign({ borderRadius: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderRadius }, (mediaPosition === 'top' && { borderEndStartRadius: '0px', borderEndEndRadius: '0px' })), (mediaPosition === 'side' && { borderStartEndRadius: '0px', borderEndEndRadius: '0px' }));
55
+ }
56
+ return properties;
57
+ }
58
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/container/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGjD,MAAM,UAAU,aAAa,CAAC,KAAuC;;IACnE,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,MAAM,KAAK,MAAM,KAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;QACpC,UAAU,GAAG;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,UAAU;YAClC,WAAW,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,WAAW;YACpC,YAAY,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,YAAY;YACtC,WAAW,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,WAAW;YACpC,SAAS,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS;SACjC,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAuC;;IACtE,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,MAAM,KAAK,MAAM,KAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAA,EAAE;QACvC,UAAU,GAAG;YACX,YAAY,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,YAAY;YACzC,aAAa,EAAE,MAAA,KAAK,CAAC,OAAO,0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IAAI,0CAAE,aAAa;SACjD,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,aAAqB,EAAE,KAAuC;;IAC3F,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,MAAM,KAAK,MAAM,KAAI,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,YAAY,CAAA,EAAE;QAClD,UAAU,iCACR,YAAY,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,YAAY,IACpC,CAAC,aAAa,KAAK,KAAK,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,GACvF,CAAC,aAAa,KAAK,MAAM,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAC5F,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport { ContainerProps } from './interfaces';\n\nexport function getRootStyles(style: ContainerProps.Style | undefined) {\n let properties = {};\n\n if (SYSTEM === 'core' && style?.root) {\n properties = {\n background: style.root?.background,\n borderColor: style.root?.borderColor,\n borderRadius: style.root?.borderRadius,\n borderWidth: style.root?.borderWidth,\n boxShadow: style.root?.boxShadow,\n };\n }\n\n return properties;\n}\n\nexport function getContentStyles(style: ContainerProps.Style | undefined) {\n let properties = {};\n\n if (SYSTEM === 'core' && style?.content) {\n properties = {\n paddingBlock: style.content?.paddingBlock,\n paddingInline: style.content?.paddingInline,\n };\n }\n\n return properties;\n}\n\nexport function getHeaderStyles(style: ContainerProps.Style | undefined) {\n let properties = {};\n\n if (SYSTEM === 'core' && style?.header) {\n properties = {\n ...(style?.root?.background && { background: style?.root?.background }),\n ...(style?.root?.borderRadius && { background: style?.root?.borderRadius }),\n paddingBlock: style.header?.paddingBlock,\n paddingInline: style.header?.paddingInline,\n };\n }\n\n return properties;\n}\n\nexport function getFooterStyles(style: ContainerProps.Style | undefined) {\n let properties = {};\n\n if (SYSTEM === 'core' && style?.footer) {\n properties = {\n borderColor: style.footer?.divider?.borderColor,\n borderWidth: style.footer?.divider?.borderWidth,\n paddingBlock: style.footer?.root?.paddingBlock,\n paddingInline: style.footer?.root?.paddingInline,\n };\n }\n\n return properties;\n}\n\nexport function getMediaStyles(mediaPosition: string, style: ContainerProps.Style | undefined) {\n let properties = {};\n\n if (SYSTEM === 'core' && style?.root?.borderRadius) {\n properties = {\n borderRadius: style?.root?.borderRadius,\n ...(mediaPosition === 'top' && { borderEndStartRadius: '0px', borderEndEndRadius: '0px' }),\n ...(mediaPosition === 'side' && { borderStartEndRadius: '0px', borderEndEndRadius: '0px' }),\n };\n }\n\n return properties;\n}\n"]}
@@ -2039,5 +2039,5 @@
2039
2039
  }
2040
2040
  }
2041
2041
  :root {
2042
- --awsui-version-info-bb84fa6e: true;
2042
+ --awsui-version-info-9e83d9a9: true;
2043
2043
  }
@@ -1,18 +1,18 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "button-trigger": "awsui_button-trigger_18eso_1qoem_161",
5
- "arrow": "awsui_arrow_18eso_1qoem_161",
6
- "in-filtering-token-root": "awsui_in-filtering-token-root_18eso_1qoem_221",
7
- "in-filtering-token-nested": "awsui_in-filtering-token-nested_18eso_1qoem_221",
8
- "has-caret": "awsui_has-caret_18eso_1qoem_257",
9
- "placeholder": "awsui_placeholder_18eso_1qoem_260",
10
- "pressed": "awsui_pressed_18eso_1qoem_273",
11
- "disabled": "awsui_disabled_18eso_1qoem_276",
12
- "in-filtering-token": "awsui_in-filtering-token_18eso_1qoem_221",
13
- "readonly": "awsui_readonly_18eso_1qoem_292",
14
- "invalid": "awsui_invalid_18eso_1qoem_314",
15
- "warning": "awsui_warning_18eso_1qoem_323",
16
- "inline-tokens": "awsui_inline-tokens_18eso_1qoem_332"
4
+ "button-trigger": "awsui_button-trigger_18eso_1g60k_161",
5
+ "arrow": "awsui_arrow_18eso_1g60k_161",
6
+ "in-filtering-token-root": "awsui_in-filtering-token-root_18eso_1g60k_221",
7
+ "in-filtering-token-nested": "awsui_in-filtering-token-nested_18eso_1g60k_221",
8
+ "has-caret": "awsui_has-caret_18eso_1g60k_257",
9
+ "placeholder": "awsui_placeholder_18eso_1g60k_260",
10
+ "pressed": "awsui_pressed_18eso_1g60k_273",
11
+ "disabled": "awsui_disabled_18eso_1g60k_276",
12
+ "in-filtering-token": "awsui_in-filtering-token_18eso_1g60k_221",
13
+ "readonly": "awsui_readonly_18eso_1g60k_297",
14
+ "invalid": "awsui_invalid_18eso_1g60k_319",
15
+ "warning": "awsui_warning_18eso_1g60k_328",
16
+ "inline-tokens": "awsui_inline-tokens_18eso_1g60k_337"
17
17
  };
18
18
 
@@ -158,21 +158,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
158
158
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
159
159
  SPDX-License-Identifier: Apache-2.0
160
160
  */
161
- .awsui_button-trigger_18eso_1qoem_161 > .awsui_arrow_18eso_1qoem_161:not(#\9) {
161
+ .awsui_button-trigger_18eso_1g60k_161 > .awsui_arrow_18eso_1g60k_161:not(#\9) {
162
162
  transition: transform var(--motion-duration-rotate-180-cxi9g7, 135ms) var(--motion-easing-rotate-180-7a58rc, cubic-bezier(0.165, 0.84, 0.44, 1));
163
163
  }
164
164
  @media (prefers-reduced-motion: reduce) {
165
- .awsui_button-trigger_18eso_1qoem_161 > .awsui_arrow_18eso_1qoem_161:not(#\9) {
165
+ .awsui_button-trigger_18eso_1g60k_161 > .awsui_arrow_18eso_1g60k_161:not(#\9) {
166
166
  animation: none;
167
167
  transition: none;
168
168
  }
169
169
  }
170
- .awsui-motion-disabled .awsui_button-trigger_18eso_1qoem_161 > .awsui_arrow_18eso_1qoem_161:not(#\9), .awsui-mode-entering .awsui_button-trigger_18eso_1qoem_161 > .awsui_arrow_18eso_1qoem_161:not(#\9) {
170
+ .awsui-motion-disabled .awsui_button-trigger_18eso_1g60k_161 > .awsui_arrow_18eso_1g60k_161:not(#\9), .awsui-mode-entering .awsui_button-trigger_18eso_1g60k_161 > .awsui_arrow_18eso_1g60k_161:not(#\9) {
171
171
  animation: none;
172
172
  transition: none;
173
173
  }
174
174
 
175
- .awsui_button-trigger_18eso_1qoem_161:not(#\9) {
175
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9) {
176
176
  border-collapse: separate;
177
177
  border-spacing: 0;
178
178
  box-sizing: border-box;
@@ -218,7 +218,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
218
218
  border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-default-317xk5, #8c8c94);
219
219
  min-block-size: var(--size-vertical-input-p1d7xx, 32px);
220
220
  }
221
- .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-root_18eso_1qoem_221:not(#\9), .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-nested_18eso_1qoem_221:not(#\9) {
221
+ .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-root_18eso_1g60k_221:not(#\9), .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-nested_18eso_1g60k_221:not(#\9) {
222
222
  padding-block: 0px;
223
223
  padding-inline: var(--space-field-horizontal-0aq2ch, 12px);
224
224
  border-block-width: var(--border-width-token-2ukdpu, 2px);
@@ -229,14 +229,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
229
229
  block-size: 100%;
230
230
  min-block-size: unset;
231
231
  }
232
- body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-root_18eso_1qoem_221:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-nested_18eso_1qoem_221:not(#\9):focus {
232
+ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-root_18eso_1g60k_221:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-nested_18eso_1g60k_221:not(#\9):focus {
233
233
  position: relative;
234
234
  }
235
- body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-root_18eso_1qoem_221:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-nested_18eso_1qoem_221:not(#\9):focus {
235
+ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-root_18eso_1g60k_221:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-nested_18eso_1g60k_221:not(#\9):focus {
236
236
  outline: 2px dotted transparent;
237
237
  outline-offset: calc(var(--space-filtering-token-operation-select-focus-outline-gutter-jacx1t, -5px) - 1px);
238
238
  }
239
- body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-root_18eso_1qoem_221:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-nested_18eso_1qoem_221:not(#\9):focus::before {
239
+ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-root_18eso_1g60k_221:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-nested_18eso_1g60k_221:not(#\9):focus::before {
240
240
  content: " ";
241
241
  display: block;
242
242
  position: absolute;
@@ -250,55 +250,60 @@ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161.awsui_
250
250
  border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
251
251
  box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
252
252
  }
253
- .awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token-nested_18eso_1qoem_221:not(#\9) {
253
+ .awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token-nested_18eso_1g60k_221:not(#\9) {
254
254
  border-start-start-radius: calc(var(--border-radius-input-7q0str, 8px) / 2);
255
255
  border-end-start-radius: calc(var(--border-radius-input-7q0str, 8px) / 2);
256
256
  }
257
- .awsui_button-trigger_18eso_1qoem_161.awsui_has-caret_18eso_1qoem_257:not(#\9) {
257
+ .awsui_button-trigger_18eso_1g60k_161.awsui_has-caret_18eso_1g60k_257:not(#\9) {
258
258
  padding-inline-end: var(--space-field-icon-offset-ikwzwx, 36px);
259
259
  }
260
- .awsui_button-trigger_18eso_1qoem_161 > .awsui_placeholder_18eso_1qoem_260:not(#\9) {
260
+ .awsui_button-trigger_18eso_1g60k_161 > .awsui_placeholder_18eso_1g60k_260:not(#\9) {
261
261
  color: var(--color-text-input-placeholder-dclg8u, #656871);
262
262
  font-style: italic;
263
263
  }
264
- .awsui_button-trigger_18eso_1qoem_161 > .awsui_arrow_18eso_1qoem_161:not(#\9) {
264
+ .awsui_button-trigger_18eso_1g60k_161 > .awsui_arrow_18eso_1g60k_161:not(#\9) {
265
265
  position: absolute;
266
266
  inset-inline-end: var(--space-field-horizontal-0aq2ch, 12px);
267
267
  inset-block-start: calc(50% - var(--line-height-body-m-2mh3ke, 20px) / 2);
268
268
  color: var(--color-text-button-inline-icon-default-f8xgpk, #006ce0);
269
269
  }
270
- .awsui_button-trigger_18eso_1qoem_161:not(#\9):hover > .awsui_arrow_18eso_1qoem_161 {
270
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9):hover > .awsui_arrow_18eso_1g60k_161 {
271
271
  color: var(--color-text-button-inline-icon-hover-c08r6g, #002b66);
272
272
  }
273
- .awsui_button-trigger_18eso_1qoem_161.awsui_pressed_18eso_1qoem_273 > .awsui_arrow_18eso_1qoem_161:not(#\9) {
273
+ .awsui_button-trigger_18eso_1g60k_161.awsui_pressed_18eso_1g60k_273 > .awsui_arrow_18eso_1g60k_161:not(#\9) {
274
274
  transform: rotate(-180deg);
275
275
  }
276
- .awsui_button-trigger_18eso_1qoem_161.awsui_disabled_18eso_1qoem_276:not(#\9) {
276
+ .awsui_button-trigger_18eso_1g60k_161.awsui_disabled_18eso_1g60k_276:not(#\9) {
277
277
  background-color: var(--color-background-input-disabled-dihaja, #ebebf0);
278
- border-block: var(--border-width-token-2ukdpu, 2px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
279
- border-inline: var(--border-width-token-2ukdpu, 2px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
278
+ border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
279
+ border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
280
280
  color: var(--color-text-input-disabled-wh1f3y, #b4b4bb);
281
281
  cursor: auto;
282
282
  }
283
- .awsui_button-trigger_18eso_1qoem_161.awsui_disabled_18eso_1qoem_276 > .awsui_arrow_18eso_1qoem_161:not(#\9) {
283
+ .awsui_button-trigger_18eso_1g60k_161.awsui_disabled_18eso_1g60k_276 > .awsui_arrow_18eso_1g60k_161:not(#\9) {
284
284
  color: var(--color-text-button-inline-icon-disabled-82hho0, #b4b4bb);
285
285
  }
286
- .awsui_button-trigger_18eso_1qoem_161.awsui_disabled_18eso_1qoem_276.awsui_in-filtering-token_18eso_1qoem_221:not(#\9) {
286
+ .awsui_button-trigger_18eso_1g60k_161.awsui_disabled_18eso_1g60k_276.awsui_in-filtering-token_18eso_1g60k_221:not(#\9) {
287
+ background-color: var(--color-background-input-disabled-dihaja, #ebebf0);
288
+ border-block: var(--border-width-token-2ukdpu, 2px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
289
+ border-inline: var(--border-width-token-2ukdpu, 2px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
290
+ color: var(--color-text-input-disabled-wh1f3y, #b4b4bb);
291
+ cursor: auto;
287
292
  border-color: var(--color-border-control-disabled-uj7t08, #dedee3);
288
293
  }
289
- .awsui_button-trigger_18eso_1qoem_161.awsui_disabled_18eso_1qoem_276 > .awsui_placeholder_18eso_1qoem_260:not(#\9) {
294
+ .awsui_button-trigger_18eso_1g60k_161.awsui_disabled_18eso_1g60k_276 > .awsui_placeholder_18eso_1g60k_260:not(#\9) {
290
295
  color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
291
296
  }
292
- .awsui_button-trigger_18eso_1qoem_161.awsui_readonly_18eso_1qoem_292:not(#\9):not(.awsui_button-trigger_18eso_1qoem_161.awsui_disabled_18eso_1qoem_276):not(.awsui_button-trigger_18eso_1qoem_161.awsui_in-filtering-token_18eso_1qoem_221) {
297
+ .awsui_button-trigger_18eso_1g60k_161.awsui_readonly_18eso_1g60k_297:not(#\9):not(.awsui_button-trigger_18eso_1g60k_161.awsui_disabled_18eso_1g60k_276):not(.awsui_button-trigger_18eso_1g60k_161.awsui_in-filtering-token_18eso_1g60k_221) {
293
298
  background-color: var(--color-background-input-default-ifz5bb, #ffffff);
294
- border-block: var(--border-width-token-2ukdpu, 2px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
295
- border-inline: var(--border-width-token-2ukdpu, 2px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
299
+ border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
300
+ border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
296
301
  }
297
- .awsui_button-trigger_18eso_1qoem_161:not(#\9):focus {
302
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9):focus {
298
303
  outline: none;
299
304
  text-decoration: none;
300
305
  }
301
- body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221):focus {
306
+ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221):focus {
302
307
  outline: 2px dotted transparent;
303
308
  border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-focused-4z0pgn, #006ce0);
304
309
  border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-focused-4z0pgn, #006ce0);
@@ -308,27 +313,27 @@ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1qoem_161:not(#\
308
313
  border-end-end-radius: var(--border-radius-input-7q0str, 8px);
309
314
  box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0);
310
315
  }
311
- .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221):invalid {
316
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221):invalid {
312
317
  box-shadow: none;
313
318
  }
314
- .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_invalid_18eso_1qoem_314, .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_invalid_18eso_1qoem_314:focus {
319
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_invalid_18eso_1g60k_319, .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_invalid_18eso_1g60k_319:focus {
315
320
  color: var(--color-text-status-error-ksqavh, #db0000);
316
321
  border-color: var(--color-text-status-error-ksqavh, #db0000);
317
322
  padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
318
323
  border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
319
324
  }
320
- .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_invalid_18eso_1qoem_314:focus, .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_invalid_18eso_1qoem_314:focus:focus {
325
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_invalid_18eso_1g60k_319:focus, .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_invalid_18eso_1g60k_319:focus:focus {
321
326
  box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
322
327
  }
323
- .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_warning_18eso_1qoem_323, .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_warning_18eso_1qoem_323:focus {
328
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_warning_18eso_1g60k_328, .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_warning_18eso_1g60k_328:focus {
324
329
  color: var(--color-text-status-warning-6meo06, #855900);
325
330
  border-color: var(--color-text-status-warning-6meo06, #855900);
326
331
  padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
327
332
  border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
328
333
  }
329
- .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_warning_18eso_1qoem_323:focus, .awsui_button-trigger_18eso_1qoem_161:not(#\9):not(.awsui_in-filtering-token_18eso_1qoem_221).awsui_warning_18eso_1qoem_323:focus:focus {
334
+ .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_warning_18eso_1g60k_328:focus, .awsui_button-trigger_18eso_1g60k_161:not(#\9):not(.awsui_in-filtering-token_18eso_1g60k_221).awsui_warning_18eso_1g60k_328:focus:focus {
330
335
  box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
331
336
  }
332
- .awsui_button-trigger_18eso_1qoem_161.awsui_inline-tokens_18eso_1qoem_332:not(#\9) {
337
+ .awsui_button-trigger_18eso_1g60k_161.awsui_inline-tokens_18eso_1g60k_337:not(#\9) {
333
338
  padding-block: 0;
334
339
  }
@@ -2,18 +2,18 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "button-trigger": "awsui_button-trigger_18eso_1qoem_161",
6
- "arrow": "awsui_arrow_18eso_1qoem_161",
7
- "in-filtering-token-root": "awsui_in-filtering-token-root_18eso_1qoem_221",
8
- "in-filtering-token-nested": "awsui_in-filtering-token-nested_18eso_1qoem_221",
9
- "has-caret": "awsui_has-caret_18eso_1qoem_257",
10
- "placeholder": "awsui_placeholder_18eso_1qoem_260",
11
- "pressed": "awsui_pressed_18eso_1qoem_273",
12
- "disabled": "awsui_disabled_18eso_1qoem_276",
13
- "in-filtering-token": "awsui_in-filtering-token_18eso_1qoem_221",
14
- "readonly": "awsui_readonly_18eso_1qoem_292",
15
- "invalid": "awsui_invalid_18eso_1qoem_314",
16
- "warning": "awsui_warning_18eso_1qoem_323",
17
- "inline-tokens": "awsui_inline-tokens_18eso_1qoem_332"
5
+ "button-trigger": "awsui_button-trigger_18eso_1g60k_161",
6
+ "arrow": "awsui_arrow_18eso_1g60k_161",
7
+ "in-filtering-token-root": "awsui_in-filtering-token-root_18eso_1g60k_221",
8
+ "in-filtering-token-nested": "awsui_in-filtering-token-nested_18eso_1g60k_221",
9
+ "has-caret": "awsui_has-caret_18eso_1g60k_257",
10
+ "placeholder": "awsui_placeholder_18eso_1g60k_260",
11
+ "pressed": "awsui_pressed_18eso_1g60k_273",
12
+ "disabled": "awsui_disabled_18eso_1g60k_276",
13
+ "in-filtering-token": "awsui_in-filtering-token_18eso_1g60k_221",
14
+ "readonly": "awsui_readonly_18eso_1g60k_297",
15
+ "invalid": "awsui_invalid_18eso_1g60k_319",
16
+ "warning": "awsui_warning_18eso_1g60k_328",
17
+ "inline-tokens": "awsui_inline-tokens_18eso_1g60k_337"
18
18
  };
19
19
 
@@ -1,6 +1,6 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (bb84fa6e)";
3
- export var GIT_SHA = "bb84fa6e";
2
+ export var PACKAGE_VERSION = "3.0.0 (9e83d9a9)";
3
+ export var GIT_SHA = "9e83d9a9";
4
4
  export var THEME = "open-source-visual-refresh";
5
5
  export var SYSTEM = "console";
6
6
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (bb84fa6e)",
4
- "GIT_SHA": "bb84fa6e",
3
+ "PACKAGE_VERSION": "3.0.0 (9e83d9a9)",
4
+ "GIT_SHA": "9e83d9a9",
5
5
  "THEME": "open-source-visual-refresh",
6
6
  "SYSTEM": "console",
7
7
  "ALWAYS_VISUAL_REFRESH": true
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "bb84fa6e90d3805835878eaba54d20db257b4c0c"
2
+ "commit": "9e83d9a96dbf2557ab57000e2ce98454e0824f72"
3
3
  }
package/package.json CHANGED
@@ -111,7 +111,6 @@
111
111
  "./tree-view": "./tree-view/index.js",
112
112
  "./tutorial-panel": "./tutorial-panel/index.js",
113
113
  "./wizard": "./wizard/index.js",
114
- "./top-navigation/1.0-beta": "./top-navigation/1.0-beta/index.js",
115
114
  "./i18n": "./i18n/index.js",
116
115
  "./i18n/messages/all.all": "./i18n/messages/all.all.js",
117
116
  "./i18n/messages/all.all.json": "./i18n/messages/all.all.json",
@@ -151,7 +150,7 @@
151
150
  "./internal/base-component/index.js",
152
151
  "./internal/base-component/styles.css.js"
153
152
  ],
154
- "version": "3.0.1042",
153
+ "version": "3.0.1044",
155
154
  "repository": {
156
155
  "type": "git",
157
156
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,aAAa,MAAM,YAAY,CAAC;AAEvC,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAIpE,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAuD,EAAE,GAA8B,EAAE,EAAE;QAA3F,EAAE,IAAI,GAAG,MAAM,EAAE,OAAO,GAAG,IAAI,OAAwB,EAAnB,KAAK,cAAzC,mBAA2C,C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ACZ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,IACZ,KAAK,EACL,kBAAkB,IACtB,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,IACxB,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,EAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React, { useEffect } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getSubStepAllSelector, getTextFromSelector } from '../internal/analytics/selectors';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataAlertComponent } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\nimport InternalAlert from './internal';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { AlertProps };\n\nconst Alert = React.forwardRef(\n ({ type = 'info', visible = true, ...props }: AlertProps, ref: React.Ref<AlertProps.Ref>) => {\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const baseComponentProps = useBaseComponent<HTMLDivElement>(\n 'Alert',\n {\n props: { type, visible, dismissible: props.dismissible },\n },\n analyticsMetadata\n );\n\n const { funnelIdentifier, funnelInteractionId, funnelErrorContext, submissionAttempt, funnelState, errorCount } =\n useFunnel();\n const { stepNumber, stepNameSelector, stepIdentifier, subStepCount, stepErrorContext, subStepConfiguration } =\n useFunnelStep();\n const { subStepSelector, subStepNameSelector, subStepIdentifier, subStepErrorContext } = useFunnelSubStep();\n\n const messageSlotId = useUniqueId('alert-');\n\n useEffect(() => {\n if (funnelInteractionId && visible && type === 'error' && funnelState.current !== 'complete') {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n errorCount.current++;\n\n // We don't want to report an error if it is hidden, e.g. inside an Expandable Section.\n const errorIsVisible = (baseComponentProps.__internalRootRef.current?.getBoundingClientRect()?.width ?? 0) > 0;\n\n if (errorIsVisible) {\n if (subStepSelector) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n funnelIdentifier,\n stepIdentifier,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n subStepIdentifier,\n errorContext: analyticsMetadata.errorContext || subStepErrorContext,\n });\n } else if (stepNameSelector) {\n FunnelMetrics.funnelStepError({\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n stepName,\n stepIdentifier,\n currentDocument: baseComponentProps.__internalRootRef.current?.ownerDocument,\n totalSubSteps: subStepCount.current,\n funnelIdentifier,\n subStepAllSelector: getSubStepAllSelector(),\n errorContext: analyticsMetadata.errorContext || stepErrorContext,\n subStepConfiguration: subStepConfiguration.current?.get(stepNumber),\n stepErrorSelector: '#' + messageSlotId,\n });\n } else {\n FunnelMetrics.funnelError({\n funnelIdentifier,\n funnelInteractionId,\n errorContext: analyticsMetadata.errorContext || funnelErrorContext,\n });\n }\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n errorCount.current--;\n };\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, visible, submissionAttempt, errorCount]);\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataAlertComponent = {\n name: 'awsui.Alert',\n label: `.${analyticsSelectors.header}`,\n properties: {\n type,\n },\n };\n\n return (\n <InternalAlert\n type={type}\n visible={visible}\n {...props}\n {...baseComponentProps}\n ref={ref}\n messageSlotId={messageSlotId}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Alert, 'Alert');\nexport default Alert;\n"]}
@@ -1,28 +0,0 @@
1
- import { ComponentWrapper, ElementWrapper } from '@cloudscape-design/test-utils-core/dom';
2
- import ButtonWrapper from '../../button';
3
- import ButtonDropdownWrapper from '../../button-dropdown';
4
- import LinkWrapper from '../../link';
5
- export default class TopNavigationWrapper extends ComponentWrapper {
6
- static rootSelector: string;
7
- findIdentityLink(): ElementWrapper;
8
- findLogo(): ElementWrapper | null;
9
- findTitle(): ElementWrapper | null;
10
- findSearch(): ElementWrapper | null;
11
- findUtilities(): Array<TopNavigationUtilityWrapper>;
12
- findUtility(index: number): TopNavigationUtilityWrapper | null;
13
- findSearchButton(): ElementWrapper | null;
14
- findOverflowMenuButtonDropdown(): MenuDropdownWrapper | null;
15
- }
16
- export declare class MenuDropdownWrapper extends ButtonDropdownWrapper {
17
- findNativeButton(): ElementWrapper<HTMLButtonElement>;
18
- }
19
- export declare class TopNavigationUtilityWrapper extends ComponentWrapper {
20
- findButtonLinkType(): LinkWrapper | null;
21
- findPrimaryButtonType(): ButtonWrapper | null;
22
- findMenuDropdownType(): TopNavigationMenuDropdownWrapper | null;
23
- }
24
- export declare class TopNavigationMenuDropdownWrapper extends ButtonDropdownWrapper {
25
- findNativeButton(): ElementWrapper<HTMLButtonElement>;
26
- findTitle(): ElementWrapper | null;
27
- findDescription(): ElementWrapper | null;
28
- }