@cloudscape-design/components 3.0.790 → 3.0.792

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 (41) hide show
  1. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +19 -19
  2. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +40 -40
  3. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +19 -19
  4. package/form/index.d.ts.map +1 -1
  5. package/form/index.js +3 -3
  6. package/form/index.js.map +1 -1
  7. package/internal/analytics/components/analytics-funnel.d.ts +2 -0
  8. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  9. package/internal/analytics/components/analytics-funnel.js +48 -5
  10. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  11. package/internal/analytics/hooks/use-funnel.d.ts +6 -21
  12. package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
  13. package/internal/analytics/hooks/use-funnel.js +0 -7
  14. package/internal/analytics/hooks/use-funnel.js.map +1 -1
  15. package/internal/analytics/interfaces.d.ts +3 -2
  16. package/internal/analytics/interfaces.d.ts.map +1 -1
  17. package/internal/analytics/interfaces.js.map +1 -1
  18. package/internal/base-component/styles.scoped.css +23 -0
  19. package/internal/environment.js +1 -1
  20. package/internal/environment.json +1 -1
  21. package/internal/generated/styles/tokens.d.ts +5 -0
  22. package/internal/generated/styles/tokens.js +5 -0
  23. package/internal/generated/theming/index.cjs +134 -0
  24. package/internal/generated/theming/index.cjs.d.ts +16 -0
  25. package/internal/generated/theming/index.d.ts +16 -0
  26. package/internal/generated/theming/index.js +134 -0
  27. package/internal/manifest.json +1 -1
  28. package/modal/index.d.ts.map +1 -1
  29. package/modal/index.js +22 -2
  30. package/modal/index.js.map +1 -1
  31. package/modal/interfaces.d.ts +14 -0
  32. package/modal/interfaces.d.ts.map +1 -1
  33. package/modal/interfaces.js.map +1 -1
  34. package/modal/internal.d.ts +9 -0
  35. package/modal/internal.d.ts.map +1 -1
  36. package/modal/internal.js +20 -6
  37. package/modal/internal.js.map +1 -1
  38. package/package.json +1 -1
  39. package/property-filter/styles.css.js +35 -35
  40. package/property-filter/styles.scoped.css +40 -38
  41. package/property-filter/styles.selectors.js +35 -35
package/modal/index.js CHANGED
@@ -2,14 +2,34 @@ import { __rest } from "tslib";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import React from 'react';
5
+ import { AnalyticsFunnel, AnalyticsFunnelStep, AnalyticsFunnelSubStep, } from '../internal/analytics/components/analytics-funnel';
6
+ import { useFunnel } from '../internal/analytics/hooks/use-funnel';
7
+ import { getAnalyticsMetadataProps } from '../internal/base-component';
5
8
  import useBaseComponent from '../internal/hooks/use-base-component';
6
9
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import InternalModal from './internal';
10
+ import InternalModal, { InternalModalAsFunnel } from './internal';
11
+ import styles from './styles.css.js';
12
+ function ModalWithAnalyticsFunnel(_a) {
13
+ var { analyticsMetadata, baseComponentProps, size = 'medium' } = _a, props = __rest(_a, ["analyticsMetadata", "baseComponentProps", "size"]);
14
+ return (React.createElement(AnalyticsFunnel, { mounted: props.visible, funnelIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, funnelFlowType: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.flowType, funnelErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext, funnelResourceType: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.resourceType, funnelType: "modal", optionalStepNumbers: [], totalFunnelSteps: 1, funnelNameSelectors: [`.${styles['header--text']}`] },
15
+ React.createElement(AnalyticsFunnelStep, { mounted: props.visible, stepIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, stepErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext, stepNumber: 1 },
16
+ React.createElement(AnalyticsFunnelSubStep, { subStepIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, subStepErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext },
17
+ React.createElement(InternalModalAsFunnel, Object.assign({ size: size }, props, baseComponentProps, { __injectAnalyticsComponentMetadata: true }))))));
18
+ }
8
19
  export default function Modal(_a) {
9
20
  var { size = 'medium' } = _a, props = __rest(_a, ["size"]);
21
+ const { isInFunnel } = useFunnel();
22
+ const analyticsMetadata = getAnalyticsMetadataProps(props);
10
23
  const baseComponentProps = useBaseComponent('Modal', {
11
24
  props: { size, disableContentPaddings: props.disableContentPaddings },
12
- });
25
+ metadata: {
26
+ hasResourceType: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.resourceType),
27
+ hasInstanceIdentifier: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier),
28
+ },
29
+ }, analyticsMetadata);
30
+ if (!isInFunnel) {
31
+ return (React.createElement(ModalWithAnalyticsFunnel, Object.assign({ analyticsMetadata: analyticsMetadata, baseComponentProps: baseComponentProps, size: size }, props)));
32
+ }
13
33
  return React.createElement(InternalModal, Object.assign({ size: size }, props, baseComponentProps, { __injectAnalyticsComponentMetadata: true }));
14
34
  }
