@cloudscape-design/components-themeable 3.0.988 → 3.0.990

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 (207) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +1 -0
  3. package/lib/internal/scss/internal/components/drag-handle-wrapper/motion.scss +2 -2
  4. package/lib/internal/template/alert/internal.d.ts.map +1 -1
  5. package/lib/internal/template/alert/internal.js +1 -1
  6. package/lib/internal/template/alert/internal.js.map +1 -1
  7. package/lib/internal/template/app-layout/index.d.ts.map +1 -1
  8. package/lib/internal/template/app-layout/index.js +1 -2
  9. package/lib/internal/template/app-layout/index.js.map +1 -1
  10. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +17 -17
  11. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +36 -35
  12. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +17 -17
  13. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  14. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +1 -2
  15. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  18. package/lib/internal/template/app-layout-toolbar/index.d.ts.map +1 -1
  19. package/lib/internal/template/app-layout-toolbar/index.js +1 -2
  20. package/lib/internal/template/app-layout-toolbar/index.js.map +1 -1
  21. package/lib/internal/template/area-chart/chart-container.d.ts.map +1 -1
  22. package/lib/internal/template/area-chart/chart-container.js +1 -1
  23. package/lib/internal/template/area-chart/chart-container.js.map +1 -1
  24. package/lib/internal/template/area-chart/internal.d.ts.map +1 -1
  25. package/lib/internal/template/area-chart/internal.js +1 -2
  26. package/lib/internal/template/area-chart/internal.js.map +1 -1
  27. package/lib/internal/template/attribute-editor/internal.d.ts.map +1 -1
  28. package/lib/internal/template/attribute-editor/internal.js +1 -1
  29. package/lib/internal/template/attribute-editor/internal.js.map +1 -1
  30. package/lib/internal/template/breadcrumb-group/implementation.d.ts.map +1 -1
  31. package/lib/internal/template/breadcrumb-group/implementation.js +1 -2
  32. package/lib/internal/template/breadcrumb-group/implementation.js.map +1 -1
  33. package/lib/internal/template/button/internal.d.ts.map +1 -1
  34. package/lib/internal/template/button/internal.js +1 -2
  35. package/lib/internal/template/button/internal.js.map +1 -1
  36. package/lib/internal/template/button-group/internal.d.ts.map +1 -1
  37. package/lib/internal/template/button-group/internal.js +1 -2
  38. package/lib/internal/template/button-group/internal.js.map +1 -1
  39. package/lib/internal/template/calendar/grid/index.d.ts.map +1 -1
  40. package/lib/internal/template/calendar/grid/index.js +1 -1
  41. package/lib/internal/template/calendar/grid/index.js.map +1 -1
  42. package/lib/internal/template/cards/index.js +1 -1
  43. package/lib/internal/template/cards/index.js.map +1 -1
  44. package/lib/internal/template/code-editor/index.d.ts.map +1 -1
  45. package/lib/internal/template/code-editor/index.js +1 -2
  46. package/lib/internal/template/code-editor/index.js.map +1 -1
  47. package/lib/internal/template/container/internal.d.ts.map +1 -1
  48. package/lib/internal/template/container/internal.js +1 -1
  49. package/lib/internal/template/container/internal.js.map +1 -1
  50. package/lib/internal/template/content-layout/internal.d.ts.map +1 -1
  51. package/lib/internal/template/content-layout/internal.js +1 -2
  52. package/lib/internal/template/content-layout/internal.js.map +1 -1
  53. package/lib/internal/template/date-picker/index.d.ts.map +1 -1
  54. package/lib/internal/template/date-picker/index.js +1 -1
  55. package/lib/internal/template/date-picker/index.js.map +1 -1
  56. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.d.ts.map +1 -1
  57. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.js +1 -1
  58. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
  59. package/lib/internal/template/date-range-picker/index.d.ts.map +1 -1
  60. package/lib/internal/template/date-range-picker/index.js +1 -2
  61. package/lib/internal/template/date-range-picker/index.js.map +1 -1
  62. package/lib/internal/template/file-input/internal.d.ts.map +1 -1
  63. package/lib/internal/template/file-input/internal.js +1 -2
  64. package/lib/internal/template/file-input/internal.js.map +1 -1
  65. package/lib/internal/template/file-token-group/internal.d.ts.map +1 -1
  66. package/lib/internal/template/file-token-group/internal.js +1 -1
  67. package/lib/internal/template/file-token-group/internal.js.map +1 -1
  68. package/lib/internal/template/file-upload/internal.d.ts.map +1 -1
  69. package/lib/internal/template/file-upload/internal.js +1 -2
  70. package/lib/internal/template/file-upload/internal.js.map +1 -1
  71. package/lib/internal/template/flashbar/common.d.ts.map +1 -1
  72. package/lib/internal/template/flashbar/common.js +1 -2
  73. package/lib/internal/template/flashbar/common.js.map +1 -1
  74. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  75. package/lib/internal/template/flashbar/flash.js +1 -2
  76. package/lib/internal/template/flashbar/flash.js.map +1 -1
  77. package/lib/internal/template/grid/internal.d.ts.map +1 -1
  78. package/lib/internal/template/grid/internal.js +1 -2
  79. package/lib/internal/template/grid/internal.js.map +1 -1
  80. package/lib/internal/template/icon/internal.d.ts.map +1 -1
  81. package/lib/internal/template/icon/internal.js +1 -2
  82. package/lib/internal/template/icon/internal.js.map +1 -1
  83. package/lib/internal/template/input/internal.d.ts.map +1 -1
  84. package/lib/internal/template/input/internal.js +1 -1
  85. package/lib/internal/template/input/internal.js.map +1 -1
  86. package/lib/internal/template/internal/components/chart-popover/index.d.ts.map +1 -1
  87. package/lib/internal/template/internal/components/chart-popover/index.js +1 -1
  88. package/lib/internal/template/internal/components/chart-popover/index.js.map +1 -1
  89. package/lib/internal/template/internal/components/chart-series-details/index.d.ts.map +1 -1
  90. package/lib/internal/template/internal/components/chart-series-details/index.js +1 -1
  91. package/lib/internal/template/internal/components/chart-series-details/index.js.map +1 -1
  92. package/lib/internal/template/internal/components/drag-handle/button.d.ts.map +1 -1
  93. package/lib/internal/template/internal/components/drag-handle/button.js +1 -1
  94. package/lib/internal/template/internal/components/drag-handle/button.js.map +1 -1
  95. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +21 -21
  96. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +36 -36
  97. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +21 -21
  98. package/lib/internal/template/internal/components/dropdown/index.d.ts.map +1 -1
  99. package/lib/internal/template/internal/components/dropdown/index.js +1 -2
  100. package/lib/internal/template/internal/components/dropdown/index.js.map +1 -1
  101. package/lib/internal/template/internal/components/focus-lock/index.d.ts.map +1 -1
  102. package/lib/internal/template/internal/components/focus-lock/index.js +1 -1
  103. package/lib/internal/template/internal/components/focus-lock/index.js.map +1 -1
  104. package/lib/internal/template/internal/components/masked-input/index.d.ts.map +1 -1
  105. package/lib/internal/template/internal/components/masked-input/index.js +1 -1
  106. package/lib/internal/template/internal/components/masked-input/index.js.map +1 -1
  107. package/lib/internal/template/internal/components/options-list/index.d.ts.map +1 -1
  108. package/lib/internal/template/internal/components/options-list/index.js +1 -2
  109. package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
  110. package/lib/internal/template/internal/environment.js +1 -1
  111. package/lib/internal/template/internal/environment.json +1 -1
  112. package/lib/internal/template/link/internal.d.ts.map +1 -1
  113. package/lib/internal/template/link/internal.js +1 -1
  114. package/lib/internal/template/link/internal.js.map +1 -1
  115. package/lib/internal/template/live-region/internal.d.ts.map +1 -1
  116. package/lib/internal/template/live-region/internal.js +1 -1
  117. package/lib/internal/template/live-region/internal.js.map +1 -1
  118. package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  119. package/lib/internal/template/mixed-line-bar-chart/chart-container.js +1 -2
  120. package/lib/internal/template/mixed-line-bar-chart/chart-container.js.map +1 -1
  121. package/lib/internal/template/mixed-line-bar-chart/internal.d.ts.map +1 -1
  122. package/lib/internal/template/mixed-line-bar-chart/internal.js +1 -2
  123. package/lib/internal/template/mixed-line-bar-chart/internal.js.map +1 -1
  124. package/lib/internal/template/modal/internal.d.ts.map +1 -1
  125. package/lib/internal/template/modal/internal.js +1 -2
  126. package/lib/internal/template/modal/internal.js.map +1 -1
  127. package/lib/internal/template/pie-chart/index.d.ts.map +1 -1
  128. package/lib/internal/template/pie-chart/index.js +1 -1
  129. package/lib/internal/template/pie-chart/index.js.map +1 -1
  130. package/lib/internal/template/popover/internal.d.ts.map +1 -1
  131. package/lib/internal/template/popover/internal.js +1 -2
  132. package/lib/internal/template/popover/internal.js.map +1 -1
  133. package/lib/internal/template/property-filter/filtering-token/index.d.ts.map +1 -1
  134. package/lib/internal/template/property-filter/filtering-token/index.js +1 -2
  135. package/lib/internal/template/property-filter/filtering-token/index.js.map +1 -1
  136. package/lib/internal/template/property-filter/internal.d.ts.map +1 -1
  137. package/lib/internal/template/property-filter/internal.js +1 -1
  138. package/lib/internal/template/property-filter/internal.js.map +1 -1
  139. package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts.map +1 -1
  140. package/lib/internal/template/property-filter/property-filter-autosuggest.js +1 -1
  141. package/lib/internal/template/property-filter/property-filter-autosuggest.js.map +1 -1
  142. package/lib/internal/template/radio-group/radio-button.d.ts.map +1 -1
  143. package/lib/internal/template/radio-group/radio-button.js +1 -1
  144. package/lib/internal/template/radio-group/radio-button.js.map +1 -1
  145. package/lib/internal/template/segmented-control/segment.d.ts.map +1 -1
  146. package/lib/internal/template/segmented-control/segment.js +1 -1
  147. package/lib/internal/template/segmented-control/segment.js.map +1 -1
  148. package/lib/internal/template/select/internal.d.ts.map +1 -1
  149. package/lib/internal/template/select/internal.js +1 -2
  150. package/lib/internal/template/select/internal.js.map +1 -1
  151. package/lib/internal/template/select/parts/item.d.ts.map +1 -1
  152. package/lib/internal/template/select/parts/item.js +1 -1
  153. package/lib/internal/template/select/parts/item.js.map +1 -1
  154. package/lib/internal/template/select/parts/multiselect-item.d.ts.map +1 -1
  155. package/lib/internal/template/select/parts/multiselect-item.js +1 -1
  156. package/lib/internal/template/select/parts/multiselect-item.js.map +1 -1
  157. package/lib/internal/template/select/parts/plain-list.d.ts.map +1 -1
  158. package/lib/internal/template/select/parts/plain-list.js +1 -1
  159. package/lib/internal/template/select/parts/plain-list.js.map +1 -1
  160. package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
  161. package/lib/internal/template/select/parts/trigger.js +1 -1
  162. package/lib/internal/template/select/parts/trigger.js.map +1 -1
  163. package/lib/internal/template/select/parts/virtual-list.js +1 -1
  164. package/lib/internal/template/select/parts/virtual-list.js.map +1 -1
  165. package/lib/internal/template/space-between/internal.d.ts.map +1 -1
  166. package/lib/internal/template/space-between/internal.js +1 -1
  167. package/lib/internal/template/space-between/internal.js.map +1 -1
  168. package/lib/internal/template/split-panel/implementation.d.ts.map +1 -1
  169. package/lib/internal/template/split-panel/implementation.js +1 -1
  170. package/lib/internal/template/split-panel/implementation.js.map +1 -1
  171. package/lib/internal/template/table/body-cell/td-element.js +1 -1
  172. package/lib/internal/template/table/body-cell/td-element.js.map +1 -1
  173. package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
  174. package/lib/internal/template/table/header-cell/index.js +1 -2
  175. package/lib/internal/template/table/header-cell/index.js.map +1 -1
  176. package/lib/internal/template/table/header-cell/th-element.js +1 -1
  177. package/lib/internal/template/table/header-cell/th-element.js.map +1 -1
  178. package/lib/internal/template/table/internal.d.ts.map +1 -1
  179. package/lib/internal/template/table/internal.js +4 -3
  180. package/lib/internal/template/table/internal.js.map +1 -1
  181. package/lib/internal/template/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -1
  182. package/lib/internal/template/table/sticky-scrollbar/sticky-scrollbar.js +1 -1
  183. package/lib/internal/template/table/sticky-scrollbar/sticky-scrollbar.js.map +1 -1
  184. package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
  185. package/lib/internal/template/tabs/tab-header-bar.js +13 -1
  186. package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
  187. package/lib/internal/template/tiles/internal.d.ts.map +1 -1
  188. package/lib/internal/template/tiles/internal.js +1 -1
  189. package/lib/internal/template/tiles/internal.js.map +1 -1
  190. package/lib/internal/template/tiles/tile.d.ts.map +1 -1
  191. package/lib/internal/template/tiles/tile.js +1 -1
  192. package/lib/internal/template/tiles/tile.js.map +1 -1
  193. package/lib/internal/template/token-group/internal.d.ts.map +1 -1
  194. package/lib/internal/template/token-group/internal.js +1 -1
  195. package/lib/internal/template/token-group/internal.js.map +1 -1
  196. package/lib/internal/template/top-navigation/1.0-beta/use-top-navigation.js +1 -1
  197. package/lib/internal/template/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
  198. package/lib/internal/template/top-navigation/use-top-navigation.js +1 -1
  199. package/lib/internal/template/top-navigation/use-top-navigation.js.map +1 -1
  200. package/lib/internal/template/wizard/internal.d.ts.map +1 -1
  201. package/lib/internal/template/wizard/internal.js +1 -2
  202. package/lib/internal/template/wizard/internal.js.map +1 -1
  203. package/package.json +1 -1
  204. package/lib/internal/template/internal/hooks/use-merge-refs/index.d.ts +0 -10
  205. package/lib/internal/template/internal/hooks/use-merge-refs/index.d.ts.map +0 -1
  206. package/lib/internal/template/internal/hooks/use-merge-refs/index.js +0 -30
  207. package/lib/internal/template/internal/hooks/use-merge-refs/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/icon/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO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iBAAe,CAAC,YAAY,EAAE,KAAK,EAAE,YAAY,KACtG,GAAG,CACC,CACR,CAAC;KACH;IAED,IAAI,GAAG,EAAE;QACP,OAAO,CACL,8CAAU,SAAS,IAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY;YACtD,6BAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,GAAG,GAAI,CACnC,CACR,CAAC;KACH;IAED,MAAM,SAAS,GAAG,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE5E,SAAS,OAAO,CAAC,IAAoB;QACnC,IAAI,IAAI,KAAK,QAAQ,IAAI,QAAQ,KAAK,OAAO,EAAE;YAC7C,OAAO,CACL,6BACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,iBACL,MAAM,iBACN,eAAe;gBAE3B,8BACE,CAAC,EAAC,wKAAwK,EAC1K,SAAS,EAAC,QAAQ,GAClB,CACE,CACP,CAAC;SACH;aAAM;YACL,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;SACpB;IACH,CAAC;IAED,OAAO,CACL,8CAAU,SAAS,EAAM,eAAe,IAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,KAC1E,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CACjC,CACR,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport icons from './generated/icons';\nimport { IconProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalIconProps = IconProps &\n InternalBaseComponentProps & {\n badge?: boolean;\n };\n\nfunction iconSizeMap(height: number | null) {\n if (height === null) {\n // This is the best guess for the contextual height while server rendering.\n return 'normal';\n }\n\n if (height >= 50) {\n return 'large';\n } else if (height >= 36) {\n return 'big';\n } else if (height >= 24) {\n return 'medium';\n } else if (height <= 16) {\n return 'small';\n } else {\n return 'normal';\n }\n}\n\nconst InternalIcon = ({\n name,\n size = 'normal',\n variant = 'normal',\n url,\n alt,\n ariaLabel,\n svg,\n badge,\n __internalRootRef = null,\n ...props\n}: InternalIconProps) => {\n const iconRef = useRef<HTMLElement>(null);\n // To ensure a re-render is triggered on visual mode changes\n useVisualRefresh();\n const [parentHeight, setParentHeight] = useState<number | null>(null);\n const contextualSize = size === 'inherit';\n const iconSize = contextualSize ? iconSizeMap(parentHeight) : size;\n const inlineStyles = contextualSize && parentHeight !== null ? { height: `${parentHeight}px` } : {};\n const baseProps = getBaseProps(props);\n\n baseProps.className = clsx(\n baseProps.className,\n styles.icon,\n contextualSize && styles['icon-flex-height'],\n badge && styles.badge,\n !contextualSize && styles[`size-${iconSize}-mapped-height`],\n styles[`size-${iconSize}`],\n styles[`variant-${variant}`],\n styles[`name-${name}`]\n );\n\n // Possible infinite loop is not a concern here because line\n // height should not change without an external state update.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n if (!contextualSize || !iconRef.current) {\n return;\n }\n const { lineHeight } = getComputedStyle(iconRef.current);\n const newParentHeight = parseInt(lineHeight, 10);\n setParentHeight(newParentHeight);\n });\n\n const mergedRef = useMergeRefs(iconRef, __internalRootRef);\n const hasAriaLabel = typeof ariaLabel === 'string';\n const labelAttributes = hasAriaLabel ? { role: 'img', 'aria-label': ariaLabel } : {};\n\n if (svg) {\n if (url) {\n warnOnce(\n 'Icon',\n 'You have specified both `url` and `svg`. `svg` will take precedence and `url` will be ignored.'\n );\n }\n return (\n <span {...baseProps} {...labelAttributes} ref={mergedRef} aria-hidden={!hasAriaLabel} style={inlineStyles}>\n {svg}\n </span>\n );\n }\n\n if (url) {\n return (\n <span {...baseProps} ref={mergedRef} style={inlineStyles}>\n <img src={url} alt={ariaLabel ?? alt} />\n </span>\n );\n }\n\n const validIcon = name && Object.prototype.hasOwnProperty.call(icons, name);\n\n function iconMap(name: IconProps.Name) {\n if (name === 'gen-ai' && iconSize === 'small') {\n return (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\"\n aria-hidden=\"true\"\n data-testid=\"gen-ai-filled\"\n >\n <path\n d=\"m8 4.4 1.018 2.582L11.6 8 9.018 9.018 8 11.6 6.982 9.018 4.4 8l2.582-1.018L8 4.4ZM2.405 2.41l.002-.003.003-.002-.003-.002-.002-.003-.002.003-.003.002.003.002.002.003Z\"\n className=\"filled\"\n />\n </svg>\n );\n } else {\n return icons[name];\n }\n }\n\n return (\n <span {...baseProps} {...labelAttributes} ref={mergedRef} style={inlineStyles}>\n {validIcon ? iconMap(name) : undefined}\n </span>\n );\n};\n\nexport { InternalIconProps };\nexport default InternalIcon;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/icon/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC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,EAAE,SAAS,iBAAe,CAAC,YAAY,EAAE,KAAK,EAAE,YAAY,KACtG,GAAG,CACC,CACR,CAAC;KACH;IAED,IAAI,GAAG,EAAE;QACP,OAAO,CACL,8CAAU,SAAS,IAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY;YACtD,6BAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,GAAG,GAAI,CACnC,CACR,CAAC;KACH;IAED,MAAM,SAAS,GAAG,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE5E,SAAS,OAAO,CAAC,IAAoB;QACnC,IAAI,IAAI,KAAK,QAAQ,IAAI,QAAQ,KAAK,OAAO,EAAE;YAC7C,OAAO,CACL,6BACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,iBACL,MAAM,iBACN,eAAe;gBAE3B,8BACE,CAAC,EAAC,wKAAwK,EAC1K,SAAS,EAAC,QAAQ,GAClB,CACE,CACP,CAAC;SACH;aAAM;YACL,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;SACpB;IACH,CAAC;IAED,OAAO,CACL,8CAAU,SAAS,EAAM,eAAe,IAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,KAC1E,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CACjC,CACR,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport icons from './generated/icons';\nimport { IconProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalIconProps = IconProps &\n InternalBaseComponentProps & {\n badge?: boolean;\n };\n\nfunction iconSizeMap(height: number | null) {\n if (height === null) {\n // This is the best guess for the contextual height while server rendering.\n return 'normal';\n }\n\n if (height >= 50) {\n return 'large';\n } else if (height >= 36) {\n return 'big';\n } else if (height >= 24) {\n return 'medium';\n } else if (height <= 16) {\n return 'small';\n } else {\n return 'normal';\n }\n}\n\nconst InternalIcon = ({\n name,\n size = 'normal',\n variant = 'normal',\n url,\n alt,\n ariaLabel,\n svg,\n badge,\n __internalRootRef = null,\n ...props\n}: InternalIconProps) => {\n const iconRef = useRef<HTMLElement>(null);\n // To ensure a re-render is triggered on visual mode changes\n useVisualRefresh();\n const [parentHeight, setParentHeight] = useState<number | null>(null);\n const contextualSize = size === 'inherit';\n const iconSize = contextualSize ? iconSizeMap(parentHeight) : size;\n const inlineStyles = contextualSize && parentHeight !== null ? { height: `${parentHeight}px` } : {};\n const baseProps = getBaseProps(props);\n\n baseProps.className = clsx(\n baseProps.className,\n styles.icon,\n contextualSize && styles['icon-flex-height'],\n badge && styles.badge,\n !contextualSize && styles[`size-${iconSize}-mapped-height`],\n styles[`size-${iconSize}`],\n styles[`variant-${variant}`],\n styles[`name-${name}`]\n );\n\n // Possible infinite loop is not a concern here because line\n // height should not change without an external state update.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n if (!contextualSize || !iconRef.current) {\n return;\n }\n const { lineHeight } = getComputedStyle(iconRef.current);\n const newParentHeight = parseInt(lineHeight, 10);\n setParentHeight(newParentHeight);\n });\n\n const mergedRef = useMergeRefs(iconRef, __internalRootRef);\n const hasAriaLabel = typeof ariaLabel === 'string';\n const labelAttributes = hasAriaLabel ? { role: 'img', 'aria-label': ariaLabel } : {};\n\n if (svg) {\n if (url) {\n warnOnce(\n 'Icon',\n 'You have specified both `url` and `svg`. `svg` will take precedence and `url` will be ignored.'\n );\n }\n return (\n <span {...baseProps} {...labelAttributes} ref={mergedRef} aria-hidden={!hasAriaLabel} style={inlineStyles}>\n {svg}\n </span>\n );\n }\n\n if (url) {\n return (\n <span {...baseProps} ref={mergedRef} style={inlineStyles}>\n <img src={url} alt={ariaLabel ?? alt} />\n </span>\n );\n }\n\n const validIcon = name && Object.prototype.hasOwnProperty.call(icons, name);\n\n function iconMap(name: IconProps.Name) {\n if (name === 'gen-ai' && iconSize === 'small') {\n return (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\"\n aria-hidden=\"true\"\n data-testid=\"gen-ai-filled\"\n >\n <path\n d=\"m8 4.4 1.018 2.582L11.6 8 9.018 9.018 8 11.6 6.982 9.018 4.4 8l2.582-1.018L8 4.4ZM2.405 2.41l.002-.003.003-.002-.003-.002-.002-.003-.002.003-.003.002.003.002.002.003Z\"\n className=\"filled\"\n />\n </svg>\n );\n } else {\n return icons[name];\n }\n }\n\n return (\n <span {...baseProps} {...labelAttributes} ref={mergedRef} style={inlineStyles}>\n {validIcon ? iconMap(name) : undefined}\n </span>\n );\n};\n\nexport { InternalIconProps };\nexport default InternalIcon;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAO3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAgB,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,+BAA+B,EAAuB,MAAM,wCAAwC,CAAC;AAC9G,OAAO,EAA6C,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,O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A6C,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK9F,MAAM,WAAW,kBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EACxB,gBAAgB,EAChB,+BAA+B,EAC/B,0BAA0B;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B,WAAW,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEhC,kBAAkB,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACjE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,gBAAgB,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC/D,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;QAAE,aAAa,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAE/E,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;;AA6KD,wBAA+C"}
@@ -3,6 +3,7 @@ import { __rest } from "tslib";
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import React, { useRef } from 'react';
5
5
  import clsx from 'clsx';
6
+ import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
6
7
  import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
7
8
  import InternalButton from '../button/internal';
8
9
  import { useInternalI18n } from '../i18n/context';
@@ -11,7 +12,6 @@ import { getBaseProps } from '../internal/base-component';
11
12
  import { useFormFieldContext } from '../internal/context/form-field-context';
12
13
  import { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';
13
14
  import { useDebounceCallback } from '../internal/hooks/use-debounce-callback';
14
- import { useMergeRefs } from '../internal/hooks/use-merge-refs';
15
15
  import { convertAutoComplete, useSearchProps } from './utils';
16
16
  import styles from './styles.css.js';
17
17
  function InternalInput(_a, ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAmC,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AAE1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAGhE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA0BrC,SAAS,aAAa,CACpB,EAqCqB,EACrB,GAA0B;QAtC1B,EACE,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,SAAS,EACT,YAAY,GAAG,IAAI,EACnB,SAA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SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC,EAC/D,GAAG,EAAE,iBAAiB,EACtB,GAAG,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;QAExC,UAAU,IAAI,CACb,8BAAM,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;YACpE,oBAAC,YAAY,IAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,GAAI,CAC7F,CACR;QACD,6CAAO,GAAG,EAAE,SAAS,IAAM,UAAU,EAAI;QACxC,WAAW,IAAI,CACd,4CACE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IACjC,CAAC,WAAW,KAAK,OAAO;YAC1B,CAAC,CAAC,6BAA6B,CAAC;gBAC5B,MAAM,EAAE,YAAY;aACiC,CAAC;YAC1D,CAAC,CAAC,EAAE,CAAC;YAEP,oBAAC,cAAc;YACb,sBAAsB;YACtB,wDAAwD;;gBADxD,sBAAsB;gBACtB,wDAAwD;gBACxD,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EACvC,OAAO,EAAC,4BAA4B,EACpC,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,EACzD,QAAQ,EAAE,QAAQ,GAClB,CACG,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { GeneratedAnalyticsMetadataInputClearInput } from './analytics-metadata/interfaces';\nimport { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputProps } from './interfaces';\nimport { convertAutoComplete, useSearchProps } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: React.InputHTMLAttributes<HTMLInputElement>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n ariaRequired,\n\n __rightIcon,\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = __inheritFormFieldProps\n ? formFieldContext\n : rest;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n [styles['input-warning']]: warning && !invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail && fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles['input-container'])}\n ref={__internalRootRef}\n dir={type === 'email' ? 'ltr' : undefined}\n >\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={styles['input-icon-left']}>\n <InternalIcon name={__leftIcon} variant={disabled || readOnly ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} />\n {__rightIcon && (\n <span\n className={styles['input-icon-right']}\n {...(__rightIcon === 'close'\n ? getAnalyticsMetadataAttribute({\n action: 'clearInput',\n } as Partial<GeneratedAnalyticsMetadataInputClearInput>)\n : {})}\n >\n <InternalButton\n // Used for test utils\n // eslint-disable-next-line react/forbid-component-props\n className={styles['input-button-right']}\n variant=\"inline-icon-pointer-target\"\n formAction=\"none\"\n iconName={__rightIcon}\n onClick={__onRightIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAmC,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AAE1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAG9E,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA0BrC,SAAS,aAAa,CACpB,EAqCqB,EACrB,GAA0B;QAtC1B,EACE,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,SAAS,EACT,YAAY,GAAG,IAAI,EACnB,SAAS,EACT,cAAc,EAAE,sBAAsB,EACtC,IAAI,EACJ,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,yBAAyB,EACzB,UAAU,EACV,gBAAgB,EAEhB,UAAU,EACV,iBAAiB,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KAAK,CAAC,CAAC,CAAC,SAAS;QAExC,UAAU,IAAI,CACb,8BAAM,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;YACpE,oBAAC,YAAY,IAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,GAAI,CAC7F,CACR;QACD,6CAAO,GAAG,EAAE,SAAS,IAAM,UAAU,EAAI;QACxC,WAAW,IAAI,CACd,4CACE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IACjC,CAAC,WAAW,KAAK,OAAO;YAC1B,CAAC,CAAC,6BAA6B,CAAC;gBAC5B,MAAM,EAAE,YAAY;aACiC,CAAC;YAC1D,CAAC,CAAC,EAAE,CAAC;YAEP,oBAAC,cAAc;YACb,sBAAsB;YACtB,wDAAwD;;gBADxD,sBAAsB;gBACtB,wDAAwD;gBACxD,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EACvC,OAAO,EAAC,4BAA4B,EACpC,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,EACzD,QAAQ,EAAE,QAAQ,GAClB,CACG,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { GeneratedAnalyticsMetadataInputClearInput } from './analytics-metadata/interfaces';\nimport { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputProps } from './interfaces';\nimport { convertAutoComplete, useSearchProps } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: React.InputHTMLAttributes<HTMLInputElement>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n ariaRequired,\n\n __rightIcon,\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = __inheritFormFieldProps\n ? formFieldContext\n : rest;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n [styles['input-warning']]: warning && !invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail && fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles['input-container'])}\n ref={__internalRootRef}\n dir={type === 'email' ? 'ltr' : undefined}\n >\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={styles['input-icon-left']}>\n <InternalIcon name={__leftIcon} variant={disabled || readOnly ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} />\n {__rightIcon && (\n <span\n className={styles['input-icon-right']}\n {...(__rightIcon === 'close'\n ? getAnalyticsMetadataAttribute({\n action: 'clearInput',\n } as Partial<GeneratedAnalyticsMetadataInputClearInput>)\n : {})}\n >\n <InternalButton\n // Used for test utils\n // eslint-disable-next-line react/forbid-component-props\n className={styles['input-button-right']}\n variant=\"inline-icon-pointer-target\"\n formAction=\"none\"\n iconName={__rightIcon}\n onClick={__onRightIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAS3D,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,2BAA2B;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,WAAW,GAAG,UAAU,CAAC;IACjD;;;;;;;;MAQE;IACF,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,+FAA+F;IAC/F,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B,wDAAwD;IACxD,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5C,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE3C,sBAAsB;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,qBAAqB;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;;AAED,wBAA8C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAQ3D,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,2BAA2B;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,WAAW,GAAG,UAAU,CAAC;IACjD;;;;;;;;MAQE;IACF,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,+FAA+F;IAC/F,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B,wDAAwD;IACxD,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5C,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAE3C,sBAAsB;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,qBAAqB;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;;AAED,wBAA8C"}
@@ -4,10 +4,10 @@ import { __rest } from "tslib";
4
4
  import React, { useEffect, useRef } from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { nodeContains } from '@cloudscape-design/component-toolkit/dom';
7
+ import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
7
8
  import PopoverBody from '../../../popover/body';
8
9
  import PopoverContainer from '../../../popover/container';
9
10
  import { getBaseProps } from '../../base-component';
10
- import { useMergeRefs } from '../../hooks/use-merge-refs';
11
11
  import { nodeBelongs } from '../../utils/node-belongs';
12
12
  import popoverStyles from '../../../popover/styles.css.js';
13
13
  import styles from './styles.css.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,WAAW,MAAM,8BAA8B,CAAC;AA0CvD,eAAe,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAE9C,SAAS,YAAY,CACnB,EAuBoB,EACpB,GAA2B;QAxB3B,EACE,QAAQ,GAAG,OAAO,EAClB,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,aAAa,GAAG,KAAK,EACrB,gBAAgB,EAEhB,QAAQ,EACR,MAAM,EAEN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,mBAAmB,EAEnB,YAAY,EACZ,YAAY,EACZ,MAAM,OAGY,EADf,SAAS,cAtBd,qOAuBC,CADa;IAId,MAAM,SAAS,GAAG,YAAY,CA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,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CACjB,6BAAK,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAC;gBACpF,6BAAK,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,GAAI;gBAChD,6BAAK,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,GAAI,CAC5C,CACP,EACD,YAAY,EAAE,IAAI,EAClB,qBAAqB,EAAE,IAAI,EAC3B,gBAAgB,EAAE,QAAQ,EAC1B,SAAS,EAAE,IAAI;YAEf,oBAAC,WAAW,IACV,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,8BAAM,SAAS,EAAE,WAAW,CAAC,MAAM,IAAG,KAAK,CAAQ,EAC3D,SAAS,EAAE,SAAS,EACpB,eAAe,EAAC,SAAS,EACzB,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,EACjC,OAAO,EAAC,OAAO;gBAEf,6BAAK,SAAS,EAAE,WAAW,CAAC,IAAI,IAAG,QAAQ,CAAO;gBACjD,MAAM,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAG,MAAM,CAAO,CACtE,CACG,CACf,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\n\nimport PopoverBody from '../../../popover/body';\nimport PopoverContainer from '../../../popover/container';\nimport { PopoverProps } from '../../../popover/interfaces';\nimport { getBaseProps } from '../../base-component';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport { nodeBelongs } from '../../utils/node-belongs';\n\nimport popoverStyles from '../../../popover/styles.css.js';\nimport styles from './styles.css.js';\nimport testClasses from './test-classes/styles.css.js';\n\nexport interface ChartPopoverProps extends PopoverProps {\n /** Title of the popover */\n title?: React.ReactNode;\n\n /** References the element the container is positioned against. */\n trackRef?: React.RefObject<HTMLElement | SVGElement>;\n getTrack?: () => null | HTMLElement | SVGElement;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n minVisibleBlockSize?: number;\n\n /** Optional container element that prevents any clicks in there from dismissing the popover */\n container: Element | null;\n\n /** Event that is fired when the popover is dismissed */\n onDismiss: (outsideClick?: boolean) => void;\n\n /** Fired when the pointer enters the hoverable area around the popover */\n onMouseEnter?: (event: React.MouseEvent) => void;\n\n /** Fired when the pointer leaves the hoverable area around the popover */\n onMouseLeave?: (event: React.MouseEvent) => void;\n\n onBlur?: (event: React.FocusEvent) => void;\n\n /** Popover content */\n children?: React.ReactNode;\n\n /** Popover footer */\n footer?: React.ReactNode;\n}\n\nexport default React.forwardRef(ChartPopover);\n\nfunction ChartPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n dismissButton = false,\n dismissAriaLabel,\n\n children,\n footer,\n\n title,\n trackRef,\n getTrack,\n trackKey,\n onDismiss,\n container,\n minVisibleBlockSize,\n\n onMouseEnter,\n onMouseLeave,\n onBlur,\n\n ...restProps\n }: ChartPopoverProps,\n ref: React.Ref<HTMLElement>\n) {\n const baseProps = getBaseProps(restProps);\n const popoverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const popoverRef = useMergeRefs(popoverObjectRef, ref);\n\n useEffect(() => {\n const onDocumentClick = (event: MouseEvent) => {\n if (\n event.target &&\n !nodeBelongs(popoverObjectRef.current, event.target as Element) && // click not in popover\n !nodeContains(container, event.target as Element) // click not in segment\n ) {\n onDismiss(true);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick, { capture: true });\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, { capture: true });\n };\n }, [container, onDismiss]);\n\n // In chart popovers, dismiss button is present when they are pinned, so both values are equivalent.\n const isPinned = dismissButton;\n\n return (\n <div\n {...baseProps}\n className={clsx(popoverStyles.root, styles.root, baseProps.className)}\n ref={popoverRef}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onBlur={onBlur}\n // The tabIndex makes it so that clicking inside popover assigns this element as blur target.\n // That is necessary in charts to ensure the blur target is within the chart and no cleanup is needed.\n tabIndex={-1}\n >\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={trackRef}\n getTrack={getTrack}\n trackKey={trackKey}\n minVisibleBlockSize={minVisibleBlockSize}\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n keepPosition={true}\n allowVerticalOverflow={true}\n allowScrollToFit={isPinned}\n hoverArea={true}\n >\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={<span className={testClasses.header}>{title}</span>}\n onDismiss={onDismiss}\n overflowVisible=\"content\"\n className={styles['popover-body']}\n variant=\"chart\"\n >\n <div className={testClasses.body}>{children}</div>\n {footer && <div className={clsx(testClasses.footer, styles.footer)}>{footer}</div>}\n </PopoverBody>\n </PopoverContainer>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,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AI,CAC5C,CACP,EACD,YAAY,EAAE,IAAI,EAClB,qBAAqB,EAAE,IAAI,EAC3B,gBAAgB,EAAE,QAAQ,EAC1B,SAAS,EAAE,IAAI;YAEf,oBAAC,WAAW,IACV,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,8BAAM,SAAS,EAAE,WAAW,CAAC,MAAM,IAAG,KAAK,CAAQ,EAC3D,SAAS,EAAE,SAAS,EACpB,eAAe,EAAC,SAAS,EACzB,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,EACjC,OAAO,EAAC,OAAO;gBAEf,6BAAK,SAAS,EAAE,WAAW,CAAC,IAAI,IAAG,QAAQ,CAAO;gBACjD,MAAM,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAG,MAAM,CAAO,CACtE,CACG,CACf,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport PopoverBody from '../../../popover/body';\nimport PopoverContainer from '../../../popover/container';\nimport { PopoverProps } from '../../../popover/interfaces';\nimport { getBaseProps } from '../../base-component';\nimport { nodeBelongs } from '../../utils/node-belongs';\n\nimport popoverStyles from '../../../popover/styles.css.js';\nimport styles from './styles.css.js';\nimport testClasses from './test-classes/styles.css.js';\n\nexport interface ChartPopoverProps extends PopoverProps {\n /** Title of the popover */\n title?: React.ReactNode;\n\n /** References the element the container is positioned against. */\n trackRef?: React.RefObject<HTMLElement | SVGElement>;\n getTrack?: () => null | HTMLElement | SVGElement;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n minVisibleBlockSize?: number;\n\n /** Optional container element that prevents any clicks in there from dismissing the popover */\n container: Element | null;\n\n /** Event that is fired when the popover is dismissed */\n onDismiss: (outsideClick?: boolean) => void;\n\n /** Fired when the pointer enters the hoverable area around the popover */\n onMouseEnter?: (event: React.MouseEvent) => void;\n\n /** Fired when the pointer leaves the hoverable area around the popover */\n onMouseLeave?: (event: React.MouseEvent) => void;\n\n onBlur?: (event: React.FocusEvent) => void;\n\n /** Popover content */\n children?: React.ReactNode;\n\n /** Popover footer */\n footer?: React.ReactNode;\n}\n\nexport default React.forwardRef(ChartPopover);\n\nfunction ChartPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n dismissButton = false,\n dismissAriaLabel,\n\n children,\n footer,\n\n title,\n trackRef,\n getTrack,\n trackKey,\n onDismiss,\n container,\n minVisibleBlockSize,\n\n onMouseEnter,\n onMouseLeave,\n onBlur,\n\n ...restProps\n }: ChartPopoverProps,\n ref: React.Ref<HTMLElement>\n) {\n const baseProps = getBaseProps(restProps);\n const popoverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const popoverRef = useMergeRefs(popoverObjectRef, ref);\n\n useEffect(() => {\n const onDocumentClick = (event: MouseEvent) => {\n if (\n event.target &&\n !nodeBelongs(popoverObjectRef.current, event.target as Element) && // click not in popover\n !nodeContains(container, event.target as Element) // click not in segment\n ) {\n onDismiss(true);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick, { capture: true });\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, { capture: true });\n };\n }, [container, onDismiss]);\n\n // In chart popovers, dismiss button is present when they are pinned, so both values are equivalent.\n const isPinned = dismissButton;\n\n return (\n <div\n {...baseProps}\n className={clsx(popoverStyles.root, styles.root, baseProps.className)}\n ref={popoverRef}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onBlur={onBlur}\n // The tabIndex makes it so that clicking inside popover assigns this element as blur target.\n // That is necessary in charts to ensure the blur target is within the chart and no cleanup is needed.\n tabIndex={-1}\n >\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={trackRef}\n getTrack={getTrack}\n trackKey={trackKey}\n minVisibleBlockSize={minVisibleBlockSize}\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n keepPosition={true}\n allowVerticalOverflow={true}\n allowScrollToFit={isPinned}\n hoverArea={true}\n >\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={<span className={testClasses.header}>{title}</span>}\n onDismiss={onDismiss}\n overflowVisible=\"content\"\n className={styles['popover-body']}\n variant=\"chart\"\n >\n <div className={testClasses.body}>{children}</div>\n {footer && <div className={clsx(testClasses.footer, styles.footer)}>{footer}</div>}\n </PopoverBody>\n </PopoverContainer>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-series-details/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAoB,SAAS,EAAqB,MAAM,OAAO,CAAC;AAI9E,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAExE,OAA0B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAKlF,UAAU,eAAe;IACvB,GAAG,EAAE,SAAS,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;CAClB;AAUD,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,C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C,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;;AAED,wBAAoD"}
@@ -3,9 +3,9 @@ import { __rest } from "tslib";
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import React, { forwardRef, memo, useEffect, useRef } from 'react';
5
5
  import clsx from 'clsx';
6
+ import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
6
7
  import InternalExpandableSection from '../../../expandable-section/internal';
7
8
  import { getBaseProps } from '../../base-component';
8
- import { useMergeRefs } from '../../hooks/use-merge-refs';
9
9
  import ChartSeriesMarker from '../chart-series-marker';
10
10
  import getSeriesDetailsText, { screenReaderTextClass } from './series-details-text';
11
11
  import styles from './styles.css.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,yBAAyB,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,iBAA4C,MAAM,wBAAwB,CAAC;AAClF,OAAO,oBAAoB,EAAE,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgCrC,eAAe,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAEpD,SAAS,kBAAkB,CACzB,EAAi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AAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;YACnE,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG;gBACvB,UAAU,IAAI,KAAK,IAAI,oBAAC,iBAAiB,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI;gBAC7E,kCAAO,OAAO,CAAQ,CAClB;YACN,8BAAM,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,KAAK,CAAQ,CACzC;QACL,QAAQ,IAAI,oBAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,GAAI,CACzC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, memo, ReactNode, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport InternalExpandableSection from '../../../expandable-section/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport ChartSeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport getSeriesDetailsText, { screenReaderTextClass } from './series-details-text';\n\nimport styles from './styles.css.js';\n\ninterface ChartDetailPair {\n key: ReactNode;\n value: ReactNode;\n}\n\ninterface ListItemProps {\n itemKey: ReactNode;\n value: ReactNode;\n subItems?: ReadonlyArray<ChartDetailPair>;\n markerType?: ChartSeriesMarkerType;\n color?: string;\n}\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n markerType?: ChartSeriesMarkerType;\n color?: string;\n isDimmed?: boolean;\n subItems?: ReadonlyArray<ChartDetailPair>;\n expandableId?: string;\n}\nexport type ExpandedSeries = Set<string>;\n\ninterface ChartSeriesDetailsProps extends BaseComponentProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n expandedSeries?: ExpandedSeries;\n setPopoverText?: (s: string) => void;\n setExpandedState?: (seriesTitle: string, state: boolean) => void;\n compactList?: boolean;\n}\n\nexport default memo(forwardRef(ChartSeriesDetails));\n\nfunction ChartSeriesDetails(\n { details, expandedSeries, setPopoverText, setExpandedState, compactList, ...restProps }: ChartSeriesDetailsProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const baseProps = getBaseProps(restProps);\n const className = clsx(baseProps.className, styles.root);\n const detailsRef = useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergeRefs(ref, detailsRef);\n\n // Once the component has rendered, pass its content in plain text\n // so that it can be used by screen readers.\n useEffect(() => {\n if (setPopoverText) {\n if (detailsRef.current) {\n setPopoverText(getSeriesDetailsText(detailsRef.current));\n }\n return () => {\n setPopoverText('');\n };\n }\n }, [details, setPopoverText]);\n\n const isExpanded = (seriesTitle: string) => !!expandedSeries && expandedSeries.has(seriesTitle);\n\n return (\n <div {...baseProps} className={className} ref={mergedRef}>\n <ul className={clsx(styles.list, compactList && styles.compact)}>\n {details.map(({ key, value, markerType, color, isDimmed, subItems, expandableId }, index) => (\n <li\n key={index}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles['list-item']]: true,\n [styles['with-sub-items']]: subItems?.length,\n [styles.expandable]: !!expandableId,\n })}\n >\n {subItems?.length && !!expandableId ? (\n <ExpandableSeries\n itemKey={key}\n value={value}\n markerType={markerType}\n color={color}\n subItems={subItems}\n expanded={isExpanded(expandableId)}\n setExpandedState={state => setExpandedState && setExpandedState(expandableId, state)}\n />\n ) : (\n <NonExpandableSeries\n itemKey={key}\n value={value}\n markerType={markerType}\n color={color}\n subItems={subItems}\n />\n )}\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction SubItems({\n items,\n expandable,\n expanded,\n}: {\n items: ReadonlyArray<ChartDetailPair>;\n expandable?: boolean;\n expanded?: boolean;\n}) {\n return (\n <ul className={clsx(styles['sub-items'], expandable && styles.expandable)}>\n {items.map(({ key, value }, index) => (\n <li\n key={index}\n className={clsx(\n styles['inner-list-item'],\n styles['key-value-pair'],\n (expanded || !expandable) && screenReaderTextClass\n )}\n >\n <span className={styles.key}>{key}</span>\n <span className={styles.value}>{value}</span>\n </li>\n ))}\n </ul>\n );\n}\n\nfunction ExpandableSeries({\n itemKey,\n value,\n subItems,\n markerType,\n color,\n expanded,\n setExpandedState,\n}: ListItemProps &\n Required<Pick<ListItemProps, 'subItems'>> & {\n expanded: boolean;\n setExpandedState: (state: boolean) => void;\n }) {\n return (\n <div className={styles['expandable-section']}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <div className={styles['full-width']}>\n <InternalExpandableSection\n variant=\"compact\"\n headerText={itemKey}\n headerActions={<span className={clsx(styles.value, styles.expandable)}>{value}</span>}\n expanded={expanded}\n onChange={({ detail }) => setExpandedState(detail.expanded)}\n >\n <SubItems items={subItems} expandable={true} expanded={expanded} />\n </InternalExpandableSection>\n </div>\n </div>\n );\n}\n\nfunction NonExpandableSeries({ itemKey, value, subItems, markerType, color }: ListItemProps) {\n return (\n <>\n <div className={clsx(styles['key-value-pair'], screenReaderTextClass)}>\n <div className={styles.key}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <span>{itemKey}</span>\n </div>\n <span className={styles.value}>{value}</span>\n </div>\n {subItems && <SubItems items={subItems} />}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,yBAAyB,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,iBAA4C,MAAM,wBAAwB,CAAC;AAClF,OAAO,oBAAoB,EAAE,EAAE,qBAAqB,EAAE,MAAM,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J,CAAC;AAED,SAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAiB;IACzF,OAAO,CACL;QACE,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;YACnE,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG;gBACvB,UAAU,IAAI,KAAK,IAAI,oBAAC,iBAAiB,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI;gBAC7E,kCAAO,OAAO,CAAQ,CAClB;YACN,8BAAM,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,KAAK,CAAQ,CACzC;QACL,QAAQ,IAAI,oBAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,GAAI,CACzC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, memo, ReactNode, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalExpandableSection from '../../../expandable-section/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport ChartSeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport getSeriesDetailsText, { screenReaderTextClass } from './series-details-text';\n\nimport styles from './styles.css.js';\n\ninterface ChartDetailPair {\n key: ReactNode;\n value: ReactNode;\n}\n\ninterface ListItemProps {\n itemKey: ReactNode;\n value: ReactNode;\n subItems?: ReadonlyArray<ChartDetailPair>;\n markerType?: ChartSeriesMarkerType;\n color?: string;\n}\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n markerType?: ChartSeriesMarkerType;\n color?: string;\n isDimmed?: boolean;\n subItems?: ReadonlyArray<ChartDetailPair>;\n expandableId?: string;\n}\nexport type ExpandedSeries = Set<string>;\n\ninterface ChartSeriesDetailsProps extends BaseComponentProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n expandedSeries?: ExpandedSeries;\n setPopoverText?: (s: string) => void;\n setExpandedState?: (seriesTitle: string, state: boolean) => void;\n compactList?: boolean;\n}\n\nexport default memo(forwardRef(ChartSeriesDetails));\n\nfunction ChartSeriesDetails(\n { details, expandedSeries, setPopoverText, setExpandedState, compactList, ...restProps }: ChartSeriesDetailsProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const baseProps = getBaseProps(restProps);\n const className = clsx(baseProps.className, styles.root);\n const detailsRef = useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergeRefs(ref, detailsRef);\n\n // Once the component has rendered, pass its content in plain text\n // so that it can be used by screen readers.\n useEffect(() => {\n if (setPopoverText) {\n if (detailsRef.current) {\n setPopoverText(getSeriesDetailsText(detailsRef.current));\n }\n return () => {\n setPopoverText('');\n };\n }\n }, [details, setPopoverText]);\n\n const isExpanded = (seriesTitle: string) => !!expandedSeries && expandedSeries.has(seriesTitle);\n\n return (\n <div {...baseProps} className={className} ref={mergedRef}>\n <ul className={clsx(styles.list, compactList && styles.compact)}>\n {details.map(({ key, value, markerType, color, isDimmed, subItems, expandableId }, index) => (\n <li\n key={index}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles['list-item']]: true,\n [styles['with-sub-items']]: subItems?.length,\n [styles.expandable]: !!expandableId,\n })}\n >\n {subItems?.length && !!expandableId ? (\n <ExpandableSeries\n itemKey={key}\n value={value}\n markerType={markerType}\n color={color}\n subItems={subItems}\n expanded={isExpanded(expandableId)}\n setExpandedState={state => setExpandedState && setExpandedState(expandableId, state)}\n />\n ) : (\n <NonExpandableSeries\n itemKey={key}\n value={value}\n markerType={markerType}\n color={color}\n subItems={subItems}\n />\n )}\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction SubItems({\n items,\n expandable,\n expanded,\n}: {\n items: ReadonlyArray<ChartDetailPair>;\n expandable?: boolean;\n expanded?: boolean;\n}) {\n return (\n <ul className={clsx(styles['sub-items'], expandable && styles.expandable)}>\n {items.map(({ key, value }, index) => (\n <li\n key={index}\n className={clsx(\n styles['inner-list-item'],\n styles['key-value-pair'],\n (expanded || !expandable) && screenReaderTextClass\n )}\n >\n <span className={styles.key}>{key}</span>\n <span className={styles.value}>{value}</span>\n </li>\n ))}\n </ul>\n );\n}\n\nfunction ExpandableSeries({\n itemKey,\n value,\n subItems,\n markerType,\n color,\n expanded,\n setExpandedState,\n}: ListItemProps &\n Required<Pick<ListItemProps, 'subItems'>> & {\n expanded: boolean;\n setExpandedState: (state: boolean) => void;\n }) {\n return (\n <div className={styles['expandable-section']}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <div className={styles['full-width']}>\n <InternalExpandableSection\n variant=\"compact\"\n headerText={itemKey}\n headerActions={<span className={clsx(styles.value, styles.expandable)}>{value}</span>}\n expanded={expanded}\n onChange={({ detail }) => setExpandedState(detail.expanded)}\n >\n <SubItems items={subItems} expandable={true} expanded={expanded} />\n </InternalExpandableSection>\n </div>\n </div>\n );\n}\n\nfunction NonExpandableSeries({ itemKey, value, subItems, markerType, color }: ListItemProps) {\n return (\n <>\n <div className={clsx(styles['key-value-pair'], screenReaderTextClass)}>\n <div className={styles.key}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <span>{itemKey}</span>\n </div>\n <span className={styles.value}>{value}</span>\n </div>\n {subItems && <SubItems items={subItems} />}\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAMlD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAM/C,QAAA,MAAM,gBAAgB,iFAgErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAM/C,QAAA,MAAM,gBAAgB,iFAgErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { forwardRef, useRef } from 'react';
4
4
  import clsx from 'clsx';
5
+ import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
5
6
  import InternalIcon from '../../../icon/internal';
6
- import { useMergeRefs } from '../../hooks/use-merge-refs';
7
7
  import { ResizeIcon } from './resize-icon';
8
8
  import styles from './styles.css.js';
9
9
  import testUtilsStyles from './test-classes/styles.css.js';
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,MAAM,gBAAgB,GAAG,UAAU,CACjC,CACE,EACE,OAAO,GAAG,gBAAgB,EAC1B,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,GACO,EAClB,GAAuB,EACvB,EAAE;IACF,MAAM,mBAAmB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEzD,MAAM,SAAS,GAAc,CAAC,GAAG,EAAE;Q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E,aAAa,EAC5B,SAAS,EAAE,SAAS;QAEpB,oBAAC,YAAY,oBAAK,SAAS,EAAI,CAC3B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { IconProps } from '../../../icon/interfaces';\nimport InternalIcon from '../../../icon/internal';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport { DragHandleProps } from './interfaces';\nimport { ResizeIcon } from './resize-icon';\n\nimport styles from './styles.css.js';\nimport testUtilsStyles from './test-classes/styles.css.js';\n\nconst DragHandleButton = forwardRef(\n (\n {\n variant = 'drag-indicator',\n size = 'normal',\n className,\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedby,\n ariaValue,\n disabled,\n onPointerDown,\n onKeyDown,\n }: DragHandleProps,\n ref: React.Ref<Element>\n ) => {\n const dragHandleRefObject = useRef<HTMLDivElement>(null);\n\n const iconProps: IconProps = (() => {\n const shared = { variant: disabled ? ('disabled' as const) : undefined, size };\n switch (variant) {\n case 'drag-indicator':\n return { ...shared, name: 'drag-indicator' };\n case 'resize-area':\n return { ...shared, name: 'resize-area' };\n case 'resize-horizontal':\n return { ...shared, svg: <ResizeIcon variant=\"horizontal\" /> };\n case 'resize-vertical':\n return { ...shared, svg: <ResizeIcon variant=\"vertical\" /> };\n }\n })();\n\n return (\n // We need to use a div with button role instead of a button\n // so that Safari will focus on it when clicking it.\n // (See https://bugs.webkit.org/show_bug.cgi?id=22261)\n // Otherwise, we can't reliably catch keyboard events coming from the handle\n // when it is being dragged.\n <div\n ref={useMergeRefs(ref, dragHandleRefObject)}\n role={ariaValue ? 'slider' : 'button'}\n tabIndex={0}\n className={clsx(\n className,\n styles.handle,\n testUtilsStyles.root,\n styles[`handle-${variant}`],\n styles[`handle-size-${size}`],\n disabled && styles['handle-disabled']\n )}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedby}\n aria-disabled={disabled}\n aria-valuemax={ariaValue?.valueMax}\n aria-valuemin={ariaValue?.valueMin}\n aria-valuenow={ariaValue?.valueNow}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n >\n <InternalIcon {...iconProps} />\n </div>\n );\n }\n);\n\nexport default DragHandleButton;\n"]}
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../../src/internal/components/drag-handle/button.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAG7E,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,MAAM,gBAAgB,GAAG,UAAU,CACjC,CACE,EACE,OAAO,GAAG,gBAAgB,EAC1B,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,GACO,EAClB,GAAuB,EACvB,EAAE;IACF,MAAM,mBAAmB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEzD,MAAM,SAAS,GAAc,CAAC,GAAG,EAAE;QACjC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAE,UAAoB,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;QAC/E,QAAQ,OAAO,EAAE;YACf,KAAK,gBAAgB;gBACnB,uCAAY,MAAM,KAAE,IAAI,EAAE,gBAAg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2.0\nimport React, { forwardRef, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { IconProps } from '../../../icon/interfaces';\nimport InternalIcon from '../../../icon/internal';\nimport { DragHandleProps } from './interfaces';\nimport { ResizeIcon } from './resize-icon';\n\nimport styles from './styles.css.js';\nimport testUtilsStyles from './test-classes/styles.css.js';\n\nconst DragHandleButton = forwardRef(\n (\n {\n variant = 'drag-indicator',\n size = 'normal',\n className,\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedby,\n ariaValue,\n disabled,\n onPointerDown,\n onKeyDown,\n }: DragHandleProps,\n ref: React.Ref<Element>\n ) => {\n const dragHandleRefObject = useRef<HTMLDivElement>(null);\n\n const iconProps: IconProps = (() => {\n const shared = { variant: disabled ? ('disabled' as const) : undefined, size };\n switch (variant) {\n case 'drag-indicator':\n return { ...shared, name: 'drag-indicator' };\n case 'resize-area':\n return { ...shared, name: 'resize-area' };\n case 'resize-horizontal':\n return { ...shared, svg: <ResizeIcon variant=\"horizontal\" /> };\n case 'resize-vertical':\n return { ...shared, svg: <ResizeIcon variant=\"vertical\" /> };\n }\n })();\n\n return (\n // We need to use a div with button role instead of a button\n // so that Safari will focus on it when clicking it.\n // (See https://bugs.webkit.org/show_bug.cgi?id=22261)\n // Otherwise, we can't reliably catch keyboard events coming from the handle\n // when it is being dragged.\n <div\n ref={useMergeRefs(ref, dragHandleRefObject)}\n role={ariaValue ? 'slider' : 'button'}\n tabIndex={0}\n className={clsx(\n className,\n styles.handle,\n testUtilsStyles.root,\n styles[`handle-${variant}`],\n styles[`handle-size-${size}`],\n disabled && styles['handle-disabled']\n )}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedby}\n aria-disabled={disabled}\n aria-valuemax={ariaValue?.valueMax}\n aria-valuemin={ariaValue?.valueMin}\n aria-valuenow={ariaValue?.valueNow}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n >\n <InternalIcon {...iconProps} />\n </div>\n );\n }\n);\n\nexport default DragHandleButton;\n"]}
@@ -1,26 +1,26 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_15xkw_169",
5
- "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_15xkw_189",
6
- "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_15xkw_189",
7
- "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_15xkw_189",
8
- "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_15xkw_189",
9
- "drag-handle-entry": "awsui_drag-handle-entry_155yk_15xkw_1",
10
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_15xkw_1",
11
- "drag-handle-exit": "awsui_drag-handle-exit_155yk_15xkw_1",
12
- "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_15xkw_1",
13
- "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_15xkw_229",
14
- "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_15xkw_233",
15
- "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_15xkw_237",
16
- "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_15xkw_238",
17
- "direction-button-wrapper-rtl": "awsui_direction-button-wrapper-rtl_155yk_15xkw_238",
18
- "drag-handle-wrapper": "awsui_drag-handle-wrapper_155yk_15xkw_247",
19
- "portal-overlay": "awsui_portal-overlay_155yk_15xkw_252",
20
- "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_15xkw_260",
21
- "drag-handle": "awsui_drag-handle_155yk_15xkw_247",
22
- "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_15xkw_277",
23
- "direction-button": "awsui_direction-button_155yk_15xkw_169",
24
- "direction-button-disabled": "awsui_direction-button-disabled_155yk_15xkw_320"
4
+ "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_1acsn_169",
5
+ "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_1acsn_189",
6
+ "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_1acsn_189",
7
+ "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_1acsn_189",
8
+ "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_1acsn_189",
9
+ "drag-handle-entry": "awsui_drag-handle-entry_155yk_1acsn_1",
10
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_1acsn_1",
11
+ "drag-handle-exit": "awsui_drag-handle-exit_155yk_1acsn_1",
12
+ "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_1acsn_1",
13
+ "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_1acsn_229",
14
+ "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_1acsn_233",
15
+ "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_1acsn_237",
16
+ "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_1acsn_238",
17
+ "direction-button-wrapper-rtl": "awsui_direction-button-wrapper-rtl_155yk_1acsn_238",
18
+ "drag-handle-wrapper": "awsui_drag-handle-wrapper_155yk_1acsn_247",
19
+ "portal-overlay": "awsui_portal-overlay_155yk_1acsn_252",
20
+ "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_1acsn_260",
21
+ "drag-handle": "awsui_drag-handle_155yk_1acsn_247",
22
+ "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_1acsn_277",
23
+ "direction-button": "awsui_direction-button_155yk_1acsn_169",
24
+ "direction-button-disabled": "awsui_direction-button-disabled_155yk_1acsn_320"
25
25
  };
26
26
 
@@ -150,7 +150,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
150
150
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
151
151
  SPDX-License-Identifier: Apache-2.0
152
152
  */
153
- @keyframes awsui_drag-handle-entry_155yk_15xkw_1 {
153
+ @keyframes awsui_drag-handle-entry_155yk_1acsn_1 {
154
154
  from {
155
155
  transform: translate(var(--awsui-drag-handle-animation-inline-offset-xgujsu), var(--awsui-drag-handle-animation-block-offset-xgujsu));
156
156
  }
@@ -158,7 +158,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
158
158
  transform: translate(0, 0);
159
159
  }
160
160
  }
161
- @keyframes awsui_drag-handle-exit_155yk_15xkw_1 {
161
+ @keyframes awsui_drag-handle-exit_155yk_1acsn_1 {
162
162
  from {
163
163
  transform: translate(0, 0);
164
164
  }
@@ -166,11 +166,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
166
166
  transform: translate(var(--awsui-drag-handle-animation-inline-offset-xgujsu), var(--awsui-drag-handle-animation-block-offset-xgujsu));
167
167
  }
168
168
  }
169
- .awsui_direction-button-wrapper_155yk_15xkw_169:not(#\9) {
169
+ .awsui_direction-button-wrapper_155yk_1acsn_169:not(#\9) {
170
170
  --awsui-drag-handle-animation-inline-offset-xgujsu: 0;
171
171
  --awsui-drag-handle-animation-block-offset-xgujsu: 0;
172
172
  }
173
- @keyframes awsui_awsui-motion-fade-in_155yk_15xkw_1 {
173
+ @keyframes awsui_awsui-motion-fade-in_155yk_1acsn_1 {
174
174
  from {
175
175
  opacity: 0.2;
176
176
  }
@@ -178,7 +178,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
178
178
  opacity: 1;
179
179
  }
180
180
  }
181
- @keyframes awsui_awsui-motion-fade-out-0_155yk_15xkw_1 {
181
+ @keyframes awsui_awsui-motion-fade-out-0_155yk_1acsn_1 {
182
182
  from {
183
183
  opacity: 1;
184
184
  }
@@ -186,70 +186,70 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
186
186
  opacity: 0;
187
187
  }
188
188
  }
189
- .awsui_direction-button-wrapper-motion-enter_155yk_15xkw_189:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_15xkw_189:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_15xkw_189:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_15xkw_189:not(#\9) {
189
+ .awsui_direction-button-wrapper-motion-enter_155yk_1acsn_189:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_1acsn_189:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_1acsn_189:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_1acsn_189:not(#\9) {
190
190
  pointer-events: none;
191
191
  }
192
- .awsui_direction-button-wrapper-motion-entering_155yk_15xkw_189:not(#\9) {
193
- animation: awsui_drag-handle-entry_155yk_15xkw_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out), awsui_awsui-motion-fade-in_155yk_15xkw_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out);
192
+ .awsui_direction-button-wrapper-motion-entering_155yk_1acsn_189:not(#\9) {
193
+ animation: awsui_drag-handle-entry_155yk_1acsn_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out), awsui_awsui-motion-fade-in_155yk_1acsn_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out);
194
194
  }
195
195
  @media (prefers-reduced-motion: reduce) {
196
- .awsui_direction-button-wrapper-motion-entering_155yk_15xkw_189:not(#\9) {
196
+ .awsui_direction-button-wrapper-motion-entering_155yk_1acsn_189:not(#\9) {
197
197
  animation: none;
198
198
  transition: none;
199
199
  }
200
200
  }
201
- .awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_15xkw_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_15xkw_189:not(#\9) {
201
+ .awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_1acsn_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_1acsn_189:not(#\9) {
202
202
  animation: none;
203
203
  transition: none;
204
204
  }
205
- .awsui_direction-button-wrapper-motion-exiting_155yk_15xkw_189:not(#\9) {
206
- animation: awsui_drag-handle-exit_155yk_15xkw_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out), awsui_awsui-motion-fade-out-0_155yk_15xkw_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out);
205
+ .awsui_direction-button-wrapper-motion-exiting_155yk_1acsn_189:not(#\9) {
206
+ animation: awsui_drag-handle-exit_155yk_1acsn_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out) forwards, awsui_awsui-motion-fade-out-0_155yk_1acsn_1 var(--motion-duration-complex-hv88cf, 270ms) var(--motion-easing-responsive-dxkfpl, ease-out) forwards;
207
207
  }
208
208
  @media (prefers-reduced-motion: reduce) {
209
- .awsui_direction-button-wrapper-motion-exiting_155yk_15xkw_189:not(#\9) {
209
+ .awsui_direction-button-wrapper-motion-exiting_155yk_1acsn_189:not(#\9) {
210
210
  animation: none;
211
211
  transition: none;
212
212
  }
213
213
  }
214
- .awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_15xkw_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_15xkw_189:not(#\9) {
214
+ .awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_1acsn_189:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_1acsn_189:not(#\9) {
215
215
  animation: none;
216
216
  transition: none;
217
217
  }
218
218
  @media (prefers-reduced-motion: reduce) {
219
- .awsui_direction-button-wrapper_155yk_15xkw_169:not(#\9) {
219
+ .awsui_direction-button-wrapper_155yk_1acsn_169:not(#\9) {
220
220
  animation: none;
221
221
  transition: none;
222
222
  }
223
223
  }
224
- .awsui-motion-disabled .awsui_direction-button-wrapper_155yk_15xkw_169:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_15xkw_169:not(#\9) {
224
+ .awsui-motion-disabled .awsui_direction-button-wrapper_155yk_1acsn_169:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_1acsn_169:not(#\9) {
225
225
  animation: none;
226
226
  transition: none;
227
227
  }
228
228
 
229
- .awsui_direction-button-wrapper-block-start_155yk_15xkw_229:not(#\9) {
229
+ .awsui_direction-button-wrapper-block-start_155yk_1acsn_229:not(#\9) {
230
230
  --awsui-drag-handle-animation-block-offset-xgujsu: 20px;
231
231
  }
232
232
 
233
- .awsui_direction-button-wrapper-block-end_155yk_15xkw_233:not(#\9) {
233
+ .awsui_direction-button-wrapper-block-end_155yk_1acsn_233:not(#\9) {
234
234
  --awsui-drag-handle-animation-block-offset-xgujsu: -20px;
235
235
  }
236
236
 
237
- .awsui_direction-button-wrapper-inline-start_155yk_15xkw_237:not(#\9),
238
- .awsui_direction-button-wrapper-inline-end_155yk_15xkw_238.awsui_direction-button-wrapper-rtl_155yk_15xkw_238:not(#\9) {
237
+ .awsui_direction-button-wrapper-inline-start_155yk_1acsn_237:not(#\9),
238
+ .awsui_direction-button-wrapper-inline-end_155yk_1acsn_238.awsui_direction-button-wrapper-rtl_155yk_1acsn_238:not(#\9) {
239
239
  --awsui-drag-handle-animation-inline-offset-xgujsu: 20px;
240
240
  }
241
241
 
242
- .awsui_direction-button-wrapper-inline-end_155yk_15xkw_238:not(#\9),
243
- .awsui_direction-button-wrapper-inline-start_155yk_15xkw_237.awsui_direction-button-wrapper-rtl_155yk_15xkw_238:not(#\9) {
242
+ .awsui_direction-button-wrapper-inline-end_155yk_1acsn_238:not(#\9),
243
+ .awsui_direction-button-wrapper-inline-start_155yk_1acsn_237.awsui_direction-button-wrapper-rtl_155yk_1acsn_238:not(#\9) {
244
244
  --awsui-drag-handle-animation-inline-offset-xgujsu: -20px;
245
245
  }
246
246
 
247
- .awsui_drag-handle-wrapper_155yk_15xkw_247:not(#\9) {
247
+ .awsui_drag-handle-wrapper_155yk_1acsn_247:not(#\9) {
248
248
  position: relative;
249
249
  display: inline-block;
250
250
  }
251
251
 
252
- .awsui_portal-overlay_155yk_15xkw_252:not(#\9) {
252
+ .awsui_portal-overlay_155yk_1acsn_252:not(#\9) {
253
253
  position: absolute;
254
254
  inset-block-start: 0;
255
255
  inset-inline-start: 0;
@@ -257,16 +257,16 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
257
257
  z-index: 7000;
258
258
  }
259
259
 
260
- .awsui_portal-overlay-contents_155yk_15xkw_260:not(#\9) {
260
+ .awsui_portal-overlay-contents_155yk_1acsn_260:not(#\9) {
261
261
  pointer-events: auto;
262
262
  }
263
263
 
264
- .awsui_drag-handle_155yk_15xkw_247:not(#\9) {
264
+ .awsui_drag-handle_155yk_1acsn_247:not(#\9) {
265
265
  position: relative;
266
266
  display: flex;
267
267
  }
268
268
 
269
- .awsui_direction-button-wrapper_155yk_15xkw_169:not(#\9) {
269
+ .awsui_direction-button-wrapper_155yk_1acsn_169:not(#\9) {
270
270
  position: absolute;
271
271
  block-size: var(--space-static-xl-pek4x1, 24px);
272
272
  inline-size: var(--space-static-xl-pek4x1, 24px);
@@ -274,31 +274,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
274
274
  padding-inline: var(--space-static-xxs-0cgyf1, 4px);
275
275
  }
276
276
 
277
- .awsui_direction-button-wrapper-hidden_155yk_15xkw_277:not(#\9) {
277
+ .awsui_direction-button-wrapper-hidden_155yk_1acsn_277:not(#\9) {
278
278
  display: none;
279
279
  }
280
280
 
281
- .awsui_direction-button-wrapper-block-start_155yk_15xkw_229:not(#\9) {
281
+ .awsui_direction-button-wrapper-block-start_155yk_1acsn_229:not(#\9) {
282
282
  inset-block-start: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
283
283
  inset-inline-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
284
284
  }
285
285
 
286
- .awsui_direction-button-wrapper-block-end_155yk_15xkw_233:not(#\9) {
286
+ .awsui_direction-button-wrapper-block-end_155yk_1acsn_233:not(#\9) {
287
287
  inset-block-end: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
288
288
  inset-inline-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
289
289
  }
290
290
 
291
- .awsui_direction-button-wrapper-inline-start_155yk_15xkw_237:not(#\9) {
291
+ .awsui_direction-button-wrapper-inline-start_155yk_1acsn_237:not(#\9) {
292
292
  inset-inline-start: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
293
293
  inset-block-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
294
294
  }
295
295
 
296
- .awsui_direction-button-wrapper-inline-end_155yk_15xkw_238:not(#\9) {
296
+ .awsui_direction-button-wrapper-inline-end_155yk_1acsn_238:not(#\9) {
297
297
  inset-inline-end: calc(-1 * (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)));
298
298
  inset-block-start: calc(50% - (var(--space-static-xl-pek4x1, 24px) + 2 * var(--space-static-xxs-0cgyf1, 4px)) / 2);
299
299
  }
300
300
 
301
- .awsui_direction-button_155yk_15xkw_169:not(#\9) {
301
+ .awsui_direction-button_155yk_1acsn_169:not(#\9) {
302
302
  position: absolute;
303
303
  border-width: 0;
304
304
  cursor: pointer;
@@ -317,14 +317,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
317
317
  color: var(--color-text-direction-button-default-dkices, #ffffff);
318
318
  box-shadow: var(--shadow-dropdown-skxpuu, 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15));
319
319
  }
320
- .awsui_direction-button_155yk_15xkw_169:not(#\9):not(.awsui_direction-button-disabled_155yk_15xkw_320):hover {
320
+ .awsui_direction-button_155yk_1acsn_169:not(#\9):not(.awsui_direction-button-disabled_155yk_1acsn_320):hover {
321
321
  background-color: var(--color-background-direction-button-hover-v5bxfc, #414750);
322
322
  }
323
- .awsui_direction-button_155yk_15xkw_169:not(#\9):not(.awsui_direction-button-disabled_155yk_15xkw_320):active {
323
+ .awsui_direction-button_155yk_1acsn_169:not(#\9):not(.awsui_direction-button-disabled_155yk_1acsn_320):active {
324
324
  background-color: var(--color-background-direction-button-active-wn6s2j, #2a2e33);
325
325
  }
326
326
 
327
- .awsui_direction-button-disabled_155yk_15xkw_320:not(#\9) {
327
+ .awsui_direction-button-disabled_155yk_1acsn_320:not(#\9) {
328
328
  cursor: default;
329
329
  background-color: var(--color-background-direction-button-disabled-fu8sjl, #eaeded);
330
330
  color: var(--color-text-direction-button-disabled-c84zkd, #aab7b8);