@cloudscape-design/components-themeable 3.0.1382 → 3.0.1384
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.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/container/styles.scss +5 -4
- package/lib/internal/scss/input/styles.scss +4 -0
- package/lib/internal/scss/internal/components/button-trigger/styles.scss +4 -0
- package/lib/internal/scss/internal/components/control-group/styles.scss +53 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +176 -175
- package/lib/internal/scss/internal/styles/forms/mixins.scss +58 -17
- package/lib/internal/scss/modal/styles.scss +6 -0
- package/lib/internal/scss/prompt-input/styles.scss +4 -0
- package/lib/internal/scss/segmented-control/segment.scss +5 -0
- package/lib/internal/scss/segmented-control/styles.scss +29 -4
- package/lib/internal/scss/side-navigation/styles.scss +13 -6
- package/lib/internal/scss/steps/styles.scss +1 -1
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +50 -50
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +13 -13
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -30
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +68 -68
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -30
- package/lib/internal/template/attribute-editor/styles.css.js +15 -15
- package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
- package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/button/styles.css.js +23 -23
- package/lib/internal/template/button/styles.scoped.css +261 -261
- package/lib/internal/template/button/styles.selectors.js +23 -23
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
- package/lib/internal/template/cards/styles.css.js +39 -39
- package/lib/internal/template/cards/styles.scoped.css +41 -41
- package/lib/internal/template/cards/styles.selectors.js +39 -39
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +10 -10
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/container/style.d.ts +1 -15
- package/lib/internal/template/container/style.d.ts.map +1 -1
- package/lib/internal/template/container/style.js +6 -2
- package/lib/internal/template/container/style.js.map +1 -1
- package/lib/internal/template/container/styles.css.js +34 -34
- package/lib/internal/template/container/styles.scoped.css +87 -87
- package/lib/internal/template/container/styles.selectors.js +34 -34
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/dropdown/styles.css.js +20 -20
- package/lib/internal/template/dropdown/styles.scoped.css +49 -49
- package/lib/internal/template/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/interfaces.d.ts +4 -4
- package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
- package/lib/internal/template/file-token-group/styles.css.js +23 -23
- package/lib/internal/template/file-token-group/styles.scoped.css +36 -36
- package/lib/internal/template/file-token-group/styles.selectors.js +23 -23
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +184 -184
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +72 -72
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +10 -4
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +36 -29
- package/lib/internal/template/input/styles.scoped.css +168 -137
- package/lib/internal/template/input/styles.selectors.js +36 -29
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js +4 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.d.ts +2 -0
- package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.js +3 -2
- package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/styles.css.js +21 -14
- package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +63 -33
- package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +21 -14
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts +10 -0
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts.map +1 -0
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js +14 -0
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js.map +1 -0
- package/lib/internal/template/internal/components/control-group/index.d.ts +9 -0
- package/lib/internal/template/internal/components/control-group/index.d.ts.map +1 -0
- package/lib/internal/template/internal/components/control-group/index.js +20 -0
- package/lib/internal/template/internal/components/control-group/index.js.map +1 -0
- package/lib/internal/template/internal/components/control-group/styles.css.js +13 -0
- package/lib/internal/template/internal/components/control-group/styles.scoped.css +63 -0
- package/lib/internal/template/internal/components/control-group/styles.selectors.js +14 -0
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
- package/lib/internal/template/internal/components/focus-lock/index.d.ts +6 -0
- package/lib/internal/template/internal/components/focus-lock/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/focus-lock/index.js +8 -3
- package/lib/internal/template/internal/components/focus-lock/index.js.map +1 -1
- package/lib/internal/template/internal/components/option/styles.css.js +17 -17
- package/lib/internal/template/internal/components/option/styles.scoped.css +31 -31
- package/lib/internal/template/internal/components/option/styles.selectors.js +17 -17
- package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
- package/lib/internal/template/internal/components/radio-button/styles.scoped.css +17 -17
- package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/selectable-item/styles.css.js +22 -22
- package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +57 -57
- package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +22 -22
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
- package/lib/internal/template/internal/context/control-group-context.d.ts +30 -0
- package/lib/internal/template/internal/context/control-group-context.d.ts.map +1 -0
- package/lib/internal/template/internal/context/control-group-context.js +24 -0
- package/lib/internal/template/internal/context/control-group-context.js.map +1 -0
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +1 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +175 -174
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/item-card/styles.css.js +14 -14
- package/lib/internal/template/item-card/styles.scoped.css +63 -63
- package/lib/internal/template/item-card/styles.selectors.js +14 -14
- package/lib/internal/template/link/styles.css.js +21 -21
- package/lib/internal/template/link/styles.scoped.css +104 -104
- package/lib/internal/template/link/styles.selectors.js +21 -21
- package/lib/internal/template/modal/index.d.ts +1 -1
- package/lib/internal/template/modal/index.d.ts.map +1 -1
- package/lib/internal/template/modal/index.js +6 -5
- package/lib/internal/template/modal/index.js.map +1 -1
- package/lib/internal/template/modal/interfaces.d.ts +7 -0
- package/lib/internal/template/modal/interfaces.d.ts.map +1 -1
- package/lib/internal/template/modal/interfaces.js.map +1 -1
- package/lib/internal/template/modal/internal.js +23 -6
- package/lib/internal/template/modal/internal.js.map +1 -1
- package/lib/internal/template/modal/styles.css.js +32 -31
- package/lib/internal/template/modal/styles.scoped.css +51 -48
- package/lib/internal/template/modal/styles.selectors.js +32 -31
- package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
- package/lib/internal/template/multiselect/internal.js +17 -10
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/progress-bar/styles.css.js +19 -19
- package/lib/internal/template/progress-bar/styles.scoped.css +58 -58
- package/lib/internal/template/progress-bar/styles.selectors.js +19 -19
- package/lib/internal/template/prompt-input/styles.css.js +26 -26
- package/lib/internal/template/prompt-input/styles.scoped.css +109 -109
- package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
- package/lib/internal/template/segmented-control/internal-segmented-control.d.ts +6 -1
- package/lib/internal/template/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/internal-segmented-control.js +8 -3
- package/lib/internal/template/segmented-control/internal-segmented-control.js.map +1 -1
- package/lib/internal/template/segmented-control/internal.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/internal.js +5 -2
- package/lib/internal/template/segmented-control/internal.js.map +1 -1
- package/lib/internal/template/segmented-control/segment.d.ts +1 -0
- package/lib/internal/template/segmented-control/segment.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/segment.js +2 -2
- package/lib/internal/template/segmented-control/segment.js.map +1 -1
- package/lib/internal/template/segmented-control/styles.css.js +26 -16
- package/lib/internal/template/segmented-control/styles.scoped.css +106 -46
- package/lib/internal/template/segmented-control/styles.selectors.js +26 -16
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js +11 -8
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/parts/styles.css.js +21 -21
- package/lib/internal/template/select/parts/styles.scoped.css +24 -24
- package/lib/internal/template/select/parts/styles.selectors.js +21 -21
- package/lib/internal/template/select/parts/trigger.d.ts +2 -0
- package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
- package/lib/internal/template/select/parts/trigger.js +2 -2
- package/lib/internal/template/select/parts/trigger.js.map +1 -1
- package/lib/internal/template/side-navigation/styles.css.js +64 -64
- package/lib/internal/template/side-navigation/styles.scoped.css +119 -114
- package/lib/internal/template/side-navigation/styles.selectors.js +64 -64
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +165 -165
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +14 -14
- package/lib/internal/template/spinner/styles.scoped.css +40 -40
- package/lib/internal/template/spinner/styles.selectors.js +14 -14
- package/lib/internal/template/steps/styles.css.js +17 -17
- package/lib/internal/template/steps/styles.scoped.css +35 -35
- package/lib/internal/template/steps/styles.selectors.js +17 -17
- package/lib/internal/template/table/styles.css.js +37 -37
- package/lib/internal/template/table/styles.scoped.css +46 -46
- package/lib/internal/template/table/styles.selectors.js +37 -37
- package/lib/internal/template/tabs/styles.css.js +30 -30
- package/lib/internal/template/tabs/styles.scoped.css +76 -76
- package/lib/internal/template/tabs/styles.selectors.js +30 -30
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +66 -66
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/textarea/styles.css.js +9 -9
- package/lib/internal/template/textarea/styles.scoped.css +51 -55
- package/lib/internal/template/textarea/styles.selectors.js +9 -9
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +22 -22
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/lib/internal/template/token/styles.css.js +14 -14
- package/lib/internal/template/token/styles.scoped.css +46 -46
- package/lib/internal/template/token/styles.selectors.js +14 -14
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modal/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,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KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,KACV,KAAK,KACL,kBAAkB,EACtB,kCAAkC,EAAE,IAAI,GACxC,CACH,CAAC;AACJ,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\n'use client';\nimport React from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport {\n AnalyticsFunnel,\n AnalyticsFunnelStep,\n AnalyticsFunnelSubStep,\n} from '../internal/analytics/components/analytics-funnel';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { DATA_ATTR_MODAL_ID } from '../internal/analytics/selectors';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { 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 hideDismissButton,\n ...props\n}: ModalProps & { analyticsMetadata: any; baseComponentProps: ReturnType<typeof useBaseComponent> }) {\n const modalId = useUniqueId();\n const dataAttributes = {\n [DATA_ATTR_MODAL_ID]: modalId,\n };\n\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={() => [\n `[${DATA_ATTR_MODAL_ID}=\"${window?.CSS?.escape(modalId)}\"] .${styles['header--text']}`,\n ]}\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 hideDismissButton={hideDismissButton}\n {...props}\n {...baseComponentProps}\n {...dataAttributes}\n __injectAnalyticsComponentMetadata={true}\n />\n </AnalyticsFunnelSubStep>\n </AnalyticsFunnelStep>\n </AnalyticsFunnel>\n );\n}\n\nexport default function Modal({\n size = 'medium',\n position = 'center',\n hideDismissButton = false,\n width,\n height,\n ...props\n}: ModalProps) {\n const { isInFunnel } = useFunnel();\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const baseComponentProps = useBaseComponent(\n 'Modal',\n {\n props: {\n size,\n position,\n hideDismissButton,\n disableContentPaddings: props.disableContentPaddings,\n flowType: analyticsMetadata.flowType,\n width,\n height,\n },\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 position={position}\n hideDismissButton={hideDismissButton}\n width={width}\n height={height}\n {...props}\n />\n );\n }\n\n return (\n <InternalModal\n size={size}\n position={position}\n hideDismissButton={hideDismissButton}\n width={width}\n height={height}\n {...props}\n {...baseComponentProps}\n __injectAnalyticsComponentMetadata={true}\n />\n );\n}\n\napplyDisplayName(Modal, 'Modal');\n"]}
|
|
@@ -47,6 +47,13 @@ export interface ModalProps extends BaseComponentProps, BaseModalProps {
|
|
|
47
47
|
* vertical repositioning that can cause users to lose context.
|
|
48
48
|
*/
|
|
49
49
|
position?: ModalProps.Position;
|
|
50
|
+
/**
|
|
51
|
+
* Determines whether the close button is displayed in the header.
|
|
52
|
+
* When set to `true`, the close button isn't rendered, and the user resolves
|
|
53
|
+
* the modal by choosing one of the actions in the footer.
|
|
54
|
+
* ESC and clicks outside the modal still call `onDismiss`.
|
|
55
|
+
*/
|
|
56
|
+
hideDismissButton?: boolean;
|
|
50
57
|
/**
|
|
51
58
|
* Determines whether the modal is displayed on the screen. Modals are hidden by default.
|
|
52
59
|
* Set this property to `true` to show them.
|
|
@@ -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,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAE3C;;;;OAIG;IACH,eAAe,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB,EAAE,cAAc;IACpE;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC;IACvB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC/B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,S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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 { PortalProps } from '@cloudscape-design/component-toolkit/internal';\n\nimport { FlowType } from '../types/analytics';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/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?: PortalProps['getContainer'];\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?: PortalProps['removeContainer'];\n}\n\nexport interface ModalProps extends BaseComponentProps, BaseModalProps {\n /**\n * Specifies the width of the modal. When provided, takes precedence over the `size` property.\n * If the specified width exceeds available viewport space, the modal will use the maximum available space.\n * The minimum width is 320px (equivalent to the `small` size).\n */\n width?: number;\n\n /**\n * Specifies the height of the modal. When provided, the modal content becomes scrollable if it exceeds the specified height.\n * If the specified height exceeds available viewport space, the modal will use the maximum available space.\n * To make sure the content is accessible, the component will apply a minimum height of 60px for the content area,\n * plus the header height and the footer height.\n */\n height?: number;\n\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 have fixed widths:\n * `small` (320px), `medium` (600px), `large` (820px), `x-large` (1024px), `xx-large` (1280px).\n */\n size?: ModalProps.Size;\n /**\n * Controls the vertical positioning of the modal.\n *\n * - `center` (default) - The modal is vertically centered in the viewport and re-centers\n * when content height changes. Use for dialogs with static, predictable content.\n *\n * - `top` - The modal anchors at fixed distance and grows downward\n * as content expands. Use when the content changes dynamically to prevent disruptive\n * vertical repositioning that can cause users to lose context.\n */\n position?: ModalProps.Position;\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' | 'x-large' | 'xx-large' | 'max';\n export type Position = 'center' | 'top';\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
|
+
{"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 { PortalProps } from '@cloudscape-design/component-toolkit/internal';\n\nimport { FlowType } from '../types/analytics';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/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?: PortalProps['getContainer'];\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?: PortalProps['removeContainer'];\n}\n\nexport interface ModalProps extends BaseComponentProps, BaseModalProps {\n /**\n * Specifies the width of the modal. When provided, takes precedence over the `size` property.\n * If the specified width exceeds available viewport space, the modal will use the maximum available space.\n * The minimum width is 320px (equivalent to the `small` size).\n */\n width?: number;\n\n /**\n * Specifies the height of the modal. When provided, the modal content becomes scrollable if it exceeds the specified height.\n * If the specified height exceeds available viewport space, the modal will use the maximum available space.\n * To make sure the content is accessible, the component will apply a minimum height of 60px for the content area,\n * plus the header height and the footer height.\n */\n height?: number;\n\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 have fixed widths:\n * `small` (320px), `medium` (600px), `large` (820px), `x-large` (1024px), `xx-large` (1280px).\n */\n size?: ModalProps.Size;\n /**\n * Controls the vertical positioning of the modal.\n *\n * - `center` (default) - The modal is vertically centered in the viewport and re-centers\n * when content height changes. Use for dialogs with static, predictable content.\n *\n * - `top` - The modal anchors at fixed distance and grows downward\n * as content expands. Use when the content changes dynamically to prevent disruptive\n * vertical repositioning that can cause users to lose context.\n */\n position?: ModalProps.Position;\n /**\n * Determines whether the close button is displayed in the header.\n * When set to `true`, the close button isn't rendered, and the user resolves\n * the modal by choosing one of the actions in the footer.\n * ESC and clicks outside the modal still call `onDismiss`.\n */\n hideDismissButton?: boolean;\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' | 'x-large' | 'xx-large' | 'max';\n export type Position = 'center' | 'top';\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"]}
|
|
@@ -44,7 +44,7 @@ export default function InternalModal({ modalRoot, getModalRoot, removeModalRoot
|
|
|
44
44
|
}
|
|
45
45
|
// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.
|
|
46
46
|
// useContainerQuery needs its targeted element to exist on the first render in order to work properly.
|
|
47
|
-
function PortaledModal({ size, visible, header, children, footer, disableContentPaddings, position = 'center', onButtonClick = () => { }, onDismiss, width, height, __internalRootRef, __injectAnalyticsComponentMetadata, __funnelProps, __funnelStepProps, __subStepRef, __subStepFunnelProps, referrerId, ...rest }) {
|
|
47
|
+
function PortaledModal({ size, hideDismissButton = false, visible, header, children, footer, disableContentPaddings, position = 'center', onButtonClick = () => { }, onDismiss, width, height, __internalRootRef, __injectAnalyticsComponentMetadata, __funnelProps, __funnelStepProps, __subStepRef, __subStepFunnelProps, referrerId, ...rest }) {
|
|
48
48
|
var _a;
|
|
49
49
|
const instanceUniqueId = useUniqueId();
|
|
50
50
|
const headerId = `${rest.id || instanceUniqueId}-header`;
|
|
@@ -54,6 +54,7 @@ function PortaledModal({ size, visible, header, children, footer, disableContent
|
|
|
54
54
|
const closeAriaLabel = i18n('closeAriaLabel', rest.closeAriaLabel);
|
|
55
55
|
const refObject = useRef(null);
|
|
56
56
|
const mergedRef = useMergeRefs(breakpointsRef, refObject, __internalRootRef);
|
|
57
|
+
const dialogRef = useRef(null);
|
|
57
58
|
const isRefresh = useVisualRefresh();
|
|
58
59
|
const baseProps = getBaseProps(rest);
|
|
59
60
|
const analyticsComponentMetadata = {
|
|
@@ -122,6 +123,13 @@ function PortaledModal({ size, visible, header, children, footer, disableContent
|
|
|
122
123
|
const dismiss = (reason) => fireNonCancelableEvent(onDismiss, { reason });
|
|
123
124
|
const onOverlayMouseDown = (event) => {
|
|
124
125
|
lastMouseDownElementRef.current = event.target;
|
|
126
|
+
// The overlay can't hold focus, so pressing it would blur whatever is focused inside the
|
|
127
|
+
// dialog and leave focus on the document body. That takes focus out of the dialog, which
|
|
128
|
+
// breaks focus containment and stops ESC from reaching the handler on the dialog element.
|
|
129
|
+
// Preventing the default action keeps focus where it is.
|
|
130
|
+
if (event.target === refObject.current) {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
}
|
|
125
133
|
};
|
|
126
134
|
const onOverlayClick = (event) => {
|
|
127
135
|
const overlay = refObject.current;
|
|
@@ -140,7 +148,13 @@ function PortaledModal({ size, visible, header, children, footer, disableContent
|
|
|
140
148
|
// to detect when the user has scrolled to the bottom.
|
|
141
149
|
const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();
|
|
142
150
|
const headerTextRef = useRef(null);
|
|
151
|
+
const headingTagRef = useRef(null);
|
|
143
152
|
const { subStepRef } = useFunnelSubStep();
|
|
153
|
+
// Without a dismiss button there is no predictable first focusable element, so focus the
|
|
154
|
+
// heading to announce what the modal is about. When no header is given, fall back to the
|
|
155
|
+
// dialog.
|
|
156
|
+
const hasHeader = header !== undefined && header !== null && header !== false && header !== '';
|
|
157
|
+
const autoFocusTarget = hideDismissButton ? (hasHeader ? headingTagRef : dialogRef) : undefined;
|
|
144
158
|
const { footerRef, headerRef, hasCustomHeight, hasCustomWidth, dialogCustomStyles, footerHeight } = useModalDimensions({
|
|
145
159
|
height,
|
|
146
160
|
width,
|
|
@@ -153,15 +167,18 @@ function PortaledModal({ size, visible, header, children, footer, disableContent
|
|
|
153
167
|
componentLoadingCount,
|
|
154
168
|
emitTimeToContentReadyInModal,
|
|
155
169
|
} },
|
|
156
|
-
React.createElement("div", { ...baseProps, ...__funnelProps, ...__funnelStepProps, className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined, "data-awsui-referrer-id": ((_a = subStepRef.current) === null || _a === void 0 ? void 0 : _a.id) || referrerId },
|
|
157
|
-
React.createElement(FocusLock, { disabled: !visible, autoFocus: true, restoreFocus: true, className: clsx(styles['focus-lock'], styles[`position-${position}`]) },
|
|
158
|
-
React.createElement("div", { className: clsx(styles.dialog, !hasCustomWidth && styles[size], styles[`breakpoint-${breakpoint}`], isRefresh && styles.refresh, hasCustomWidth && styles['custom-width'], hasCustomHeight && styles['custom-height']), style: dialogCustomStyles, onKeyDown: escKeyHandler,
|
|
170
|
+
React.createElement("div", { ...baseProps, ...__funnelProps, ...__funnelStepProps, className: clsx(styles.root, { [styles.hidden]: !visible }, hideDismissButton && styles['hide-dismiss-button'], baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined, "data-awsui-referrer-id": ((_a = subStepRef.current) === null || _a === void 0 ? void 0 : _a.id) || referrerId },
|
|
171
|
+
React.createElement(FocusLock, { disabled: !visible, autoFocus: true, restoreFocus: true, autoFocusTarget: autoFocusTarget, className: clsx(styles['focus-lock'], styles[`position-${position}`]) },
|
|
172
|
+
React.createElement("div", { className: clsx(styles.dialog, !hasCustomWidth && styles[size], styles[`breakpoint-${breakpoint}`], isRefresh && styles.refresh, hasCustomWidth && styles['custom-width'], hasCustomHeight && styles['custom-height']), ref: dialogRef, style: dialogCustomStyles, onKeyDown: escKeyHandler,
|
|
173
|
+
// Keeps the dialog focusable so that clicking a non-focusable area inside it moves
|
|
174
|
+
// focus to the dialog rather than the document body.
|
|
175
|
+
tabIndex: -1, ...metadataAttribute },
|
|
159
176
|
React.createElement("div", { className: clsx(styles.container, hasCustomHeight && styles['custom-height-container']) },
|
|
160
177
|
React.createElement("div", { ref: headerRef, className: clsx(styles.header, analyticsSelectors.header) },
|
|
161
|
-
React.createElement(InternalHeader, { variant: "h2", __disableActionsWrapping: true, actions: React.createElement("div", { ...getAnalyticsMetadataAttribute({
|
|
178
|
+
React.createElement(InternalHeader, { variant: "h2", __disableActionsWrapping: true, __headingTagRef: headingTagRef, __headingTagTabIndex: -1, actions: hideDismissButton ? undefined : (React.createElement("div", { ...getAnalyticsMetadataAttribute({
|
|
162
179
|
action: 'dismiss',
|
|
163
180
|
}) },
|
|
164
|
-
React.createElement(InternalButton, { ariaLabel: closeAriaLabel, className: styles['dismiss-control'], variant: "modal-dismiss", iconName: "close", formAction: "none", onClick: onCloseButtonClick })) },
|
|
181
|
+
React.createElement(InternalButton, { ariaLabel: closeAriaLabel, className: styles['dismiss-control'], variant: "modal-dismiss", iconName: "close", formAction: "none", onClick: onCloseButtonClick }))) },
|
|
165
182
|
React.createElement("span", { ref: headerTextRef, id: headerId, className: styles['header--text'] }, header))),
|
|
166
183
|
React.createElement(BuiltInErrorBoundary, { wrapper: content => React.createElement(InternalBox, { padding: { bottom: 'm', horizontal: 'l' } }, content) },
|
|
167
184
|
React.createElement("div", { ref: __subStepRef, ...__subStepFunnelProps, className: clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings }, hasCustomHeight && styles['custom-height-content']), ...(hasCustomHeight && {
|
|
@@ -1 +1 @@
|
|
|
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,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,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,OAAO,SAA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served.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { Portal, useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalBox from '../box/internal';\nimport { InternalButton } from '../button/internal';\nimport { BuiltInErrorBoundary } from '../error-boundary/internal';\nimport InternalHeader from '../header/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { PerformanceMetrics } from '../internal/analytics';\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 { 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 { 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';\nimport { useModalDimensions } from './use-modal-dimensions';\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 width?: number;\n height?: number;\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 position = 'center',\n onButtonClick = () => {},\n onDismiss,\n width,\n height,\n __internalRootRef,\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 const metadataAttribute = __injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })\n : {};\n const loadStartTime = useRef<number>(0);\n const loadCompleteTime = useRef<number>(0);\n const componentLoadingCount = useRef<number>(0);\n const performanceMetricLogged = useRef<boolean>(false);\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n const resetModalPerformanceData = () => {\n loadStartTime.current = performance.now();\n loadCompleteTime.current = 0;\n performanceMetricLogged.current = false;\n };\n\n const emitTimeToContentReadyInModal = (loadCompleteTime: number) => {\n if (\n componentLoadingCount.current === 0 &&\n loadStartTime.current &&\n loadStartTime.current !== 0 &&\n !performanceMetricLogged.current\n ) {\n const timeToContentReadyInModal = loadCompleteTime - loadStartTime.current;\n PerformanceMetrics.modalPerformanceData({\n timeToContentReadyInModal,\n instanceIdentifier: instanceUniqueId,\n componentIdentifier: headerTextRef.current?.textContent || '',\n });\n performanceMetricLogged.current = true;\n }\n };\n\n const MODAL_READY_TIMEOUT = 100;\n /**\n * This useEffect is triggered when the visible attribute of modal changes.\n * When modal becomes visible, modal performance metrics are reset marking the beginning loading process.\n * To ensure that the modal component ready metric is always emitted, a setTimeout is implemented.\n * This setTimeout automatically emits the component ready metric after a specified duration.\n */\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n resetModalPerformanceData();\n setTimeout(() => {\n emitTimeToContentReadyInModal(loadStartTime.current);\n }, MODAL_READY_TIMEOUT);\n } else {\n enableBodyScrolling();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\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 const headerTextRef = useRef<HTMLSpanElement>(null);\n const { subStepRef } = useFunnelSubStep();\n\n const { footerRef, headerRef, hasCustomHeight, hasCustomWidth, dialogCustomStyles, footerHeight } =\n useModalDimensions({\n height,\n width,\n hasFooter: !!footer,\n });\n\n return (\n <FunnelNameSelectorContext.Provider value={`.${styles['header--text']}`}>\n <ResetContextsForModal>\n <ModalContext.Provider\n value={{\n isInModal: true,\n componentLoadingCount,\n emitTimeToContentReadyInModal,\n }}\n >\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-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\n disabled={!visible}\n autoFocus={true}\n restoreFocus={true}\n className={clsx(styles['focus-lock'], styles[`position-${position}`])}\n >\n <div\n className={clsx(\n styles.dialog,\n !hasCustomWidth && styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh,\n hasCustomWidth && styles['custom-width'],\n hasCustomHeight && styles['custom-height']\n )}\n style={dialogCustomStyles}\n onKeyDown={escKeyHandler}\n {...metadataAttribute}\n >\n <div className={clsx(styles.container, hasCustomHeight && styles['custom-height-container'])}>\n <div ref={headerRef} 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 ref={headerTextRef} id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <BuiltInErrorBoundary\n wrapper={content => <InternalBox padding={{ bottom: 'm', horizontal: 'l' }}>{content}</InternalBox>}\n >\n <div\n ref={__subStepRef}\n {...__subStepFunnelProps}\n className={clsx(\n styles.content,\n { [styles['no-paddings']]: disableContentPaddings },\n hasCustomHeight && styles['custom-height-content']\n )}\n {...(hasCustomHeight && {\n tabIndex: 0,\n role: 'region',\n 'aria-labelledby': headerId,\n })}\n >\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <ButtonContext.Provider value={{ onClick: onButtonClick }}>\n <div\n ref={footerRef}\n className={clsx(styles.footer, (footerStuck || hasCustomHeight) && styles['footer--rounded'])}\n >\n {footer}\n </div>\n </ButtonContext.Provider>\n )}\n </BuiltInErrorBoundary>\n </div>\n </div>\n </FocusLock>\n </div>\n </ModalContext.Provider>\n </ResetContextsForModal>\n </FunnelNameSelectorContext.Provider>\n );\n}\n"]}
|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CACd,iBAAiB,EAAE,QAAQ;yCAC5B,CAAC;wCAED,QAAQ;wCACT,6BAAK,GAAG,EAAE,iBAAiB,GAAI,CAC3B;oCACL,MAAM,IAAI,CACT,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;wCACvD,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,WAAW,IAAI,eAAe,CAAC,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAE5F,MAAM,CACH,CACiB,CAC1B,CACoB,CACnB,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 { Portal, useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalBox from '../box/internal';\nimport { InternalButton } from '../button/internal';\nimport { BuiltInErrorBoundary } from '../error-boundary/internal';\nimport InternalHeader from '../header/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { PerformanceMetrics } from '../internal/analytics';\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 { 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 { 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';\nimport { useModalDimensions } from './use-modal-dimensions';\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 width?: number;\n height?: number;\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 hideDismissButton = false,\n visible,\n header,\n children,\n footer,\n disableContentPaddings,\n position = 'center',\n onButtonClick = () => {},\n onDismiss,\n width,\n height,\n __internalRootRef,\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 const dialogRef = useRef<HTMLDivElement>(null);\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 const metadataAttribute = __injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })\n : {};\n const loadStartTime = useRef<number>(0);\n const loadCompleteTime = useRef<number>(0);\n const componentLoadingCount = useRef<number>(0);\n const performanceMetricLogged = useRef<boolean>(false);\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n const resetModalPerformanceData = () => {\n loadStartTime.current = performance.now();\n loadCompleteTime.current = 0;\n performanceMetricLogged.current = false;\n };\n\n const emitTimeToContentReadyInModal = (loadCompleteTime: number) => {\n if (\n componentLoadingCount.current === 0 &&\n loadStartTime.current &&\n loadStartTime.current !== 0 &&\n !performanceMetricLogged.current\n ) {\n const timeToContentReadyInModal = loadCompleteTime - loadStartTime.current;\n PerformanceMetrics.modalPerformanceData({\n timeToContentReadyInModal,\n instanceIdentifier: instanceUniqueId,\n componentIdentifier: headerTextRef.current?.textContent || '',\n });\n performanceMetricLogged.current = true;\n }\n };\n\n const MODAL_READY_TIMEOUT = 100;\n /**\n * This useEffect is triggered when the visible attribute of modal changes.\n * When modal becomes visible, modal performance metrics are reset marking the beginning loading process.\n * To ensure that the modal component ready metric is always emitted, a setTimeout is implemented.\n * This setTimeout automatically emits the component ready metric after a specified duration.\n */\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n resetModalPerformanceData();\n setTimeout(() => {\n emitTimeToContentReadyInModal(loadStartTime.current);\n }, MODAL_READY_TIMEOUT);\n } else {\n enableBodyScrolling();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\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 // The overlay can't hold focus, so pressing it would blur whatever is focused inside the\n // dialog and leave focus on the document body. That takes focus out of the dialog, which\n // breaks focus containment and stops ESC from reaching the handler on the dialog element.\n // Preventing the default action keeps focus where it is.\n if (event.target === refObject.current) {\n event.preventDefault();\n }\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 const headerTextRef = useRef<HTMLSpanElement>(null);\n const headingTagRef = useRef<HTMLHeadingElement | null>(null);\n const { subStepRef } = useFunnelSubStep();\n\n // Without a dismiss button there is no predictable first focusable element, so focus the\n // heading to announce what the modal is about. When no header is given, fall back to the\n // dialog.\n const hasHeader = header !== undefined && header !== null && header !== false && header !== '';\n const autoFocusTarget = hideDismissButton ? (hasHeader ? headingTagRef : dialogRef) : undefined;\n\n const { footerRef, headerRef, hasCustomHeight, hasCustomWidth, dialogCustomStyles, footerHeight } =\n useModalDimensions({\n height,\n width,\n hasFooter: !!footer,\n });\n\n return (\n <FunnelNameSelectorContext.Provider value={`.${styles['header--text']}`}>\n <ResetContextsForModal>\n <ModalContext.Provider\n value={{\n isInModal: true,\n componentLoadingCount,\n emitTimeToContentReadyInModal,\n }}\n >\n <div\n {...baseProps}\n {...__funnelProps}\n {...__funnelStepProps}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible },\n hideDismissButton && styles['hide-dismiss-button'],\n baseProps.className,\n isRefresh && styles.refresh\n )}\n role=\"dialog\"\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\n disabled={!visible}\n autoFocus={true}\n restoreFocus={true}\n autoFocusTarget={autoFocusTarget}\n className={clsx(styles['focus-lock'], styles[`position-${position}`])}\n >\n <div\n className={clsx(\n styles.dialog,\n !hasCustomWidth && styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh,\n hasCustomWidth && styles['custom-width'],\n hasCustomHeight && styles['custom-height']\n )}\n ref={dialogRef}\n style={dialogCustomStyles}\n onKeyDown={escKeyHandler}\n // Keeps the dialog focusable so that clicking a non-focusable area inside it moves\n // focus to the dialog rather than the document body.\n tabIndex={-1}\n {...metadataAttribute}\n >\n <div className={clsx(styles.container, hasCustomHeight && styles['custom-height-container'])}>\n <div ref={headerRef} className={clsx(styles.header, analyticsSelectors.header)}>\n <InternalHeader\n variant=\"h2\"\n __disableActionsWrapping={true}\n __headingTagRef={headingTagRef}\n __headingTagTabIndex={-1}\n actions={\n hideDismissButton ? undefined : (\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 >\n <span ref={headerTextRef} id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <BuiltInErrorBoundary\n wrapper={content => <InternalBox padding={{ bottom: 'm', horizontal: 'l' }}>{content}</InternalBox>}\n >\n <div\n ref={__subStepRef}\n {...__subStepFunnelProps}\n className={clsx(\n styles.content,\n { [styles['no-paddings']]: disableContentPaddings },\n hasCustomHeight && styles['custom-height-content']\n )}\n {...(hasCustomHeight && {\n tabIndex: 0,\n role: 'region',\n 'aria-labelledby': headerId,\n })}\n >\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <ButtonContext.Provider value={{ onClick: onButtonClick }}>\n <div\n ref={footerRef}\n className={clsx(styles.footer, (footerStuck || hasCustomHeight) && styles['footer--rounded'])}\n >\n {footer}\n </div>\n </ButtonContext.Provider>\n )}\n </BuiltInErrorBoundary>\n </div>\n </div>\n </FocusLock>\n </div>\n </ModalContext.Provider>\n </ResetContextsForModal>\n </FunnelNameSelectorContext.Provider>\n );\n}\n"]}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"dialog": "
|
|
5
|
-
"modal-slide-up": "awsui_modal-slide-
|
|
6
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
7
|
-
"refresh": "
|
|
8
|
-
"awsui-motion-scale-popup": "awsui_awsui-motion-scale-
|
|
9
|
-
"root": "
|
|
10
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"position-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"header
|
|
31
|
-
"
|
|
32
|
-
"footer
|
|
33
|
-
"
|
|
34
|
-
"
|
|
4
|
+
"dialog": "awsui_dialog_1d2i7_1ls09_25",
|
|
5
|
+
"modal-slide-up": "awsui_modal-slide-up_1d2i7_1ls09_1",
|
|
6
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1d2i7_1ls09_1",
|
|
7
|
+
"refresh": "awsui_refresh_1d2i7_1ls09_48",
|
|
8
|
+
"awsui-motion-scale-popup": "awsui_awsui-motion-scale-popup_1d2i7_1ls09_1",
|
|
9
|
+
"root": "awsui_root_1d2i7_1ls09_81",
|
|
10
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_1d2i7_1ls09_1",
|
|
11
|
+
"hide-dismiss-button": "awsui_hide-dismiss-button_1d2i7_1ls09_158",
|
|
12
|
+
"hidden": "awsui_hidden_1d2i7_1ls09_161",
|
|
13
|
+
"focus-lock": "awsui_focus-lock_1d2i7_1ls09_165",
|
|
14
|
+
"position-top": "awsui_position-top_1d2i7_1ls09_173",
|
|
15
|
+
"position-center": "awsui_position-center_1d2i7_1ls09_176",
|
|
16
|
+
"small": "awsui_small_1d2i7_1ls09_190",
|
|
17
|
+
"medium": "awsui_medium_1d2i7_1ls09_193",
|
|
18
|
+
"large": "awsui_large_1d2i7_1ls09_196",
|
|
19
|
+
"x-large": "awsui_x-large_1d2i7_1ls09_199",
|
|
20
|
+
"xx-large": "awsui_xx-large_1d2i7_1ls09_202",
|
|
21
|
+
"custom-width": "awsui_custom-width_1d2i7_1ls09_205",
|
|
22
|
+
"max": "awsui_max_1d2i7_1ls09_208",
|
|
23
|
+
"breakpoint-xs": "awsui_breakpoint-xs_1d2i7_1ls09_208",
|
|
24
|
+
"custom-height": "awsui_custom-height_1d2i7_1ls09_213",
|
|
25
|
+
"container": "awsui_container_1d2i7_1ls09_218",
|
|
26
|
+
"custom-height-container": "awsui_custom-height-container_1d2i7_1ls09_258",
|
|
27
|
+
"content": "awsui_content_1d2i7_1ls09_264",
|
|
28
|
+
"no-paddings": "awsui_no-paddings_1d2i7_1ls09_269",
|
|
29
|
+
"custom-height-content": "awsui_custom-height-content_1d2i7_1ls09_273",
|
|
30
|
+
"header": "awsui_header_1d2i7_1ls09_278",
|
|
31
|
+
"header--text": "awsui_header--text_1d2i7_1ls09_290",
|
|
32
|
+
"footer": "awsui_footer_1d2i7_1ls09_294",
|
|
33
|
+
"footer--rounded": "awsui_footer--rounded_1d2i7_1ls09_303",
|
|
34
|
+
"dismiss-control": "awsui_dismiss-control_1d2i7_1ls09_315",
|
|
35
|
+
"modal-open": "awsui_modal-open_1d2i7_1ls09_319"
|
|
35
36
|
};
|
|
36
37
|
|