@cloudscape-design/components-themeable 3.0.1221 → 3.0.1223

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 (126) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +142 -140
  3. package/lib/internal/scss/modal/styles.scss +43 -1
  4. package/lib/internal/scss/table/styles.scss +1 -3
  5. package/lib/internal/template/alert/styles.css.js +27 -27
  6. package/lib/internal/template/alert/styles.scoped.css +50 -50
  7. package/lib/internal/template/alert/styles.selectors.js +27 -27
  8. package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
  9. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
  10. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
  11. package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
  12. package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
  13. package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
  14. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
  15. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
  16. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
  26. package/lib/internal/template/attribute-editor/styles.css.js +15 -15
  27. package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
  28. package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
  29. package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
  30. package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
  31. package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
  32. package/lib/internal/template/button/styles.css.js +22 -22
  33. package/lib/internal/template/button/styles.scoped.css +256 -256
  34. package/lib/internal/template/button/styles.selectors.js +22 -22
  35. package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
  36. package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
  37. package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
  38. package/lib/internal/template/checkbox/styles.css.js +3 -3
  39. package/lib/internal/template/checkbox/styles.scoped.css +11 -11
  40. package/lib/internal/template/checkbox/styles.selectors.js +3 -3
  41. package/lib/internal/template/content-layout/styles.css.js +14 -14
  42. package/lib/internal/template/content-layout/styles.scoped.css +27 -27
  43. package/lib/internal/template/content-layout/styles.selectors.js +14 -14
  44. package/lib/internal/template/flashbar/styles.css.js +50 -50
  45. package/lib/internal/template/flashbar/styles.scoped.css +187 -187
  46. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  47. package/lib/internal/template/help-panel/styles.css.js +6 -6
  48. package/lib/internal/template/help-panel/styles.scoped.css +73 -73
  49. package/lib/internal/template/help-panel/styles.selectors.js +6 -6
  50. package/lib/internal/template/input/styles.css.js +13 -13
  51. package/lib/internal/template/input/styles.scoped.css +74 -74
  52. package/lib/internal/template/input/styles.selectors.js +13 -13
  53. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  54. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  55. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  56. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  57. package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
  58. package/lib/internal/template/internal/components/dropdown/styles.scoped.css +39 -39
  59. package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
  60. package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
  61. package/lib/internal/template/internal/components/radio-button/styles.scoped.css +18 -18
  62. package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
  63. package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
  64. package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
  65. package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
  66. package/lib/internal/template/internal/environment.js +2 -2
  67. package/lib/internal/template/internal/environment.json +2 -2
  68. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +2 -0
  69. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  70. package/lib/internal/template/internal/generated/custom-css-properties/index.js +141 -139
  71. package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
  72. package/lib/internal/template/link/styles.css.js +20 -20
  73. package/lib/internal/template/link/styles.scoped.css +103 -103
  74. package/lib/internal/template/link/styles.selectors.js +20 -20
  75. package/lib/internal/template/modal/index.d.ts +1 -1
  76. package/lib/internal/template/modal/index.d.ts.map +1 -1
  77. package/lib/internal/template/modal/index.js +6 -3
  78. package/lib/internal/template/modal/index.js.map +1 -1
  79. package/lib/internal/template/modal/interfaces.d.ts +28 -3
  80. package/lib/internal/template/modal/interfaces.d.ts.map +1 -1
  81. package/lib/internal/template/modal/interfaces.js.map +1 -1
  82. package/lib/internal/template/modal/internal.d.ts +2 -0
  83. package/lib/internal/template/modal/internal.d.ts.map +1 -1
  84. package/lib/internal/template/modal/internal.js +20 -14
  85. package/lib/internal/template/modal/internal.js.map +1 -1
  86. package/lib/internal/template/modal/styles.css.js +31 -23
  87. package/lib/internal/template/modal/styles.scoped.css +70 -39
  88. package/lib/internal/template/modal/styles.selectors.js +31 -23
  89. package/lib/internal/template/modal/use-modal-dimensions.d.ts +17 -0
  90. package/lib/internal/template/modal/use-modal-dimensions.d.ts.map +1 -0
  91. package/lib/internal/template/modal/use-modal-dimensions.js +37 -0
  92. package/lib/internal/template/modal/use-modal-dimensions.js.map +1 -0
  93. package/lib/internal/template/progress-bar/styles.css.js +18 -18
  94. package/lib/internal/template/progress-bar/styles.scoped.css +48 -48
  95. package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
  96. package/lib/internal/template/prompt-input/styles.css.js +17 -17
  97. package/lib/internal/template/prompt-input/styles.scoped.css +79 -79
  98. package/lib/internal/template/prompt-input/styles.selectors.js +17 -17
  99. package/lib/internal/template/segmented-control/styles.css.js +16 -16
  100. package/lib/internal/template/segmented-control/styles.scoped.css +46 -46
  101. package/lib/internal/template/segmented-control/styles.selectors.js +16 -16
  102. package/lib/internal/template/slider/styles.css.js +26 -26
  103. package/lib/internal/template/slider/styles.scoped.css +165 -165
  104. package/lib/internal/template/slider/styles.selectors.js +26 -26
  105. package/lib/internal/template/spinner/styles.css.js +13 -13
  106. package/lib/internal/template/spinner/styles.scoped.css +39 -39
  107. package/lib/internal/template/spinner/styles.selectors.js +13 -13
  108. package/lib/internal/template/table/styles.css.js +34 -34
  109. package/lib/internal/template/table/styles.scoped.css +42 -44
  110. package/lib/internal/template/table/styles.selectors.js +34 -34
  111. package/lib/internal/template/tabs/styles.css.js +30 -30
  112. package/lib/internal/template/tabs/styles.scoped.css +76 -76
  113. package/lib/internal/template/tabs/styles.selectors.js +30 -30
  114. package/lib/internal/template/tag-editor/styles.css.js +3 -3
  115. package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
  116. package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
  117. package/lib/internal/template/text-content/styles.css.js +1 -1
  118. package/lib/internal/template/text-content/styles.scoped.css +66 -66
  119. package/lib/internal/template/text-content/styles.selectors.js +1 -1
  120. package/lib/internal/template/textarea/styles.css.js +5 -5
  121. package/lib/internal/template/textarea/styles.scoped.css +45 -45
  122. package/lib/internal/template/textarea/styles.selectors.js +5 -5
  123. package/lib/internal/template/toggle/styles.css.js +10 -10
  124. package/lib/internal/template/toggle/styles.scoped.css +23 -23
  125. package/lib/internal/template/toggle/styles.selectors.js +10 -10
  126. package/package.json +1 -1