15
35
  applyDisplayName(Modal, 'Modal');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modal/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,aAAa,MAAM,YAAY,CAAC;AAIvC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAyC;QAAzC,EAAE,IAAI,GAAG,QAAQ,OAAwB,EAAnB,KAAK,cAA3B,QAA6B,CAAF;IACvD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,OAAO,EAAE;QACnD,KAAK,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,CAAC,sBAAsB,EAAE;KACtE,CAAC,CAAC;IACH,OAAO,oBAAC,aAAa,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAM,kBAAkB,IAAE,kCAAkC,EAAE,IAAI,IAAI,CAAC;AACpH,CAAC;AAED,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { ModalProps } from './interfaces';\nimport InternalModal from './internal';\n\nexport { ModalProps };\n\nexport default function Modal({ size = 'medium', ...props }: ModalProps) {\n const baseComponentProps = useBaseComponent('Modal', {\n props: { size, disableContentPaddings: props.disableContentPaddings },\n });\n return <InternalModal size={size} {...props} {...baseComponentProps} __injectAnalyticsComponentMetadata={true} />;\n}\n\napplyDisplayName(Modal, 'Modal');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modal/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sC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B,kCAAkC,EAAE,IAAI,IACxC,CACqB,CACL,CACN,CACnB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAyC;QAAzC,EAAE,IAAI,GAAG,QAAQ,OAAwB,EAAnB,KAAK,cAA3B,QAA6B,CAAF;IACvD,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,CAAC;IACnC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,KAAuC,CAAC,CAAC;IAC7F,MAAM,kBAAkB,GAAG,gBAAgB,CACzC,OAAO,EACP;QACE,KAAK,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,CAAC,sBAAsB,EAAE;QACrE,QAAQ,EAAE;YACR,eAAe,EAAE,OAAO,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,YAAY,CAAC;YACzD,qBAAqB,EAAE,OAAO,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,kBAAkB,CAAC;SACtE;KACF,EACD,iBAAiB,CAClB,CAAC;IAEF,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,CACL,oBAAC,wBAAwB,kBACvB,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAkB,EACtC,IAAI,EAAE,IAAI,IACN,KAAK,EACT,CACH,CAAC;KACH;IAED,OAAO,oBAAC,aAAa,kBAAC,IAAI,EAAE,IAAI,IAAM,KAAK,EAAM,kBAAkB,IAAE,kCAAkC,EAAE,IAAI,IAAI,CAAC;AACpH,CAAC;AAED,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport {\n AnalyticsFunnel,\n AnalyticsFunnelStep,\n AnalyticsFunnelSubStep,\n} from '../internal/analytics/components/analytics-funnel';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { ModalProps } from './interfaces';\nimport InternalModal, { InternalModalAsFunnel } from './internal';\n\nimport styles from './styles.css.js';\n\nexport { ModalProps };\n\nfunction ModalWithAnalyticsFunnel({\n analyticsMetadata,\n baseComponentProps,\n size = 'medium',\n ...props\n}: ModalProps & { analyticsMetadata: any; baseComponentProps: ReturnType<typeof useBaseComponent> }) {\n return (\n <AnalyticsFunnel\n mounted={props.visible}\n funnelIdentifier={analyticsMetadata?.instanceIdentifier}\n funnelFlowType={analyticsMetadata?.flowType}\n funnelErrorContext={analyticsMetadata?.errorContext}\n funnelResourceType={analyticsMetadata?.resourceType}\n funnelType=\"modal\"\n optionalStepNumbers={[]}\n totalFunnelSteps={1}\n funnelNameSelectors={[`.${styles['header--text']}`]}\n >\n <AnalyticsFunnelStep\n mounted={props.visible}\n stepIdentifier={analyticsMetadata?.instanceIdentifier}\n stepErrorContext={analyticsMetadata?.errorContext}\n stepNumber={1}\n >\n <AnalyticsFunnelSubStep\n subStepIdentifier={analyticsMetadata?.instanceIdentifier}\n subStepErrorContext={analyticsMetadata?.errorContext}\n >\n <InternalModalAsFunnel\n size={size}\n {...props}\n {...baseComponentProps}\n __injectAnalyticsComponentMetadata={true}\n />\n </AnalyticsFunnelSubStep>\n </AnalyticsFunnelStep>\n </AnalyticsFunnel>\n );\n}\n\nexport default function Modal({ size = 'medium', ...props }: ModalProps) {\n const { isInFunnel } = useFunnel();\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const baseComponentProps = useBaseComponent(\n 'Modal',\n {\n props: { size, disableContentPaddings: props.disableContentPaddings },\n metadata: {\n hasResourceType: Boolean(analyticsMetadata?.resourceType),\n hasInstanceIdentifier: Boolean(analyticsMetadata?.instanceIdentifier),\n },\n },\n analyticsMetadata\n );\n\n if (!isInFunnel) {\n return (\n <ModalWithAnalyticsFunnel\n analyticsMetadata={analyticsMetadata}\n baseComponentProps={baseComponentProps}\n size={size}\n {...props}\n />\n );\n }\n\n return <InternalModal size={size} {...props} {...baseComponentProps} __injectAnalyticsComponentMetadata={true} />;\n}\n\napplyDisplayName(Modal, 'Modal');\n"]}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { FlowType } from '../internal/analytics/interfaces';
2
3
  import { BaseComponentProps } from '../internal/base-component';
3
4
  import { NonCancelableEventHandler } from '../internal/events';
