@cloudscape-design/components 3.0.937 → 3.0.939

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 (38) hide show
  1. package/alert/actions-wrapper/index.d.ts +3 -1
  2. package/alert/actions-wrapper/index.d.ts.map +1 -1
  3. package/alert/actions-wrapper/index.js +24 -3
  4. package/alert/actions-wrapper/index.js.map +1 -1
  5. package/alert/internal.d.ts.map +1 -1
  6. package/alert/internal.js +18 -17
  7. package/alert/internal.js.map +1 -1
  8. package/alert/styles.css.js +27 -28
  9. package/alert/styles.scoped.css +53 -54
  10. package/alert/styles.selectors.js +27 -28
  11. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  12. package/flashbar/collapsible-flashbar.js +2 -2
  13. package/flashbar/collapsible-flashbar.js.map +1 -1
  14. package/flashbar/common.d.ts +0 -1
  15. package/flashbar/common.d.ts.map +1 -1
  16. package/flashbar/common.js +1 -4
  17. package/flashbar/common.js.map +1 -1
  18. package/flashbar/flash.d.ts.map +1 -1
  19. package/flashbar/flash.js +4 -2
  20. package/flashbar/flash.js.map +1 -1
  21. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  22. package/flashbar/non-collapsible-flashbar.js +2 -2
  23. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  24. package/flashbar/styles.css.js +50 -50
  25. package/flashbar/styles.scoped.css +151 -153
  26. package/flashbar/styles.selectors.js +50 -50
  27. package/internal/base-component/styles.scoped.css +3 -0
  28. package/internal/environment.js +1 -1
  29. package/internal/environment.json +1 -1
  30. package/internal/generated/styles/tokens.d.ts +1 -0
  31. package/internal/generated/styles/tokens.js +1 -0
  32. package/internal/generated/theming/index.cjs +15 -4
  33. package/internal/generated/theming/index.js +15 -4
  34. package/internal/manifest.json +1 -1
  35. package/package.json +1 -1
  36. package/popover/styles.css.js +54 -54
  37. package/popover/styles.scoped.css +84 -77
  38. package/popover/styles.selectors.js +54 -54
@@ -9,8 +9,10 @@ interface ActionsWrapperProps {
9
9
  action: React.ReactNode;
10
10
  discoveredActions: Array<React.ReactNode>;
11
11
  buttonText: React.ReactNode;
12
+ wrappedClass?: string;
13
+ containerWidth?: number;
12
14
  onButtonClick: InternalButtonProps['onClick'];
13
15
  }
14
- export declare const ActionsWrapper: ({ className, testUtilClasses, action, discoveredActions, buttonText, onButtonClick, }: ActionsWrapperProps) => JSX.Element | null;
16
+ export declare const ActionsWrapper: ({ className, testUtilClasses, action, discoveredActions, buttonText, wrappedClass, containerWidth, onButtonClick, }: ActionsWrapperProps) => JSX.Element | null;
15
17
  export {};
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA2B5E,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,aAAa,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,cAAc,0FAOxB,mBAAmB,uBAYrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAMzD,OAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA2B5E,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,cAAc,wHASxB,mBAAmB,uBAiCrB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import React from 'react';
3
+ import React, { useLayoutEffect, useState } from 'react';
4
4
  import clsx from 'clsx';
5
+ import { getIsRtl } from '@cloudscape-design/component-toolkit/internal';
5
6
  import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
6
7
  import InternalButton from '../../button/internal';
7
8
  import styles from './styles.css.js';
@@ -14,12 +15,32 @@ function createActionButton(testUtilClasses, action, buttonText, onButtonClick)
14
15
  }
15
16
  return action ? React.createElement("div", { className: testUtilClasses.actionSlot }, action) : null;
16
17
  }