@@ -17,12 +17,36 @@ export interface BaseModalProps {
17
17
  removeModalRoot?: PortalProps['removeContainer'];
18
18
  }
19
19
  export interface ModalProps extends BaseComponentProps, BaseModalProps {
20
+ /**
21
+ * Specifies the width of the modal. When provided, takes precedence over the `size` property.
22
+ * If the specified width exceeds available viewport space, the modal will use the maximum available space.
23
+ * The minimum width is 320px (equivalent to the `small` size).
24
+ */
25
+ width?: number;
26
+ /**
27
+ * Specifies the height of the modal. When provided, the modal content becomes scrollable if it exceeds the specified height.
28
+ * If the specified height exceeds available viewport space, the modal will use the maximum available space.
29
+ * To make sure the content is accessible, the component will apply a minimum height of 60px for the content area,
30
+ * plus the header height and the footer height.
31
+ */
32
+ height?: number;
20
33
  /**
21
34
  * Sets the width of the modal. `max` uses variable width up to the
22
- * largest size allowed by the design guidelines. Other sizes
23
- * (`small`/`medium`/`large`) have fixed widths.
35
+ * largest size allowed by the design guidelines. Other sizes have fixed widths:
36
+ * `small` (320px), `medium` (600px), `large` (820px), `x-large` (1024px), `xx-large` (1280px).
24
37
  */
25
38
  size?: ModalProps.Size;
39
+ /**
40
+ * Controls the vertical positioning of the modal.
41
+ *
42
+ * - `center` (default) - The modal is vertically centered in the viewport and re-centers
43
+ * when content height changes. Use for dialogs with static, predictable content.
44
+ *
45
+ * - `top` - The modal anchors at fixed distance and grows downward
46
+ * as content expands. Use when the content changes dynamically to prevent disruptive
47
+ * vertical repositioning that can cause users to lose context.
48
+ */
49
+ position?: ModalProps.Position;
26
50
  /**
27
51
  * Determines whether the modal is displayed on the screen. Modals are hidden by default.
28
52
  * Set this property to `true` to show them.
@@ -72,7 +96,8 @@ export interface ModalProps extends BaseComponentProps, BaseModalProps {
72
96
  analyticsMetadata?: ModalProps.AnalyticsMetadata;
73
97
  }
74
98
  export declare namespace ModalProps {
75
- type Size = 'small' | 'medium' | 'large' | 'max';
99
+ type Size = 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'max';
100
+ type Position = 'center' | 'top';
76
101
  interface DismissDetail {
77
102
  reason: string;
78
103
  }
@@ -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,kCAAkC,CAAC;AAC5D,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,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,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;;;;;OA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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,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,SAAS,GAAG,UAAU,GAAG,KAAK,CAAC;IACjF,KAAY,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IAExC,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 { PortalProps } from '@cloudscape-design/component-toolkit/internal';\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?: 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 * 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
+ {"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 '../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?: 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"]}
@@ -13,6 +13,8 @@ type InternalModalProps = SomeRequired<ModalProps, 'size'> & InternalBaseCompone
13
13
  __injectAnalyticsComponentMetadata?: boolean;
14
14
  onButtonClick?: ButtonContextProps['onClick'];
15
15
  referrerId?: string;
16
+ width?: number;
17
+ height?: number;
16
18
  };
17
19
  export default function InternalModal({ modalRoot, getModalRoot, removeModalRoot, ...rest }: InternalModalProps): JSX.Element;
18
20
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/modal/internal.tsx"],"names":[],"mappings":"AAeA,OAAO,EAEL,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,WAAW,EAA8C,MAAM,wCAAwC,CAAC;AAGjH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAKvF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,eAqB9D;AAED,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,GACxD,0BAA0B,GAAG;IAC3B,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAC9D,YAAY,CAAC,EAAE,yBAAyB,CAAC,YAAY,CAAC,CAAC;IACvD,oBAAoB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;IACvE,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,aAAa,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,eAM9G"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/modal/internal.tsx"],"names":[],"mappings":"AAcA,OAAO,EAEL,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,WAAW,EAA8C,MAAM,wCAAwC,CAAC;AAGjH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAKvF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,eAqB9D;AAED,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,GACxD,0BAA0B,GAAG;IAC3B,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAC9D,YAAY,CAAC,EAAE,yBAAyB,CAAC,YAAY,CAAC,CAAC;IACvD,oBAAoB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;IACvE,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,aAAa,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,eAM9G"}
@@ -2,7 +2,6 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { useEffect, useRef } from 'react';
4
4
  import clsx from 'clsx';
5
- import { useContainerQuery } from '@cloudscape-design/component-toolkit';
6
5
  import { Portal, useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';
7
6
  import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
8
7
  import InternalBox from '../box/internal';
@@ -24,6 +23,7 @@ import { useIntersectionObserver } from '../internal/hooks/use-intersection-obse
24
23
  import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
25
24
  import { KeyCode } from '../internal/keycode';
26
25
  import { disableBodyScrolling, enableBodyScrolling } from './body-scroll';
26
+ import { useModalDimensions } from './use-modal-dimensions';
27
27
  import analyticsSelectors from './analytics-metadata/styles.css.js';
28
28
  import styles from './styles.css.js';
29
29
  export function InternalModalAsFunnel(props) {
@@ -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, onButtonClick = () => { }, onDismiss, __internalRootRef, __injectAnalyticsComponentMetadata, __funnelProps, __funnelStepProps, __subStepRef, __subStepFunnelProps, referrerId, ...rest }) {
47
+ function PortaledModal({ size, 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`;
@@ -88,7 +88,7 @@ function PortaledModal({ size, visible, header, children, footer, disableContent
88
88
  PerformanceMetrics.modalPerformanceData({
89
89
  timeToContentReadyInModal,
90
90
  instanceIdentifier: instanceUniqueId,
91
- componentIdentifier: ((_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.textContent) || '',
91
+ componentIdentifier: ((_a = headerTextRef.current) === null || _a === void 0 ? void 0 : _a.textContent) || '',
92
92
  });
93
93
  performanceMetricLogged.current = true;
94
94
  }
@@ -139,11 +139,13 @@ function PortaledModal({ size, visible, header, children, footer, disableContent
139
139
  // We use an empty div element at the end of the content slot as a sentinel
140
140
  // to detect when the user has scrolled to the bottom.
141
141
  const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();
142
- // Add extra scroll padding to account for the height of the sticky footer,
143
- // to prevent it from covering focused elements.
144
- const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);
145
- const headerRef = useRef(null);
142
+ const headerTextRef = useRef(null);
146
143
  const { subStepRef } = useFunnelSubStep();
144
+ const { footerRef, headerRef, hasCustomHeight, hasCustomWidth, dialogCustomStyles, footerHeight } = useModalDimensions({
145
+ height,
146
+ width,
147
+ hasFooter: !!footer,
148
+ });
147
149
  return (React.createElement(FunnelNameSelectorContext.Provider, { value: `.${styles['header--text']}` },
148
150
  React.createElement(ResetContextsForModal, null,
149
151
  React.createElement(ModalContext.Provider, { value: {
@@ -152,20 +154,24 @@ function PortaledModal({ size, visible, header, children, footer, disableContent
152
154
  emitTimeToContentReadyInModal,
153
155
  } },
154
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 },
155
- React.createElement(FocusLock, { disabled: !visible, autoFocus: true, restoreFocus: true, className: styles['focus-lock'] },
156
- React.createElement("div", { className: clsx(styles.dialog, styles[size], styles[`breakpoint-${breakpoint}`], isRefresh && styles.refresh), onKeyDown: escKeyHandler, ...metadataAttribute },
157
- React.createElement("div", { className: styles.container },
158
- React.createElement("div", { className: clsx(styles.header, analyticsSelectors.header) },
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, ...metadataAttribute },
159
+ React.createElement("div", { className: clsx(styles.container, hasCustomHeight && styles['custom-height-container']) },
160
+ React.createElement("div", { ref: headerRef, className: clsx(styles.header, analyticsSelectors.header) },
159
161
  React.createElement(InternalHeader, { variant: "h2", __disableActionsWrapping: true, actions: React.createElement("div", { ...getAnalyticsMetadataAttribute({
160
162
  action: 'dismiss',
161
163
  }) },
162
164
  React.createElement(InternalButton, { ariaLabel: closeAriaLabel, className: styles['dismiss-control'], variant: "modal-dismiss", iconName: "close", formAction: "none", onClick: onCloseButtonClick })) },
163
- React.createElement("span", { ref: headerRef, id: headerId, className: styles['header--text'] }, header))),
165
+ React.createElement("span", { ref: headerTextRef, id: headerId, className: styles['header--text'] }, header))),
164
166
  React.createElement(BuiltInErrorBoundary, { wrapper: content => React.createElement(InternalBox, { padding: { bottom: 'm', horizontal: 'l' } }, content) },
165
- React.createElement("div", { ref: __subStepRef, ...__subStepFunnelProps, className: clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings }) },
167
+ React.createElement("div", { ref: __subStepRef, ...__subStepFunnelProps, className: clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings }, hasCustomHeight && styles['custom-height-content']), ...(hasCustomHeight && {
168
+ tabIndex: 0,
169
+ role: 'region',
170
+ 'aria-labelledby': headerId,
171
+ }) },
166
172
  children,
167
173
  React.createElement("div", { ref: stickySentinelRef })),
168
174
  footer && (React.createElement(ButtonContext.Provider, { value: { onClick: onButtonClick } },
169
- React.createElement("div", { ref: footerRef, className: clsx(styles.footer, footerStuck && styles['footer--stuck']) }, footer))))))))))));
175
+ React.createElement("div", { ref: footerRef, className: clsx(styles.footer, footerStuck && styles['footer--stuck'], hasCustomHeight && styles['custom-height']) }, footer))))))))))));
170
176
  }
171
177
  //# sourceMappingURL=internal.js.map
@@ -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,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,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,SAAS,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAsB,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,qBAAqB,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,s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,EAAE,CAAC;wCAEnF,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,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,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 { useContainerQuery } from '@cloudscape-design/component-toolkit';\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';\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,\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: headerRef.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 // 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 headerRef = useRef<HTMLDivElement>(null);\n const { subStepRef } = useFunnelSubStep();\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 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 ref={headerRef} 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(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 </BuiltInErrorBoundary>\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,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,SAAS,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAsB,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,qBAAqB,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E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CACb;gCACN,oBAAC,oBAAoB,IACnB,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,oBAAC,WAAW,IAAC,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAG,OAAO,CAAe;oCAEnG,6BACE,GAAG,EAAE,YAAY,KACb,oBAAoB,EACxB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,OAAO,EACd,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,sBAAsB,EAAE,EACnD,eAAe,IAAI,MAAM,CAAC,uBAAuB,CAAC,CACnD,KACG,CAAC,eAAe,IAAI;4CACtB,QAAQ,EAAE,CAAC;4CACX,IAAI,EAAE,QAAQ;4CACd,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,CACb,MAAM,CAAC,MAAM,EACb,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,EACtC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,CAC3C,IAEA,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 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(\n styles.footer,\n footerStuck && styles['footer--stuck'],\n hasCustomHeight && styles['custom-height']\n )}\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,28 +1,36 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "dialog": "awsui_dialog_1d2i7_766d8_169",
5
- "modal-slide-up": "awsui_modal-slide-up_1d2i7_766d8_1",
6
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1d2i7_766d8_1",
7
- "refresh": "awsui_refresh_1d2i7_766d8_192",
8
- "awsui-motion-scale-popup": "awsui_awsui-motion-scale-popup_1d2i7_766d8_1",
9
- "root": "awsui_root_1d2i7_766d8_225",
10
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_1d2i7_766d8_1",
11
- "hidden": "awsui_hidden_1d2i7_766d8_302",
12
- "focus-lock": "awsui_focus-lock_1d2i7_766d8_306",
13
- "small": "awsui_small_1d2i7_766d8_326",
14
- "medium": "awsui_medium_1d2i7_766d8_329",
15
- "large": "awsui_large_1d2i7_766d8_332",
16
- "max": "awsui_max_1d2i7_766d8_335",
17
- "breakpoint-xs": "awsui_breakpoint-xs_1d2i7_766d8_335",
18
- "container": "awsui_container_1d2i7_766d8_341",
19
- "content": "awsui_content_1d2i7_766d8_382",
20
- "no-paddings": "awsui_no-paddings_1d2i7_766d8_387",
21
- "header": "awsui_header_1d2i7_766d8_392",
22
- "header--text": "awsui_header--text_1d2i7_766d8_404",
23
- "footer": "awsui_footer_1d2i7_766d8_408",
24
- "footer--stuck": "awsui_footer--stuck_1d2i7_766d8_417",
25
- "dismiss-control": "awsui_dismiss-control_1d2i7_766d8_429",
26
- "modal-open": "awsui_modal-open_1d2i7_766d8_433"
4
+ "dialog": "awsui_dialog_1d2i7_jna9e_169",
5
+ "modal-slide-up": "awsui_modal-slide-up_1d2i7_jna9e_1",
6
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1d2i7_jna9e_1",
7
+ "refresh": "awsui_refresh_1d2i7_jna9e_192",
8
+ "awsui-motion-scale-popup": "awsui_awsui-motion-scale-popup_1d2i7_jna9e_1",
9
+ "root": "awsui_root_1d2i7_jna9e_225",
10
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_1d2i7_jna9e_1",
11
+ "hidden": "awsui_hidden_1d2i7_jna9e_302",
12
+ "focus-lock": "awsui_focus-lock_1d2i7_jna9e_306",
13
+ "position-top": "awsui_position-top_1d2i7_jna9e_314",
14
+ "position-center": "awsui_position-center_1d2i7_jna9e_317",
15
+ "small": "awsui_small_1d2i7_jna9e_331",
16
+ "medium": "awsui_medium_1d2i7_jna9e_334",
17
+ "large": "awsui_large_1d2i7_jna9e_337",
18
+ "x-large": "awsui_x-large_1d2i7_jna9e_340",
19
+ "xx-large": "awsui_xx-large_1d2i7_jna9e_343",
20
+ "custom-width": "awsui_custom-width_1d2i7_jna9e_346",
21
+ "max": "awsui_max_1d2i7_jna9e_349",
22
+ "breakpoint-xs": "awsui_breakpoint-xs_1d2i7_jna9e_349",
23
+ "custom-height": "awsui_custom-height_1d2i7_jna9e_354",
24
+ "container": "awsui_container_1d2i7_jna9e_359",
25
+ "custom-height-container": "awsui_custom-height-container_1d2i7_jna9e_399",
26
+ "content": "awsui_content_1d2i7_jna9e_405",
27
+ "no-paddings": "awsui_no-paddings_1d2i7_jna9e_410",
28
+ "custom-height-content": "awsui_custom-height-content_1d2i7_jna9e_414",
29
+ "header": "awsui_header_1d2i7_jna9e_419",
30
+ "header--text": "awsui_header--text_1d2i7_jna9e_431",
31
+ "footer": "awsui_footer_1d2i7_jna9e_435",
32
+ "footer--stuck": "awsui_footer--stuck_1d2i7_jna9e_448",
33
+ "dismiss-control": "awsui_dismiss-control_1d2i7_jna9e_460",
34
+ "modal-open": "awsui_modal-open_1d2i7_jna9e_464"
27
35
  };
28
36
 
@@ -158,7 +158,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
158
158
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
159
159
  SPDX-License-Identifier: Apache-2.0
160
160
  */
161
- @keyframes awsui_modal-slide-up_1d2i7_766d8_1 {
161
+ @keyframes awsui_modal-slide-up_1d2i7_jna9e_1 {
162
162
  0% {
163
163
  transform: translate(0, 10px);
164
164
  }
@@ -166,12 +166,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
166
166
  transform: translate(0, 0);
167
167
  }
168
168
  }
169
- .awsui_dialog_1d2i7_766d8_169:not(#\9) {
170
- animation: awsui_modal-slide-up_1d2i7_766d8_1 var(--motion-duration-slow-cxexcj, 180ms) ease-out, awsui_awsui-motion-fade-in-0_1d2i7_766d8_1 var(--motion-duration-slow-cxexcj, 180ms) ease-out;
169
+ .awsui_dialog_1d2i7_jna9e_169:not(#\9) {
170
+ animation: awsui_modal-slide-up_1d2i7_jna9e_1 var(--motion-duration-slow-cxexcj, 180ms) ease-out, awsui_awsui-motion-fade-in-0_1d2i7_jna9e_1 var(--motion-duration-slow-cxexcj, 180ms) ease-out;
171
171
  animation-delay: var(--motion-duration-fast-okdxjh, 90ms);
172
172
  animation-fill-mode: both;
173
173
  }
174
- @keyframes awsui_awsui-motion-fade-in-0_1d2i7_766d8_1 {
174
+ @keyframes awsui_awsui-motion-fade-in-0_1d2i7_jna9e_1 {
175
175
  from {
176
176
  opacity: 0;
177
177
  }
@@ -180,22 +180,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
180
180
  }
181
181
  }
182
182
  @media (prefers-reduced-motion: reduce) {
183
- .awsui_dialog_1d2i7_766d8_169:not(#\9) {
183
+ .awsui_dialog_1d2i7_jna9e_169:not(#\9) {
184
184
  animation: none;
185
185
  transition: none;
186
186
  }
187
187
  }
188
- .awsui-motion-disabled .awsui_dialog_1d2i7_766d8_169:not(#\9), .awsui-mode-entering .awsui_dialog_1d2i7_766d8_169:not(#\9) {
188
+ .awsui-motion-disabled .awsui_dialog_1d2i7_jna9e_169:not(#\9), .awsui-mode-entering .awsui_dialog_1d2i7_jna9e_169:not(#\9) {
189
189
  animation: none;
190
190
  transition: none;
191
191
  }
192
- .awsui_dialog_1d2i7_766d8_169.awsui_refresh_1d2i7_766d8_192:not(#\9) {
193
- animation: awsui_awsui-motion-scale-popup_1d2i7_766d8_1, awsui_awsui-motion-fade-in-0_1d2i7_766d8_1;
192
+ .awsui_dialog_1d2i7_jna9e_169.awsui_refresh_1d2i7_jna9e_192:not(#\9) {
193
+ animation: awsui_awsui-motion-scale-popup_1d2i7_jna9e_1, awsui_awsui-motion-fade-in-0_1d2i7_jna9e_1;
194
194
  animation-duration: var(--motion-duration-refresh-only-fast-v9rk6z, 0ms);
195
195
  animation-timing-function: var(--motion-easing-refresh-only-a-8gio5w, cubic-bezier(0, 0, 0, 1));
196
196
  animation-fill-mode: both;
197
197
  }
198
- @keyframes awsui_awsui-motion-fade-in-0_1d2i7_766d8_1 {
198
+ @keyframes awsui_awsui-motion-fade-in-0_1d2i7_jna9e_1 {
199
199
  from {
200
200
  opacity: 0;
201
201
  }
@@ -203,7 +203,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
203
203
  opacity: 1;
204
204
  }
205
205
  }
206
- @keyframes awsui_awsui-motion-scale-popup_1d2i7_766d8_1 {
206
+ @keyframes awsui_awsui-motion-scale-popup_1d2i7_jna9e_1 {
207
207
  0% {
208
208
  transform: scale(0.95);
209
209
  }
@@ -212,21 +212,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
212
212
  }
213
213
  }
214
214
  @media (prefers-reduced-motion: reduce) {
215
- .awsui_dialog_1d2i7_766d8_169.awsui_refresh_1d2i7_766d8_192:not(#\9) {
215
+ .awsui_dialog_1d2i7_jna9e_169.awsui_refresh_1d2i7_jna9e_192:not(#\9) {
216
216
  animation: none;
217
217
  transition: none;
218
218
  }
219
219
  }
220
- .awsui-motion-disabled .awsui_dialog_1d2i7_766d8_169.awsui_refresh_1d2i7_766d8_192:not(#\9), .awsui-mode-entering .awsui_dialog_1d2i7_766d8_169.awsui_refresh_1d2i7_766d8_192:not(#\9) {
220
+ .awsui-motion-disabled .awsui_dialog_1d2i7_jna9e_169.awsui_refresh_1d2i7_jna9e_192:not(#\9), .awsui-mode-entering .awsui_dialog_1d2i7_jna9e_169.awsui_refresh_1d2i7_jna9e_192:not(#\9) {
221
221
  animation: none;
222
222
  transition: none;
223
223
  }
224
224
 
225
- .awsui_root_1d2i7_766d8_225:not(#\9) {
226
- animation: awsui_awsui-motion-fade-in_1d2i7_766d8_1 var(--motion-duration-extra-slow-j8l6m4, 270ms) ease-out;
225
+ .awsui_root_1d2i7_jna9e_225:not(#\9) {
226
+ animation: awsui_awsui-motion-fade-in_1d2i7_jna9e_1 var(--motion-duration-extra-slow-j8l6m4, 270ms) ease-out;
227
227
  animation-fill-mode: both;
228
228
  }
229
- @keyframes awsui_awsui-motion-fade-in_1d2i7_766d8_1 {
229
+ @keyframes awsui_awsui-motion-fade-in_1d2i7_jna9e_1 {
230
230
  from {
231
231
  opacity: 0.2;
232
232
  }
@@ -235,30 +235,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
235
235
  }
236
236
  }
237
237
  @media (prefers-reduced-motion: reduce) {
238
- .awsui_root_1d2i7_766d8_225:not(#\9) {
238
+ .awsui_root_1d2i7_jna9e_225:not(#\9) {
239
239
  animation: none;
240
240
  transition: none;
241
241
  }
242
242
  }
243
- .awsui-motion-disabled .awsui_root_1d2i7_766d8_225:not(#\9), .awsui-mode-entering .awsui_root_1d2i7_766d8_225:not(#\9) {
243
+ .awsui-motion-disabled .awsui_root_1d2i7_jna9e_225:not(#\9), .awsui-mode-entering .awsui_root_1d2i7_jna9e_225:not(#\9) {
244
244
  animation: none;
245
245
  transition: none;
246
246
  }
247
- .awsui_root_1d2i7_766d8_225.awsui_refresh_1d2i7_766d8_192:not(#\9) {
247
+ .awsui_root_1d2i7_jna9e_225.awsui_refresh_1d2i7_jna9e_192:not(#\9) {
248
248
  animation-duration: var(--motion-duration-refresh-only-fast-v9rk6z, 0ms);
249
249
  }
250
250
  @media (prefers-reduced-motion: reduce) {
251
- .awsui_root_1d2i7_766d8_225.awsui_refresh_1d2i7_766d8_192:not(#\9) {
251
+ .awsui_root_1d2i7_jna9e_225.awsui_refresh_1d2i7_jna9e_192:not(#\9) {
252
252
  animation: none;
253
253
  transition: none;
254
254
  }
255
255
  }
256
- .awsui-motion-disabled .awsui_root_1d2i7_766d8_225.awsui_refresh_1d2i7_766d8_192:not(#\9), .awsui-mode-entering .awsui_root_1d2i7_766d8_225.awsui_refresh_1d2i7_766d8_192:not(#\9) {
256
+ .awsui-motion-disabled .awsui_root_1d2i7_jna9e_225.awsui_refresh_1d2i7_jna9e_192:not(#\9), .awsui-mode-entering .awsui_root_1d2i7_jna9e_225.awsui_refresh_1d2i7_jna9e_192:not(#\9) {
257
257
  animation: none;
258
258
  transition: none;
259
259
  }
260
260
 
261
- .awsui_root_1d2i7_766d8_225:not(#\9) {
261
+ .awsui_root_1d2i7_jna9e_225:not(#\9) {
262
262
  border-collapse: separate;
263
263
  border-spacing: 0;
264
264
  box-sizing: border-box;
@@ -299,21 +299,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
299
299
  overflow: auto;
300
300
  cursor: pointer;
301
301
  }
302
- .awsui_root_1d2i7_766d8_225.awsui_hidden_1d2i7_766d8_302:not(#\9) {
302
+ .awsui_root_1d2i7_jna9e_225.awsui_hidden_1d2i7_jna9e_302:not(#\9) {
303
303
  display: none;
304
304
  }
305
305
 
306
- .awsui_focus-lock_1d2i7_766d8_306:not(#\9) {
306
+ .awsui_focus-lock_1d2i7_jna9e_306:not(#\9) {
307
307
  align-self: flex-start;
308
- margin-block: auto;
309
308
  margin-inline: auto;
310
309
  padding-block: var(--space-s-4a5hs8, 12px);
311
310
  padding-inline: 0;
312
311
  z-index: 5000;
313
312
  pointer-events: none;
314
313
  }
314
+ .awsui_focus-lock_1d2i7_jna9e_306.awsui_position-top_1d2i7_jna9e_314:not(#\9) {
315
+ margin-block-start: 0;
316
+ }
317
+ .awsui_focus-lock_1d2i7_jna9e_306.awsui_position-center_1d2i7_jna9e_317:not(#\9) {
318
+ margin-block: auto;
319
+ }
315
320
 
316
- .awsui_dialog_1d2i7_766d8_169:not(#\9) {
321
+ .awsui_dialog_1d2i7_jna9e_169:not(#\9) {
317
322
  position: static;
318
323
  inset-block-start: 0;
319
324
  transform: translate(0, 0);
@@ -323,22 +328,35 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
323
328
  z-index: 5000;
324
329
  pointer-events: all;
325
330
  }
326
- .awsui_dialog_1d2i7_766d8_169.awsui_small_1d2i7_766d8_326:not(#\9) {
331
+ .awsui_dialog_1d2i7_jna9e_169.awsui_small_1d2i7_jna9e_331:not(#\9) {
327
332
  max-inline-size: 320px;
328
333
  }
329
- .awsui_dialog_1d2i7_766d8_169.awsui_medium_1d2i7_766d8_329:not(#\9) {
334
+ .awsui_dialog_1d2i7_jna9e_169.awsui_medium_1d2i7_jna9e_334:not(#\9) {
330
335
  max-inline-size: 600px;
331
336
  }
332
- .awsui_dialog_1d2i7_766d8_169.awsui_large_1d2i7_766d8_332:not(#\9) {
337
+ .awsui_dialog_1d2i7_jna9e_169.awsui_large_1d2i7_jna9e_337:not(#\9) {
333
338
  max-inline-size: 820px;
334
339
  }
335
- .awsui_dialog_1d2i7_766d8_169.awsui_max_1d2i7_766d8_335.awsui_breakpoint-xs_1d2i7_766d8_335:not(#\9) {
340
+ .awsui_dialog_1d2i7_jna9e_169.awsui_x-large_1d2i7_jna9e_340:not(#\9) {
341
+ max-inline-size: 1024px;
342
+ }
343
+ .awsui_dialog_1d2i7_jna9e_169.awsui_xx-large_1d2i7_jna9e_343:not(#\9) {
344
+ max-inline-size: 1280px;
345
+ }
346
+ .awsui_dialog_1d2i7_jna9e_169.awsui_custom-width_1d2i7_jna9e_346:not(#\9) {
347
+ max-inline-size: var(--awsui-modal-custom-width-n6lfw8);
348
+ }
349
+ .awsui_dialog_1d2i7_jna9e_169.awsui_max_1d2i7_jna9e_349.awsui_breakpoint-xs_1d2i7_jna9e_349:not(#\9) {
336
350
  max-inline-size: calc(100vw - (8 * 10px + var(--space-xxxl-qhelse, 40px)));
337
351
  margin-block: auto;
338
352
  margin-inline: auto;
339
353
  }
354
+ .awsui_dialog_1d2i7_jna9e_169.awsui_custom-height_1d2i7_jna9e_354:not(#\9) {
355
+ block-size: var(--awsui-modal-custom-height-n6lfw8);
356
+ max-block-size: calc(100vh - 2 * var(--space-s-4a5hs8, 12px));
357
+ }
340
358
 
341
- .awsui_container_1d2i7_766d8_341:not(#\9) {
359
+ .awsui_container_1d2i7_jna9e_359:not(#\9) {
342
360
  border-collapse: separate;
343
361
  border-spacing: 0;
344
362
  box-sizing: border-box;
@@ -378,18 +396,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
378
396
  border-end-end-radius: var(--border-radius-container-l30zxy, 0px);
379
397
  box-shadow: var(--shadow-modal-pjndl9, 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15));
380
398
  }
399
+ .awsui_container_1d2i7_jna9e_359.awsui_custom-height-container_1d2i7_jna9e_399:not(#\9) {
400
+ display: flex;
401
+ flex-direction: column;
402
+ block-size: 100%;
403
+ }
381
404
 
382
- .awsui_content_1d2i7_766d8_382:not(#\9) {
405
+ .awsui_content_1d2i7_jna9e_405:not(#\9) {
383
406
  padding-block-start: var(--space-container-content-top-8fvzh2, 16px);
384
407
  padding-block-end: var(--space-modal-content-bottom-pxcvcj, 20px);
385
408
  padding-inline: var(--space-modal-horizontal-tieytu, 20px);
386
409
  }
387
- .awsui_content_1d2i7_766d8_382.awsui_no-paddings_1d2i7_766d8_387:not(#\9) {
410
+ .awsui_content_1d2i7_jna9e_405.awsui_no-paddings_1d2i7_jna9e_410:not(#\9) {
388
411
  padding-block: 0;
389
412
  padding-inline: 0;
390
413
  }
414
+ .awsui_content_1d2i7_jna9e_405.awsui_custom-height-content_1d2i7_jna9e_414:not(#\9) {
415
+ flex-grow: 1;
416
+ overflow-y: auto;
417
+ }
391
418
 
392
- .awsui_header_1d2i7_766d8_392:not(#\9) {
419
+ .awsui_header_1d2i7_jna9e_419:not(#\9) {
393
420
  padding-block-start: var(--space-container-header-top-3cfni8, 12px);
394
421
  padding-block-end: var(--space-container-header-bottom-rbnprk, 12px);
395
422
  padding-inline: var(--space-modal-horizontal-tieytu, 20px);
@@ -401,11 +428,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
401
428
  border-end-end-radius: 0;
402
429
  }
403
430
 
404
- .awsui_header--text_1d2i7_766d8_404:not(#\9) {
431
+ .awsui_header--text_1d2i7_jna9e_431:not(#\9) {
405
432
  /* used in test-utils */
406
433
  }
407
434
 
408
- .awsui_footer_1d2i7_766d8_408:not(#\9) {
435
+ .awsui_footer_1d2i7_jna9e_435:not(#\9) {
409
436
  border-block-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-divider-default-ipvpev, #eaeded);
410
437
  padding-block: var(--space-scaled-s-gjhvjd, 12px);
411
438
  padding-inline: var(--space-container-horizontal-ipmk0e, 20px);
@@ -414,23 +441,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
414
441
  inset-block-end: 0;
415
442
  z-index: 800;
416
443
  }
417
- .awsui_footer--stuck_1d2i7_766d8_417:not(#\9) {
444
+ .awsui_footer_1d2i7_jna9e_435.awsui_custom-height_1d2i7_jna9e_354:not(#\9) {
445
+ border-end-start-radius: var(--border-radius-container-l30zxy, 0px);
446
+ border-end-end-radius: var(--border-radius-container-l30zxy, 0px);
447
+ }
448
+ .awsui_footer--stuck_1d2i7_jna9e_448:not(#\9) {
418
449
  border-start-start-radius: 0;
419
450
  border-start-end-radius: 0;
420
451
  border-end-start-radius: var(--border-radius-container-l30zxy, 0px);
421
452
  border-end-end-radius: var(--border-radius-container-l30zxy, 0px);
422
453
  }
423
- .awsui_footer_1d2i7_766d8_408:not(#\9):after {
454
+ .awsui_footer_1d2i7_jna9e_435:not(#\9):after {
424
455
  content: "";
425
456
  display: table;
426
457
  clear: both;
427
458
  }
428
459
 
429
- .awsui_dismiss-control_1d2i7_766d8_429:not(#\9) {
460
+ .awsui_dismiss-control_1d2i7_jna9e_460:not(#\9) {
430
461
  /* used in test-utils */
431
462
  }
432
463
 
433
- .awsui_modal-open_1d2i7_766d8_433:not(#\9) {
464
+ .awsui_modal-open_1d2i7_jna9e_464:not(#\9) {
434
465
  overflow: hidden;
435
466
  /*
436
467
  * When padding-right is added to account for scrollbar being turned