4
5
  export interface BaseModalProps {
@@ -60,11 +61,24 @@ export interface ModalProps extends BaseComponentProps, BaseModalProps {
60
61
  * render to an element under `document.body`.
61
62
  */
62
63
  modalRoot?: HTMLElement;
64
+ /**
65
+ * Specifies additional analytics-related metadata.
66
+ * * `instanceIdentifier` - A unique string that identifies this component instance in your application.
67
+ * * `flowType` - Identifies the type of flow represented by the component.
68
+ * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.
69
+ * @analytics
70
+ */
71
+ analyticsMetadata?: ModalProps.AnalyticsMetadata;
63
72
  }
64
73
  export declare namespace ModalProps {
65
74
  type Size = 'small' | 'medium' | 'large' | 'max';
66
75
  interface DismissDetail {
67
76
  reason: string;
68
77
  }
78
+ interface AnalyticsMetadata {
79
+ instanceIdentifier?: string;
80
+ flowType?: FlowType;
81
+ resourceType?: string;
82
+ }
69
83
  }
70
84
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/modal/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,O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C;IAE1C;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;CACtD;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB,EAAE,cAAc;IACpE;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC;IACvB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAChE;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC;CAClD;AAED,yBAAiB,UAAU,CAAC;IAC1B,KAAY,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;IAExD,UAAiB,aAAa;QAC5B,MAAM,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,iBAAiB;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/modal/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface BaseModalProps {\n /**\n * Use this property to specify a different dynamic modal root for the dialog.\n * The function will be called when a user clicks on the trigger button.\n */\n getModalRoot?: () => Promise<HTMLElement>;\n\n /**\n * Use this property when `getModalRoot` is used to clean up the modal root\n * element after a user closes the dialog. The function receives the return value\n * of the most recent getModalRoot call as an argument.\n */\n removeModalRoot?: (rootElement: HTMLElement) => void;\n}\n\nexport interface ModalProps extends BaseComponentProps, BaseModalProps {\n /**\n * Sets the width of the modal. `max` uses variable width up to the\n * largest size allowed by the design guidelines. Other sizes\n * (`small`/`medium`/`large`) have fixed widths.\n */\n size?: ModalProps.Size;\n /**\n * Determines whether the modal is displayed on the screen. Modals are hidden by default.\n * Set this property to `true` to show them.\n */\n visible: boolean;\n /**\n * Adds an `aria-label` to the close button, for accessibility.\n * @i18n\n */\n closeAriaLabel?: string;\n /**\n * Specifies a title for the modal. Although this can be empty, we suggest that you always provide a title.\n */\n header?: React.ReactNode;\n /**\n * Body of the modal.\n */\n children?: React.ReactNode;\n /**\n * Specifies a footer for the modal. If empty, the footer isn't displayed.\n */\n footer?: React.ReactNode;\n /**\n * Determines whether the modal content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n /**\n * Called when a user closes the modal by using the close icon button,\n * clicking outside of the modal, or pressing ESC.\n * The event detail contains the `reason`, which can be any of the following:\n * `['closeButton', 'overlay', 'keyboard']`.\n */\n onDismiss?: NonCancelableEventHandler<ModalProps.DismissDetail>;\n /**\n * Specifies the HTML element where the modal is rendered.\n * If neither `modalRoot` or `getModalRoot` properties are provided, the modal will\n * render to an element under `document.body`.\n */\n modalRoot?: HTMLElement;\n}\n\nexport namespace ModalProps {\n export type Size = 'small' | 'medium' | 'large' | 'max';\n\n export interface DismissDetail {\n reason: string;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/modal/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { FlowType } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface BaseModalProps {\n /**\n * Use this property to specify a different dynamic modal root for the dialog.\n * The function will be called when a user clicks on the trigger button.\n */\n getModalRoot?: () => Promise<HTMLElement>;\n\n /**\n * Use this property when `getModalRoot` is used to clean up the modal root\n * element after a user closes the dialog. The function receives the return value\n * of the most recent getModalRoot call as an argument.\n */\n removeModalRoot?: (rootElement: HTMLElement) => void;\n}\n\nexport interface ModalProps extends BaseComponentProps, BaseModalProps {\n /**\n * Sets the width of the modal. `max` uses variable width up to the\n * largest size allowed by the design guidelines. Other sizes\n * (`small`/`medium`/`large`) have fixed widths.\n */\n size?: ModalProps.Size;\n /**\n * Determines whether the modal is displayed on the screen. Modals are hidden by default.\n * Set this property to `true` to show them.\n */\n visible: boolean;\n /**\n * Adds an `aria-label` to the close button, for accessibility.\n * @i18n\n */\n closeAriaLabel?: string;\n /**\n * Specifies a title for the modal. Although this can be empty, we suggest that you always provide a title.\n */\n header?: React.ReactNode;\n /**\n * Body of the modal.\n */\n children?: React.ReactNode;\n /**\n * Specifies a footer for the modal. If empty, the footer isn't displayed.\n */\n footer?: React.ReactNode;\n /**\n * Determines whether the modal content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n /**\n * Called when a user closes the modal by using the close icon button,\n * clicking outside of the modal, or pressing ESC.\n * The event detail contains the `reason`, which can be any of the following:\n * `['closeButton', 'overlay', 'keyboard']`.\n */\n onDismiss?: NonCancelableEventHandler<ModalProps.DismissDetail>;\n /**\n * Specifies the HTML element where the modal is rendered.\n * If neither `modalRoot` or `getModalRoot` properties are provided, the modal will\n * render to an element under `document.body`.\n */\n modalRoot?: HTMLElement;\n\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `flowType` - Identifies the type of flow represented by the component.\n * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.\n * @analytics\n */\n analyticsMetadata?: ModalProps.AnalyticsMetadata;\n}\n\nexport namespace ModalProps {\n export type Size = 'small' | 'medium' | 'large' | 'max';\n\n export interface DismissDetail {\n reason: string;\n }\n\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n resourceType?: string;\n }\n}\n"]}
@@ -1,9 +1,18 @@
1
1
  /// <reference types="react" />
2
+ import { FunnelStepContextValue, FunnelSubStepContextValue } from '../internal/analytics/context/analytics-context';
3
+ import { FunnelProps } from '../internal/analytics/hooks/use-funnel';
4
+ import { ButtonContextProps } from '../internal/context/button-context';
2
5
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
6
  import { SomeRequired } from '../internal/types';
4
7
  import { ModalProps } from './interfaces';
8
+ export declare function InternalModalAsFunnel(props: InternalModalProps): JSX.Element;
5
9
  type InternalModalProps = SomeRequired<ModalProps, 'size'> & InternalBaseComponentProps & {
10
+ __funnelProps?: FunnelProps;
11
+ __funnelStepProps?: FunnelStepContextValue['funnelStepProps'];
12
+ __subStepRef?: FunnelSubStepContextValue['subStepRef'];
13
+ __subStepFunnelProps?: FunnelSubStepContextValue['funnelSubStepProps'];
6
14
  __injectAnalyticsComponentMetadata?: boolean;
15
+ onButtonClick?: ButtonContextProps['onClick'];
7
16
  referrerId?: string;
8
17
  };
9
18
  export default function InternalModal({ modalRoot, getModalRoot, removeModalRoot, ...rest }: InternalModalProps): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/modal/internal.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAMlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,OAAO,EAAE,UAAU,EA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EJ,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,eAM9G"}
package/modal/internal.js CHANGED
@@ -8,11 +8,12 @@ import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-tool
8
8
  import { InternalButton } from '../button/internal';
9
9
  import InternalHeader from '../header/internal';
10
10
  import { useInternalI18n } from '../i18n/context';
11
- import { FunnelNameSelectorContext } from '../internal/analytics/context/analytics-context';
12
- import { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';
11
+ import { FunnelNameSelectorContext, } from '../internal/analytics/context/analytics-context';
12
+ import { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';
13
13
  import { getBaseProps } from '../internal/base-component';
14
14
  import FocusLock from '../internal/components/focus-lock';
15
15
  import Portal from '../internal/components/portal';
16
+ import { ButtonContext } from '../internal/context/button-context';
16
17
  import { ModalContext } from '../internal/context/modal-context';
17
18
  import ResetContextsForModal from '../internal/context/reset-contexts-for-modal';
18
19
  import { fireNonCancelableEvent } from '../internal/events';
@@ -25,6 +26,18 @@ import { KeyCode } from '../internal/keycode';
25
26
  import { disableBodyScrolling, enableBodyScrolling } from './body-scroll';
26
27
  import analyticsSelectors from './analytics-metadata/styles.css.js';
27
28
  import styles from './styles.css.js';
29
+ export function InternalModalAsFunnel(props) {
30
+ const { funnelProps, funnelSubmit, funnelNextOrSubmitAttempt } = useFunnel();
31
+ const { funnelStepProps } = useFunnelStep();
32
+ const { subStepRef, funnelSubStepProps } = useFunnelSubStep();
33
+ const onButtonClick = ({ variant }) => {
34
+ if (variant === 'primary') {
35
+ funnelNextOrSubmitAttempt();
36
+ funnelSubmit();
37
+ }
38
+ };
39
+ return (React.createElement(InternalModal, Object.assign({ __funnelProps: funnelProps, __funnelStepProps: funnelStepProps, __subStepRef: subStepRef, __subStepFunnelProps: funnelSubStepProps, onButtonClick: onButtonClick }, props)));
40
+ }
28
41
  export default function InternalModal(_a) {
29
42
  var { modalRoot, getModalRoot, removeModalRoot } = _a, rest = __rest(_a, ["modalRoot", "getModalRoot", "removeModalRoot"]);
30
43
  return (React.createElement(Portal, { container: modalRoot, getContainer: getModalRoot, removeContainer: removeModalRoot },
@@ -34,7 +47,7 @@ export default function InternalModal(_a) {
34
47
  // useContainerQuery needs its targeted element to exist on the first render in order to work properly.
35
48
  function PortaledModal(_a) {
36
49
  var _b;
37
- var { size, visible, header, children, footer, disableContentPaddings, onDismiss, __internalRootRef = null, __injectAnalyticsComponentMetadata, referrerId } = _a, rest = __rest(_a, ["size", "visible", "header", "children", "footer", "disableContentPaddings", "onDismiss", "__internalRootRef", "__injectAnalyticsComponentMetadata", "referrerId"]);
50
+ var { size, visible, header, children, footer, disableContentPaddings, onButtonClick = () => { }, onDismiss, __internalRootRef = null, __injectAnalyticsComponentMetadata, __funnelProps, __funnelStepProps, __subStepRef, __subStepFunnelProps, referrerId } = _a, rest = __rest(_a, ["size", "visible", "header", "children", "footer", "disableContentPaddings", "onButtonClick", "onDismiss", "__internalRootRef", "__injectAnalyticsComponentMetadata", "__funnelProps", "__funnelStepProps", "__subStepRef", "__subStepFunnelProps", "referrerId"]);
38
51
  const instanceUniqueId = useUniqueId();
39
52
  const headerId = `${rest.id || instanceUniqueId}-header`;
40
53
  const lastMouseDownElementRef = useRef(null);
@@ -100,7 +113,7 @@ function PortaledModal(_a) {
100
113
  return (React.createElement(FunnelNameSelectorContext.Provider, { value: `.${styles['header--text']}` },
101
114
  React.createElement(ResetContextsForModal, null,
102
115
  React.createElement(ModalContext.Provider, { value: { isInModal: true } },
103
- React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-modal": true, "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined, "data-awsui-referrer-id": ((_b = subStepRef.current) === null || _b === void 0 ? void 0 : _b.id) || referrerId }),
116
+ React.createElement("div", Object.assign({}, baseProps, __funnelProps, __funnelStepProps, { className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-modal": true, "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined, "data-awsui-referrer-id": ((_b = subStepRef.current) === null || _b === void 0 ? void 0 : _b.id) || referrerId }),
104
117
  React.createElement(FocusLock, { disabled: !visible, autoFocus: true, restoreFocus: true, className: styles['focus-lock'] },
105
118
  React.createElement("div", Object.assign({ className: clsx(styles.dialog, styles[size], styles[`breakpoint-${breakpoint}`], isRefresh && styles.refresh), onKeyDown: escKeyHandler }, metadataAttribute),
106
119
  React.createElement("div", { className: styles.container },
@@ -110,9 +123,10 @@ function PortaledModal(_a) {
110
123
  })),
111
124
  React.createElement(InternalButton, { ariaLabel: closeAriaLabel, className: styles['dismiss-control'], variant: "modal-dismiss", iconName: "close", formAction: "none", onClick: onCloseButtonClick })) },
112
125
  React.createElement("span", { id: headerId, className: styles['header--text'] }, header))),
113
- React.createElement("div", { className: clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings }) },
126
+ React.createElement("div", Object.assign({ ref: __subStepRef }, __subStepFunnelProps, { className: clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings }) }),
114
127
  children,
115
128
  React.createElement("div", { ref: stickySentinelRef })),
116
- footer && (React.createElement("div", { ref: footerRef, className: clsx(styles.footer, footerStuck && styles['footer--stuck']) }, footer))))))))));
129
+ footer && (React.createElement(ButtonContext.Provider, { value: { onClick: onButtonClick } },
130
+ React.createElement("div", { ref: footerRef, className: clsx(styles.footer, footerStuck && styles['footer--stuck']) }, footer)))))))))));
117
131
  }