17
- export const ActionsWrapper = ({ className, testUtilClasses, action, discoveredActions, buttonText, onButtonClick, }) => {
18
+ export const ActionsWrapper = ({ className, testUtilClasses, action, discoveredActions, buttonText, wrappedClass, containerWidth, onButtonClick, }) => {
19
+ const [wrapped, setWrapped] = useState(false);
20
+ const ref = React.useRef(null);
21
+ useLayoutEffect(() => {
22
+ if (!ref.current || !containerWidth || !wrappedClass) {
23
+ return;
24
+ }
25
+ function check() {
26
+ const isRtl = getIsRtl(ref.current);
27
+ const { offsetWidth, offsetLeft } = ref.current;
28
+ const start = isRtl ? containerWidth - offsetWidth - offsetLeft : offsetLeft;
29
+ // if the action slot is towards the left (right in RTL) of its container
30
+ setWrapped(start < 100);
31
+ }
32
+ // Discovered actions are rendered by their plugin, so don't cause a
33
+ // re-render of our React tree. So we observe for changes.
34
+ const observer = new MutationObserver(check);
35
+ observer.observe(ref.current, { attributes: false, childList: true, subtree: true });
36
+ check();
37
+ return () => observer.disconnect();
38
+ });
18
39
  const actionButton = createActionButton(testUtilClasses, action, buttonText, onButtonClick);
19
40
  if (!actionButton && discoveredActions.length === 0) {
20
41
  return null;
21
42
  }
22
- return (React.createElement("div", { className: clsx(styles.root, className) },
43
+ return (React.createElement("div", { ref: ref, className: clsx(styles.root, className, wrapped && wrappedClass) },
23
44
  actionButton,
24
45
  discoveredActions));
25
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,cAAuC,MAAM,uBAAuB,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,SAAS,kBAAkB,CACzB,eAAuD,EACvD,MAAuB,EACvB,UAA2B,EAC3B,aAA6C;IAE7C,IAAI,CAAC,MAAM,IAAI,UAAU,EAAE;QACzB,MAAM,GAAG,CACP,8CACM,6BAA6B,CAAC;YAChC,MAAM,EAAE,aAAa;SACiC,CAAC;YAEzD,oBAAC,cAAc,IAAC,SAAS,EAAE,eAAe,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAC,MAAM,IAC/F,UAAU,CACI,CACZ,CACR,CAAC;KACH;IACD,OAAO,MAAM,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAE,eAAe,CAAC,UAAU,IAAG,MAAM,CAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC;AAWD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,SAAS,EACT,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,UAAU,EACV,aAAa,GACO,EAAE,EAAE;IACxB,MAAM,YAAY,GAAG,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IAC5F,IAAI,CAAC,YAAY,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;QACnD,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC;QACzC,YAAY;QACZ,iBAAiB,CACd,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton, { InternalButtonProps } from '../../button/internal';\nimport { GeneratedAnalyticsMetadataAlertButtonClick } from '../analytics-metadata/interfaces';\n\nimport styles from './styles.css.js';\n\nfunction createActionButton(\n testUtilClasses: ActionsWrapperProps['testUtilClasses'],\n action: React.ReactNode,\n buttonText: React.ReactNode,\n onButtonClick: InternalButtonProps['onClick']\n) {\n if (!action && buttonText) {\n action = (\n <span\n {...getAnalyticsMetadataAttribute({\n action: 'buttonClick',\n } as Partial<GeneratedAnalyticsMetadataAlertButtonClick>)}\n >\n <InternalButton className={testUtilClasses.actionButton} onClick={onButtonClick} formAction=\"none\">\n {buttonText}\n </InternalButton>\n </span>\n );\n }\n return action ? <div className={testUtilClasses.actionSlot}>{action}</div> : null;\n}\n\ninterface ActionsWrapperProps {\n className: string;\n testUtilClasses: { actionSlot: string; actionButton: string };\n action: React.ReactNode;\n discoveredActions: Array<React.ReactNode>;\n buttonText: React.ReactNode;\n onButtonClick: InternalButtonProps['onClick'];\n}\n\nexport const ActionsWrapper = ({\n className,\n testUtilClasses,\n action,\n discoveredActions,\n buttonText,\n onButtonClick,\n}: ActionsWrapperProps) => {\n const actionButton = createActionButton(testUtilClasses, action, buttonText, onButtonClick);\n if (!actionButton && discoveredActions.length === 0) {\n return null;\n }\n\n return (\n <div className={clsx(styles.root, className)}>\n {actionButton}\n {discoveredActions}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/alert/actions-wrapper/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,cAAuC,MAAM,uBAAuB,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,SAAS,kBAAkB,CACzB,eAAuD,EACvD,MAAuB,EACvB,UAA2B,EAC3B,aAA6C;IAE7C,IAAI,CAAC,MAAM,IAAI,UAAU,EAAE;QACzB,MAAM,GAAG,CACP,8CACM,6BAA6B,CAAC;YAChC,MAAM,EAAE,aAAa;SACiC,CAAC;YAEzD,oBAAC,cAAc,IAAC,SAAS,EAAE,eAAe,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAC,MAAM,IAC/F,UAAU,CACI,CACZ,CACR,CAAC;KACH;IACD,OAAO,MAAM,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAE,eAAe,CAAC,UAAU,IAAG,MAAM,CAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC;AAaD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,SAAS,EACT,eAAe,EAC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C;KACb;IAED,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,IAAI,YAAY,CAAC;QAC5E,YAAY;QACZ,iBAAiB,CACd,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getIsRtl } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton, { InternalButtonProps } from '../../button/internal';\nimport { GeneratedAnalyticsMetadataAlertButtonClick } from '../analytics-metadata/interfaces';\n\nimport styles from './styles.css.js';\n\nfunction createActionButton(\n testUtilClasses: ActionsWrapperProps['testUtilClasses'],\n action: React.ReactNode,\n buttonText: React.ReactNode,\n onButtonClick: InternalButtonProps['onClick']\n) {\n if (!action && buttonText) {\n action = (\n <span\n {...getAnalyticsMetadataAttribute({\n action: 'buttonClick',\n } as Partial<GeneratedAnalyticsMetadataAlertButtonClick>)}\n >\n <InternalButton className={testUtilClasses.actionButton} onClick={onButtonClick} formAction=\"none\">\n {buttonText}\n </InternalButton>\n </span>\n );\n }\n return action ? <div className={testUtilClasses.actionSlot}>{action}</div> : null;\n}\n\ninterface ActionsWrapperProps {\n className: string;\n testUtilClasses: { actionSlot: string; actionButton: string };\n action: React.ReactNode;\n discoveredActions: Array<React.ReactNode>;\n buttonText: React.ReactNode;\n wrappedClass?: string;\n containerWidth?: number;\n onButtonClick: InternalButtonProps['onClick'];\n}\n\nexport const ActionsWrapper = ({\n className,\n testUtilClasses,\n action,\n discoveredActions,\n buttonText,\n wrappedClass,\n containerWidth,\n onButtonClick,\n}: ActionsWrapperProps) => {\n const [wrapped, setWrapped] = useState(false);\n const ref = React.useRef<HTMLDivElement>(null);\n useLayoutEffect(() => {\n if (!ref.current || !containerWidth || !wrappedClass) {\n return;\n }\n function check() {\n const isRtl = getIsRtl(ref.current);\n const { offsetWidth, offsetLeft } = ref.current!;\n const start = isRtl ? containerWidth! - offsetWidth - offsetLeft : offsetLeft;\n // if the action slot is towards the left (right in RTL) of its container\n setWrapped(start < 100);\n }\n\n // Discovered actions are rendered by their plugin, so don't cause a\n // re-render of our React tree. So we observe for changes.\n const observer = new MutationObserver(check);\n observer.observe(ref.current, { attributes: false, childList: true, subtree: true });\n check();\n return () => observer.disconnect();\n });\n const actionButton = createActionButton(testUtilClasses, action, buttonText, onButtonClick);\n if (!actionButton && discoveredActions.length === 0) {\n return null;\n }\n\n return (\n <div ref={ref} className={clsx(styles.root, className, wrapped && wrappedClass)}>\n {actionButton}\n {discoveredActions}\n </div>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAgBtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,QAAA,MAAM,aAAa;;;;wCAiKlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAetC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AASlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,QAAA,MAAM,aAAa;;;;wCAmKlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
package/alert/internal.js CHANGED
@@ -12,12 +12,12 @@ import { getBaseProps } from '../internal/base-component';
12
12
  import VisualContext from '../internal/components/visual-context';
13
13
  import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
14
14
  import { fireNonCancelableEvent } from '../internal/events';
15
- import { useContainerBreakpoints } from '../internal/hooks/container-queries';
16
15
  import useForwardFocus from '../internal/hooks/forward-focus';
17
16
  import { useMergeRefs } from '../internal/hooks/use-merge-refs';
18
17
  import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
19
18
  import { awsuiPluginsInternal } from '../internal/plugins/api';
20
19
  import { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';
20
+ import useContainerWidth from '../internal/utils/use-container-width';
21
21
  import { ActionsWrapper } from './actions-wrapper';
22
22
  import analyticsSelectors from './analytics-metadata/styles.css.js';
23
23
  import styles from './styles.css.js';
@@ -36,10 +36,10 @@ const InternalAlert = React.forwardRef((_a, ref) => {
36
36
  const i18n = useInternalI18n('alert');
37
37
  const focusRef = useRef(null);
38
38
  useForwardFocus(ref, focusRef);
39
- const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);
40
- const mergedRef = useMergeRefs(breakpointRef, __internalRootRef);
41
39
  const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);
42
40
  const { initialHidden, headerReplacementType, contentReplacementType, headerRef: headerRefContent, contentRef: contentRefContent, replacementHeaderRef, replacementContentRef, } = useDiscoveredContent({ type, header, children });
41
+ const [containerWidth, containerMeasureRef] = useContainerWidth();
42
+ const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);
43
43
  const headerRef = useMergeRefs(headerRefAction, headerRefContent);
44
44
  const contentRef = useMergeRefs(contentRefAction, contentRefContent);
45
45
  const isRefresh = useVisualRefresh();
@@ -54,22 +54,23 @@ const InternalAlert = React.forwardRef((_a, ref) => {
54
54
  };
55
55
  const statusIconAriaLabel = i18n(`i18nStrings.${type}IconAriaLabel`, (_b = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings[`${type}IconAriaLabel`]) !== null && _b !== void 0 ? _b : deprecatedStatusIconAriaLabel);
56
56
  const dismissAriaLabel = i18n('i18nStrings.dismissAriaLabel', (_c = i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.dismissAriaLabel) !== null && _c !== void 0 ? _c : i18n('dismissAriaLabel', deprecatedDismissAriaLabel));
57
- return (React.createElement("div", Object.assign({}, baseProps, analyticsAttributes, { "aria-hidden": !visible, className: clsx(styles.root, { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden }, baseProps.className), ref: mergedRef }),
57
+ return (React.createElement("div", Object.assign({}, baseProps, analyticsAttributes, { "aria-hidden": !visible, className: clsx(styles.root, { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden }, baseProps.className), ref: containerRef }),
58
58
  React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
59
59
  React.createElement(VisualContext, { contextName: "alert" },
60
- React.createElement("div", { className: clsx(styles.alert, styles[`type-${type}`], styles[`icon-size-${size}`], hasAction && styles['with-action'], dismissible && styles['with-dismiss'], styles[`breakpoint-${breakpoint}`]) },
61
- React.createElement("div", { className: styles['alert-focus-wrapper'], tabIndex: -1, ref: focusRef },
62
- React.createElement("div", { className: clsx(styles.icon, styles.text) },
63
- React.createElement(InternalIcon, { name: typeToIcon[type], size: size, ariaLabel: statusIconAriaLabel })),
64
- React.createElement("div", { className: clsx(styles.message, styles.text), id: messageSlotId },
65
- React.createElement("div", { className: clsx(header && styles.header, headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header), ref: headerRef }, header),
66
- React.createElement("div", { className: clsx(styles['header-replacement'], headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header), ref: replacementHeaderRef }),
67
- React.createElement("div", { className: clsx(styles.content, contentReplacementType !== 'original' && styles.hidden), ref: contentRef }, children),
68
- React.createElement("div", { className: clsx(styles['content-replacement'], contentReplacementType !== 'replaced' && styles.hidden), ref: replacementContentRef }))),
69
- React.createElement(ActionsWrapper, { className: styles.action, testUtilClasses: {
70
- actionSlot: styles['action-slot'],
71
- actionButton: styles['action-button'],
72
- }, action: action, discoveredActions: discoveredActions, buttonText: buttonText, onButtonClick: () => fireNonCancelableEvent(onButtonClick) }),
60
+ React.createElement("div", { className: clsx(styles.alert, styles[`type-${type}`], styles[`icon-size-${size}`], hasAction && styles['with-action'], dismissible && styles['with-dismiss']) },
61
+ React.createElement("div", { className: styles['alert-wrapper'] },
62
+ React.createElement("div", { className: styles['alert-focus-wrapper'], tabIndex: -1, ref: focusRef },
63
+ React.createElement("div", { className: clsx(styles.icon, styles.text) },
64
+ React.createElement(InternalIcon, { name: typeToIcon[type], size: size, ariaLabel: statusIconAriaLabel })),
65
+ React.createElement("div", { className: clsx(styles.message, styles.text), id: messageSlotId },
66
+ React.createElement("div", { className: clsx(header && styles.header, headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header), ref: headerRef }, header),
67
+ React.createElement("div", { className: clsx(styles['header-replacement'], headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header), ref: replacementHeaderRef }),
68
+ React.createElement("div", { className: clsx(styles.content, contentReplacementType !== 'original' && styles.hidden), ref: contentRef }, children),
69
+ React.createElement("div", { className: clsx(styles['content-replacement'], contentReplacementType !== 'replaced' && styles.hidden), ref: replacementContentRef }))),
70
+ React.createElement(ActionsWrapper, { className: styles.action, testUtilClasses: {
71
+ actionSlot: styles['action-slot'],
72
+ actionButton: styles['action-button'],
73
+ }, action: action, discoveredActions: discoveredActions, buttonText: buttonText, onButtonClick: () => fireNonCancelableEvent(onButtonClick), containerWidth: containerWidth, wrappedClass: styles['action-wrapped'] })),
73
74
  dismissible && (React.createElement("div", Object.assign({ className: styles.dismiss }, getAnalyticsMetadataAttribute({
74
75
  action: 'dismiss',
75
76
  })),
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,M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,EAC7B,sBAAsB,KAAK,UAAU,IAAI,MAAM,CAAC,MAAM,CACvD,EACD,GAAG,EAAE,qBAAqB,GACrB,CACH,CACF;oBACN,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,eAAe,EAAE;4BACf,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC;4BACjC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;yBACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAC1D;oBACD,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAChD,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,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 { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps<HTMLDivElement> & {\n messageSlotId?: string;\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef = null,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);\n const mergedRef = useMergeRefs(breakpointRef, __internalRootRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={mergedRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss'],\n styles[`breakpoint-${breakpoint}`]\n )}\n >\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef}>\n <div className={clsx(styles.icon, styles.text)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n />\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/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,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM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jC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;6BACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAC1D,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,CAAC,gBAAgB,CAAC,GACtC,CACE;oBACL,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAChD,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,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 { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps<HTMLDivElement> & {\n messageSlotId?: string;\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef = null,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={containerRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss']\n )}\n >\n <div className={styles['alert-wrapper']}>\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef}>\n <div className={clsx(styles.icon, styles.text)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
@@ -1,33 +1,32 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "alert": "awsui_alert_mx3cw_1euw8_193",
5
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1euw8_1",
6
- "root": "awsui_root_mx3cw_1euw8_215",
7
- "hidden": "awsui_hidden_mx3cw_1euw8_250",
8
- "with-dismiss": "awsui_with-dismiss_mx3cw_1euw8_297",
9
- "with-action": "awsui_with-action_mx3cw_1euw8_297",
10
- "breakpoint-default": "awsui_breakpoint-default_mx3cw_1euw8_303",
11
- "initial-hidden": "awsui_initial-hidden_mx3cw_1euw8_314",
12
- "header": "awsui_header_mx3cw_1euw8_319",
13
- "header-replacement": "awsui_header-replacement_mx3cw_1euw8_320",
14
- "action": "awsui_action_mx3cw_1euw8_324",
15
- "action-slot": "awsui_action-slot_mx3cw_1euw8_329",
16
- "action-button": "awsui_action-button_mx3cw_1euw8_330",
17
- "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1euw8_334",
18
- "text": "awsui_text_mx3cw_1euw8_363",
19
- "icon": "awsui_icon_mx3cw_1euw8_370",
20
- "message": "awsui_message_mx3cw_1euw8_373",
21
- "icon-size-medium": "awsui_icon-size-medium_mx3cw_1euw8_381",
22
- "icon-size-big": "awsui_icon-size-big_mx3cw_1euw8_384",
23
- "icon-size-normal": "awsui_icon-size-normal_mx3cw_1euw8_387",
24
- "content": "awsui_content_mx3cw_1euw8_391",
25
- "content-replacement": "awsui_content-replacement_mx3cw_1euw8_392",
26
- "dismiss": "awsui_dismiss_mx3cw_1euw8_396",
27
- "dismiss-button": "awsui_dismiss-button_mx3cw_1euw8_401",
28
- "type-error": "awsui_type-error_mx3cw_1euw8_405",
29
- "type-warning": "awsui_type-warning_mx3cw_1euw8_413",
30
- "type-success": "awsui_type-success_mx3cw_1euw8_421",
31
- "type-info": "awsui_type-info_mx3cw_1euw8_429"
4
+ "alert": "awsui_alert_mx3cw_1r6ai_193",
5
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1r6ai_1",
6
+ "root": "awsui_root_mx3cw_1r6ai_215",
7
+ "hidden": "awsui_hidden_mx3cw_1r6ai_250",
8
+ "alert-wrapper": "awsui_alert-wrapper_mx3cw_1r6ai_298",
9
+ "initial-hidden": "awsui_initial-hidden_mx3cw_1r6ai_310",
10
+ "header": "awsui_header_mx3cw_1r6ai_315",
11
+ "header-replacement": "awsui_header-replacement_mx3cw_1r6ai_316",
12
+ "action": "awsui_action_mx3cw_1r6ai_320",
13
+ "action-slot": "awsui_action-slot_mx3cw_1r6ai_324",
14
+ "action-button": "awsui_action-button_mx3cw_1r6ai_325",
15
+ "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1r6ai_329",
16
+ "text": "awsui_text_mx3cw_1r6ai_360",
17
+ "icon": "awsui_icon_mx3cw_1r6ai_367",
18
+ "message": "awsui_message_mx3cw_1r6ai_370",
19
+ "action-wrapped": "awsui_action-wrapped_mx3cw_1r6ai_374",
20
+ "icon-size-medium": "awsui_icon-size-medium_mx3cw_1r6ai_378",
21
+ "icon-size-big": "awsui_icon-size-big_mx3cw_1r6ai_382",
22
+ "icon-size-normal": "awsui_icon-size-normal_mx3cw_1r6ai_386",
23
+ "content": "awsui_content_mx3cw_1r6ai_390",
24
+ "content-replacement": "awsui_content-replacement_mx3cw_1r6ai_391",
25
+ "dismiss": "awsui_dismiss_mx3cw_1r6ai_395",
26
+ "dismiss-button": "awsui_dismiss-button_mx3cw_1r6ai_400",
27
+ "type-error": "awsui_type-error_mx3cw_1r6ai_404",
28
+ "type-warning": "awsui_type-warning_mx3cw_1r6ai_412",
29
+ "type-success": "awsui_type-success_mx3cw_1r6ai_420",
30
+ "type-info": "awsui_type-info_mx3cw_1r6ai_428"
32
31
  };
33
32
 
@@ -190,10 +190,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
190
190
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
191
191
  SPDX-License-Identifier: Apache-2.0
192
192
  */
193
- .awsui_alert_mx3cw_1euw8_193:not(#\9) {
194
- animation: awsui_awsui-motion-fade-in_mx3cw_1euw8_1 var(--motion-duration-show-paced-q2lo2h, 180ms) var(--motion-easing-show-paced-ne2o0s, ease-out);
193
+ .awsui_alert_mx3cw_1r6ai_193:not(#\9) {
194
+ animation: awsui_awsui-motion-fade-in_mx3cw_1r6ai_1 var(--motion-duration-show-paced-q2lo2h, 180ms) var(--motion-easing-show-paced-ne2o0s, ease-out);
195
195
  }
196
- @keyframes awsui_awsui-motion-fade-in_mx3cw_1euw8_1 {
196
+ @keyframes awsui_awsui-motion-fade-in_mx3cw_1r6ai_1 {
197
197
  from {
198
198
  opacity: 0.2;
199
199
  }
@@ -202,17 +202,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
202
202
  }
203
203
  }
204
204
  @media (prefers-reduced-motion: reduce) {
205
- .awsui_alert_mx3cw_1euw8_193:not(#\9) {
205
+ .awsui_alert_mx3cw_1r6ai_193:not(#\9) {
206
206
  animation: none;
207
207
  transition: none;
208
208
  }
209
209
  }
210
- .awsui-motion-disabled .awsui_alert_mx3cw_1euw8_193:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_1euw8_193:not(#\9) {
210
+ .awsui-motion-disabled .awsui_alert_mx3cw_1r6ai_193:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_1r6ai_193:not(#\9) {
211
211
  animation: none;
212
212
  transition: none;
213
213
  }
214
214
 
215
- .awsui_root_mx3cw_1euw8_215:not(#\9) {
215
+ .awsui_root_mx3cw_1r6ai_215:not(#\9) {
216
216
  border-collapse: separate;
217
217
  border-spacing: 0;
218
218
  box-sizing: border-box;
@@ -248,11 +248,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
248
248
  overflow: hidden;
249
249
  display: block;
250
250
  }
251
- .awsui_root_mx3cw_1euw8_215.awsui_hidden_mx3cw_1euw8_250:not(#\9) {
251
+ .awsui_root_mx3cw_1r6ai_215.awsui_hidden_mx3cw_1r6ai_250:not(#\9) {
252
252
  display: none;
253
253
  }
254
254
 
255
- .awsui_alert_mx3cw_1euw8_193:not(#\9) {
255
+ .awsui_alert_mx3cw_1r6ai_193:not(#\9) {
256
256
  border-collapse: separate;
257
257
  border-spacing: 0;
258
258
  box-sizing: border-box;
@@ -284,8 +284,8 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
284
284
  -webkit-font-smoothing: auto;
285
285
  -moz-osx-font-smoothing: auto;
286
286
  position: relative;
287
- display: grid;
288
- grid-template-columns: 1fr;
287
+ display: flex;
288
+ flex-direction: row;
289
289
  border-block: var(--border-width-alert-t0f3yn, 2px) solid;
290
290
  border-inline: var(--border-width-alert-t0f3yn, 2px) solid;
291
291
  border-start-start-radius: var(--border-radius-alert-mdtrse, 12px);
@@ -296,58 +296,55 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
296
296
  padding-inline: var(--space-alert-horizontal-eyt1xx, 16px);
297
297
  background-color: var(--color-background-container-content-z79u4u, #ffffff);
298
298
  }
299
- .awsui_alert_mx3cw_1euw8_193.awsui_with-dismiss_mx3cw_1euw8_297:not(#\9), .awsui_alert_mx3cw_1euw8_193.awsui_with-action_mx3cw_1euw8_297:not(#\9) {
300
- grid-template-columns: 1fr auto;
301
- }
302
- .awsui_alert_mx3cw_1euw8_193.awsui_with-action_mx3cw_1euw8_297.awsui_with-dismiss_mx3cw_1euw8_297:not(#\9) {
303
- grid-template-columns: 1fr auto auto;
304
- }
305
- .awsui_alert_mx3cw_1euw8_193.awsui_breakpoint-default_mx3cw_1euw8_303.awsui_with-action_mx3cw_1euw8_297:not(#\9) {
306
- grid-template-columns: 1fr auto;
307
- }
308
- .awsui_alert_mx3cw_1euw8_193.awsui_breakpoint-default_mx3cw_1euw8_303:not(#\9):not(.awsui_with-dismiss_mx3cw_1euw8_297) {
309
- grid-template-columns: 1fr;
299
+
300
+ .awsui_alert-wrapper_mx3cw_1r6ai_298:not(#\9) {
301
+ flex: 1;
302
+ display: flex;
303
+ flex-direction: row;
304
+ flex-wrap: wrap;
305
+ column-gap: var(--space-alert-action-left-ea9czk, 12px);
310
306
  }
311
307
 
312
- .awsui_hidden_mx3cw_1euw8_250:not(#\9) {
308
+ .awsui_hidden_mx3cw_1r6ai_250:not(#\9) {
313
309
  display: none;
314
310
  }
315
311
 
316
- .awsui_initial-hidden_mx3cw_1euw8_314:not(#\9) {
312
+ .awsui_initial-hidden_mx3cw_1r6ai_310:not(#\9) {
317
313
  overflow: hidden;
318
314
  block-size: 0;
319
315
  }
320
316
 
321
- .awsui_header_mx3cw_1euw8_319:not(#\9),
322
- .awsui_header-replacement_mx3cw_1euw8_320:not(#\9) {
317
+ .awsui_header_mx3cw_1r6ai_315:not(#\9),
318
+ .awsui_header-replacement_mx3cw_1r6ai_316:not(#\9) {
323
319
  font-weight: 700;
324
320
  }
325
321
 
326
- .awsui_action_mx3cw_1euw8_324:not(#\9) {
322
+ .awsui_action_mx3cw_1r6ai_320:not(#\9) {
327
323
  white-space: nowrap;
328
- margin-inline-start: var(--space-alert-action-left-ea9czk, 12px);
329
324
  }
330
325
 
331
- .awsui_action-slot_mx3cw_1euw8_329:not(#\9),
332
- .awsui_action-button_mx3cw_1euw8_330:not(#\9) {
326
+ .awsui_action-slot_mx3cw_1r6ai_324:not(#\9),
327
+ .awsui_action-button_mx3cw_1r6ai_325:not(#\9) {
333
328
  /* used in test-utils */
334
329
  }
335
330
 
336
- .awsui_alert-focus-wrapper_mx3cw_1euw8_334:not(#\9) {
331
+ .awsui_alert-focus-wrapper_mx3cw_1r6ai_329:not(#\9) {
332
+ flex: 1;
333
+ min-inline-size: 70%;
337
334
  display: grid;
338
335
  grid-template-columns: min-content auto;
339
336
  }
340
- .awsui_alert-focus-wrapper_mx3cw_1euw8_334:not(#\9):focus {
337
+ .awsui_alert-focus-wrapper_mx3cw_1r6ai_329:not(#\9):focus {
341
338
  outline: none;
342
339
  }
343
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1euw8_334:not(#\9):focus {
340
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1r6ai_329:not(#\9):focus {
344
341
  position: relative;
345
342
  }
346
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1euw8_334:not(#\9):focus {
343
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1r6ai_329:not(#\9):focus {
347
344
  outline: 2px dotted transparent;
348
345
  outline-offset: calc(var(--space-button-focus-outline-gutter-cqfd0c, 4px) - 1px);
349
346
  }
350
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1euw8_334:not(#\9):focus::before {
347
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1r6ai_329:not(#\9):focus::before {
351
348
  content: " ";
352
349
  display: block;
353
350
  position: absolute;
@@ -362,76 +359,78 @@ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1euw8_334:n
362
359
  box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
363
360
  }
364
361
 
365
- .awsui_text_mx3cw_1euw8_363:not(#\9) {
362
+ .awsui_text_mx3cw_1r6ai_360:not(#\9) {
366
363
  min-inline-size: 0;
367
364
  padding-block: var(--border-width-alert-t0f3yn, 2px);
368
365
  padding-inline: 0;
369
366
  margin-block: var(--space-scaled-xxs-7597g1, 4px);
370
367
  margin-inline: var(--space-xxs-p8yyaw, 4px);
371
368
  }
372
- .awsui_text_mx3cw_1euw8_363.awsui_icon_mx3cw_1euw8_370:not(#\9) {
369
+ .awsui_text_mx3cw_1r6ai_360.awsui_icon_mx3cw_1r6ai_367:not(#\9) {
373
370
  margin-inline-start: 0;
374
371
  }
375
- .awsui_text_mx3cw_1euw8_363.awsui_message_mx3cw_1euw8_373:not(#\9) {
372
+ .awsui_text_mx3cw_1r6ai_360.awsui_message_mx3cw_1r6ai_370:not(#\9) {
376
373
  margin-inline-end: var(--space-alert-message-right-knlb6u, 4px);
377
374
  }
378
375
 
379
- .awsui_breakpoint-default_mx3cw_1euw8_303 > .awsui_action_mx3cw_1euw8_324:not(#\9) {
380
- grid-row: 2;
376
+ .awsui_action-wrapped_mx3cw_1r6ai_374:not(#\9) {
381
377
  margin-block-end: var(--space-xxs-p8yyaw, 4px);
382
378
  }
383
- .awsui_breakpoint-default_mx3cw_1euw8_303.awsui_icon-size-medium_mx3cw_1euw8_381 > .awsui_action_mx3cw_1euw8_324:not(#\9) {
379
+
380
+ .awsui_icon-size-medium_mx3cw_1r6ai_378 > .awsui_alert-wrapper_mx3cw_1r6ai_298 > .awsui_action-wrapped_mx3cw_1r6ai_374:not(#\9) {
384
381
  margin-inline-start: calc(var(--size-icon-medium-y9xuoq, 20px) + var(--space-xs-zb16t3, 8px));
385
382
  }
386
- .awsui_breakpoint-default_mx3cw_1euw8_303.awsui_icon-size-big_mx3cw_1euw8_384 > .awsui_action_mx3cw_1euw8_324:not(#\9) {
383
+
384
+ .awsui_icon-size-big_mx3cw_1r6ai_382 > .awsui_alert-wrapper_mx3cw_1r6ai_298 > .awsui_action-wrapped_mx3cw_1r6ai_374:not(#\9) {
387
385
  margin-inline-start: calc(var(--size-icon-big-zkdryd, 32px) + var(--space-xs-zb16t3, 8px));
388
386
  }
389
- .awsui_breakpoint-default_mx3cw_1euw8_303.awsui_icon-size-normal_mx3cw_1euw8_387 > .awsui_action_mx3cw_1euw8_324:not(#\9) {
387
+
388
+ .awsui_icon-size-normal_mx3cw_1r6ai_386 > .awsui_alert-wrapper_mx3cw_1r6ai_298 > .awsui_action-wrapped_mx3cw_1r6ai_374:not(#\9) {
390
389
  margin-inline-start: calc(var(--size-icon-normal-0m1722, 16px) + var(--space-xs-zb16t3, 8px));
391
390
  }
392
391
 
393
- .awsui_content_mx3cw_1euw8_391:not(#\9),
394
- .awsui_content-replacement_mx3cw_1euw8_392:not(#\9) {
392
+ .awsui_content_mx3cw_1r6ai_390:not(#\9),
393
+ .awsui_content-replacement_mx3cw_1r6ai_391:not(#\9) {
395
394
  /* used in test-utils */
396
395
  }
397
396
 
398
- .awsui_dismiss_mx3cw_1euw8_396:not(#\9) {
397
+ .awsui_dismiss_mx3cw_1r6ai_395:not(#\9) {
399
398
  margin-inline-end: calc(-1 * var(--space-xxs-p8yyaw, 4px));
400
399
  margin-inline-start: var(--space-s-34lx8l, 12px);
401
400
  }
402
401
 
403
- .awsui_dismiss-button_mx3cw_1euw8_401:not(#\9) {
402
+ .awsui_dismiss-button_mx3cw_1r6ai_400:not(#\9) {
404
403
  /* used in test-utils */
405
404
  }
406
405
 
407
- .awsui_type-error_mx3cw_1euw8_405:not(#\9) {
406
+ .awsui_type-error_mx3cw_1r6ai_404:not(#\9) {
408
407
  border-color: var(--color-border-status-error-adxa56, #db0000);
409
408
  background-color: var(--color-background-status-error-5fz45j, #fff5f5);
410
409
  }
411
- .awsui_type-error_mx3cw_1euw8_405 > .awsui_alert-focus-wrapper_mx3cw_1euw8_334 > .awsui_icon_mx3cw_1euw8_370:not(#\9) {
410
+ .awsui_type-error_mx3cw_1r6ai_404 > .awsui_alert-wrapper_mx3cw_1r6ai_298 > .awsui_alert-focus-wrapper_mx3cw_1r6ai_329 > .awsui_icon_mx3cw_1r6ai_367:not(#\9) {
412
411
  color: var(--color-text-status-error-5676bj, #db0000);
413
412
  }
414
413
 
415
- .awsui_type-warning_mx3cw_1euw8_413:not(#\9) {
414
+ .awsui_type-warning_mx3cw_1r6ai_412:not(#\9) {
416
415
  border-color: var(--color-border-status-warning-3feumr, #855900);
417
416
  background-color: var(--color-background-status-warning-03nxlw, #fffef0);
418
417
  }
419
- .awsui_type-warning_mx3cw_1euw8_413 > .awsui_alert-focus-wrapper_mx3cw_1euw8_334 > .awsui_icon_mx3cw_1euw8_370:not(#\9) {
418
+ .awsui_type-warning_mx3cw_1r6ai_412 > .awsui_alert-wrapper_mx3cw_1r6ai_298 > .awsui_alert-focus-wrapper_mx3cw_1r6ai_329 > .awsui_icon_mx3cw_1r6ai_367:not(#\9) {
420
419
  color: var(--color-text-status-warning-csaw41, #855900);
421
420
  }
422
421
 
423
- .awsui_type-success_mx3cw_1euw8_421:not(#\9) {
422
+ .awsui_type-success_mx3cw_1r6ai_420:not(#\9) {
424
423
  border-color: var(--color-border-status-success-4x6srk, #00802f);
425
424
  background-color: var(--color-background-status-success-ua29ej, #effff1);
426
425
  }
427
- .awsui_type-success_mx3cw_1euw8_421 > .awsui_alert-focus-wrapper_mx3cw_1euw8_334 > .awsui_icon_mx3cw_1euw8_370:not(#\9) {
426
+ .awsui_type-success_mx3cw_1r6ai_420 > .awsui_alert-wrapper_mx3cw_1r6ai_298 > .awsui_alert-focus-wrapper_mx3cw_1r6ai_329 > .awsui_icon_mx3cw_1r6ai_367:not(#\9) {
428
427
  color: var(--color-text-status-success-gqp5xk, #00802f);
429
428
  }
430
429
 
431
- .awsui_type-info_mx3cw_1euw8_429:not(#\9) {
430
+ .awsui_type-info_mx3cw_1r6ai_428:not(#\9) {
432
431
  border-color: var(--color-border-status-info-z6pwqy, #006ce0);
433
432
  background-color: var(--color-background-status-info-gflgo4, #f0fbff);
434
433
  }
435
- .awsui_type-info_mx3cw_1euw8_429 > .awsui_alert-focus-wrapper_mx3cw_1euw8_334 > .awsui_icon_mx3cw_1euw8_370:not(#\9) {
434
+ .awsui_type-info_mx3cw_1r6ai_428 > .awsui_alert-wrapper_mx3cw_1r6ai_298 > .awsui_alert-focus-wrapper_mx3cw_1r6ai_329 > .awsui_icon_mx3cw_1r6ai_367:not(#\9) {
436
435
  color: var(--color-text-status-info-7rlubr, #006ce0);
437
436
  }
@@ -2,33 +2,32 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "alert": "awsui_alert_mx3cw_1euw8_193",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1euw8_1",
7
- "root": "awsui_root_mx3cw_1euw8_215",
8
- "hidden": "awsui_hidden_mx3cw_1euw8_250",
9
- "with-dismiss": "awsui_with-dismiss_mx3cw_1euw8_297",
10
- "with-action": "awsui_with-action_mx3cw_1euw8_297",
11
- "breakpoint-default": "awsui_breakpoint-default_mx3cw_1euw8_303",
12
- "initial-hidden": "awsui_initial-hidden_mx3cw_1euw8_314",
13
- "header": "awsui_header_mx3cw_1euw8_319",
14
- "header-replacement": "awsui_header-replacement_mx3cw_1euw8_320",
15
- "action": "awsui_action_mx3cw_1euw8_324",
16
- "action-slot": "awsui_action-slot_mx3cw_1euw8_329",
17
- "action-button": "awsui_action-button_mx3cw_1euw8_330",
18
- "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1euw8_334",
19
- "text": "awsui_text_mx3cw_1euw8_363",
20
- "icon": "awsui_icon_mx3cw_1euw8_370",
21
- "message": "awsui_message_mx3cw_1euw8_373",
22
- "icon-size-medium": "awsui_icon-size-medium_mx3cw_1euw8_381",
23
- "icon-size-big": "awsui_icon-size-big_mx3cw_1euw8_384",
24
- "icon-size-normal": "awsui_icon-size-normal_mx3cw_1euw8_387",
25
- "content": "awsui_content_mx3cw_1euw8_391",
26
- "content-replacement": "awsui_content-replacement_mx3cw_1euw8_392",
27
- "dismiss": "awsui_dismiss_mx3cw_1euw8_396",
28
- "dismiss-button": "awsui_dismiss-button_mx3cw_1euw8_401",
29
- "type-error": "awsui_type-error_mx3cw_1euw8_405",
30
- "type-warning": "awsui_type-warning_mx3cw_1euw8_413",
31
- "type-success": "awsui_type-success_mx3cw_1euw8_421",
32
- "type-info": "awsui_type-info_mx3cw_1euw8_429"
5
+ "alert": "awsui_alert_mx3cw_1r6ai_193",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1r6ai_1",
7
+ "root": "awsui_root_mx3cw_1r6ai_215",
8
+ "hidden": "awsui_hidden_mx3cw_1r6ai_250",
9
+ "alert-wrapper": "awsui_alert-wrapper_mx3cw_1r6ai_298",
10
+ "initial-hidden": "awsui_initial-hidden_mx3cw_1r6ai_310",
11
+ "header": "awsui_header_mx3cw_1r6ai_315",
12
+ "header-replacement": "awsui_header-replacement_mx3cw_1r6ai_316",
13
+ "action": "awsui_action_mx3cw_1r6ai_320",
14
+ "action-slot": "awsui_action-slot_mx3cw_1r6ai_324",
15
+ "action-button": "awsui_action-button_mx3cw_1r6ai_325",
16
+ "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1r6ai_329",
17
+ "text": "awsui_text_mx3cw_1r6ai_360",
18
+ "icon": "awsui_icon_mx3cw_1r6ai_367",
19
+ "message": "awsui_message_mx3cw_1r6ai_370",
20
+ "action-wrapped": "awsui_action-wrapped_mx3cw_1r6ai_374",
21
+ "icon-size-medium": "awsui_icon-size-medium_mx3cw_1r6ai_378",
22
+ "icon-size-big": "awsui_icon-size-big_mx3cw_1r6ai_382",
23
+ "icon-size-normal": "awsui_icon-size-normal_mx3cw_1r6ai_386",
24
+ "content": "awsui_content_mx3cw_1r6ai_390",
25
+ "content-replacement": "awsui_content-replacement_mx3cw_1r6ai_391",
26
+ "dismiss": "awsui_dismiss_mx3cw_1r6ai_395",
27
+ "dismiss-button": "awsui_dismiss-button_mx3cw_1r6ai_400",
28
+ "type-error": "awsui_type-error_mx3cw_1r6ai_404",
29
+ "type-warning": "awsui_type-warning_mx3cw_1r6ai_412",
30
+ "type-success": "awsui_type-success_mx3cw_1r6ai_420",
31
+ "type-info": "awsui_type-info_mx3cw_1r6ai_428"
33
32
  };
34
33
 
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible-flashbar.d.ts","sourceRoot":"","sources":["../../../src/flashbar/collapsible-flashbar.tsx"],"names":[],"mappings":";AAwBA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAW7C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,aAAa,eAsUjF"}
1
+ {"version":3,"file":"collapsible-flashbar.d.ts","sourceRoot":"","sources":["../../../src/flashbar/collapsible-flashbar.tsx"],"names":[],"mappings":";AAwBA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAW7C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,aAAa,eAqUjF"}