@cloudscape-design/components-themeable 3.0.1210 → 3.0.1211

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 (198) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/components/dropdown/styles.scss +3 -2
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +140 -139
  4. package/lib/internal/template/alert/interfaces.d.ts +2 -0
  5. package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
  6. package/lib/internal/template/alert/interfaces.js.map +1 -1
  7. package/lib/internal/template/alert/styles.css.js +27 -27
  8. package/lib/internal/template/alert/styles.scoped.css +50 -50
  9. package/lib/internal/template/alert/styles.selectors.js +27 -27
  10. package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
  11. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
  12. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
  13. package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
  14. package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
  15. package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
  16. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
  17. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
  18. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +87 -87
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
  28. package/lib/internal/template/attribute-editor/styles.css.js +15 -15
  29. package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
  30. package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
  31. package/lib/internal/template/autosuggest/interfaces.d.ts +2 -0
  32. package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
  33. package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
  34. package/lib/internal/template/badge/interfaces.d.ts +2 -0
  35. package/lib/internal/template/badge/interfaces.d.ts.map +1 -1
  36. package/lib/internal/template/badge/interfaces.js.map +1 -1
  37. package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
  38. package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
  39. package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
  40. package/lib/internal/template/button/interfaces.d.ts +2 -0
  41. package/lib/internal/template/button/interfaces.d.ts.map +1 -1
  42. package/lib/internal/template/button/interfaces.js.map +1 -1
  43. package/lib/internal/template/button/styles.css.js +22 -22
  44. package/lib/internal/template/button/styles.scoped.css +256 -256
  45. package/lib/internal/template/button/styles.selectors.js +22 -22
  46. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +1 -1
  47. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  48. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  49. package/lib/internal/template/button-dropdown/internal.js +1 -1
  50. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  51. package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
  52. package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
  53. package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
  54. package/lib/internal/template/button-group/interfaces.d.ts +2 -0
  55. package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
  56. package/lib/internal/template/button-group/interfaces.js.map +1 -1
  57. package/lib/internal/template/checkbox/interfaces.d.ts +2 -0
  58. package/lib/internal/template/checkbox/interfaces.d.ts.map +1 -1
  59. package/lib/internal/template/checkbox/interfaces.js.map +1 -1
  60. package/lib/internal/template/checkbox/styles.css.js +3 -3
  61. package/lib/internal/template/checkbox/styles.scoped.css +11 -11
  62. package/lib/internal/template/checkbox/styles.selectors.js +3 -3
  63. package/lib/internal/template/container/interfaces.d.ts +2 -0
  64. package/lib/internal/template/container/interfaces.d.ts.map +1 -1
  65. package/lib/internal/template/container/interfaces.js.map +1 -1
  66. package/lib/internal/template/content-layout/styles.css.js +14 -14
  67. package/lib/internal/template/content-layout/styles.scoped.css +27 -27
  68. package/lib/internal/template/content-layout/styles.selectors.js +14 -14
  69. package/lib/internal/template/date-picker/index.d.ts.map +1 -1
  70. package/lib/internal/template/date-picker/index.js +1 -1
  71. package/lib/internal/template/date-picker/index.js.map +1 -1
  72. package/lib/internal/template/date-range-picker/index.d.ts.map +1 -1
  73. package/lib/internal/template/date-range-picker/index.js +1 -1
  74. package/lib/internal/template/date-range-picker/index.js.map +1 -1
  75. package/lib/internal/template/flashbar/interfaces.d.ts +2 -0
  76. package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
  77. package/lib/internal/template/flashbar/interfaces.js.map +1 -1
  78. package/lib/internal/template/flashbar/styles.css.js +50 -50
  79. package/lib/internal/template/flashbar/styles.scoped.css +187 -187
  80. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  81. package/lib/internal/template/help-panel/styles.css.js +6 -6
  82. package/lib/internal/template/help-panel/styles.scoped.css +73 -73
  83. package/lib/internal/template/help-panel/styles.selectors.js +6 -6
  84. package/lib/internal/template/input/interfaces.d.ts +2 -0
  85. package/lib/internal/template/input/interfaces.d.ts.map +1 -1
  86. package/lib/internal/template/input/interfaces.js.map +1 -1
  87. package/lib/internal/template/input/styles.css.js +13 -13
  88. package/lib/internal/template/input/styles.scoped.css +74 -74
  89. package/lib/internal/template/input/styles.selectors.js +13 -13
  90. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  91. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  92. package/lib/internal/template/internal/components/autosuggest-input/index.js +2 -1
  93. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  94. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  95. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  96. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  97. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts +9 -9
  98. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
  99. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js +22 -23
  100. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
  101. package/lib/internal/template/internal/components/dropdown/dropdown-position.d.ts.map +1 -1
  102. package/lib/internal/template/internal/components/dropdown/dropdown-position.js +4 -1
  103. package/lib/internal/template/internal/components/dropdown/dropdown-position.js.map +1 -1
  104. package/lib/internal/template/internal/components/dropdown/index.d.ts +1 -1
  105. package/lib/internal/template/internal/components/dropdown/index.d.ts.map +1 -1
  106. package/lib/internal/template/internal/components/dropdown/index.js +52 -30
  107. package/lib/internal/template/internal/components/dropdown/index.js.map +1 -1
  108. package/lib/internal/template/internal/components/dropdown/interfaces.d.ts +20 -14
  109. package/lib/internal/template/internal/components/dropdown/interfaces.d.ts.map +1 -1
  110. package/lib/internal/template/internal/components/dropdown/interfaces.js.map +1 -1
  111. package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
  112. package/lib/internal/template/internal/components/dropdown/styles.scoped.css +39 -38
  113. package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
  114. package/lib/internal/template/internal/components/radio-button/interfaces.d.ts +2 -0
  115. package/lib/internal/template/internal/components/radio-button/interfaces.d.ts.map +1 -1
  116. package/lib/internal/template/internal/components/radio-button/interfaces.js.map +1 -1
  117. package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
  118. package/lib/internal/template/internal/components/radio-button/styles.scoped.css +18 -18
  119. package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
  120. package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
  121. package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
  122. package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
  123. package/lib/internal/template/internal/environment.js +2 -2
  124. package/lib/internal/template/internal/environment.json +2 -2
  125. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +1 -0
  126. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  127. package/lib/internal/template/internal/generated/custom-css-properties/index.js +139 -138
  128. package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
  129. package/lib/internal/template/link/interfaces.d.ts +2 -0
  130. package/lib/internal/template/link/interfaces.d.ts.map +1 -1
  131. package/lib/internal/template/link/interfaces.js.map +1 -1
  132. package/lib/internal/template/link/styles.css.js +20 -20
  133. package/lib/internal/template/link/styles.scoped.css +103 -103
  134. package/lib/internal/template/link/styles.selectors.js +20 -20
  135. package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
  136. package/lib/internal/template/multiselect/internal.js +2 -1
  137. package/lib/internal/template/multiselect/internal.js.map +1 -1
  138. package/lib/internal/template/progress-bar/interfaces.d.ts +2 -0
  139. package/lib/internal/template/progress-bar/interfaces.d.ts.map +1 -1
  140. package/lib/internal/template/progress-bar/interfaces.js.map +1 -1
  141. package/lib/internal/template/progress-bar/styles.css.js +18 -18
  142. package/lib/internal/template/progress-bar/styles.scoped.css +48 -48
  143. package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
  144. package/lib/internal/template/prompt-input/interfaces.d.ts +2 -0
  145. package/lib/internal/template/prompt-input/interfaces.d.ts.map +1 -1
  146. package/lib/internal/template/prompt-input/interfaces.js.map +1 -1
  147. package/lib/internal/template/prompt-input/styles.css.js +17 -17
  148. package/lib/internal/template/prompt-input/styles.scoped.css +79 -79
  149. package/lib/internal/template/prompt-input/styles.selectors.js +17 -17
  150. package/lib/internal/template/radio-group/interfaces.d.ts +2 -0
  151. package/lib/internal/template/radio-group/interfaces.d.ts.map +1 -1
  152. package/lib/internal/template/radio-group/interfaces.js.map +1 -1
  153. package/lib/internal/template/segmented-control/interfaces.d.ts +2 -0
  154. package/lib/internal/template/segmented-control/interfaces.d.ts.map +1 -1
  155. package/lib/internal/template/segmented-control/interfaces.js.map +1 -1
  156. package/lib/internal/template/segmented-control/styles.css.js +16 -16
  157. package/lib/internal/template/segmented-control/styles.scoped.css +46 -46
  158. package/lib/internal/template/segmented-control/styles.selectors.js +16 -16
  159. package/lib/internal/template/select/internal.d.ts.map +1 -1
  160. package/lib/internal/template/select/internal.js +2 -1
  161. package/lib/internal/template/select/internal.js.map +1 -1
  162. package/lib/internal/template/slider/interfaces.d.ts +2 -0
  163. package/lib/internal/template/slider/interfaces.d.ts.map +1 -1
  164. package/lib/internal/template/slider/interfaces.js.map +1 -1
  165. package/lib/internal/template/slider/styles.css.js +26 -26
  166. package/lib/internal/template/slider/styles.scoped.css +165 -165
  167. package/lib/internal/template/slider/styles.selectors.js +26 -26
  168. package/lib/internal/template/spinner/styles.css.js +13 -13
  169. package/lib/internal/template/spinner/styles.scoped.css +39 -39
  170. package/lib/internal/template/spinner/styles.selectors.js +13 -13
  171. package/lib/internal/template/tabs/interfaces.d.ts +2 -0
  172. package/lib/internal/template/tabs/interfaces.d.ts.map +1 -1
  173. package/lib/internal/template/tabs/interfaces.js.map +1 -1
  174. package/lib/internal/template/tabs/styles.css.js +30 -30
  175. package/lib/internal/template/tabs/styles.scoped.css +76 -76
  176. package/lib/internal/template/tabs/styles.selectors.js +30 -30
  177. package/lib/internal/template/tag-editor/styles.css.js +3 -3
  178. package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
  179. package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
  180. package/lib/internal/template/text-content/styles.css.js +1 -1
  181. package/lib/internal/template/text-content/styles.scoped.css +66 -66
  182. package/lib/internal/template/text-content/styles.selectors.js +1 -1
  183. package/lib/internal/template/text-filter/interfaces.d.ts +2 -0
  184. package/lib/internal/template/text-filter/interfaces.d.ts.map +1 -1
  185. package/lib/internal/template/text-filter/interfaces.js.map +1 -1
  186. package/lib/internal/template/textarea/interfaces.d.ts +2 -0
  187. package/lib/internal/template/textarea/interfaces.d.ts.map +1 -1
  188. package/lib/internal/template/textarea/interfaces.js.map +1 -1
  189. package/lib/internal/template/textarea/styles.css.js +5 -5
  190. package/lib/internal/template/textarea/styles.scoped.css +45 -45
  191. package/lib/internal/template/textarea/styles.selectors.js +5 -5
  192. package/lib/internal/template/toggle/interfaces.d.ts +2 -0
  193. package/lib/internal/template/toggle/interfaces.d.ts.map +1 -1
  194. package/lib/internal/template/toggle/interfaces.js.map +1 -1
  195. package/lib/internal/template/toggle/styles.css.js +10 -10
  196. package/lib/internal/template/toggle/styles.scoped.css +23 -23
  197. package/lib/internal/template/toggle/styles.selectors.js +10 -10
  198. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-group/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\n\nexport interface ButtonGroupProps extends BaseComponentProps {\n /**\n * Adds `aria-label` to the button group toolbar element.\n * Use this to provide a unique accessible name for each button group on the page.\n */\n ariaLabel?: string;\n /**\n * Determines the general styling of the button dropdown.\n * * `icon` for icon buttons.\n */\n variant: ButtonGroupProps.Variant;\n /**\n * Use this property to determine dropdown placement strategy for all menu dropdown items.\n *\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n */\n dropdownExpandToViewport?: boolean;\n /**\n * Array of objects with a number of supported types.\n *\n * ### icon-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n *\n * ### icon-toggle-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `pressed` (boolean) - The toggle button pressed state.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `pressedIconName` (optional, string) - Specifies the name of the icon in pressed state, used with the [icon component](/components/icon/).\n * * `pressedIconUrl` (optional, string) - Specifies the URL of a custom icon in pressed state.\n * * `pressedIconSvg` (optional, ReactNode) - Custom SVG icon in pressed state. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n * * `pressedPopoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button in pressed state. Defaults to `popoverFeedback`.\n *\n * * ### file-input\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onFilesChange`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `accept` (optional, string) - Specifies the native file input `accept` attribute to describe the allow-list of file types.\n * * `multiple` (optional, string) - Specifies the native file input `multiple` attribute to allow users entering more than one file.\n *\n * ### menu-dropdown\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `disabled` (optional, boolean) - The disabled state indication for the menu button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for the menu button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `items` (ButtonDropdownProps.ItemOrGroup[]) - The array of dropdown items that belong to this menu.\n *\n * ### group\n *\n * * `text` (string) - The name of the group rendered as ARIA label for this group.\n * * `items` ((ButtonGroupProps.IconButton | ButtonGroupProps.MenuDropdown)[]) - The array of items that belong to this group.\n */\n items: ReadonlyArray<ButtonGroupProps.ItemOrGroup>;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n /**\n * Called when the user uploads files. The event detail object contains the id and files from the file input item.\n */\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails>;\n /**\n * @awsuiSystem core\n */\n style?: ButtonGroupProps.Style;\n}\n\nexport interface InternalIconButton extends ButtonGroupProps.IconButton {\n analyticsAction?: string;\n}\nexport interface InternalIconToggleButton extends ButtonGroupProps.IconToggleButton {\n analyticsAction?: string;\n}\n\nexport interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback'> {\n iconSvg?: string;\n}\nexport interface IconToggleButtonRuntime\n extends Omit<\n ButtonGroupProps.IconToggleButton,\n 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback'\n > {\n iconSvg?: string;\n pressedIconSvg?: string;\n}\nexport type ItemOrGroupRuntime = ItemRuntime | ButtonGroupProps.Group;\nexport type ItemRuntime =\n | IconButtonRuntime\n | IconToggleButtonRuntime\n | ButtonGroupProps.IconFileInput\n | ButtonGroupProps.MenuDropdown;\n\nexport type InternalItemOrGroup = InternalItem | ButtonGroupProps.Group;\nexport type InternalItem =\n | InternalIconButton\n | InternalIconToggleButton\n | ButtonGroupProps.IconFileInput\n | ButtonGroupProps.MenuDropdown;\n\nexport interface InternalButtonGroupProps\n extends SomeRequired<ButtonGroupProps, 'dropdownExpandToViewport'>,\n InternalBaseComponentProps {\n style?: ButtonGroupProps.Style;\n items: ReadonlyArray<InternalItemOrGroup>;\n}\n\nexport namespace ButtonGroupProps {\n export type Variant = 'icon';\n\n export type ItemOrGroup = Item | Group;\n export type Item = IconButton | IconToggleButton | IconFileInput | MenuDropdown;\n\n export interface IconButton {\n type: 'icon-button';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n }\n\n export interface IconToggleButton {\n type: 'icon-toggle-button';\n id: string;\n text: string;\n pressed: boolean;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n pressedIconName?: IconProps.Name;\n pressedIconUrl?: string;\n pressedIconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n pressedPopoverFeedback?: React.ReactNode;\n }\n\n export interface IconFileInput {\n type: 'icon-file-input';\n id: string;\n text: string;\n accept?: string;\n multiple?: boolean;\n }\n\n export interface MenuDropdown {\n type: 'menu-dropdown';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n }\n\n export interface Group {\n type: 'group';\n text: string;\n items: ReadonlyArray<ButtonGroupProps.Item>;\n }\n\n export interface ItemClickDetails {\n id: string;\n pressed?: boolean;\n checked?: boolean;\n }\n\n export interface FilesChangeDetails {\n id: string;\n files: File[];\n }\n\n export interface Ref {\n /**\n * Focuses button group item by id.\n */\n focus(itemId: string): void;\n }\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n paddingBlock?: string;\n paddingInline?: string;\n boxShadow?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n item?: {\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n boxShadow?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-group/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\n\nexport interface ButtonGroupProps extends BaseComponentProps {\n /**\n * Adds `aria-label` to the button group toolbar element.\n * Use this to provide a unique accessible name for each button group on the page.\n */\n ariaLabel?: string;\n /**\n * Determines the general styling of the button dropdown.\n * * `icon` for icon buttons.\n */\n variant: ButtonGroupProps.Variant;\n /**\n * Use this property to determine dropdown placement strategy for all menu dropdown items.\n *\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n */\n dropdownExpandToViewport?: boolean;\n /**\n * Array of objects with a number of supported types.\n *\n * ### icon-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n *\n * ### icon-toggle-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `pressed` (boolean) - The toggle button pressed state.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `pressedIconName` (optional, string) - Specifies the name of the icon in pressed state, used with the [icon component](/components/icon/).\n * * `pressedIconUrl` (optional, string) - Specifies the URL of a custom icon in pressed state.\n * * `pressedIconSvg` (optional, ReactNode) - Custom SVG icon in pressed state. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n * * `pressedPopoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button in pressed state. Defaults to `popoverFeedback`.\n *\n * * ### file-input\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onFilesChange`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `accept` (optional, string) - Specifies the native file input `accept` attribute to describe the allow-list of file types.\n * * `multiple` (optional, string) - Specifies the native file input `multiple` attribute to allow users entering more than one file.\n *\n * ### menu-dropdown\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `disabled` (optional, boolean) - The disabled state indication for the menu button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for the menu button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `items` (ButtonDropdownProps.ItemOrGroup[]) - The array of dropdown items that belong to this menu.\n *\n * ### group\n *\n * * `text` (string) - The name of the group rendered as ARIA label for this group.\n * * `items` ((ButtonGroupProps.IconButton | ButtonGroupProps.MenuDropdown)[]) - The array of items that belong to this group.\n */\n items: ReadonlyArray<ButtonGroupProps.ItemOrGroup>;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n /**\n * Called when the user uploads files. The event detail object contains the id and files from the file input item.\n */\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails>;\n /**\n * An object containing CSS properties to customize the button group's visual appearance.\n * Refer to the [style](/components/button-group/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ButtonGroupProps.Style;\n}\n\nexport interface InternalIconButton extends ButtonGroupProps.IconButton {\n analyticsAction?: string;\n}\nexport interface InternalIconToggleButton extends ButtonGroupProps.IconToggleButton {\n analyticsAction?: string;\n}\n\nexport interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback'> {\n iconSvg?: string;\n}\nexport interface IconToggleButtonRuntime\n extends Omit<\n ButtonGroupProps.IconToggleButton,\n 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback'\n > {\n iconSvg?: string;\n pressedIconSvg?: string;\n}\nexport type ItemOrGroupRuntime = ItemRuntime | ButtonGroupProps.Group;\nexport type ItemRuntime =\n | IconButtonRuntime\n | IconToggleButtonRuntime\n | ButtonGroupProps.IconFileInput\n | ButtonGroupProps.MenuDropdown;\n\nexport type InternalItemOrGroup = InternalItem | ButtonGroupProps.Group;\nexport type InternalItem =\n | InternalIconButton\n | InternalIconToggleButton\n | ButtonGroupProps.IconFileInput\n | ButtonGroupProps.MenuDropdown;\n\nexport interface InternalButtonGroupProps\n extends SomeRequired<ButtonGroupProps, 'dropdownExpandToViewport'>,\n InternalBaseComponentProps {\n style?: ButtonGroupProps.Style;\n items: ReadonlyArray<InternalItemOrGroup>;\n}\n\nexport namespace ButtonGroupProps {\n export type Variant = 'icon';\n\n export type ItemOrGroup = Item | Group;\n export type Item = IconButton | IconToggleButton | IconFileInput | MenuDropdown;\n\n export interface IconButton {\n type: 'icon-button';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n }\n\n export interface IconToggleButton {\n type: 'icon-toggle-button';\n id: string;\n text: string;\n pressed: boolean;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n pressedIconName?: IconProps.Name;\n pressedIconUrl?: string;\n pressedIconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n pressedPopoverFeedback?: React.ReactNode;\n }\n\n export interface IconFileInput {\n type: 'icon-file-input';\n id: string;\n text: string;\n accept?: string;\n multiple?: boolean;\n }\n\n export interface MenuDropdown {\n type: 'menu-dropdown';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n }\n\n export interface Group {\n type: 'group';\n text: string;\n items: ReadonlyArray<ButtonGroupProps.Item>;\n }\n\n export interface ItemClickDetails {\n id: string;\n pressed?: boolean;\n checked?: boolean;\n }\n\n export interface FilesChangeDetails {\n id: string;\n files: File[];\n }\n\n export interface Ref {\n /**\n * Focuses button group item by id.\n */\n focus(itemId: string): void;\n }\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n paddingBlock?: string;\n paddingInline?: string;\n boxShadow?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n item?: {\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n boxShadow?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
@@ -26,6 +26,8 @@ export interface CheckboxProps extends BaseCheckboxProps {
26
26
  */
27
27
  ariaRequired?: boolean;
28
28
  /**
29
+ * An object containing CSS properties to customize the checkbox's visual appearance.
30
+ * Refer to the [style](/components/checkbox/?tabId=style) tab for more details.
29
31
  * @awsuiSystem core
30
32
  */
31
33
  style?: CheckboxProps.Style;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/checkbox/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAEjE;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC;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M,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,aAAa,CAAC,EAAE,MAAM,CAAC;gBACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,MAAM,CAAC,EAAE;gBACP,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,aAAa,CAAC,EAAE,MAAM,CAAC;gBACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,KAAK,CAAC,EAAE;gBACN,MAAM,CAAC,EAAE;oBACP,OAAO,CAAC,EAAE,MAAM,CAAC;oBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;oBAClB,aAAa,CAAC,EAAE,MAAM,CAAC;oBACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;iBACnB,CAAC;aACH,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;QACF,KAAK,CAAC,EAAE;YACN,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,aAAa,CAAC,EAAE,MAAM,CAAC;gBACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACH,CAAC;KACH;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/checkbox/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 { NonCancelableEventHandler } from '../internal/events';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\nimport { BaseCheckboxProps } from './base-checkbox';\n\nexport interface CheckboxProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the checkbox. A state change occurs when a user clicks on it.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /**\n * Specifies that the component is in an indeterminate state. The behavior of this property replicates\n * the behavior of [the respective property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes)\n * in the native control.\n */\n indeterminate?: boolean;\n\n /**\n * Called when the user changes the component state. The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<CheckboxProps.ChangeDetail>;\n\n /**\n * Specifies whether to add `aria-required` to the native control.\n */\n ariaRequired?: boolean;\n\n /**\n * @awsuiSystem core\n */\n style?: CheckboxProps.Style;\n\n /**\n * Attributes to add to the native `input` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeInputAttributes?: NativeAttributes<React.InputHTMLAttributes<HTMLInputElement>>;\n}\n\nexport namespace CheckboxProps {\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface ChangeDetail {\n checked: boolean;\n indeterminate: false;\n }\n\n export interface Style {\n input?: {\n fill?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n stroke?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n check?: {\n stroke?: {\n checked?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/checkbox/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 { NonCancelableEventHandler } from '../internal/events';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\nimport { BaseCheckboxProps } from './base-checkbox';\n\nexport interface CheckboxProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the checkbox. A state change occurs when a user clicks on it.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /**\n * Specifies that the component is in an indeterminate state. The behavior of this property replicates\n * the behavior of [the respective property](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes)\n * in the native control.\n */\n indeterminate?: boolean;\n\n /**\n * Called when the user changes the component state. The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<CheckboxProps.ChangeDetail>;\n\n /**\n * Specifies whether to add `aria-required` to the native control.\n */\n ariaRequired?: boolean;\n\n /**\n * An object containing CSS properties to customize the checkbox's visual appearance.\n * Refer to the [style](/components/checkbox/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: CheckboxProps.Style;\n\n /**\n * Attributes to add to the native `input` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeInputAttributes?: NativeAttributes<React.InputHTMLAttributes<HTMLInputElement>>;\n}\n\nexport namespace CheckboxProps {\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface ChangeDetail {\n checked: boolean;\n indeterminate: false;\n }\n\n export interface Style {\n input?: {\n fill?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n stroke?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n check?: {\n stroke?: {\n checked?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n indeterminate?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_k2y2q_15dhr_145",
5
- "checkbox-control": "awsui_checkbox-control_k2y2q_15dhr_178",
6
- "outline": "awsui_outline_k2y2q_15dhr_186"
4
+ "root": "awsui_root_k2y2q_1cyq7_145",
5
+ "checkbox-control": "awsui_checkbox-control_k2y2q_1cyq7_178",
6
+ "outline": "awsui_outline_k2y2q_1cyq7_186"
7
7
  };
8
8
 
@@ -142,7 +142,7 @@
142
142
  */
143
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
144
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
- .awsui_root_k2y2q_15dhr_145.awsui_root_k2y2q_15dhr_145:not(#\9) {
145
+ .awsui_root_k2y2q_1cyq7_145.awsui_root_k2y2q_1cyq7_145:not(#\9) {
146
146
  border-collapse: separate;
147
147
  border-spacing: 0;
148
148
  box-sizing: border-box;
@@ -175,7 +175,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
175
175
  display: flex;
176
176
  }
177
177
 
178
- .awsui_checkbox-control_k2y2q_15dhr_178:not(#\9) {
178
+ .awsui_checkbox-control_k2y2q_1cyq7_178:not(#\9) {
179
179
  margin-block-start: calc((var(--line-height-body-m-bedeoh, 22px) - var(--size-control-lkpwjy, 14px)) / 2);
180
180
  min-block-size: var(--size-control-lkpwjy, 14px);
181
181
  min-inline-size: var(--size-control-lkpwjy, 14px);
@@ -183,15 +183,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
183
183
  inline-size: var(--size-control-lkpwjy, 14px);
184
184
  }
185
185
 
186
- .awsui_outline_k2y2q_15dhr_186:not(#\9) {
187
- --awsui-style-focus-ring-box-shadow-4hh3rt: 0 0 0 var(--awsui-style-focus-ring-border-width-4hh3rt, 2px) var(--awsui-style-focus-ring-border-color-4hh3rt, var(--color-border-item-focused-r5f6xl, #0073bb));
186
+ .awsui_outline_k2y2q_1cyq7_186:not(#\9) {
187
+ --awsui-style-focus-ring-box-shadow-c5ek4l: 0 0 0 var(--awsui-style-focus-ring-border-width-c5ek4l, 2px) var(--awsui-style-focus-ring-border-color-c5ek4l, var(--color-border-item-focused-r5f6xl, #0073bb));
188
188
  position: relative;
189
189
  }
190
- .awsui_outline_k2y2q_15dhr_186:not(#\9) {
190
+ .awsui_outline_k2y2q_1cyq7_186:not(#\9) {
191
191
  outline: 2px dotted transparent;
192
192
  outline-offset: calc(2px - 1px);
193
193
  }
194
- .awsui_outline_k2y2q_15dhr_186:not(#\9)::before {
194
+ .awsui_outline_k2y2q_1cyq7_186:not(#\9)::before {
195
195
  content: " ";
196
196
  display: block;
197
197
  position: absolute;
@@ -199,9 +199,9 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
199
199
  inset-block-start: calc(-1 * 2px);
200
200
  inline-size: calc(100% + 2px + 2px);
201
201
  block-size: calc(100% + 2px + 2px);
202
- border-start-start-radius: var(--awsui-style-focus-ring-border-radius-4hh3rt, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
203
- border-start-end-radius: var(--awsui-style-focus-ring-border-radius-4hh3rt, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
204
- border-end-start-radius: var(--awsui-style-focus-ring-border-radius-4hh3rt, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
205
- border-end-end-radius: var(--awsui-style-focus-ring-border-radius-4hh3rt, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
206
- box-shadow: var(--awsui-style-focus-ring-box-shadow-4hh3rt);
202
+ border-start-start-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
203
+ border-start-end-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
204
+ border-end-start-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
205
+ border-end-end-radius: var(--awsui-style-focus-ring-border-radius-c5ek4l, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
206
+ box-shadow: var(--awsui-style-focus-ring-box-shadow-c5ek4l);
207
207
  }
@@ -2,8 +2,8 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_k2y2q_15dhr_145",
6
- "checkbox-control": "awsui_checkbox-control_k2y2q_15dhr_178",
7
- "outline": "awsui_outline_k2y2q_15dhr_186"
5
+ "root": "awsui_root_k2y2q_1cyq7_145",
6
+ "checkbox-control": "awsui_checkbox-control_k2y2q_1cyq7_178",
7
+ "outline": "awsui_outline_k2y2q_1cyq7_186"
8
8
  };
9
9
 
@@ -69,6 +69,8 @@ export interface ContainerProps extends BaseComponentProps {
69
69
  */
70
70
  variant?: 'default' | 'stacked';
71
71
  /**
72
+ * An object containing CSS properties to customize the container's visual appearance.
73
+ * Refer to the [style](/components/container/?tabId=style) tab for more details.
72
74
  * @awsuiSystem core
73
75
  */
74
76
  style?: ContainerProps.Style;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,cAAe,SAAQ,kBAAkB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@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n * @awsuiSystem core\n */\n style?: ContainerProps.Style;\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: string;\n };\n content?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n header?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n footer?: {\n root: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n divider: {\n borderColor?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n * An object containing CSS properties to customize the container's visual appearance.\n * Refer to the [style](/components/container/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ContainerProps.Style;\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: string;\n };\n content?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n header?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n footer?: {\n root: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n divider: {\n borderColor?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
@@ -1,19 +1,19 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "layout": "awsui_layout_5gtk3_vawnw_145",
5
- "background": "awsui_background_5gtk3_vawnw_159",
6
- "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_vawnw_164",
7
- "header-background": "awsui_header-background_5gtk3_vawnw_167",
8
- "notifications": "awsui_notifications_5gtk3_vawnw_171",
9
- "breadcrumbs": "awsui_breadcrumbs_5gtk3_vawnw_176",
10
- "default-padding": "awsui_default-padding_5gtk3_vawnw_181",
11
- "header-wrapper": "awsui_header-wrapper_5gtk3_vawnw_185",
12
- "with-divider": "awsui_with-divider_5gtk3_vawnw_190",
13
- "content": "awsui_content_5gtk3_vawnw_193",
14
- "has-header": "awsui_has-header_5gtk3_vawnw_197",
15
- "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_vawnw_204",
16
- "has-default-background": "awsui_has-default-background_5gtk3_vawnw_204",
17
- "has-notifications": "awsui_has-notifications_5gtk3_vawnw_208"
4
+ "layout": "awsui_layout_5gtk3_zgbcy_145",
5
+ "background": "awsui_background_5gtk3_zgbcy_159",
6
+ "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_zgbcy_164",
7
+ "header-background": "awsui_header-background_5gtk3_zgbcy_167",
8
+ "notifications": "awsui_notifications_5gtk3_zgbcy_171",
9
+ "breadcrumbs": "awsui_breadcrumbs_5gtk3_zgbcy_176",
10
+ "default-padding": "awsui_default-padding_5gtk3_zgbcy_181",
11
+ "header-wrapper": "awsui_header-wrapper_5gtk3_zgbcy_185",
12
+ "with-divider": "awsui_with-divider_5gtk3_zgbcy_190",
13
+ "content": "awsui_content_5gtk3_zgbcy_193",
14
+ "has-header": "awsui_has-header_5gtk3_zgbcy_197",
15
+ "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_zgbcy_204",
16
+ "has-default-background": "awsui_has-default-background_5gtk3_zgbcy_204",
17
+ "has-notifications": "awsui_has-notifications_5gtk3_zgbcy_208"
18
18
  };
19
19
 
@@ -142,72 +142,72 @@
142
142
  */
143
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
144
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
- .awsui_layout_5gtk3_vawnw_145:not(#\9) {
146
- --awsui-content-layout-default-horizontal-padding-4hh3rt: var(--space-layout-content-horizontal-q3zhej, 40px);
147
- --awsui-content-layout-max-content-width-4hh3rt: 0px;
148
- --awsui-content-layout-main-gap-4hh3rt: 0px;
145
+ .awsui_layout_5gtk3_zgbcy_145:not(#\9) {
146
+ --awsui-content-layout-default-horizontal-padding-c5ek4l: var(--space-layout-content-horizontal-q3zhej, 40px);
147
+ --awsui-content-layout-max-content-width-c5ek4l: 0px;
148
+ --awsui-content-layout-main-gap-c5ek4l: 0px;
149
149
  display: grid;
150
- grid-template-columns: 0 0 1fr minmax(0, var(--awsui-content-layout-max-content-width-4hh3rt)) 1fr 0 0;
151
- grid-template-rows: var(--awsui-content-layout-main-gap-4hh3rt) min-content min-content auto var(--space-dark-header-overlap-distance-45h6a9, 0px) 1fr;
150
+ grid-template-columns: 0 0 1fr minmax(0, var(--awsui-content-layout-max-content-width-c5ek4l)) 1fr 0 0;
151
+ grid-template-rows: var(--awsui-content-layout-main-gap-c5ek4l) min-content min-content auto var(--space-dark-header-overlap-distance-45h6a9, 0px) 1fr;
152
152
  min-block-size: 100%;
153
153
  }
154
154
  @media (max-width: 688px) {
155
- .awsui_layout_5gtk3_vawnw_145:not(#\9) {
156
- --awsui-content-layout-default-horizontal-padding-4hh3rt: var(--space-l-3cws6j, 20px);
155
+ .awsui_layout_5gtk3_zgbcy_145:not(#\9) {
156
+ --awsui-content-layout-default-horizontal-padding-c5ek4l: var(--space-l-3cws6j, 20px);
157
157
  }
158
158
  }
159
- .awsui_layout_5gtk3_vawnw_145 > .awsui_background_5gtk3_vawnw_159:not(#\9) {
159
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_background_5gtk3_zgbcy_159:not(#\9) {
160
160
  grid-column: 1/8;
161
161
  grid-row: 1/6;
162
162
  color: var(--color-text-body-default-5qid0u, #16191f);
163
163
  }
164
- .awsui_layout_5gtk3_vawnw_145 > .awsui_background_5gtk3_vawnw_159.awsui_is-overlap-disabled_5gtk3_vawnw_164:not(#\9) {
164
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_background_5gtk3_zgbcy_159.awsui_is-overlap-disabled_5gtk3_zgbcy_164:not(#\9) {
165
165
  grid-row: 1/5;
166
166
  }
167
- .awsui_layout_5gtk3_vawnw_145 > .awsui_background_5gtk3_vawnw_159 > .awsui_header-background_5gtk3_vawnw_167:not(#\9) {
167
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_background_5gtk3_zgbcy_159 > .awsui_header-background_5gtk3_zgbcy_167:not(#\9) {
168
168
  inline-size: 100%;
169
169
  block-size: 100%;
170
170
  }
171
- .awsui_layout_5gtk3_vawnw_145 > .awsui_notifications_5gtk3_vawnw_171:not(#\9) {
171
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_notifications_5gtk3_zgbcy_171:not(#\9) {
172
172
  grid-column: 4;
173
173
  grid-row: 2;
174
174
  padding-block-end: var(--space-xs-kw7k3v, 8px);
175
175
  }
176
- .awsui_layout_5gtk3_vawnw_145 > .awsui_breadcrumbs_5gtk3_vawnw_176:not(#\9) {
176
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_breadcrumbs_5gtk3_zgbcy_176:not(#\9) {
177
177
  grid-column: 4;
178
178
  grid-row: 3;
179
179
  padding-block-end: var(--space-xs-kw7k3v, 8px);
180
180
  }
181
- .awsui_layout_5gtk3_vawnw_145.awsui_default-padding_5gtk3_vawnw_181:not(#\9) {
182
- --awsui-content-layout-main-gap-4hh3rt: var(--space-scaled-m-sw9kcx, 16px);
183
- grid-template-columns: var(--awsui-toggles-left-width-4hh3rt, 0) var(--awsui-content-layout-default-horizontal-padding-4hh3rt, 0) 1fr minmax(0, var(--awsui-content-layout-max-content-width-4hh3rt)) 1fr var(--awsui-content-layout-default-horizontal-padding-4hh3rt, 0) var(--awsui-toggles-right-width-4hh3rt, 0);
181
+ .awsui_layout_5gtk3_zgbcy_145.awsui_default-padding_5gtk3_zgbcy_181:not(#\9) {
182
+ --awsui-content-layout-main-gap-c5ek4l: var(--space-scaled-m-sw9kcx, 16px);
183
+ grid-template-columns: var(--awsui-toggles-left-width-c5ek4l, 0) var(--awsui-content-layout-default-horizontal-padding-c5ek4l, 0) 1fr minmax(0, var(--awsui-content-layout-max-content-width-c5ek4l)) 1fr var(--awsui-content-layout-default-horizontal-padding-c5ek4l, 0) var(--awsui-toggles-right-width-c5ek4l, 0);
184
184
  }
185
- .awsui_layout_5gtk3_vawnw_145 > .awsui_header-wrapper_5gtk3_vawnw_185:not(#\9) {
185
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_header-wrapper_5gtk3_zgbcy_185:not(#\9) {
186
186
  grid-column: 4;
187
187
  grid-row: 4;
188
188
  padding-block-end: var(--space-content-header-padding-bottom-hjkugf, 16px);
189
189
  }
190
- .awsui_layout_5gtk3_vawnw_145 > .awsui_header-wrapper_5gtk3_vawnw_185.awsui_with-divider_5gtk3_vawnw_190:not(#\9) {
190
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_header-wrapper_5gtk3_zgbcy_185.awsui_with-divider_5gtk3_zgbcy_190:not(#\9) {
191
191
  border-block-end: 1px solid var(--color-border-divider-default-ipvpev, #eaeded);
192
192
  }
193
- .awsui_layout_5gtk3_vawnw_145 > .awsui_content_5gtk3_vawnw_193:not(#\9) {
193
+ .awsui_layout_5gtk3_zgbcy_145 > .awsui_content_5gtk3_zgbcy_193:not(#\9) {
194
194
  grid-column: 4;
195
195
  grid-row: 5/8;
196
196
  }
197
- .awsui_layout_5gtk3_vawnw_145:not(#\9):not(.awsui_has-header_5gtk3_vawnw_197) {
198
- grid-template-rows: var(--awsui-content-layout-main-gap-4hh3rt) min-content min-content 0 calc(var(--space-dark-header-overlap-distance-45h6a9, 0px)) 1fr;
197
+ .awsui_layout_5gtk3_zgbcy_145:not(#\9):not(.awsui_has-header_5gtk3_zgbcy_197) {
198
+ grid-template-rows: var(--awsui-content-layout-main-gap-c5ek4l) min-content min-content 0 calc(var(--space-dark-header-overlap-distance-45h6a9, 0px)) 1fr;
199
199
  }
200
- .awsui_layout_5gtk3_vawnw_145.awsui_is-overlap-disabled_5gtk3_vawnw_164:not(#\9) {
201
- grid-template-rows: var(--awsui-content-layout-main-gap-4hh3rt) min-content min-content auto 0 1fr;
200
+ .awsui_layout_5gtk3_zgbcy_145.awsui_is-overlap-disabled_5gtk3_zgbcy_164:not(#\9) {
201
+ grid-template-rows: var(--awsui-content-layout-main-gap-c5ek4l) min-content min-content auto 0 1fr;
202
202
  }
203
203
 
204
- .awsui_layout_5gtk3_vawnw_145.awsui_is-visual-refresh_5gtk3_vawnw_204 > .awsui_background_5gtk3_vawnw_159.awsui_has-default-background_5gtk3_vawnw_204:not(#\9) {
204
+ .awsui_layout_5gtk3_zgbcy_145.awsui_is-visual-refresh_5gtk3_zgbcy_204 > .awsui_background_5gtk3_zgbcy_159.awsui_has-default-background_5gtk3_zgbcy_204:not(#\9) {
205
205
  background-color: var(--color-background-layout-main-05m5y6, #f2f3f3);
206
206
  }
207
207
 
208
- .awsui_layout_5gtk3_vawnw_145:not(#\9):not(.awsui_is-visual-refresh_5gtk3_vawnw_204).awsui_has-notifications_5gtk3_vawnw_208 {
209
- --awsui-content-layout-main-gap-4hh3rt: 0px;
208
+ .awsui_layout_5gtk3_zgbcy_145:not(#\9):not(.awsui_is-visual-refresh_5gtk3_zgbcy_204).awsui_has-notifications_5gtk3_zgbcy_208 {
209
+ --awsui-content-layout-main-gap-c5ek4l: 0px;
210
210
  }
211
- .awsui_layout_5gtk3_vawnw_145:not(#\9):not(.awsui_is-visual-refresh_5gtk3_vawnw_204) > .awsui_notifications_5gtk3_vawnw_171 {
211
+ .awsui_layout_5gtk3_zgbcy_145:not(#\9):not(.awsui_is-visual-refresh_5gtk3_zgbcy_204) > .awsui_notifications_5gtk3_zgbcy_171 {
212
212
  grid-column: 1/8;
213
213
  }
@@ -2,19 +2,19 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "layout": "awsui_layout_5gtk3_vawnw_145",
6
- "background": "awsui_background_5gtk3_vawnw_159",
7
- "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_vawnw_164",
8
- "header-background": "awsui_header-background_5gtk3_vawnw_167",
9
- "notifications": "awsui_notifications_5gtk3_vawnw_171",
10
- "breadcrumbs": "awsui_breadcrumbs_5gtk3_vawnw_176",
11
- "default-padding": "awsui_default-padding_5gtk3_vawnw_181",
12
- "header-wrapper": "awsui_header-wrapper_5gtk3_vawnw_185",
13
- "with-divider": "awsui_with-divider_5gtk3_vawnw_190",
14
- "content": "awsui_content_5gtk3_vawnw_193",
15
- "has-header": "awsui_has-header_5gtk3_vawnw_197",
16
- "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_vawnw_204",
17
- "has-default-background": "awsui_has-default-background_5gtk3_vawnw_204",
18
- "has-notifications": "awsui_has-notifications_5gtk3_vawnw_208"
5
+ "layout": "awsui_layout_5gtk3_zgbcy_145",
6
+ "background": "awsui_background_5gtk3_zgbcy_159",
7
+ "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_zgbcy_164",
8
+ "header-background": "awsui_header-background_5gtk3_zgbcy_167",
9
+ "notifications": "awsui_notifications_5gtk3_zgbcy_171",
10
+ "breadcrumbs": "awsui_breadcrumbs_5gtk3_zgbcy_176",
11
+ "default-padding": "awsui_default-padding_5gtk3_zgbcy_181",
12
+ "header-wrapper": "awsui_header-wrapper_5gtk3_zgbcy_185",
13
+ "with-divider": "awsui_with-divider_5gtk3_zgbcy_190",
14
+ "content": "awsui_content_5gtk3_zgbcy_193",
15
+ "has-header": "awsui_has-header_5gtk3_zgbcy_197",
16
+ "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_zgbcy_204",
17
+ "has-default-background": "awsui_has-default-background_5gtk3_zgbcy_204",
18
+ "has-notifications": "awsui_has-notifications_5gtk3_zgbcy_208"
19
19
  };
20
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-picker/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA6C,MAAM,OAAO,CAAC;AA0BlE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,QAAA,MAAM,UAAU,6FAsMf,CAAC;AAGF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-picker/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA6C,MAAM,OAAO,CAAC;AA0BlE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,QAAA,MAAM,UAAU,6FAuMf,CAAC;AAGF,eAAe,UAAU,CAAC"}
@@ -82,7 +82,7 @@ const DatePicker = React.forwardRef(({ locale, startOfWeek, isDateEnabled, dateD
82
82
  React.createElement("div", null,
83
83
  React.createElement(InternalButton, { iconName: "calendar", className: styles['open-calendar-button'], onClick: onButtonClickHandler, ref: buttonRef, ariaLabel: buttonAriaLabel, disabled: disabled || readOnly, formAction: "none" }))));
84
84
  baseProps.className = clsx(baseProps.className, styles.root, styles['date-picker-container']);
85
- return (React.createElement("div", { ...baseProps, ref: mergedRef, onKeyDown: !disabled && !readOnly ? onWrapperKeyDownHandler : undefined }, disabled || readOnly ? (trigger) : (React.createElement(Dropdown, { stretchWidth: true, stretchHeight: true, open: isDropDownOpen, onDropdownClose: onDropdownCloseHandler, trigger: trigger, expandToViewport: expandToViewport, scrollable: false, dropdownId: dropdownId, content: isDropDownOpen ? (React.createElement(FocusLock, { className: styles['focus-lock'], autoFocus: true },
85
+ return (React.createElement("div", { ...baseProps, ref: mergedRef, onKeyDown: !disabled && !readOnly ? onWrapperKeyDownHandler : undefined }, disabled || readOnly ? (trigger) : (React.createElement(Dropdown, { minWidth: "trigger", maxWidth: "trigger", stretchHeight: true, open: isDropDownOpen, onDropdownClose: onDropdownCloseHandler, trigger: trigger, expandToViewport: expandToViewport, scrollable: false, dropdownId: dropdownId, content: isDropDownOpen ? (React.createElement(FocusLock, { className: styles['focus-lock'], autoFocus: true },
86
86
  React.createElement("div", { tabIndex: 0, className: styles.calendar, role: "dialog" },
87
87
  React.createElement(InternalCalendar, { value: value, onChange: e => {
88
88
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/date-picker/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,EAAO,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAG1F,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,OA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,WAAW,CAAE,kBAAkB,mCAAI,kBAAkB;wBACzE,sBAAsB,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,sBAAsB,mCAAI,sBAAsB;qBACtF,GACD;gBACF,oBAAC,kBAAkB,IAAC,EAAE,EAAE,qBAAqB,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,IACxE,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CACzD,CACjB,CACI,CACb,CAAC,CAAC,CAAC,SAAS,GAEf,CACH,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAC3C,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React, { Ref, useCallback, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalCalendar from '../calendar/internal';\nimport { useFormFieldContext } from '../contexts/form-field.js';\nimport InternalDateInput from '../date-input/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { useLocale } from '../i18n/context.js';\nimport { InputProps } from '../input/interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport Dropdown from '../internal/components/dropdown';\nimport FocusLock from '../internal/components/focus-lock';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useFocusTracker } from '../internal/hooks/use-focus-tracker.js';\nimport { KeyCode } from '../internal/keycode';\nimport { applyDisplayName } from '../internal/utils/apply-display-name.js';\nimport { parseDate } from '../internal/utils/date-time';\nimport { normalizeLocale } from '../internal/utils/locale';\nimport InternalLiveRegion from '../live-region/internal';\nimport { DatePickerProps } from './interfaces';\nimport { getBaseDateLabel, getSelectedDateLabel, isValidFullDate } from './utils';\n\nimport styles from './styles.css.js';\n\nexport { DatePickerProps };\n\nconst DatePicker = React.forwardRef(\n (\n {\n locale,\n startOfWeek,\n isDateEnabled,\n dateDisabledReason,\n nextMonthAriaLabel,\n previousMonthAriaLabel,\n todayAriaLabel,\n i18nStrings,\n placeholder = '',\n value = '',\n readOnly = false,\n disabled = false,\n onBlur,\n autoFocus = false,\n onChange,\n onFocus,\n name,\n ariaLabel,\n ariaRequired,\n controlId,\n invalid,\n warning,\n openCalendarAriaLabel,\n expandToViewport,\n granularity = 'day',\n format = 'slashed',\n inputFormat = 'slashed',\n ...restProps\n }: DatePickerProps,\n ref: Ref<DatePickerProps.Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent('DatePicker', {\n props: { autoFocus, expandToViewport, granularity, readOnly },\n metadata: { hasDisabledReasons: Boolean(dateDisabledReason) },\n });\n checkControlled('DatePicker', 'value', value, 'onChange', onChange);\n\n const i18n = useInternalI18n('date-picker');\n const contextLocale = useLocale();\n const normalizedLocale = normalizeLocale('DatePicker', locale || contextLocale);\n\n const baseProps = getBaseProps(restProps);\n const [isDropDownOpen, setIsDropDownOpen] = useState<boolean>(false);\n const { ariaLabelledby, ariaDescribedby } = useFormFieldContext(restProps);\n\n const internalInputRef = useRef<HTMLInputElement>(null);\n const buttonRef = useRef<ButtonProps.Ref>(null);\n useForwardFocus(ref, internalInputRef);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const dropdownId = useUniqueId('calender');\n const calendarDescriptionId = useUniqueId('calendar-description-');\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n useFocusTracker({ rootRef, onBlur, onFocus });\n\n const onDropdownCloseHandler = useCallback(() => setIsDropDownOpen(false), [setIsDropDownOpen]);\n\n const onButtonClickHandler = () => {\n if (!isDropDownOpen) {\n setIsDropDownOpen(true);\n }\n };\n\n const onWrapperKeyDownHandler = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.keyCode === KeyCode.escape && isDropDownOpen) {\n event.stopPropagation();\n buttonRef.current?.focus();\n setIsDropDownOpen(false);\n }\n };\n\n const onInputChangeHandler: InputProps['onChange'] = event => {\n fireNonCancelableEvent(onChange, { value: event.detail.value });\n };\n\n const onInputBlurHandler: InputProps['onBlur'] = () => {\n if (!isDropDownOpen) {\n setIsDropDownOpen(false);\n }\n };\n\n // Set displayed date to value if defined or to current date otherwise.\n const parsedValue = value && value.length >= 4 ? parseDate(value) : null;\n const baseDate = parsedValue || new Date();\n\n const hasFullValue = isValidFullDate({ date: value, granularity });\n\n const defaultOpenCalendarAriaLabel = i18n(\n 'i18nStrings.openCalendarAriaLabel',\n i18nStrings?.openCalendarAriaLabel ?? openCalendarAriaLabel,\n format => (selectedDate: string | null) => format({ selectedDate: selectedDate ?? 'none' })\n );\n\n const buttonAriaLabel = defaultOpenCalendarAriaLabel?.(\n hasFullValue && parsedValue\n ? getSelectedDateLabel({ date: parsedValue, granularity, locale: normalizedLocale })\n : null\n );\n\n const trigger = (\n <div className={styles['date-picker-trigger']}>\n <div className={styles['date-picker-input']}>\n <InternalDateInput\n name={name}\n invalid={invalid}\n warning={warning}\n controlId={controlId}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={ariaDescribedby}\n ariaLabel={ariaLabel}\n ariaRequired={ariaRequired}\n value={value}\n disabled={disabled}\n readOnly={readOnly}\n onChange={onInputChangeHandler}\n onBlur={onInputBlurHandler}\n placeholder={placeholder}\n ref={internalInputRef}\n autoFocus={autoFocus}\n onFocus={onDropdownCloseHandler}\n granularity={granularity}\n locale={locale}\n format={format}\n inputFormat={inputFormat}\n />\n </div>\n <div>\n <InternalButton\n iconName=\"calendar\"\n className={styles['open-calendar-button']}\n onClick={onButtonClickHandler}\n ref={buttonRef}\n ariaLabel={buttonAriaLabel}\n disabled={disabled || readOnly}\n formAction=\"none\"\n />\n </div>\n </div>\n );\n\n baseProps.className = clsx(baseProps.className, styles.root, styles['date-picker-container']);\n\n return (\n <div {...baseProps} ref={mergedRef} onKeyDown={!disabled && !readOnly ? onWrapperKeyDownHandler : undefined}>\n {disabled || readOnly ? (\n trigger\n ) : (\n <Dropdown\n stretchWidth={true}\n stretchHeight={true}\n open={isDropDownOpen}\n onDropdownClose={onDropdownCloseHandler}\n trigger={trigger}\n expandToViewport={expandToViewport}\n scrollable={false}\n dropdownId={dropdownId}\n content={\n isDropDownOpen ? (\n <FocusLock className={styles['focus-lock']} autoFocus={true}>\n <div tabIndex={0} className={styles.calendar} role=\"dialog\">\n <InternalCalendar\n value={value}\n onChange={e => {\n fireNonCancelableEvent(onChange, e.detail);\n buttonRef?.current?.focus();\n setIsDropDownOpen(false);\n }}\n locale={normalizedLocale}\n startOfWeek={startOfWeek}\n ariaDescribedby={calendarDescriptionId}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n granularity={granularity}\n isDateEnabled={isDateEnabled}\n dateDisabledReason={dateDisabledReason}\n i18nStrings={{\n ...i18nStrings,\n todayAriaLabel: i18nStrings?.todayAriaLabel ?? todayAriaLabel,\n nextMonthAriaLabel: i18nStrings?.nextMonthAriaLabel ?? nextMonthAriaLabel,\n previousMonthAriaLabel: i18nStrings?.previousMonthAriaLabel ?? previousMonthAriaLabel,\n }}\n />\n <InternalLiveRegion id={calendarDescriptionId} hidden={true} tagName=\"span\">\n {getBaseDateLabel({ date: baseDate, granularity, locale: normalizedLocale })}\n </InternalLiveRegion>\n </div>\n </FocusLock>\n ) : undefined\n }\n />\n )}\n </div>\n );\n }\n);\n\napplyDisplayName(DatePicker, 'DatePicker');\nexport default DatePicker;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/date-picker/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,EAAO,WA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G,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAC3C,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React, { Ref, useCallback, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalCalendar from '../calendar/internal';\nimport { useFormFieldContext } from '../contexts/form-field.js';\nimport InternalDateInput from '../date-input/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { useLocale } from '../i18n/context.js';\nimport { InputProps } from '../input/interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport Dropdown from '../internal/components/dropdown';\nimport FocusLock from '../internal/components/focus-lock';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useFocusTracker } from '../internal/hooks/use-focus-tracker.js';\nimport { KeyCode } from '../internal/keycode';\nimport { applyDisplayName } from '../internal/utils/apply-display-name.js';\nimport { parseDate } from '../internal/utils/date-time';\nimport { normalizeLocale } from '../internal/utils/locale';\nimport InternalLiveRegion from '../live-region/internal';\nimport { DatePickerProps } from './interfaces';\nimport { getBaseDateLabel, getSelectedDateLabel, isValidFullDate } from './utils';\n\nimport styles from './styles.css.js';\n\nexport { DatePickerProps };\n\nconst DatePicker = React.forwardRef(\n (\n {\n locale,\n startOfWeek,\n isDateEnabled,\n dateDisabledReason,\n nextMonthAriaLabel,\n previousMonthAriaLabel,\n todayAriaLabel,\n i18nStrings,\n placeholder = '',\n value = '',\n readOnly = false,\n disabled = false,\n onBlur,\n autoFocus = false,\n onChange,\n onFocus,\n name,\n ariaLabel,\n ariaRequired,\n controlId,\n invalid,\n warning,\n openCalendarAriaLabel,\n expandToViewport,\n granularity = 'day',\n format = 'slashed',\n inputFormat = 'slashed',\n ...restProps\n }: DatePickerProps,\n ref: Ref<DatePickerProps.Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent('DatePicker', {\n props: { autoFocus, expandToViewport, granularity, readOnly },\n metadata: { hasDisabledReasons: Boolean(dateDisabledReason) },\n });\n checkControlled('DatePicker', 'value', value, 'onChange', onChange);\n\n const i18n = useInternalI18n('date-picker');\n const contextLocale = useLocale();\n const normalizedLocale = normalizeLocale('DatePicker', locale || contextLocale);\n\n const baseProps = getBaseProps(restProps);\n const [isDropDownOpen, setIsDropDownOpen] = useState<boolean>(false);\n const { ariaLabelledby, ariaDescribedby } = useFormFieldContext(restProps);\n\n const internalInputRef = useRef<HTMLInputElement>(null);\n const buttonRef = useRef<ButtonProps.Ref>(null);\n useForwardFocus(ref, internalInputRef);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const dropdownId = useUniqueId('calender');\n const calendarDescriptionId = useUniqueId('calendar-description-');\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n useFocusTracker({ rootRef, onBlur, onFocus });\n\n const onDropdownCloseHandler = useCallback(() => setIsDropDownOpen(false), [setIsDropDownOpen]);\n\n const onButtonClickHandler = () => {\n if (!isDropDownOpen) {\n setIsDropDownOpen(true);\n }\n };\n\n const onWrapperKeyDownHandler = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.keyCode === KeyCode.escape && isDropDownOpen) {\n event.stopPropagation();\n buttonRef.current?.focus();\n setIsDropDownOpen(false);\n }\n };\n\n const onInputChangeHandler: InputProps['onChange'] = event => {\n fireNonCancelableEvent(onChange, { value: event.detail.value });\n };\n\n const onInputBlurHandler: InputProps['onBlur'] = () => {\n if (!isDropDownOpen) {\n setIsDropDownOpen(false);\n }\n };\n\n // Set displayed date to value if defined or to current date otherwise.\n const parsedValue = value && value.length >= 4 ? parseDate(value) : null;\n const baseDate = parsedValue || new Date();\n\n const hasFullValue = isValidFullDate({ date: value, granularity });\n\n const defaultOpenCalendarAriaLabel = i18n(\n 'i18nStrings.openCalendarAriaLabel',\n i18nStrings?.openCalendarAriaLabel ?? openCalendarAriaLabel,\n format => (selectedDate: string | null) => format({ selectedDate: selectedDate ?? 'none' })\n );\n\n const buttonAriaLabel = defaultOpenCalendarAriaLabel?.(\n hasFullValue && parsedValue\n ? getSelectedDateLabel({ date: parsedValue, granularity, locale: normalizedLocale })\n : null\n );\n\n const trigger = (\n <div className={styles['date-picker-trigger']}>\n <div className={styles['date-picker-input']}>\n <InternalDateInput\n name={name}\n invalid={invalid}\n warning={warning}\n controlId={controlId}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={ariaDescribedby}\n ariaLabel={ariaLabel}\n ariaRequired={ariaRequired}\n value={value}\n disabled={disabled}\n readOnly={readOnly}\n onChange={onInputChangeHandler}\n onBlur={onInputBlurHandler}\n placeholder={placeholder}\n ref={internalInputRef}\n autoFocus={autoFocus}\n onFocus={onDropdownCloseHandler}\n granularity={granularity}\n locale={locale}\n format={format}\n inputFormat={inputFormat}\n />\n </div>\n <div>\n <InternalButton\n iconName=\"calendar\"\n className={styles['open-calendar-button']}\n onClick={onButtonClickHandler}\n ref={buttonRef}\n ariaLabel={buttonAriaLabel}\n disabled={disabled || readOnly}\n formAction=\"none\"\n />\n </div>\n </div>\n );\n\n baseProps.className = clsx(baseProps.className, styles.root, styles['date-picker-container']);\n\n return (\n <div {...baseProps} ref={mergedRef} onKeyDown={!disabled && !readOnly ? onWrapperKeyDownHandler : undefined}>\n {disabled || readOnly ? (\n trigger\n ) : (\n <Dropdown\n minWidth=\"trigger\"\n maxWidth=\"trigger\"\n stretchHeight={true}\n open={isDropDownOpen}\n onDropdownClose={onDropdownCloseHandler}\n trigger={trigger}\n expandToViewport={expandToViewport}\n scrollable={false}\n dropdownId={dropdownId}\n content={\n isDropDownOpen ? (\n <FocusLock className={styles['focus-lock']} autoFocus={true}>\n <div tabIndex={0} className={styles.calendar} role=\"dialog\">\n <InternalCalendar\n value={value}\n onChange={e => {\n fireNonCancelableEvent(onChange, e.detail);\n buttonRef?.current?.focus();\n setIsDropDownOpen(false);\n }}\n locale={normalizedLocale}\n startOfWeek={startOfWeek}\n ariaDescribedby={calendarDescriptionId}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n granularity={granularity}\n isDateEnabled={isDateEnabled}\n dateDisabledReason={dateDisabledReason}\n i18nStrings={{\n ...i18nStrings,\n todayAriaLabel: i18nStrings?.todayAriaLabel ?? todayAriaLabel,\n nextMonthAriaLabel: i18nStrings?.nextMonthAriaLabel ?? nextMonthAriaLabel,\n previousMonthAriaLabel: i18nStrings?.previousMonthAriaLabel ?? previousMonthAriaLabel,\n }}\n />\n <InternalLiveRegion id={calendarDescriptionId} hidden={true} tagName=\"span\">\n {getBaseDateLabel({ date: baseDate, granularity, locale: normalizedLocale })}\n </InternalLiveRegion>\n </div>\n </FocusLock>\n ) : undefined\n }\n />\n )}\n </div>\n );\n }\n);\n\napplyDisplayName(DatePicker, 'DatePicker');\nexport default DatePicker;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-range-picker/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA0BhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAOpD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAmDhC,QAAA,MAAM,eAAe,uGAkRpB,CAAC;AAGF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-range-picker/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA0BhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAOpD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAmDhC,QAAA,MAAM,eAAe,uGAgRpB,CAAC;AAGF,eAAe,eAAe,CAAC"}
@@ -179,7 +179,7 @@ const DateRangePicker = React.forwardRef(({ locale = '', startOfWeek, isDateEnab
179
179
  React.createElement("span", { id: triggerContentId }, formattedDate))));
180
180
  const mergedRef = useMergeRefs(rootRef, __internalRootRef);
181
181
  return (React.createElement("div", { ...baseProps, ref: mergedRef, className: clsx(baseProps.className, styles.root, testutilStyles.root, absoluteFormat === 'long-localized' && !dateOnly && !isMonthOnly && styles.wide), onKeyDown: onWrapperKeyDownHandler },
182
- React.createElement(Dropdown, { stretchWidth: true, stretchHeight: true, open: isDropDownOpen, onDropdownClose: () => closeDropdown(), trigger: trigger, stretchToTriggerWidth: false, expandToViewport: expandToViewport, dropdownId: dropdownId, content:
182
+ React.createElement(Dropdown, { stretchHeight: true, open: isDropDownOpen, onDropdownClose: () => closeDropdown(), trigger: trigger, expandToViewport: expandToViewport, dropdownId: dropdownId, content:
183
183
  /* Reset form field context to prevent a wrapper form field from labelling all inputs inside the dropdown. */
184
184
  React.createElement(ResetContextsForModal, null, isDropDownOpen && (React.createElement(DateRangePickerDropdown, { startOfWeek: startOfWeek, locale: normalizedLocale, isSingleGrid: isSingleGrid, onDropdownClose: () => closeDropdown(true), value: value, showClearButton: showClearButton, isDateEnabled: isDateEnabled, dateDisabledReason: dateDisabledReason, i18nStrings: i18nStrings, onClear: onClear, onApply: onApply, getTimeOffset: getTimeOffset, timeOffset: timeOffset, relativeOptions: relativeOptions, isValidRange: isValidRange, dateOnly: dateOnly, absoluteFormat: absoluteFormat, timeInputFormat: timeInputFormat, dateInputFormat: dateInputFormat, rangeSelectorMode: rangeSelectorMode, ariaLabelledby: ariaLabelledby, ariaDescribedby: ariaDescribedby, customAbsoluteRangeControl: customAbsoluteRangeControl, customRelativeRangeUnits: customRelativeRangeUnits, renderRelativeRangeContent: renderRelativeRangeContent, granularity: granularity }))) })));
185
185
  });