118
132
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceR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AAI,CACT,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,IACxF,MAAM,CACH,CACP,CACG,CACF,CACI,CACR,CACgB,CACF,CACW,CACtC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport InternalHeader from '../header/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { FunnelNameSelectorContext } from '../internal/analytics/context/analytics-context';\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport FocusLock from '../internal/components/focus-lock';\nimport Portal from '../internal/components/portal';\nimport { ModalContext } from '../internal/context/modal-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useIntersectionObserver } from '../internal/hooks/use-intersection-observer';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { KeyCode } from '../internal/keycode';\nimport { SomeRequired } from '../internal/types';\nimport {\n GeneratedAnalyticsMetadataModalComponent,\n GeneratedAnalyticsMetadataModalDismiss,\n} from './analytics-metadata/interfaces';\nimport { disableBodyScrolling, enableBodyScrolling } from './body-scroll';\nimport { ModalProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\ntype InternalModalProps = SomeRequired<ModalProps, 'size'> &\n InternalBaseComponentProps & { __injectAnalyticsComponentMetadata?: boolean; referrerId?: string };\n\nexport default function InternalModal({ modalRoot, getModalRoot, removeModalRoot, ...rest }: InternalModalProps) {\n return (\n <Portal container={modalRoot} getContainer={getModalRoot} removeContainer={removeModalRoot}>\n <PortaledModal {...rest} />\n </Portal>\n );\n}\n\ntype PortaledModalProps = Omit<InternalModalProps, 'modalRoot' | 'getModalRoot' | 'removeModalRoot'>;\n\n// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.\n// useContainerQuery needs its targeted element to exist on the first render in order to work properly.\nfunction PortaledModal({\n size,\n visible,\n header,\n children,\n footer,\n disableContentPaddings,\n onDismiss,\n __internalRootRef = null,\n __injectAnalyticsComponentMetadata,\n referrerId,\n ...rest\n}: PortaledModalProps) {\n const instanceUniqueId = useUniqueId();\n const headerId = `${rest.id || instanceUniqueId}-header`;\n const lastMouseDownElementRef = useRef<HTMLElement | null>(null);\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n\n const i18n = useInternalI18n('modal');\n const closeAriaLabel = i18n('closeAriaLabel', rest.closeAriaLabel);\n\n const refObject = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(breakpointsRef, refObject, __internalRootRef);\n\n const isRefresh = useVisualRefresh();\n\n const baseProps = getBaseProps(rest);\n\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataModalComponent = {\n name: 'awsui.Modal',\n label: `.${analyticsSelectors.header} h2`,\n };\n\n const metadataAttribute = __injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })\n : {};\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n // enable / disable body scroll\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n } else {\n enableBodyScrolling();\n }\n }, [visible]);\n\n // Because we hide the element with styles (and not actually detach it from DOM), we need to scroll to top\n useEffect(() => {\n if (visible && refObject.current) {\n refObject.current.scrollTop = 0;\n }\n }, [visible]);\n\n const dismiss = (reason: string) => fireNonCancelableEvent(onDismiss, { reason });\n\n const onOverlayMouseDown = (event: React.MouseEvent) => {\n lastMouseDownElementRef.current = event.target as HTMLElement;\n };\n const onOverlayClick = (event: React.MouseEvent) => {\n const overlay = refObject.current;\n const lastClicked = lastMouseDownElementRef.current;\n\n if (event.target === overlay && lastClicked === overlay) {\n dismiss('overlay');\n }\n };\n const onCloseButtonClick = () => dismiss('closeButton');\n const escKeyHandler = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.escape) {\n dismiss('keyboard');\n }\n };\n\n // We use an empty div element at the end of the content slot as a sentinel\n // to detect when the user has scrolled to the bottom.\n const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();\n\n // Add extra scroll padding to account for the height of the sticky footer,\n // to prevent it from covering focused elements.\n const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);\n const { subStepRef } = useFunnelSubStep();\n\n return (\n <FunnelNameSelectorContext.Provider value={`.${styles['header--text']}`}>\n <ResetContextsForModal>\n <ModalContext.Provider value={{ isInModal: true }}>\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible },\n baseProps.className,\n isRefresh && styles.refresh\n )}\n role=\"dialog\"\n aria-modal={true}\n aria-labelledby={headerId}\n onMouseDown={onOverlayMouseDown}\n onClick={onOverlayClick}\n ref={mergedRef}\n style={footerHeight ? { scrollPaddingBottom: footerHeight } : undefined}\n data-awsui-referrer-id={subStepRef.current?.id || referrerId}\n >\n <FocusLock disabled={!visible} autoFocus={true} restoreFocus={true} className={styles['focus-lock']}>\n <div\n className={clsx(\n styles.dialog,\n styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh\n )}\n onKeyDown={escKeyHandler}\n {...metadataAttribute}\n >\n <div className={styles.container}>\n <div className={clsx(styles.header, analyticsSelectors.header)}>\n <InternalHeader\n variant=\"h2\"\n __disableActionsWrapping={true}\n actions={\n <div\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataModalDismiss>)}\n >\n <InternalButton\n ariaLabel={closeAriaLabel}\n className={styles['dismiss-control']}\n variant=\"modal-dismiss\"\n iconName=\"close\"\n formAction=\"none\"\n onClick={onCloseButtonClick}\n />\n </div>\n }\n >\n <span id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <div className={clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings })}>\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <div ref={footerRef} className={clsx(styles.footer, footerStuck && styles['footer--stuck'])}>\n {footer}\n </div>\n )}\n </div>\n </div>\n </FocusLock>\n </div>\n </ModalContext.Provider>\n </ResetContextsForModal>\n </FunnelNameSelectorContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/modal/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,yBAAyB,GAG1B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAe,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACjH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAA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,2CACE,GAAG,EAAE,YAAY,IACb,oBAAoB,IACxB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,sBAAsB,EAAE,CAAC;oCAEnF,QAAQ;oCACT,6BAAK,GAAG,EAAE,iBAAiB,GAAI,CAC3B;gCACL,MAAM,IAAI,CACT,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;oCACvD,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,IACxF,MAAM,CACH,CACiB,CAC1B,CACG,CACF,CACI,CACR,CACgB,CACF,CACW,CACtC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport InternalHeader from '../header/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport {\n FunnelNameSelectorContext,\n FunnelStepContextValue,\n FunnelSubStepContextValue,\n} from '../internal/analytics/context/analytics-context';\nimport { FunnelProps, useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport FocusLock from '../internal/components/focus-lock';\nimport Portal from '../internal/components/portal';\nimport { ButtonContext, ButtonContextProps } from '../internal/context/button-context';\nimport { ModalContext } from '../internal/context/modal-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useIntersectionObserver } from '../internal/hooks/use-intersection-observer';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { KeyCode } from '../internal/keycode';\nimport { SomeRequired } from '../internal/types';\nimport {\n GeneratedAnalyticsMetadataModalComponent,\n GeneratedAnalyticsMetadataModalDismiss,\n} from './analytics-metadata/interfaces';\nimport { disableBodyScrolling, enableBodyScrolling } from './body-scroll';\nimport { ModalProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nexport function InternalModalAsFunnel(props: InternalModalProps) {\n const { funnelProps, funnelSubmit, funnelNextOrSubmitAttempt } = useFunnel();\n const { funnelStepProps } = useFunnelStep();\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const onButtonClick: ButtonContextProps['onClick'] = ({ variant }) => {\n if (variant === 'primary') {\n funnelNextOrSubmitAttempt();\n funnelSubmit();\n }\n };\n\n return (\n <InternalModal\n __funnelProps={funnelProps}\n __funnelStepProps={funnelStepProps}\n __subStepRef={subStepRef}\n __subStepFunnelProps={funnelSubStepProps}\n onButtonClick={onButtonClick}\n {...props}\n />\n );\n}\n\ntype InternalModalProps = SomeRequired<ModalProps, 'size'> &\n InternalBaseComponentProps & {\n __funnelProps?: FunnelProps;\n __funnelStepProps?: FunnelStepContextValue['funnelStepProps'];\n __subStepRef?: FunnelSubStepContextValue['subStepRef'];\n __subStepFunnelProps?: FunnelSubStepContextValue['funnelSubStepProps'];\n __injectAnalyticsComponentMetadata?: boolean;\n onButtonClick?: ButtonContextProps['onClick'];\n referrerId?: string;\n };\n\nexport default function InternalModal({ modalRoot, getModalRoot, removeModalRoot, ...rest }: InternalModalProps) {\n return (\n <Portal container={modalRoot} getContainer={getModalRoot} removeContainer={removeModalRoot}>\n <PortaledModal {...rest} />\n </Portal>\n );\n}\n\ntype PortaledModalProps = Omit<InternalModalProps, 'modalRoot' | 'getModalRoot' | 'removeModalRoot'>;\n\n// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.\n// useContainerQuery needs its targeted element to exist on the first render in order to work properly.\nfunction PortaledModal({\n size,\n visible,\n header,\n children,\n footer,\n disableContentPaddings,\n onButtonClick = () => {},\n onDismiss,\n __internalRootRef = null,\n __injectAnalyticsComponentMetadata,\n __funnelProps,\n __funnelStepProps,\n __subStepRef,\n __subStepFunnelProps,\n referrerId,\n ...rest\n}: PortaledModalProps) {\n const instanceUniqueId = useUniqueId();\n const headerId = `${rest.id || instanceUniqueId}-header`;\n const lastMouseDownElementRef = useRef<HTMLElement | null>(null);\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n\n const i18n = useInternalI18n('modal');\n const closeAriaLabel = i18n('closeAriaLabel', rest.closeAriaLabel);\n\n const refObject = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(breakpointsRef, refObject, __internalRootRef);\n\n const isRefresh = useVisualRefresh();\n\n const baseProps = getBaseProps(rest);\n\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataModalComponent = {\n name: 'awsui.Modal',\n label: `.${analyticsSelectors.header} h2`,\n };\n\n const metadataAttribute = __injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })\n : {};\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n // enable / disable body scroll\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n } else {\n enableBodyScrolling();\n }\n }, [visible]);\n\n // Because we hide the element with styles (and not actually detach it from DOM), we need to scroll to top\n useEffect(() => {\n if (visible && refObject.current) {\n refObject.current.scrollTop = 0;\n }\n }, [visible]);\n\n const dismiss = (reason: string) => fireNonCancelableEvent(onDismiss, { reason });\n\n const onOverlayMouseDown = (event: React.MouseEvent) => {\n lastMouseDownElementRef.current = event.target as HTMLElement;\n };\n const onOverlayClick = (event: React.MouseEvent) => {\n const overlay = refObject.current;\n const lastClicked = lastMouseDownElementRef.current;\n\n if (event.target === overlay && lastClicked === overlay) {\n dismiss('overlay');\n }\n };\n const onCloseButtonClick = () => dismiss('closeButton');\n const escKeyHandler = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.escape) {\n dismiss('keyboard');\n }\n };\n\n // We use an empty div element at the end of the content slot as a sentinel\n // to detect when the user has scrolled to the bottom.\n const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();\n\n // Add extra scroll padding to account for the height of the sticky footer,\n // to prevent it from covering focused elements.\n const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);\n const { subStepRef } = useFunnelSubStep();\n\n return (\n <FunnelNameSelectorContext.Provider value={`.${styles['header--text']}`}>\n <ResetContextsForModal>\n <ModalContext.Provider value={{ isInModal: true }}>\n <div\n {...baseProps}\n {...__funnelProps}\n {...__funnelStepProps}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible },\n baseProps.className,\n isRefresh && styles.refresh\n )}\n role=\"dialog\"\n aria-modal={true}\n aria-labelledby={headerId}\n onMouseDown={onOverlayMouseDown}\n onClick={onOverlayClick}\n ref={mergedRef}\n style={footerHeight ? { scrollPaddingBottom: footerHeight } : undefined}\n data-awsui-referrer-id={subStepRef.current?.id || referrerId}\n >\n <FocusLock disabled={!visible} autoFocus={true} restoreFocus={true} className={styles['focus-lock']}>\n <div\n className={clsx(\n styles.dialog,\n styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh\n )}\n onKeyDown={escKeyHandler}\n {...metadataAttribute}\n >\n <div className={styles.container}>\n <div className={clsx(styles.header, analyticsSelectors.header)}>\n <InternalHeader\n variant=\"h2\"\n __disableActionsWrapping={true}\n actions={\n <div\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataModalDismiss>)}\n >\n <InternalButton\n ariaLabel={closeAriaLabel}\n className={styles['dismiss-control']}\n variant=\"modal-dismiss\"\n iconName=\"close\"\n formAction=\"none\"\n onClick={onCloseButtonClick}\n />\n </div>\n }\n >\n <span id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <div\n ref={__subStepRef}\n {...__subStepFunnelProps}\n className={clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings })}\n >\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <ButtonContext.Provider value={{ onClick: onButtonClick }}>\n <div ref={footerRef} className={clsx(styles.footer, footerStuck && styles['footer--stuck'])}>\n {footer}\n </div>\n </ButtonContext.Provider>\n )}\n </div>\n </div>\n </FocusLock>\n </div>\n </ModalContext.Provider>\n </ResetContextsForModal>\n </FunnelNameSelectorContext.Provider>\n );\n}\n"]}
package/package.json CHANGED
@@ -127,7 +127,7 @@
127
127
  "./internal/base-component/index.js",
128
128
  "./internal/base-component/styles.css.js"
129
129
  ],
130
- "version": "3.0.790",
130
+ "version": "3.0.792",
131
131
  "repository": {
132
132
  "type": "git",
133
133
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,40 +1,40 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_1wzqe_ewjqa_141",
5
- "search-field": "awsui_search-field_1wzqe_ewjqa_176",
6
- "input-wrapper": "awsui_input-wrapper_1wzqe_ewjqa_181",
7
- "add-token": "awsui_add-token_1wzqe_ewjqa_188",
8
- "tokens": "awsui_tokens_1wzqe_ewjqa_195",
9
- "token-operator": "awsui_token-operator_1wzqe_ewjqa_200",
10
- "property-editor": "awsui_property-editor_1wzqe_ewjqa_204",
11
- "property-editor-header": "awsui_property-editor-header_1wzqe_ewjqa_207",
12
- "property-editor-form": "awsui_property-editor-form_1wzqe_ewjqa_220",
13
- "property-editor-cancel": "awsui_property-editor-cancel_1wzqe_ewjqa_225",
14
- "property-editor-actions": "awsui_property-editor-actions_1wzqe_ewjqa_228",
15
- "token-editor": "awsui_token-editor_1wzqe_ewjqa_236",
16
- "token-editor-form": "awsui_token-editor-form_1wzqe_ewjqa_243",
17
- "token-editor-field-property": "awsui_token-editor-field-property_1wzqe_ewjqa_246",
18
- "token-editor-field-operator": "awsui_token-editor-field-operator_1wzqe_ewjqa_249",
19
- "token-editor-field-value": "awsui_token-editor-field-value_1wzqe_ewjqa_252",
20
- "token-editor-cancel": "awsui_token-editor-cancel_1wzqe_ewjqa_255",
21
- "token-editor-submit": "awsui_token-editor-submit_1wzqe_ewjqa_258",
22
- "token-editor-actions": "awsui_token-editor-actions_1wzqe_ewjqa_261",
23
- "token-editor-grid": "awsui_token-editor-grid_1wzqe_ewjqa_270",
24
- "token-editor-grid-group": "awsui_token-editor-grid-group_1wzqe_ewjqa_307",
25
- "token-editor-narrow": "awsui_token-editor-narrow_1wzqe_ewjqa_310",
26
- "token-editor-supports-groups": "awsui_token-editor-supports-groups_1wzqe_ewjqa_319",
27
- "token-editor-grid-header": "awsui_token-editor-grid-header_1wzqe_ewjqa_323",
28
- "token-editor-grid-cell": "awsui_token-editor-grid-cell_1wzqe_ewjqa_329",
29
- "token-editor-add-token": "awsui_token-editor-add-token_1wzqe_ewjqa_338",
30
- "custom-content-wrapper": "awsui_custom-content-wrapper_1wzqe_ewjqa_342",
31
- "custom-control": "awsui_custom-control_1wzqe_ewjqa_346",
32
- "input": "awsui_input_1wzqe_ewjqa_181",
33
- "results": "awsui_results_1wzqe_ewjqa_354",
34
- "token-trigger": "awsui_token-trigger_1wzqe_ewjqa_359",
35
- "remove-all": "awsui_remove-all_1wzqe_ewjqa_364",
36
- "join-operation": "awsui_join-operation_1wzqe_ewjqa_365",
37
- "custom-filter-actions": "awsui_custom-filter-actions_1wzqe_ewjqa_366",
38
- "constraint": "awsui_constraint_1wzqe_ewjqa_370"
4
+ "root": "awsui_root_1wzqe_fubyj_141",
5
+ "search-field": "awsui_search-field_1wzqe_fubyj_176",
6
+ "input-wrapper": "awsui_input-wrapper_1wzqe_fubyj_183",
7
+ "add-token": "awsui_add-token_1wzqe_fubyj_190",
8
+ "tokens": "awsui_tokens_1wzqe_fubyj_197",
9
+ "token-operator": "awsui_token-operator_1wzqe_fubyj_202",
10
+ "property-editor": "awsui_property-editor_1wzqe_fubyj_206",
11
+ "property-editor-header": "awsui_property-editor-header_1wzqe_fubyj_209",
12
+ "property-editor-form": "awsui_property-editor-form_1wzqe_fubyj_222",
13
+ "property-editor-cancel": "awsui_property-editor-cancel_1wzqe_fubyj_227",
14
+ "property-editor-actions": "awsui_property-editor-actions_1wzqe_fubyj_230",
15
+ "token-editor": "awsui_token-editor_1wzqe_fubyj_238",
16
+ "token-editor-form": "awsui_token-editor-form_1wzqe_fubyj_245",
17
+ "token-editor-field-property": "awsui_token-editor-field-property_1wzqe_fubyj_248",
18
+ "token-editor-field-operator": "awsui_token-editor-field-operator_1wzqe_fubyj_251",
19
+ "token-editor-field-value": "awsui_token-editor-field-value_1wzqe_fubyj_254",
20
+ "token-editor-cancel": "awsui_token-editor-cancel_1wzqe_fubyj_257",
21
+ "token-editor-submit": "awsui_token-editor-submit_1wzqe_fubyj_260",
22
+ "token-editor-actions": "awsui_token-editor-actions_1wzqe_fubyj_263",
23
+ "token-editor-grid": "awsui_token-editor-grid_1wzqe_fubyj_272",
24
+ "token-editor-grid-group": "awsui_token-editor-grid-group_1wzqe_fubyj_309",
25
+ "token-editor-narrow": "awsui_token-editor-narrow_1wzqe_fubyj_312",
26
+ "token-editor-supports-groups": "awsui_token-editor-supports-groups_1wzqe_fubyj_321",
27
+ "token-editor-grid-header": "awsui_token-editor-grid-header_1wzqe_fubyj_325",
28
+ "token-editor-grid-cell": "awsui_token-editor-grid-cell_1wzqe_fubyj_331",
29
+ "token-editor-add-token": "awsui_token-editor-add-token_1wzqe_fubyj_340",
30
+ "custom-content-wrapper": "awsui_custom-content-wrapper_1wzqe_fubyj_344",
31
+ "custom-control": "awsui_custom-control_1wzqe_fubyj_348",
32
+ "input": "awsui_input_1wzqe_fubyj_183",
33
+ "results": "awsui_results_1wzqe_fubyj_356",
34
+ "token-trigger": "awsui_token-trigger_1wzqe_fubyj_361",
35
+ "remove-all": "awsui_remove-all_1wzqe_fubyj_366",
36
+ "join-operation": "awsui_join-operation_1wzqe_fubyj_367",
37
+ "custom-filter-actions": "awsui_custom-filter-actions_1wzqe_fubyj_368",
38
+ "constraint": "awsui_constraint_1wzqe_fubyj_372"
39
39
  };
40
40
 
@@ -138,7 +138,7 @@
138
138
  */
139
139
  /* Style used for links in slots/components that are text heavy, to help links stand out among
140
140
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
141
- .awsui_root_1wzqe_ewjqa_141:not(#\9) {
141
+ .awsui_root_1wzqe_fubyj_141:not(#\9) {
142
142
  border-collapse: separate;
143
143
  border-spacing: 0;
144
144
  box-sizing: border-box;
@@ -174,38 +174,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
174
174
  -moz-osx-font-smoothing: auto;
175
175
  }
176
176
 
177
- .awsui_search-field_1wzqe_ewjqa_176:not(#\9) {
177
+ .awsui_search-field_1wzqe_fubyj_176:not(#\9) {
178
178
  display: flex;
179
179
  align-items: flex-end;
180
+ flex-wrap: wrap;
181
+ gap: var(--space-xs-zb16t3, 8px) var(--space-s-34lx8l, 12px);
180
182
  }
181
183
 
182
- .awsui_input-wrapper_1wzqe_ewjqa_181:not(#\9) {
184
+ .awsui_input-wrapper_1wzqe_fubyj_183:not(#\9) {
183
185
  flex-grow: 1;
184
186
  display: flex;
185
187
  align-items: flex-end;
186
188
  max-inline-size: calc(688px - 2 * var(--space-l-t419sm, 20px));
187
189
  }
188
190
 
189
- .awsui_add-token_1wzqe_ewjqa_188:not(#\9) {
191
+ .awsui_add-token_1wzqe_fubyj_190:not(#\9) {
190
192
  border-inline-start: 1px solid var(--color-border-divider-default-cx07f2, #c6c6cd);
191
193
  box-sizing: border-box;
192
194
  margin-inline-start: var(--space-m-udix3p, 16px);
193
195
  padding-inline-start: var(--space-m-udix3p, 16px);
194
196
  }
195
197
 
196
- .awsui_tokens_1wzqe_ewjqa_195:not(#\9) {
198
+ .awsui_tokens_1wzqe_fubyj_197:not(#\9) {
197
199
  margin-block: var(--space-xs-zb16t3, 8px);
198
200
  margin-inline: 0;
199
201
  }
200
202
 
201
- .awsui_token-operator_1wzqe_ewjqa_200:not(#\9) {
203
+ .awsui_token-operator_1wzqe_fubyj_202:not(#\9) {
202
204
  font-weight: bold;
203
205
  }
204
206
 
205
- .awsui_property-editor_1wzqe_ewjqa_204:not(#\9) {
207
+ .awsui_property-editor_1wzqe_fubyj_206:not(#\9) {
206
208
  overflow-y: auto;
207
209
  }
208
- .awsui_property-editor-header_1wzqe_ewjqa_207:not(#\9) {
210
+ .awsui_property-editor-header_1wzqe_fubyj_209:not(#\9) {
209
211
  font-size: var(--font-size-body-m-x4okxb, 14px);
210
212
  line-height: var(--line-height-body-m-30ar75, 20px);
211
213
  color: var(--color-text-body-default-7v1jfn, #0f141a);
@@ -218,15 +220,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
218
220
  padding-block-end: var(--space-xxs-p8yyaw, 4px);
219
221
  padding-inline: var(--space-s-34lx8l, 12px);
220
222
  }
221
- .awsui_property-editor-form_1wzqe_ewjqa_220:not(#\9) {
223
+ .awsui_property-editor-form_1wzqe_fubyj_222:not(#\9) {
222
224
  padding-block-start: var(--space-xxs-p8yyaw, 4px);
223
225
  padding-block-end: var(--space-s-34lx8l, 12px);
224
226
  padding-inline: var(--space-s-34lx8l, 12px);
225
227
  }
226
- .awsui_property-editor-cancel_1wzqe_ewjqa_225:not(#\9) {
228
+ .awsui_property-editor-cancel_1wzqe_fubyj_227:not(#\9) {
227
229
  margin-inline-end: var(--space-xs-zb16t3, 8px);
228
230
  }
229
- .awsui_property-editor-actions_1wzqe_ewjqa_228:not(#\9) {
231
+ .awsui_property-editor-actions_1wzqe_fubyj_230:not(#\9) {
230
232
  display: flex;
231
233
  justify-content: flex-end;
232
234
  border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-dropdown-item-default-xiw1xo, #c6c6cd);
@@ -234,32 +236,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
234
236
  padding-block: var(--space-s-34lx8l, 12px);
235
237
  }
236
238
 
237
- .awsui_token-editor_1wzqe_ewjqa_236:not(#\9) {
239
+ .awsui_token-editor_1wzqe_fubyj_238:not(#\9) {
238
240
  display: flex;
239
241
  flex-direction: column;
240
242
  gap: var(--space-s-34lx8l, 12px);
241
243
  margin-block: var(--space-xxs-p8yyaw, 4px);
242
244
  margin-inline: var(--space-xxs-p8yyaw, 4px);
243
245
  }
244
- .awsui_token-editor-form_1wzqe_ewjqa_243:not(#\9) {
246
+ .awsui_token-editor-form_1wzqe_fubyj_245:not(#\9) {
245
247
  /* used in test-utils */
246
248
  }
247
- .awsui_token-editor-field-property_1wzqe_ewjqa_246:not(#\9) {
249
+ .awsui_token-editor-field-property_1wzqe_fubyj_248:not(#\9) {
248
250
  flex-grow: 2;
249
251
  }
250
- .awsui_token-editor-field-operator_1wzqe_ewjqa_249:not(#\9) {
252
+ .awsui_token-editor-field-operator_1wzqe_fubyj_251:not(#\9) {
251
253
  flex-grow: 1;
252
254
  }
253
- .awsui_token-editor-field-value_1wzqe_ewjqa_252:not(#\9) {
255
+ .awsui_token-editor-field-value_1wzqe_fubyj_254:not(#\9) {
254
256
  flex-grow: 2;
255
257
  }
256
- .awsui_token-editor-cancel_1wzqe_ewjqa_255:not(#\9) {
258
+ .awsui_token-editor-cancel_1wzqe_fubyj_257:not(#\9) {
257
259
  margin-inline-end: var(--space-xs-zb16t3, 8px);
258
260
  }
259
- .awsui_token-editor-submit_1wzqe_ewjqa_258:not(#\9) {
261
+ .awsui_token-editor-submit_1wzqe_fubyj_260:not(#\9) {
260
262
  /* used in test-utils */
261
263
  }
262
- .awsui_token-editor-actions_1wzqe_ewjqa_261:not(#\9) {
264
+ .awsui_token-editor-actions_1wzqe_fubyj_263:not(#\9) {
263
265
  display: flex;
264
266
  justify-content: flex-end;
265
267
  padding-block-start: var(--space-s-34lx8l, 12px);
@@ -268,7 +270,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
268
270
  margin-inline: calc(-1 * var(--space-m-udix3p, 16px) + -1 * var(--space-xxs-p8yyaw, 4px));
269
271
  margin-block-start: var(--space-s-34lx8l, 12px);
270
272
  }
271
- .awsui_token-editor-grid_1wzqe_ewjqa_270:not(#\9) {
273
+ .awsui_token-editor-grid_1wzqe_fubyj_272:not(#\9) {
272
274
  border-collapse: separate;
273
275
  border-spacing: 0;
274
276
  box-sizing: border-box;
@@ -306,70 +308,70 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
306
308
  gap: var(--space-s-34lx8l, 12px);
307
309
  grid-template-columns: minmax(min-content, 2fr) minmax(min-content, 120px) minmax(min-content, 3fr) min-content;
308
310
  }
309
- .awsui_token-editor-grid-group_1wzqe_ewjqa_307:not(#\9) {
311
+ .awsui_token-editor-grid-group_1wzqe_fubyj_309:not(#\9) {
310
312
  display: contents;
311
313
  }
312
- .awsui_token-editor-grid_1wzqe_ewjqa_270.awsui_token-editor-narrow_1wzqe_ewjqa_310:not(#\9) {
314
+ .awsui_token-editor-grid_1wzqe_fubyj_272.awsui_token-editor-narrow_1wzqe_fubyj_312:not(#\9) {
313
315
  grid-template-columns: minmax(100px, 1fr);
314
316
  gap: var(--space-m-udix3p, 16px);
315
317
  }
316
- .awsui_token-editor-grid_1wzqe_ewjqa_270.awsui_token-editor-narrow_1wzqe_ewjqa_310 > .awsui_token-editor-grid-group_1wzqe_ewjqa_307:not(#\9) {
318
+ .awsui_token-editor-grid_1wzqe_fubyj_272.awsui_token-editor-narrow_1wzqe_fubyj_312 > .awsui_token-editor-grid-group_1wzqe_fubyj_309:not(#\9) {
317
319
  display: flex;
318
320
  flex-direction: column;
319
321
  gap: var(--space-s-34lx8l, 12px);
320
322
  }
321
- .awsui_token-editor-grid_1wzqe_ewjqa_270.awsui_token-editor-narrow_1wzqe_ewjqa_310 > .awsui_token-editor-grid-group_1wzqe_ewjqa_307.awsui_token-editor-supports-groups_1wzqe_ewjqa_319:not(#\9) {
323
+ .awsui_token-editor-grid_1wzqe_fubyj_272.awsui_token-editor-narrow_1wzqe_fubyj_312 > .awsui_token-editor-grid-group_1wzqe_fubyj_309.awsui_token-editor-supports-groups_1wzqe_fubyj_321:not(#\9) {
322
324
  padding-block-end: var(--space-m-udix3p, 16px);
323
325
  border-block-end: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
324
326
  }
325
- .awsui_token-editor-grid-header_1wzqe_ewjqa_323:not(#\9) {
327
+ .awsui_token-editor-grid-header_1wzqe_fubyj_325:not(#\9) {
326
328
  color: var(--color-text-column-header-18yqaj, #424650);
327
329
  font-weight: var(--font-weight-heading-s-cwn6wc, 700);
328
330
  padding-block: var(--space-scaled-xxs-7597g1, 4px);
329
331
  text-align: start;
330
332
  }
331
- .awsui_token-editor-grid-cell_1wzqe_ewjqa_329:not(#\9):not(.awsui_token-editor-narrow_1wzqe_ewjqa_310) {
333
+ .awsui_token-editor-grid-cell_1wzqe_fubyj_331:not(#\9):not(.awsui_token-editor-narrow_1wzqe_fubyj_312) {
332
334
  display: flex;
333
335
  align-items: flex-end;
334
336
  justify-content: flex-end;
335
337
  }
336
- .awsui_token-editor-grid-cell_1wzqe_ewjqa_329.awsui_token-editor-narrow_1wzqe_ewjqa_310:not(#\9):nth-child(4) {
338
+ .awsui_token-editor-grid-cell_1wzqe_fubyj_331.awsui_token-editor-narrow_1wzqe_fubyj_312:not(#\9):nth-child(4) {
337
339
  display: flex;
338
340
  justify-content: flex-end;
339
341
  }
340
- .awsui_token-editor-add-token_1wzqe_ewjqa_338:not(#\9) {
342
+ .awsui_token-editor-add-token_1wzqe_fubyj_340:not(#\9) {
341
343
  margin-block-start: var(--space-s-34lx8l, 12px);
342
344
  }
343
345
 
344
- .awsui_custom-content-wrapper_1wzqe_ewjqa_342:not(#\9) {
346
+ .awsui_custom-content-wrapper_1wzqe_fubyj_344:not(#\9) {
345
347
  display: contents;
346
348
  }
347
349
 
348
- .awsui_custom-control_1wzqe_ewjqa_346:not(#\9) {
349
- margin-inline-end: var(--space-s-34lx8l, 12px);
350
+ .awsui_custom-control_1wzqe_fubyj_348:not(#\9) {
351
+ /* used in test-utils */
350
352
  }
351
353
 
352
- .awsui_input_1wzqe_ewjqa_181:not(#\9) {
354
+ .awsui_input_1wzqe_fubyj_183:not(#\9) {
353
355
  flex: 1;
354
356
  }
355
357
 
356
- .awsui_results_1wzqe_ewjqa_354:not(#\9) {
358
+ .awsui_results_1wzqe_fubyj_356:not(#\9) {
357
359
  padding-block: calc(var(--space-scaled-xxs-7597g1, 4px) + var(--border-field-width-09w7vk, 2px));
358
360
  padding-inline: 0;
359
361
  }
360
362
 
361
- .awsui_token-trigger_1wzqe_ewjqa_359:not(#\9) {
363
+ .awsui_token-trigger_1wzqe_fubyj_361:not(#\9) {
362
364
  min-inline-size: 0;
363
365
  word-break: break-word;
364
366
  }
365
367
 
366
- .awsui_remove-all_1wzqe_ewjqa_364:not(#\9),
367
- .awsui_join-operation_1wzqe_ewjqa_365:not(#\9),
368
- .awsui_custom-filter-actions_1wzqe_ewjqa_366:not(#\9) {
368
+ .awsui_remove-all_1wzqe_fubyj_366:not(#\9),
369
+ .awsui_join-operation_1wzqe_fubyj_367:not(#\9),
370
+ .awsui_custom-filter-actions_1wzqe_fubyj_368:not(#\9) {
369
371
  /* used in test-utils */
370
372
  }
371
373
 
372
- .awsui_constraint_1wzqe_ewjqa_370:not(#\9) {
374
+ .awsui_constraint_1wzqe_fubyj_372:not(#\9) {
373
375
  padding-block-start: var(--space-xxs-p8yyaw, 4px);
374
376
  color: var(--color-text-form-secondary-54emib, #656871);
375
377
  font-size: var(--font-size-body-s-asqx2i, 12px);