@cloudscape-design/components-themeable 3.0.1317 → 3.0.1318

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 (664) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  3. package/lib/internal/template/action-card/interfaces.d.ts +3 -3
  4. package/lib/internal/template/action-card/interfaces.d.ts.map +1 -1
  5. package/lib/internal/template/action-card/interfaces.js.map +1 -1
  6. package/lib/internal/template/alert/interfaces.d.ts +3 -3
  7. package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
  8. package/lib/internal/template/alert/interfaces.js.map +1 -1
  9. package/lib/internal/template/anchor-navigation/interfaces.d.ts +2 -2
  10. package/lib/internal/template/anchor-navigation/interfaces.d.ts.map +1 -1
  11. package/lib/internal/template/anchor-navigation/interfaces.js.map +1 -1
  12. package/lib/internal/template/annotation-context/interfaces.d.ts +1 -1
  13. package/lib/internal/template/annotation-context/interfaces.d.ts.map +1 -1
  14. package/lib/internal/template/annotation-context/interfaces.js.map +1 -1
  15. package/lib/internal/template/app-layout/classic.d.ts +1 -1
  16. package/lib/internal/template/app-layout/drawer/overflow-menu.d.ts +1 -1
  17. package/lib/internal/template/app-layout/drawer/overflow-menu.d.ts.map +1 -1
  18. package/lib/internal/template/app-layout/drawer/overflow-menu.js.map +1 -1
  19. package/lib/internal/template/app-layout/index.js.map +1 -1
  20. package/lib/internal/template/app-layout/interfaces.d.ts +3 -3
  21. package/lib/internal/template/app-layout/interfaces.d.ts.map +1 -1
  22. package/lib/internal/template/app-layout/interfaces.js.map +1 -1
  23. package/lib/internal/template/app-layout/internal.d.ts +1 -1
  24. package/lib/internal/template/app-layout/runtime-drawer/index.d.ts +1 -1
  25. package/lib/internal/template/app-layout/runtime-drawer/index.d.ts.map +1 -1
  26. package/lib/internal/template/app-layout/runtime-drawer/index.js.map +1 -1
  27. package/lib/internal/template/app-layout/visual-refresh/index.d.ts +1 -1
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  30. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  31. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-ai-drawer.d.ts +4 -4
  32. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts +4 -4
  33. package/lib/internal/template/app-layout-toolbar/index.js.map +1 -1
  34. package/lib/internal/template/area-chart/elements/use-highlight-details.d.ts +1 -1
  35. package/lib/internal/template/area-chart/elements/use-highlight-details.d.ts.map +1 -1
  36. package/lib/internal/template/area-chart/elements/use-highlight-details.js.map +1 -1
  37. package/lib/internal/template/area-chart/interfaces.d.ts +1 -1
  38. package/lib/internal/template/area-chart/interfaces.d.ts.map +1 -1
  39. package/lib/internal/template/area-chart/interfaces.js.map +1 -1
  40. package/lib/internal/template/area-chart/model/compute-chart-props.d.ts +2 -2
  41. package/lib/internal/template/area-chart/model/compute-chart-props.d.ts.map +1 -1
  42. package/lib/internal/template/area-chart/model/compute-chart-props.js +2 -0
  43. package/lib/internal/template/area-chart/model/compute-chart-props.js.map +1 -1
  44. package/lib/internal/template/area-chart/model/index.d.ts +1 -1
  45. package/lib/internal/template/area-chart/model/index.d.ts.map +1 -1
  46. package/lib/internal/template/area-chart/model/index.js.map +1 -1
  47. package/lib/internal/template/area-chart/model/use-chart-model.d.ts +1 -1
  48. package/lib/internal/template/area-chart/model/use-chart-model.d.ts.map +1 -1
  49. package/lib/internal/template/area-chart/model/use-chart-model.js.map +1 -1
  50. package/lib/internal/template/area-chart/model/use-filter-props.d.ts +1 -1
  51. package/lib/internal/template/area-chart/model/use-filter-props.d.ts.map +1 -1
  52. package/lib/internal/template/area-chart/model/use-filter-props.js.map +1 -1
  53. package/lib/internal/template/area-chart/model/use-highlight-props.d.ts +1 -1
  54. package/lib/internal/template/area-chart/model/use-highlight-props.d.ts.map +1 -1
  55. package/lib/internal/template/area-chart/model/use-highlight-props.js.map +1 -1
  56. package/lib/internal/template/area-chart/model/utils.d.ts +1 -1
  57. package/lib/internal/template/area-chart/model/utils.d.ts.map +1 -1
  58. package/lib/internal/template/area-chart/model/utils.js.map +1 -1
  59. package/lib/internal/template/attribute-editor/interfaces.d.ts +3 -3
  60. package/lib/internal/template/attribute-editor/interfaces.d.ts.map +1 -1
  61. package/lib/internal/template/attribute-editor/interfaces.js.map +1 -1
  62. package/lib/internal/template/attribute-editor/row.d.ts +2 -2
  63. package/lib/internal/template/attribute-editor/row.d.ts.map +1 -1
  64. package/lib/internal/template/attribute-editor/row.js.map +1 -1
  65. package/lib/internal/template/autosuggest/autosuggest-option.d.ts +1 -1
  66. package/lib/internal/template/autosuggest/autosuggest-option.d.ts.map +1 -1
  67. package/lib/internal/template/autosuggest/autosuggest-option.js.map +1 -1
  68. package/lib/internal/template/autosuggest/interfaces.d.ts +5 -5
  69. package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
  70. package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
  71. package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
  72. package/lib/internal/template/autosuggest/internal.js +1 -1
  73. package/lib/internal/template/autosuggest/internal.js.map +1 -1
  74. package/lib/internal/template/autosuggest/load-more-controller.d.ts +1 -1
  75. package/lib/internal/template/autosuggest/load-more-controller.d.ts.map +1 -1
  76. package/lib/internal/template/autosuggest/load-more-controller.js.map +1 -1
  77. package/lib/internal/template/badge/interfaces.d.ts +2 -2
  78. package/lib/internal/template/badge/interfaces.d.ts.map +1 -1
  79. package/lib/internal/template/badge/interfaces.js.map +1 -1
  80. package/lib/internal/template/bar-chart/interfaces.d.ts +1 -1
  81. package/lib/internal/template/bar-chart/interfaces.d.ts.map +1 -1
  82. package/lib/internal/template/bar-chart/interfaces.js.map +1 -1
  83. package/lib/internal/template/box/interfaces.d.ts +2 -2
  84. package/lib/internal/template/box/interfaces.d.ts.map +1 -1
  85. package/lib/internal/template/box/interfaces.js.map +1 -1
  86. package/lib/internal/template/breadcrumb-group/all-items-dropdown.d.ts +1 -1
  87. package/lib/internal/template/breadcrumb-group/all-items-dropdown.d.ts.map +1 -1
  88. package/lib/internal/template/breadcrumb-group/all-items-dropdown.js.map +1 -1
  89. package/lib/internal/template/breadcrumb-group/interfaces.d.ts +2 -2
  90. package/lib/internal/template/breadcrumb-group/interfaces.d.ts.map +1 -1
  91. package/lib/internal/template/breadcrumb-group/interfaces.js.map +1 -1
  92. package/lib/internal/template/button/interfaces.d.ts +3 -3
  93. package/lib/internal/template/button/interfaces.d.ts.map +1 -1
  94. package/lib/internal/template/button/interfaces.js.map +1 -1
  95. package/lib/internal/template/button-dropdown/interfaces.d.ts +3 -3
  96. package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
  97. package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
  98. package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts +1 -1
  99. package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
  100. package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  101. package/lib/internal/template/button-group/file-input-item.d.ts +1 -1
  102. package/lib/internal/template/button-group/file-input-item.d.ts.map +1 -1
  103. package/lib/internal/template/button-group/file-input-item.js.map +1 -1
  104. package/lib/internal/template/button-group/icon-button-item.d.ts +1 -1
  105. package/lib/internal/template/button-group/icon-button-item.d.ts.map +1 -1
  106. package/lib/internal/template/button-group/icon-button-item.js +1 -1
  107. package/lib/internal/template/button-group/icon-button-item.js.map +1 -1
  108. package/lib/internal/template/button-group/icon-toggle-button-item.d.ts +1 -1
  109. package/lib/internal/template/button-group/icon-toggle-button-item.d.ts.map +1 -1
  110. package/lib/internal/template/button-group/icon-toggle-button-item.js.map +1 -1
  111. package/lib/internal/template/button-group/interfaces.d.ts +10 -2
  112. package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
  113. package/lib/internal/template/button-group/interfaces.js.map +1 -1
  114. package/lib/internal/template/button-group/item-element.d.ts +1 -1
  115. package/lib/internal/template/button-group/item-element.d.ts.map +1 -1
  116. package/lib/internal/template/button-group/item-element.js.map +1 -1
  117. package/lib/internal/template/button-group/menu-dropdown-item.d.ts +1 -1
  118. package/lib/internal/template/button-group/menu-dropdown-item.d.ts.map +1 -1
  119. package/lib/internal/template/button-group/menu-dropdown-item.js.map +1 -1
  120. package/lib/internal/template/calendar/interfaces.d.ts +3 -3
  121. package/lib/internal/template/calendar/interfaces.d.ts.map +1 -1
  122. package/lib/internal/template/calendar/interfaces.js.map +1 -1
  123. package/lib/internal/template/cards/interfaces.d.ts +2 -2
  124. package/lib/internal/template/cards/interfaces.d.ts.map +1 -1
  125. package/lib/internal/template/cards/interfaces.js.map +1 -1
  126. package/lib/internal/template/checkbox/base-checkbox.d.ts +3 -3
  127. package/lib/internal/template/checkbox/base-checkbox.d.ts.map +1 -1
  128. package/lib/internal/template/checkbox/base-checkbox.js.map +1 -1
  129. package/lib/internal/template/checkbox/interfaces.d.ts +2 -2
  130. package/lib/internal/template/checkbox/interfaces.d.ts.map +1 -1
  131. package/lib/internal/template/checkbox/interfaces.js.map +1 -1
  132. package/lib/internal/template/code-editor/error-screen.d.ts +1 -1
  133. package/lib/internal/template/code-editor/error-screen.d.ts.map +1 -1
  134. package/lib/internal/template/code-editor/error-screen.js.map +1 -1
  135. package/lib/internal/template/code-editor/interfaces.d.ts +3 -3
  136. package/lib/internal/template/code-editor/interfaces.d.ts.map +1 -1
  137. package/lib/internal/template/code-editor/interfaces.js.map +1 -1
  138. package/lib/internal/template/code-editor/listeners.d.ts +1 -1
  139. package/lib/internal/template/code-editor/listeners.d.ts.map +1 -1
  140. package/lib/internal/template/code-editor/listeners.js.map +1 -1
  141. package/lib/internal/template/code-editor/preferences-modal.js.map +1 -1
  142. package/lib/internal/template/collection-preferences/interfaces.d.ts +4 -4
  143. package/lib/internal/template/collection-preferences/interfaces.d.ts.map +1 -1
  144. package/lib/internal/template/collection-preferences/interfaces.js.map +1 -1
  145. package/lib/internal/template/column-layout/interfaces.d.ts +1 -1
  146. package/lib/internal/template/column-layout/interfaces.d.ts.map +1 -1
  147. package/lib/internal/template/column-layout/interfaces.js.map +1 -1
  148. package/lib/internal/template/container/interfaces.d.ts +1 -1
  149. package/lib/internal/template/container/interfaces.d.ts.map +1 -1
  150. package/lib/internal/template/container/interfaces.js.map +1 -1
  151. package/lib/internal/template/content-layout/interfaces.d.ts +1 -1
  152. package/lib/internal/template/content-layout/interfaces.d.ts.map +1 -1
  153. package/lib/internal/template/content-layout/interfaces.js.map +1 -1
  154. package/lib/internal/template/contexts/form-field.d.ts +2 -1
  155. package/lib/internal/template/contexts/form-field.d.ts.map +1 -1
  156. package/lib/internal/template/contexts/form-field.js +1 -1
  157. package/lib/internal/template/contexts/form-field.js.map +1 -1
  158. package/lib/internal/template/copy-to-clipboard/interfaces.d.ts +2 -2
  159. package/lib/internal/template/copy-to-clipboard/interfaces.d.ts.map +1 -1
  160. package/lib/internal/template/copy-to-clipboard/interfaces.js.map +1 -1
  161. package/lib/internal/template/date-input/interfaces.d.ts +3 -3
  162. package/lib/internal/template/date-input/interfaces.d.ts.map +1 -1
  163. package/lib/internal/template/date-input/interfaces.js.map +1 -1
  164. package/lib/internal/template/date-input/internal.d.ts.map +1 -1
  165. package/lib/internal/template/date-input/internal.js.map +1 -1
  166. package/lib/internal/template/date-picker/interfaces.d.ts +4 -4
  167. package/lib/internal/template/date-picker/interfaces.d.ts.map +1 -1
  168. package/lib/internal/template/date-picker/interfaces.js.map +1 -1
  169. package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts +1 -1
  170. package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts.map +1 -1
  171. package/lib/internal/template/date-range-picker/calendar/interfaces.js.map +1 -1
  172. package/lib/internal/template/date-range-picker/interfaces.d.ts +4 -4
  173. package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
  174. package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
  175. package/lib/internal/template/divider/interfaces.d.ts +2 -2
  176. package/lib/internal/template/divider/interfaces.d.ts.map +1 -1
  177. package/lib/internal/template/divider/interfaces.js.map +1 -1
  178. package/lib/internal/template/drawer/interfaces.d.ts +2 -2
  179. package/lib/internal/template/drawer/interfaces.d.ts.map +1 -1
  180. package/lib/internal/template/drawer/interfaces.js.map +1 -1
  181. package/lib/internal/template/dropdown/interfaces.d.ts +1 -1
  182. package/lib/internal/template/dropdown/interfaces.d.ts.map +1 -1
  183. package/lib/internal/template/dropdown/interfaces.js.map +1 -1
  184. package/lib/internal/template/dropdown/internal.d.ts +1 -1
  185. package/lib/internal/template/dropdown/internal.d.ts.map +1 -1
  186. package/lib/internal/template/dropdown/internal.js.map +1 -1
  187. package/lib/internal/template/error-boundary/interfaces.d.ts +1 -1
  188. package/lib/internal/template/error-boundary/interfaces.d.ts.map +1 -1
  189. package/lib/internal/template/error-boundary/interfaces.js.map +1 -1
  190. package/lib/internal/template/expandable-section/interfaces.d.ts +2 -2
  191. package/lib/internal/template/expandable-section/interfaces.d.ts.map +1 -1
  192. package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
  193. package/lib/internal/template/file-dropzone/interfaces.d.ts +2 -2
  194. package/lib/internal/template/file-dropzone/interfaces.d.ts.map +1 -1
  195. package/lib/internal/template/file-dropzone/interfaces.js.map +1 -1
  196. package/lib/internal/template/file-input/interfaces.d.ts +3 -3
  197. package/lib/internal/template/file-input/interfaces.d.ts.map +1 -1
  198. package/lib/internal/template/file-input/interfaces.js.map +1 -1
  199. package/lib/internal/template/file-token-group/file-token.d.ts +1 -1
  200. package/lib/internal/template/file-token-group/file-token.d.ts.map +1 -1
  201. package/lib/internal/template/file-token-group/file-token.js.map +1 -1
  202. package/lib/internal/template/file-token-group/interfaces.d.ts +2 -2
  203. package/lib/internal/template/file-token-group/interfaces.d.ts.map +1 -1
  204. package/lib/internal/template/file-token-group/interfaces.js.map +1 -1
  205. package/lib/internal/template/file-upload/interfaces.d.ts +3 -3
  206. package/lib/internal/template/file-upload/interfaces.d.ts.map +1 -1
  207. package/lib/internal/template/file-upload/interfaces.js.map +1 -1
  208. package/lib/internal/template/flashbar/common.d.ts +1 -1
  209. package/lib/internal/template/flashbar/interfaces.d.ts +2 -2
  210. package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
  211. package/lib/internal/template/flashbar/interfaces.js.map +1 -1
  212. package/lib/internal/template/form/interfaces.d.ts +2 -2
  213. package/lib/internal/template/form/interfaces.d.ts.map +1 -1
  214. package/lib/internal/template/form/interfaces.js.map +1 -1
  215. package/lib/internal/template/form-field/interfaces.d.ts +2 -2
  216. package/lib/internal/template/form-field/interfaces.d.ts.map +1 -1
  217. package/lib/internal/template/form-field/interfaces.js.map +1 -1
  218. package/lib/internal/template/grid/interfaces.d.ts +2 -2
  219. package/lib/internal/template/grid/interfaces.d.ts.map +1 -1
  220. package/lib/internal/template/grid/interfaces.js.map +1 -1
  221. package/lib/internal/template/grid/internal.d.ts +1 -1
  222. package/lib/internal/template/grid/internal.d.ts.map +1 -1
  223. package/lib/internal/template/grid/internal.js.map +1 -1
  224. package/lib/internal/template/header/interfaces.d.ts +1 -1
  225. package/lib/internal/template/header/interfaces.d.ts.map +1 -1
  226. package/lib/internal/template/header/interfaces.js.map +1 -1
  227. package/lib/internal/template/help-panel/interfaces.d.ts +1 -1
  228. package/lib/internal/template/help-panel/interfaces.d.ts.map +1 -1
  229. package/lib/internal/template/help-panel/interfaces.js.map +1 -1
  230. package/lib/internal/template/hotspot/interfaces.d.ts +1 -1
  231. package/lib/internal/template/hotspot/interfaces.d.ts.map +1 -1
  232. package/lib/internal/template/hotspot/interfaces.js.map +1 -1
  233. package/lib/internal/template/icon/interfaces.d.ts +2 -2
  234. package/lib/internal/template/icon/interfaces.d.ts.map +1 -1
  235. package/lib/internal/template/icon/interfaces.js.map +1 -1
  236. package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
  237. package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
  238. package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
  239. package/lib/internal/template/input/interfaces.d.ts +4 -4
  240. package/lib/internal/template/input/interfaces.d.ts.map +1 -1
  241. package/lib/internal/template/input/interfaces.js.map +1 -1
  242. package/lib/internal/template/input/internal.d.ts +3 -3
  243. package/lib/internal/template/input/internal.d.ts.map +1 -1
  244. package/lib/internal/template/input/internal.js.map +1 -1
  245. package/lib/internal/template/interfaces.d.ts +1 -1
  246. package/lib/internal/template/interfaces.d.ts.map +1 -1
  247. package/lib/internal/template/interfaces.js.map +1 -1
  248. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts +2 -1
  249. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  250. package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
  251. package/lib/internal/template/internal/analytics/context/analytics-context.d.ts +2 -1
  252. package/lib/internal/template/internal/analytics/context/analytics-context.d.ts.map +1 -1
  253. package/lib/internal/template/internal/analytics/context/analytics-context.js.map +1 -1
  254. package/lib/internal/template/internal/analytics/interfaces.d.ts +2 -15
  255. package/lib/internal/template/internal/analytics/interfaces.d.ts.map +1 -1
  256. package/lib/internal/template/internal/analytics/interfaces.js.map +1 -1
  257. package/lib/internal/template/internal/base-component/index.d.ts +3 -15
  258. package/lib/internal/template/internal/base-component/index.d.ts.map +1 -1
  259. package/lib/internal/template/internal/base-component/index.js.map +1 -1
  260. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  261. package/lib/internal/template/internal/breakpoints.d.ts +2 -1
  262. package/lib/internal/template/internal/breakpoints.d.ts.map +1 -1
  263. package/lib/internal/template/internal/breakpoints.js.map +1 -1
  264. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +3 -3
  265. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  266. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  267. package/lib/internal/template/internal/components/button-trigger/index.d.ts +2 -2
  268. package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
  269. package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
  270. package/lib/internal/template/internal/components/cartesian-chart/block-end-labels.d.ts +1 -1
  271. package/lib/internal/template/internal/components/cartesian-chart/block-end-labels.d.ts.map +1 -1
  272. package/lib/internal/template/internal/components/cartesian-chart/block-end-labels.js.map +1 -1
  273. package/lib/internal/template/internal/components/cartesian-chart/interfaces.d.ts +1 -209
  274. package/lib/internal/template/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
  275. package/lib/internal/template/internal/components/cartesian-chart/interfaces.js +2 -0
  276. package/lib/internal/template/internal/components/cartesian-chart/interfaces.js.map +1 -1
  277. package/lib/internal/template/internal/components/cartesian-chart/label-utils.d.ts +1 -1
  278. package/lib/internal/template/internal/components/cartesian-chart/label-utils.d.ts.map +1 -1
  279. package/lib/internal/template/internal/components/cartesian-chart/label-utils.js.map +1 -1
  280. package/lib/internal/template/internal/components/cartesian-chart/scales.d.ts +1 -1
  281. package/lib/internal/template/internal/components/cartesian-chart/scales.d.ts.map +1 -1
  282. package/lib/internal/template/internal/components/cartesian-chart/scales.js +0 -2
  283. package/lib/internal/template/internal/components/cartesian-chart/scales.js.map +1 -1
  284. package/lib/internal/template/internal/components/cartesian-chart/ticks.d.ts +1 -1
  285. package/lib/internal/template/internal/components/cartesian-chart/ticks.d.ts.map +1 -1
  286. package/lib/internal/template/internal/components/cartesian-chart/ticks.js.map +1 -1
  287. package/lib/internal/template/internal/components/chart-filter/index.d.ts +1 -1
  288. package/lib/internal/template/internal/components/chart-filter/index.d.ts.map +1 -1
  289. package/lib/internal/template/internal/components/chart-filter/index.js.map +1 -1
  290. package/lib/internal/template/internal/components/chart-series-details/index.d.ts +1 -1
  291. package/lib/internal/template/internal/components/chart-series-details/index.d.ts.map +1 -1
  292. package/lib/internal/template/internal/components/chart-series-details/index.js.map +1 -1
  293. package/lib/internal/template/internal/components/chart-series-marker/index.d.ts +1 -1
  294. package/lib/internal/template/internal/components/chart-series-marker/index.d.ts.map +1 -1
  295. package/lib/internal/template/internal/components/chart-series-marker/index.js.map +1 -1
  296. package/lib/internal/template/internal/components/chart-status-container/index.d.ts +2 -2
  297. package/lib/internal/template/internal/components/chart-status-container/index.d.ts.map +1 -1
  298. package/lib/internal/template/internal/components/chart-status-container/index.js.map +1 -1
  299. package/lib/internal/template/internal/components/chart-wrapper/index.d.ts +1 -1
  300. package/lib/internal/template/internal/components/chart-wrapper/index.d.ts.map +1 -1
  301. package/lib/internal/template/internal/components/chart-wrapper/index.js.map +1 -1
  302. package/lib/internal/template/internal/components/checkbox-icon/index.d.ts +1 -1
  303. package/lib/internal/template/internal/components/checkbox-icon/index.d.ts.map +1 -1
  304. package/lib/internal/template/internal/components/checkbox-icon/index.js.map +1 -1
  305. package/lib/internal/template/internal/components/dropdown-status/index.d.ts +3 -3
  306. package/lib/internal/template/internal/components/dropdown-status/index.d.ts.map +1 -1
  307. package/lib/internal/template/internal/components/dropdown-status/index.js.map +1 -1
  308. package/lib/internal/template/internal/components/masked-input/interfaces.d.ts +2 -2
  309. package/lib/internal/template/internal/components/masked-input/interfaces.d.ts.map +1 -1
  310. package/lib/internal/template/internal/components/masked-input/interfaces.js.map +1 -1
  311. package/lib/internal/template/internal/components/masked-input/use-mask.d.ts +1 -1
  312. package/lib/internal/template/internal/components/masked-input/use-mask.d.ts.map +1 -1
  313. package/lib/internal/template/internal/components/masked-input/use-mask.js.map +1 -1
  314. package/lib/internal/template/internal/components/option/interfaces.d.ts +3 -26
  315. package/lib/internal/template/internal/components/option/interfaces.d.ts.map +1 -1
  316. package/lib/internal/template/internal/components/option/interfaces.js.map +1 -1
  317. package/lib/internal/template/internal/components/option/option-announcer.d.ts +1 -1
  318. package/lib/internal/template/internal/components/option/option-announcer.d.ts.map +1 -1
  319. package/lib/internal/template/internal/components/option/option-announcer.js.map +1 -1
  320. package/lib/internal/template/internal/components/option/utils/filter-options.d.ts +2 -1
  321. package/lib/internal/template/internal/components/option/utils/filter-options.d.ts.map +1 -1
  322. package/lib/internal/template/internal/components/option/utils/filter-options.js.map +1 -1
  323. package/lib/internal/template/internal/components/option/utils/flatten-options.d.ts +2 -1
  324. package/lib/internal/template/internal/components/option/utils/flatten-options.d.ts.map +1 -1
  325. package/lib/internal/template/internal/components/option/utils/flatten-options.js.map +1 -1
  326. package/lib/internal/template/internal/components/options-list/index.d.ts +3 -3
  327. package/lib/internal/template/internal/components/options-list/index.d.ts.map +1 -1
  328. package/lib/internal/template/internal/components/options-list/index.js +1 -1
  329. package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
  330. package/lib/internal/template/internal/components/options-list/utils/use-keyboard.d.ts +1 -1
  331. package/lib/internal/template/internal/components/options-list/utils/use-keyboard.d.ts.map +1 -1
  332. package/lib/internal/template/internal/components/options-list/utils/use-keyboard.js.map +1 -1
  333. package/lib/internal/template/internal/components/radio-button/index.d.ts +1 -1
  334. package/lib/internal/template/internal/components/radio-button/index.d.ts.map +1 -1
  335. package/lib/internal/template/internal/components/radio-button/index.js.map +1 -1
  336. package/lib/internal/template/internal/components/radio-button/interfaces.d.ts +1 -128
  337. package/lib/internal/template/internal/components/radio-button/interfaces.d.ts.map +1 -1
  338. package/lib/internal/template/internal/components/radio-button/interfaces.js +2 -0
  339. package/lib/internal/template/internal/components/radio-button/interfaces.js.map +1 -1
  340. package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts +1 -1
  341. package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts.map +1 -1
  342. package/lib/internal/template/internal/components/selectable-item/interfaces.js.map +1 -1
  343. package/lib/internal/template/internal/components/sortable-area/interfaces.d.ts +3 -9
  344. package/lib/internal/template/internal/components/sortable-area/interfaces.d.ts.map +1 -1
  345. package/lib/internal/template/internal/components/sortable-area/interfaces.js.map +1 -1
  346. package/lib/internal/template/internal/components/token-list/token-limit-toggle.d.ts +1 -1
  347. package/lib/internal/template/internal/components/token-list/token-limit-toggle.d.ts.map +1 -1
  348. package/lib/internal/template/internal/components/token-list/token-limit-toggle.js.map +1 -1
  349. package/lib/internal/template/internal/context/form-field-context.d.ts +2 -54
  350. package/lib/internal/template/internal/context/form-field-context.d.ts.map +1 -1
  351. package/lib/internal/template/internal/context/form-field-context.js.map +1 -1
  352. package/lib/internal/template/internal/do-not-use/feature-prompt/interfaces.d.ts +1 -1
  353. package/lib/internal/template/internal/do-not-use/feature-prompt/interfaces.d.ts.map +1 -1
  354. package/lib/internal/template/internal/do-not-use/feature-prompt/interfaces.js.map +1 -1
  355. package/lib/internal/template/internal/do-not-use/feature-prompt/internal.d.ts +1 -1
  356. package/lib/internal/template/internal/do-not-use/feature-prompt/internal.d.ts.map +1 -1
  357. package/lib/internal/template/internal/do-not-use/feature-prompt/internal.js.map +1 -1
  358. package/lib/internal/template/internal/environment.js +2 -2
  359. package/lib/internal/template/internal/environment.json +2 -2
  360. package/lib/internal/template/internal/events/index.d.ts +2 -24
  361. package/lib/internal/template/internal/events/index.d.ts.map +1 -1
  362. package/lib/internal/template/internal/events/index.js.map +1 -1
  363. package/lib/internal/template/internal/generated/theming/index.cjs +6 -0
  364. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +27 -0
  365. package/lib/internal/template/internal/generated/theming/index.d.ts +27 -0
  366. package/lib/internal/template/internal/generated/theming/index.js +6 -0
  367. package/lib/internal/template/internal/hooks/check-controlled/index.d.ts +1 -1
  368. package/lib/internal/template/internal/hooks/check-controlled/index.d.ts.map +1 -1
  369. package/lib/internal/template/internal/hooks/check-controlled/index.js.map +1 -1
  370. package/lib/internal/template/internal/hooks/container-queries/use-container-breakpoints.d.ts +1 -1
  371. package/lib/internal/template/internal/hooks/container-queries/use-container-breakpoints.d.ts.map +1 -1
  372. package/lib/internal/template/internal/hooks/container-queries/use-container-breakpoints.js.map +1 -1
  373. package/lib/internal/template/internal/hooks/use-base-component/index.d.ts +1 -1
  374. package/lib/internal/template/internal/hooks/use-base-component/index.d.ts.map +1 -1
  375. package/lib/internal/template/internal/hooks/use-base-component/index.js.map +1 -1
  376. package/lib/internal/template/internal/hooks/use-focus-tracker.d.ts +1 -1
  377. package/lib/internal/template/internal/hooks/use-focus-tracker.d.ts.map +1 -1
  378. package/lib/internal/template/internal/hooks/use-focus-tracker.js.map +1 -1
  379. package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +1 -1
  380. package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
  381. package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
  382. package/lib/internal/template/internal/plugins/widget/interfaces.d.ts +1 -1
  383. package/lib/internal/template/internal/plugins/widget/interfaces.d.ts.map +1 -1
  384. package/lib/internal/template/internal/plugins/widget/interfaces.js.map +1 -1
  385. package/lib/internal/template/internal/utils/date-time/interfaces.d.ts +1 -16
  386. package/lib/internal/template/internal/utils/date-time/interfaces.d.ts.map +1 -1
  387. package/lib/internal/template/internal/utils/date-time/interfaces.js.map +1 -1
  388. package/lib/internal/template/internal/utils/with-native-attributes.d.ts +2 -1
  389. package/lib/internal/template/internal/utils/with-native-attributes.d.ts.map +1 -1
  390. package/lib/internal/template/internal/utils/with-native-attributes.js.map +1 -1
  391. package/lib/internal/template/item-card/interfaces.d.ts +2 -2
  392. package/lib/internal/template/item-card/interfaces.d.ts.map +1 -1
  393. package/lib/internal/template/item-card/interfaces.js.map +1 -1
  394. package/lib/internal/template/key-value-pairs/interfaces.d.ts +1 -1
  395. package/lib/internal/template/key-value-pairs/interfaces.d.ts.map +1 -1
  396. package/lib/internal/template/key-value-pairs/interfaces.js.map +1 -1
  397. package/lib/internal/template/link/interfaces.d.ts +3 -3
  398. package/lib/internal/template/link/interfaces.d.ts.map +1 -1
  399. package/lib/internal/template/link/interfaces.js.map +1 -1
  400. package/lib/internal/template/list/interfaces.d.ts +3 -3
  401. package/lib/internal/template/list/interfaces.d.ts.map +1 -1
  402. package/lib/internal/template/list/interfaces.js.map +1 -1
  403. package/lib/internal/template/live-region/interfaces.d.ts +1 -1
  404. package/lib/internal/template/live-region/interfaces.d.ts.map +1 -1
  405. package/lib/internal/template/live-region/interfaces.js.map +1 -1
  406. package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts +1 -1
  407. package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  408. package/lib/internal/template/mixed-line-bar-chart/chart-container.js.map +1 -1
  409. package/lib/internal/template/mixed-line-bar-chart/format-highlighted.d.ts +1 -1
  410. package/lib/internal/template/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
  411. package/lib/internal/template/mixed-line-bar-chart/format-highlighted.js.map +1 -1
  412. package/lib/internal/template/mixed-line-bar-chart/interfaces.d.ts +1 -1
  413. package/lib/internal/template/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
  414. package/lib/internal/template/mixed-line-bar-chart/interfaces.js.map +1 -1
  415. package/lib/internal/template/modal/interfaces.d.ts +3 -3
  416. package/lib/internal/template/modal/interfaces.d.ts.map +1 -1
  417. package/lib/internal/template/modal/interfaces.js.map +1 -1
  418. package/lib/internal/template/multiselect/embedded.d.ts +2 -2
  419. package/lib/internal/template/multiselect/interfaces.d.ts +2 -2
  420. package/lib/internal/template/multiselect/interfaces.d.ts.map +1 -1
  421. package/lib/internal/template/multiselect/interfaces.js.map +1 -1
  422. package/lib/internal/template/multiselect/internal.d.ts +1 -1
  423. package/lib/internal/template/multiselect/use-multiselect.d.ts +8 -8
  424. package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
  425. package/lib/internal/template/multiselect/use-multiselect.js.map +1 -1
  426. package/lib/internal/template/navigable-group/interfaces.d.ts +1 -1
  427. package/lib/internal/template/navigable-group/interfaces.d.ts.map +1 -1
  428. package/lib/internal/template/navigable-group/interfaces.js.map +1 -1
  429. package/lib/internal/template/pagination/interfaces.d.ts +1 -1
  430. package/lib/internal/template/pagination/interfaces.d.ts.map +1 -1
  431. package/lib/internal/template/pagination/interfaces.js.map +1 -1
  432. package/lib/internal/template/pagination/internal.d.ts.map +1 -1
  433. package/lib/internal/template/pagination/internal.js.map +1 -1
  434. package/lib/internal/template/panel-layout/interfaces.d.ts +2 -2
  435. package/lib/internal/template/panel-layout/interfaces.d.ts.map +1 -1
  436. package/lib/internal/template/panel-layout/interfaces.js.map +1 -1
  437. package/lib/internal/template/pie-chart/interfaces.d.ts +2 -2
  438. package/lib/internal/template/pie-chart/interfaces.d.ts.map +1 -1
  439. package/lib/internal/template/pie-chart/interfaces.js.map +1 -1
  440. package/lib/internal/template/popover/interfaces.d.ts +1 -1
  441. package/lib/internal/template/popover/interfaces.d.ts.map +1 -1
  442. package/lib/internal/template/popover/interfaces.js.map +1 -1
  443. package/lib/internal/template/popover/internal.d.ts +1 -1
  444. package/lib/internal/template/popover/internal.d.ts.map +1 -1
  445. package/lib/internal/template/popover/internal.js.map +1 -1
  446. package/lib/internal/template/progress-bar/interfaces.d.ts +2 -2
  447. package/lib/internal/template/progress-bar/interfaces.d.ts.map +1 -1
  448. package/lib/internal/template/progress-bar/interfaces.js.map +1 -1
  449. package/lib/internal/template/prompt-input/core/menu-state.d.ts +2 -2
  450. package/lib/internal/template/prompt-input/core/menu-state.d.ts.map +1 -1
  451. package/lib/internal/template/prompt-input/core/menu-state.js.map +1 -1
  452. package/lib/internal/template/prompt-input/interfaces.d.ts +6 -6
  453. package/lib/internal/template/prompt-input/interfaces.d.ts.map +1 -1
  454. package/lib/internal/template/prompt-input/interfaces.js.map +1 -1
  455. package/lib/internal/template/property-filter/controller.d.ts +2 -2
  456. package/lib/internal/template/property-filter/controller.d.ts.map +1 -1
  457. package/lib/internal/template/property-filter/controller.js.map +1 -1
  458. package/lib/internal/template/property-filter/filter-options.js.map +1 -1
  459. package/lib/internal/template/property-filter/interfaces.d.ts +4 -4
  460. package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
  461. package/lib/internal/template/property-filter/interfaces.js.map +1 -1
  462. package/lib/internal/template/property-filter/property-editor.d.ts +2 -2
  463. package/lib/internal/template/property-filter/property-editor.d.ts.map +1 -1
  464. package/lib/internal/template/property-filter/property-editor.js.map +1 -1
  465. package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts +1 -1
  466. package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts.map +1 -1
  467. package/lib/internal/template/property-filter/property-filter-autosuggest.js +1 -1
  468. package/lib/internal/template/property-filter/property-filter-autosuggest.js.map +1 -1
  469. package/lib/internal/template/property-filter/token-editor-inputs.d.ts +2 -2
  470. package/lib/internal/template/property-filter/token-editor-inputs.d.ts.map +1 -1
  471. package/lib/internal/template/property-filter/token-editor-inputs.js.map +1 -1
  472. package/lib/internal/template/property-filter/token-editor.d.ts +2 -2
  473. package/lib/internal/template/property-filter/token-editor.d.ts.map +1 -1
  474. package/lib/internal/template/property-filter/token-editor.js.map +1 -1
  475. package/lib/internal/template/property-filter/token.d.ts +2 -2
  476. package/lib/internal/template/property-filter/token.d.ts.map +1 -1
  477. package/lib/internal/template/property-filter/token.js.map +1 -1
  478. package/lib/internal/template/property-filter/use-load-items.d.ts +1 -1
  479. package/lib/internal/template/property-filter/use-load-items.d.ts.map +1 -1
  480. package/lib/internal/template/property-filter/use-load-items.js.map +1 -1
  481. package/lib/internal/template/radio-button/interfaces.d.ts +128 -2
  482. package/lib/internal/template/radio-button/interfaces.d.ts.map +1 -1
  483. package/lib/internal/template/radio-button/interfaces.js.map +1 -1
  484. package/lib/internal/template/radio-group/interfaces.d.ts +4 -4
  485. package/lib/internal/template/radio-group/interfaces.d.ts.map +1 -1
  486. package/lib/internal/template/radio-group/interfaces.js.map +1 -1
  487. package/lib/internal/template/s3-resource-selector/interfaces.d.ts +2 -2
  488. package/lib/internal/template/s3-resource-selector/interfaces.d.ts.map +1 -1
  489. package/lib/internal/template/s3-resource-selector/interfaces.js.map +1 -1
  490. package/lib/internal/template/s3-resource-selector/s3-in-context/index.d.ts +1 -1
  491. package/lib/internal/template/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
  492. package/lib/internal/template/s3-resource-selector/s3-in-context/index.js.map +1 -1
  493. package/lib/internal/template/s3-resource-selector/s3-in-context/use-versions-fetch.d.ts +1 -1
  494. package/lib/internal/template/segmented-control/interfaces.d.ts +2 -2
  495. package/lib/internal/template/segmented-control/interfaces.d.ts.map +1 -1
  496. package/lib/internal/template/segmented-control/interfaces.js.map +1 -1
  497. package/lib/internal/template/select/interfaces.d.ts +5 -5
  498. package/lib/internal/template/select/interfaces.d.ts.map +1 -1
  499. package/lib/internal/template/select/interfaces.js.map +1 -1
  500. package/lib/internal/template/select/internal.d.ts.map +1 -1
  501. package/lib/internal/template/select/internal.js.map +1 -1
  502. package/lib/internal/template/select/parts/item.d.ts.map +1 -1
  503. package/lib/internal/template/select/parts/item.js.map +1 -1
  504. package/lib/internal/template/select/parts/multiselect-item.d.ts.map +1 -1
  505. package/lib/internal/template/select/parts/multiselect-item.js.map +1 -1
  506. package/lib/internal/template/select/parts/trigger.d.ts +2 -2
  507. package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
  508. package/lib/internal/template/select/parts/trigger.js.map +1 -1
  509. package/lib/internal/template/select/utils/connect-options.d.ts +2 -1
  510. package/lib/internal/template/select/utils/connect-options.d.ts.map +1 -1
  511. package/lib/internal/template/select/utils/connect-options.js.map +1 -1
  512. package/lib/internal/template/select/utils/use-announcement.d.ts +1 -1
  513. package/lib/internal/template/select/utils/use-announcement.d.ts.map +1 -1
  514. package/lib/internal/template/select/utils/use-announcement.js.map +1 -1
  515. package/lib/internal/template/select/utils/use-load-items.d.ts +2 -2
  516. package/lib/internal/template/select/utils/use-load-items.d.ts.map +1 -1
  517. package/lib/internal/template/select/utils/use-load-items.js.map +1 -1
  518. package/lib/internal/template/select/utils/use-native-search.d.ts +2 -1
  519. package/lib/internal/template/select/utils/use-native-search.d.ts.map +1 -1
  520. package/lib/internal/template/select/utils/use-native-search.js.map +1 -1
  521. package/lib/internal/template/select/utils/use-select.d.ts +4 -3
  522. package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
  523. package/lib/internal/template/select/utils/use-select.js.map +1 -1
  524. package/lib/internal/template/side-navigation/interfaces.d.ts +2 -2
  525. package/lib/internal/template/side-navigation/interfaces.d.ts.map +1 -1
  526. package/lib/internal/template/side-navigation/interfaces.js.map +1 -1
  527. package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
  528. package/lib/internal/template/side-navigation/parts.js.map +1 -1
  529. package/lib/internal/template/skeleton/interfaces.d.ts +1 -1
  530. package/lib/internal/template/skeleton/interfaces.d.ts.map +1 -1
  531. package/lib/internal/template/skeleton/interfaces.js.map +1 -1
  532. package/lib/internal/template/slider/interfaces.d.ts +3 -3
  533. package/lib/internal/template/slider/interfaces.d.ts.map +1 -1
  534. package/lib/internal/template/slider/interfaces.js.map +1 -1
  535. package/lib/internal/template/space-between/interfaces.d.ts +2 -2
  536. package/lib/internal/template/space-between/interfaces.d.ts.map +1 -1
  537. package/lib/internal/template/space-between/interfaces.js.map +1 -1
  538. package/lib/internal/template/spinner/interfaces.d.ts +2 -2
  539. package/lib/internal/template/spinner/interfaces.d.ts.map +1 -1
  540. package/lib/internal/template/spinner/interfaces.js.map +1 -1
  541. package/lib/internal/template/split-panel/interfaces.d.ts +1 -1
  542. package/lib/internal/template/split-panel/interfaces.d.ts.map +1 -1
  543. package/lib/internal/template/split-panel/interfaces.js.map +1 -1
  544. package/lib/internal/template/status-indicator/interfaces.d.ts +2 -2
  545. package/lib/internal/template/status-indicator/interfaces.d.ts.map +1 -1
  546. package/lib/internal/template/status-indicator/interfaces.js.map +1 -1
  547. package/lib/internal/template/steps/interfaces.d.ts +1 -1
  548. package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
  549. package/lib/internal/template/steps/interfaces.js.map +1 -1
  550. package/lib/internal/template/table/interfaces.d.ts +2 -2
  551. package/lib/internal/template/table/interfaces.d.ts.map +1 -1
  552. package/lib/internal/template/table/interfaces.js.map +1 -1
  553. package/lib/internal/template/table/thead.d.ts +1 -1
  554. package/lib/internal/template/table/thead.d.ts.map +1 -1
  555. package/lib/internal/template/table/thead.js.map +1 -1
  556. package/lib/internal/template/table/use-cell-editing.d.ts +1 -1
  557. package/lib/internal/template/table/use-cell-editing.d.ts.map +1 -1
  558. package/lib/internal/template/table/use-cell-editing.js.map +1 -1
  559. package/lib/internal/template/tabs/interfaces.d.ts +2 -2
  560. package/lib/internal/template/tabs/interfaces.d.ts.map +1 -1
  561. package/lib/internal/template/tabs/interfaces.js.map +1 -1
  562. package/lib/internal/template/tag-editor/index.d.ts.map +1 -1
  563. package/lib/internal/template/tag-editor/index.js.map +1 -1
  564. package/lib/internal/template/tag-editor/interfaces.d.ts +2 -2
  565. package/lib/internal/template/tag-editor/interfaces.d.ts.map +1 -1
  566. package/lib/internal/template/tag-editor/interfaces.js.map +1 -1
  567. package/lib/internal/template/tag-editor/internal.js.map +1 -1
  568. package/lib/internal/template/text-content/interfaces.d.ts +1 -1
  569. package/lib/internal/template/text-content/interfaces.d.ts.map +1 -1
  570. package/lib/internal/template/text-content/interfaces.js.map +1 -1
  571. package/lib/internal/template/text-filter/interfaces.d.ts +3 -3
  572. package/lib/internal/template/text-filter/interfaces.d.ts.map +1 -1
  573. package/lib/internal/template/text-filter/interfaces.js.map +1 -1
  574. package/lib/internal/template/textarea/interfaces.d.ts +4 -4
  575. package/lib/internal/template/textarea/interfaces.d.ts.map +1 -1
  576. package/lib/internal/template/textarea/interfaces.js.map +1 -1
  577. package/lib/internal/template/tiles/interfaces.d.ts +4 -4
  578. package/lib/internal/template/tiles/interfaces.d.ts.map +1 -1
  579. package/lib/internal/template/tiles/interfaces.js.map +1 -1
  580. package/lib/internal/template/time-input/interfaces.d.ts +2 -2
  581. package/lib/internal/template/time-input/interfaces.d.ts.map +1 -1
  582. package/lib/internal/template/time-input/interfaces.js.map +1 -1
  583. package/lib/internal/template/toggle/interfaces.d.ts +2 -2
  584. package/lib/internal/template/toggle/interfaces.d.ts.map +1 -1
  585. package/lib/internal/template/toggle/interfaces.js.map +1 -1
  586. package/lib/internal/template/toggle-button/interfaces.d.ts +2 -2
  587. package/lib/internal/template/toggle-button/interfaces.d.ts.map +1 -1
  588. package/lib/internal/template/toggle-button/interfaces.js.map +1 -1
  589. package/lib/internal/template/token/dismiss-button.d.ts +1 -1
  590. package/lib/internal/template/token/dismiss-button.d.ts.map +1 -1
  591. package/lib/internal/template/token/dismiss-button.js.map +1 -1
  592. package/lib/internal/template/token/interfaces.d.ts +2 -2
  593. package/lib/internal/template/token/interfaces.d.ts.map +1 -1
  594. package/lib/internal/template/token/interfaces.js.map +1 -1
  595. package/lib/internal/template/token-group/interfaces.d.ts +2 -2
  596. package/lib/internal/template/token-group/interfaces.d.ts.map +1 -1
  597. package/lib/internal/template/token-group/interfaces.js.map +1 -1
  598. package/lib/internal/template/tooltip/interfaces.d.ts +1 -1
  599. package/lib/internal/template/tooltip/interfaces.d.ts.map +1 -1
  600. package/lib/internal/template/tooltip/interfaces.js.map +1 -1
  601. package/lib/internal/template/top-navigation/interfaces.d.ts +2 -2
  602. package/lib/internal/template/top-navigation/interfaces.d.ts.map +1 -1
  603. package/lib/internal/template/top-navigation/interfaces.js.map +1 -1
  604. package/lib/internal/template/tree-view/interfaces.d.ts +2 -2
  605. package/lib/internal/template/tree-view/interfaces.d.ts.map +1 -1
  606. package/lib/internal/template/tree-view/interfaces.js.map +1 -1
  607. package/lib/internal/template/truncated-text/interfaces.d.ts +1 -1
  608. package/lib/internal/template/truncated-text/interfaces.d.ts.map +1 -1
  609. package/lib/internal/template/truncated-text/interfaces.js.map +1 -1
  610. package/lib/internal/template/tutorial-panel/index.js.map +1 -1
  611. package/lib/internal/template/tutorial-panel/interfaces.d.ts +2 -2
  612. package/lib/internal/template/tutorial-panel/interfaces.d.ts.map +1 -1
  613. package/lib/internal/template/tutorial-panel/interfaces.js.map +1 -1
  614. package/lib/internal/template/types/analytics.d.ts +16 -0
  615. package/lib/internal/template/types/analytics.d.ts.map +1 -0
  616. package/lib/internal/template/types/analytics.js +4 -0
  617. package/lib/internal/template/types/analytics.js.map +1 -0
  618. package/lib/internal/template/types/base-component.d.ts +15 -0
  619. package/lib/internal/template/types/base-component.d.ts.map +1 -0
  620. package/lib/internal/template/types/base-component.js +4 -0
  621. package/lib/internal/template/types/base-component.js.map +1 -0
  622. package/lib/internal/template/types/breakpoint.d.ts +2 -0
  623. package/lib/internal/template/types/breakpoint.d.ts.map +1 -0
  624. package/lib/internal/template/types/breakpoint.js +2 -0
  625. package/lib/internal/template/types/breakpoint.js.map +1 -0
  626. package/lib/internal/template/types/cartesian-chart.d.ts +210 -0
  627. package/lib/internal/template/types/cartesian-chart.d.ts.map +1 -0
  628. package/lib/internal/template/types/cartesian-chart.js +2 -0
  629. package/lib/internal/template/types/cartesian-chart.js.map +1 -0
  630. package/lib/internal/template/types/date-time.d.ts +17 -0
  631. package/lib/internal/template/types/date-time.d.ts.map +1 -0
  632. package/lib/internal/template/types/date-time.js +4 -0
  633. package/lib/internal/template/types/date-time.js.map +1 -0
  634. package/lib/internal/template/{internal/components/dropdown-status/interfaces.d.ts → types/dropdown-status.d.ts} +1 -1
  635. package/lib/internal/template/types/dropdown-status.d.ts.map +1 -0
  636. package/lib/internal/template/types/dropdown-status.js +2 -0
  637. package/lib/internal/template/types/dropdown-status.js.map +1 -0
  638. package/lib/internal/template/types/events.d.ts +25 -0
  639. package/lib/internal/template/types/events.d.ts.map +1 -0
  640. package/lib/internal/template/types/events.js +4 -0
  641. package/lib/internal/template/types/events.js.map +1 -0
  642. package/lib/internal/template/types/form-field.d.ts +55 -0
  643. package/lib/internal/template/types/form-field.d.ts.map +1 -0
  644. package/lib/internal/template/types/form-field.js +4 -0
  645. package/lib/internal/template/types/form-field.js.map +1 -0
  646. package/lib/internal/template/types/native-attributes.d.ts +3 -0
  647. package/lib/internal/template/types/native-attributes.d.ts.map +1 -0
  648. package/lib/internal/template/types/native-attributes.js +2 -0
  649. package/lib/internal/template/types/native-attributes.js.map +1 -0
  650. package/lib/internal/template/types/option.d.ts +27 -0
  651. package/lib/internal/template/types/option.d.ts.map +1 -0
  652. package/lib/internal/template/types/option.js +2 -0
  653. package/lib/internal/template/types/option.js.map +1 -0
  654. package/lib/internal/template/types/sortable-area.d.ts +9 -0
  655. package/lib/internal/template/types/sortable-area.d.ts.map +1 -0
  656. package/lib/internal/template/types/sortable-area.js +4 -0
  657. package/lib/internal/template/types/sortable-area.js.map +1 -0
  658. package/lib/internal/template/wizard/interfaces.d.ts +3 -3
  659. package/lib/internal/template/wizard/interfaces.d.ts.map +1 -1
  660. package/lib/internal/template/wizard/interfaces.js.map +1 -1
  661. package/package.json +1 -1
  662. package/lib/internal/template/internal/components/dropdown-status/interfaces.d.ts.map +0 -1
  663. package/lib/internal/template/internal/components/dropdown-status/interfaces.js +0 -2
  664. package/lib/internal/template/internal/components/dropdown-status/interfaces.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,UAAU,EACX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAS5E,UAAU,qBACR,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B;IAC5B,YAAY,CAAC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O,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,mGA4RrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAIlF,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAS1D,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAmC,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAiB,mBAAmB,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AAErH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAsCrC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CACvC,CACE,EACE,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,IAAI,EAC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AAE,uBAAuB,EACpC,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,cAAc,CAAC,EACrD,MAAM,EACJ,iBAAiB,IAAI,CACnB,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,SAAS,EAAE,qBAAqB,IAChG,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAC3C,CACP,EAEH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,OAAO,EACL,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CACxB,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAChE,eAAe,CACZ,CACP,CAAC,CAAC,CAAC,IAAI,GAEV,CACE,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\n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport { ExpandToViewport } from '../../../dropdown/interfaces';\nimport InternalDropdown from '../../../dropdown/internal';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n InputProps,\n} from '../../../input/interfaces';\nimport InternalInput from '../../../input/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { getBreakpointValue } from '../../breakpoints';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../../context/form-field-context';\nimport { BaseKeyDetail, fireCancelableEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { useIMEComposition } from '../../hooks/use-ime-composition';\nimport { KeyCode } from '../../keycode';\nimport { getDropdownMinWidth } from '../../utils/get-dropdown-min-width';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport { processAttributes } from '../../utils/with-native-attributes';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n style?: InputProps['style'];\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n nativeInputAttributes,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n style,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => inputRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n const { isComposing } = useIMEComposition(inputRef);\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n // Shared ESC key handler logic for both input and dropdown elements\n // When returnFocus is true (from dropdown elements), focus returns to input after closing\n const handleEscapeKey = (returnFocus: boolean) => {\n if (open) {\n closeDropdown();\n if (returnFocus) {\n // Return focus to input when closing from dropdown elements (e.g., recovery button)\n inputRef.current?.focus();\n }\n } else if (value) {\n fireNonCancelableEvent(onChange, { value: '' });\n }\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (isComposing()) {\n event.preventDefault();\n return;\n }\n\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n // Use shared ESC handler, without focus restoration since ESC came from input\n handleEscapeKey(false);\n if (open || value) {\n event.stopPropagation();\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: BaseInputProps['nativeInputAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const handleDropdownKeyDown: React.KeyboardEventHandler = event => {\n // Handle ESC key from focusable elements inside the dropdown (e.g., recovery button)\n // but NOT from the input itself (that's handled by handleKeyDown)\n const isFromInput = event.target === inputRef.current || nodeBelongs(inputRef.current, event.target);\n\n if (event.key === 'Escape' && !isFromInput) {\n event.stopPropagation();\n event.preventDefault();\n // Use shared ESC handler with focus restoration since ESC came from dropdown element\n handleEscapeKey(true);\n }\n };\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <InternalDropdown\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth, dropdownWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n nativeInputAttributes={processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest')}\n __skipNativeAttributesWarnings={Object.keys(nativeAttributes)}\n style={style}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']} onKeyDown={handleDropdownKeyDown}>\n {open && dropdownFooter ? dropdownFooter : null}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n content={\n open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null\n }\n />\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAIlF,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAS1D,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAsCrC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CACvC,CACE,EACE,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,yBAAyB,GAAG,KAAK,EACjC,gBAAgB,EAChB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J,iBAAiB,IAAI,CACnB,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,SAAS,EAAE,qBAAqB,IAChG,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAC3C,CACP,EAEH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,OAAO,EACL,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CACxB,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAChE,eAAe,CACZ,CACP,CAAC,CAAC,CAAC,IAAI,GAEV,CACE,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\n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport { ExpandToViewport } from '../../../dropdown/interfaces';\nimport InternalDropdown from '../../../dropdown/internal';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n InputProps,\n} from '../../../input/interfaces';\nimport InternalInput from '../../../input/internal';\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { BaseKeyDetail, NonCancelableEventHandler } from '../../../types/events';\nimport { FormFieldValidationControlProps } from '../../../types/form-field';\nimport { getBaseProps } from '../../base-component';\nimport { getBreakpointValue } from '../../breakpoints';\nimport { useFormFieldContext } from '../../context/form-field-context';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { useIMEComposition } from '../../hooks/use-ime-composition';\nimport { KeyCode } from '../../keycode';\nimport { getDropdownMinWidth } from '../../utils/get-dropdown-min-width';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport { processAttributes } from '../../utils/with-native-attributes';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n style?: InputProps['style'];\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n nativeInputAttributes,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n style,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => inputRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n const { isComposing } = useIMEComposition(inputRef);\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n // Shared ESC key handler logic for both input and dropdown elements\n // When returnFocus is true (from dropdown elements), focus returns to input after closing\n const handleEscapeKey = (returnFocus: boolean) => {\n if (open) {\n closeDropdown();\n if (returnFocus) {\n // Return focus to input when closing from dropdown elements (e.g., recovery button)\n inputRef.current?.focus();\n }\n } else if (value) {\n fireNonCancelableEvent(onChange, { value: '' });\n }\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (isComposing()) {\n event.preventDefault();\n return;\n }\n\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n // Use shared ESC handler, without focus restoration since ESC came from input\n handleEscapeKey(false);\n if (open || value) {\n event.stopPropagation();\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: BaseInputProps['nativeInputAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const handleDropdownKeyDown: React.KeyboardEventHandler = event => {\n // Handle ESC key from focusable elements inside the dropdown (e.g., recovery button)\n // but NOT from the input itself (that's handled by handleKeyDown)\n const isFromInput = event.target === inputRef.current || nodeBelongs(inputRef.current, event.target);\n\n if (event.key === 'Escape' && !isFromInput) {\n event.stopPropagation();\n event.preventDefault();\n // Use shared ESC handler with focus restoration since ESC came from dropdown element\n handleEscapeKey(true);\n }\n };\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <InternalDropdown\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth, dropdownWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n nativeInputAttributes={processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest')}\n __skipNativeAttributesWarnings={Object.keys(nativeAttributes)}\n style={style}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']} onKeyDown={handleDropdownKeyDown}>\n {open && dropdownFooter ? dropdownFooter : null}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n content={\n open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null\n }\n />\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { BaseComponentProps } from '../../base-component';
3
- import { BaseKeyDetail, CancelableEventHandler } from '../../events';
2
+ import { BaseComponentProps } from '../../../types/base-component';
3
+ import { BaseKeyDetail, CancelableEventHandler } from '../../../types/events';
4
4
  export interface ButtonTriggerProps extends BaseComponentProps {
5
5
  children?: React.ReactNode;
6
6
  pressed?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/button-trigger/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAA0C,MAAM,cAAc,CAAC;AAS7G,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAClD,OAAO,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAChD,WAAW,CAAC,E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C,aAAa,CAAC,CAAC;IAClD,OAAO,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAChD,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,MAAM,CAAC,EAAE,sBAAsB,CAAC;QAAE,aAAa,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAuGD,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,GAAG;QAClB,KAAK,IAAI,IAAI,CAAC;KACf;CACF;;AAED,wBAA+C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/button-trigger/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAyC,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAM7G,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA0BrC,MAAM,aAAa,GAAG,CACpB,EACE,QAAQ,EACR,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,gBAAgB,EA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QACR,CAAC,SAAS,IAAI,CACb,8BAAM,SAAS,EAAE,MAAM,CAAC,KAAK;YAC3B,oBAAC,YAAY,IACX,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mBAAmB,EACxE,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAC1D,OAAO,EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,GACrD,CACG,CACR,CACM,CACV,CAAC;AACJ,CAAC,CAAC;AAQF,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, { ButtonHTMLAttributes } from 'react';\nimport clsx from 'clsx';\n\nimport { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalIcon from '../../../icon/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { BaseKeyDetail, CancelableEventHandler, fireCancelableEvent, fireKeyboardEvent } from '../../events';\nimport {\n GeneratedAnalyticsMetadataButtonTriggerCollapse,\n GeneratedAnalyticsMetadataButtonTriggerExpand,\n} from './analytics-metadata/interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface ButtonTriggerProps extends BaseComponentProps {\n children?: React.ReactNode;\n pressed?: boolean;\n hideCaret?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n warning?: boolean;\n inFilteringToken?: 'root' | 'nested';\n inlineTokens?: boolean;\n ariaHasPopup?: 'true' | 'listbox' | 'dialog';\n ariaControls?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onKeyUp?: CancelableEventHandler<BaseKeyDetail>;\n onMouseDown?: CancelableEventHandler;\n onClick?: CancelableEventHandler;\n onFocus?: CancelableEventHandler;\n onBlur?: CancelableEventHandler<{ relatedTarget: Node | null }>;\n hasCustomContent?: boolean;\n autoFocus?: boolean;\n}\n\nconst ButtonTrigger = (\n {\n children,\n pressed,\n hideCaret = false,\n disabled = false,\n readOnly = false,\n invalid = false,\n warning = false,\n inlineTokens,\n inFilteringToken,\n ariaHasPopup,\n ariaLabelledby,\n ariaDescribedby,\n ariaControls,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onClick,\n onFocus,\n onBlur,\n hasCustomContent = false,\n autoFocus,\n ...restProps\n }: ButtonTriggerProps,\n ref: React.Ref<HTMLButtonElement>\n) => {\n const baseProps = getBaseProps(restProps);\n let attributes: ButtonHTMLAttributes<HTMLButtonElement> = {\n ...baseProps,\n type: 'button',\n className: clsx(\n styles['button-trigger'],\n analyticsSelectors['button-trigger'],\n baseProps.className,\n pressed && styles.pressed,\n disabled && styles.disabled,\n invalid && styles.invalid,\n warning && !invalid && styles.warning,\n !hideCaret && styles['has-caret'],\n readOnly && styles.readonly,\n inFilteringToken && styles['in-filtering-token'],\n inFilteringToken && styles[`in-filtering-token-${inFilteringToken}`],\n inlineTokens && styles['inline-tokens'],\n !!hasCustomContent && styles['custom-option']\n ),\n disabled: disabled,\n 'aria-expanded': pressed,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup ?? 'listbox',\n 'aria-controls': ariaControls,\n 'aria-disabled': readOnly && !disabled ? 'true' : undefined,\n autoFocus,\n };\n\n if (!readOnly) {\n attributes = {\n ...attributes,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n onMouseDown: onMouseDown && (event => fireCancelableEvent(onMouseDown, {}, event)),\n onClick: onClick && (event => fireCancelableEvent(onClick, {}, event)),\n onFocus: onFocus && (event => fireCancelableEvent(onFocus, {}, event)),\n onBlur: onBlur && (event => fireCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }, event)),\n };\n }\n\n if (invalid) {\n attributes['aria-invalid'] = invalid;\n }\n\n const analyticsMetadata:\n | GeneratedAnalyticsMetadataButtonTriggerExpand\n | GeneratedAnalyticsMetadataButtonTriggerCollapse = {\n action: !pressed ? 'expand' : 'collapse',\n detail: {\n label: { root: 'self' },\n },\n };\n\n return (\n <button\n ref={ref}\n {...attributes}\n {...(disabled || readOnly ? {} : getAnalyticsMetadataAttribute(analyticsMetadata))}\n >\n {children}\n {!hideCaret && (\n <span className={styles.arrow}>\n <InternalIcon\n name={isThemeActive(Theme.OneTheme) ? 'angle-down' : 'caret-down-filled'}\n size={isThemeActive(Theme.OneTheme) ? 'x-small' : 'normal'}\n variant={disabled || readOnly ? 'disabled' : 'normal'}\n />\n </span>\n )}\n </button>\n );\n};\n\nexport namespace ButtonTriggerProps {\n export interface Ref {\n focus(): void;\n }\n}\n\nexport default React.forwardRef(ButtonTrigger);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/button-trigger/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAGlD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMtE,OAAO,kBAAkB,MAAM,oCAAoC,C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,EAAE;YACN,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACxB;KACF,CAAC;IAEF,OAAO,CACL,gCACE,GAAG,EAAE,GAAG,KACJ,UAAU,KACV,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,6BAA6B,CAAC,iBAAiB,CAAC,CAAC;QAEjF,QAAQ;QACR,CAAC,SAAS,IAAI,CACb,8BAAM,SAAS,EAAE,MAAM,CAAC,KAAK;YAC3B,oBAAC,YAAY,IACX,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mBAAmB,EACxE,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAC1D,OAAO,EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,GACrD,CACG,CACR,CACM,CACV,CAAC;AACJ,CAAC,CAAC;AAQF,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, { ButtonHTMLAttributes } from 'react';\nimport clsx from 'clsx';\n\nimport { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalIcon from '../../../icon/internal';\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { BaseKeyDetail, CancelableEventHandler } from '../../../types/events';\nimport { getBaseProps } from '../../base-component';\nimport { fireCancelableEvent, fireKeyboardEvent } from '../../events';\nimport {\n GeneratedAnalyticsMetadataButtonTriggerCollapse,\n GeneratedAnalyticsMetadataButtonTriggerExpand,\n} from './analytics-metadata/interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface ButtonTriggerProps extends BaseComponentProps {\n children?: React.ReactNode;\n pressed?: boolean;\n hideCaret?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n warning?: boolean;\n inFilteringToken?: 'root' | 'nested';\n inlineTokens?: boolean;\n ariaHasPopup?: 'true' | 'listbox' | 'dialog';\n ariaControls?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onKeyUp?: CancelableEventHandler<BaseKeyDetail>;\n onMouseDown?: CancelableEventHandler;\n onClick?: CancelableEventHandler;\n onFocus?: CancelableEventHandler;\n onBlur?: CancelableEventHandler<{ relatedTarget: Node | null }>;\n hasCustomContent?: boolean;\n autoFocus?: boolean;\n}\n\nconst ButtonTrigger = (\n {\n children,\n pressed,\n hideCaret = false,\n disabled = false,\n readOnly = false,\n invalid = false,\n warning = false,\n inlineTokens,\n inFilteringToken,\n ariaHasPopup,\n ariaLabelledby,\n ariaDescribedby,\n ariaControls,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onClick,\n onFocus,\n onBlur,\n hasCustomContent = false,\n autoFocus,\n ...restProps\n }: ButtonTriggerProps,\n ref: React.Ref<HTMLButtonElement>\n) => {\n const baseProps = getBaseProps(restProps);\n let attributes: ButtonHTMLAttributes<HTMLButtonElement> = {\n ...baseProps,\n type: 'button',\n className: clsx(\n styles['button-trigger'],\n analyticsSelectors['button-trigger'],\n baseProps.className,\n pressed && styles.pressed,\n disabled && styles.disabled,\n invalid && styles.invalid,\n warning && !invalid && styles.warning,\n !hideCaret && styles['has-caret'],\n readOnly && styles.readonly,\n inFilteringToken && styles['in-filtering-token'],\n inFilteringToken && styles[`in-filtering-token-${inFilteringToken}`],\n inlineTokens && styles['inline-tokens'],\n !!hasCustomContent && styles['custom-option']\n ),\n disabled: disabled,\n 'aria-expanded': pressed,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup ?? 'listbox',\n 'aria-controls': ariaControls,\n 'aria-disabled': readOnly && !disabled ? 'true' : undefined,\n autoFocus,\n };\n\n if (!readOnly) {\n attributes = {\n ...attributes,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n onMouseDown: onMouseDown && (event => fireCancelableEvent(onMouseDown, {}, event)),\n onClick: onClick && (event => fireCancelableEvent(onClick, {}, event)),\n onFocus: onFocus && (event => fireCancelableEvent(onFocus, {}, event)),\n onBlur: onBlur && (event => fireCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }, event)),\n };\n }\n\n if (invalid) {\n attributes['aria-invalid'] = invalid;\n }\n\n const analyticsMetadata:\n | GeneratedAnalyticsMetadataButtonTriggerExpand\n | GeneratedAnalyticsMetadataButtonTriggerCollapse = {\n action: !pressed ? 'expand' : 'collapse',\n detail: {\n label: { root: 'self' },\n },\n };\n\n return (\n <button\n ref={ref}\n {...attributes}\n {...(disabled || readOnly ? {} : getAnalyticsMetadataAttribute(analyticsMetadata))}\n >\n {children}\n {!hideCaret && (\n <span className={styles.arrow}>\n <InternalIcon\n name={isThemeActive(Theme.OneTheme) ? 'angle-down' : 'caret-down-filled'}\n size={isThemeActive(Theme.OneTheme) ? 'x-small' : 'normal'}\n variant={disabled || readOnly ? 'disabled' : 'normal'}\n />\n </span>\n )}\n </button>\n );\n};\n\nexport namespace ButtonTriggerProps {\n export interface Ref {\n focus(): void;\n }\n}\n\nexport default React.forwardRef(ButtonTrigger);\n"]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ChartDataTypes } from './interfaces';
2
+ import { ChartDataTypes } from '../../../types/cartesian-chart';
3
3
  import { FormattedTick } from './label-utils';
4
4
  import { ChartScale, NumericChartScale } from './scales';
5
5
  interface BlockEndLabelsProps {
@@ -1 +1 @@
1
- {"version":3,"file":"block-end-labels.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/block-end-labels.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAgC,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIzD,UAAU,mBAAmB;IAC3B,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1C,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,aAAa,GACd,EAAE;IACD,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,MAAM,CAAC;CACnD;;;;EA4BA;wBAEsC,OAAO,cAAc;AAA5D,wBAA6D;AAG7D,iBAAS,cAAc,CAAC,EACtB,IAAU,EACV,KAAK,EACL,MAAM,EACN,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,UAAc,EACd,WAAe,EACf,cAAc,EACd,cAAc,EACd,KAAa,GACd,EAAE,mBAAmB,eAqDrB"}
1
+ {"version":3,"file":"block-end-labels.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/block-end-labels.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAgC,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIzD,UAAU,mBAAmB;IAC3B,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1C,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,aAAa,GACd,EAAE;IACD,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,MAAM,CAAC;CACnD;;;;EA4BA;wBAEsC,OAAO,cAAc;AAA5D,wBAA6D;AAG7D,iBAAS,cAAc,CAAC,EACtB,IAAU,EACV,KAAK,EACL,MAAM,EACN,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,UAAc,EACd,WAAe,EACf,cAAc,EACd,cAAc,EACd,KAAa,GACd,EAAE,mBAAmB,eAqDrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"block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E,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,GAAG,EAAE,SAAS,EACd,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,IAE1D,IAAI,CACA,CACR,CAAC,CACA,CACL,CACJ;QAED,8BAAM,GAAG,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAc,MAAM,GAAQ,CAChG,CACL,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { memo, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../../../i18n/context';\nimport { TICK_LENGTH, TICK_LINE_HEIGHT, TICK_MARGIN } from './constants';\nimport { ChartDataTypes } from './interfaces';\nimport { FormattedTick, formatTicks, getVisibleTicks } from './label-utils';\nimport { ChartScale, NumericChartScale } from './scales';\n\nimport styles from './styles.css.js';\n\ninterface BlockEndLabelsProps {\n axis?: 'x' | 'y';\n width: number;\n height: number;\n scale: ChartScale | NumericChartScale;\n title?: string;\n ariaRoleDescription?: string;\n offsetLeft?: number;\n offsetRight?: number;\n virtualTextRef: React.Ref<SVGTextElement>;\n formattedTicks: readonly FormattedTick[];\n isRTL?: boolean;\n}\n\nexport function useBLockEndLabels({\n ticks,\n scale,\n tickFormatter,\n}: {\n scale: ChartScale | NumericChartScale;\n ticks: readonly ChartDataTypes[];\n tickFormatter?: (value: ChartDataTypes) => string;\n}) {\n const virtualTextRef = useRef<SVGTextElement>(null);\n\n const cacheRef = useRef<{ [label: string]: number }>({});\n const getLabelSpace = (label: string) => {\n if (cacheRef.current[label] !== undefined && cacheRef.current[label] !== 0) {\n return cacheRef.current[label];\n }\n if (virtualTextRef.current && virtualTextRef.current.getComputedTextLength) {\n virtualTextRef.current.textContent = label;\n cacheRef.current[label] = virtualTextRef.current.getComputedTextLength();\n return cacheRef.current[label];\n }\n return 0;\n };\n\n const formattedTicks = formatTicks({ ticks, scale, getLabelSpace, tickFormatter });\n\n if (virtualTextRef.current) {\n virtualTextRef.current.textContent = '';\n }\n\n let height = TICK_LENGTH + TICK_MARGIN;\n for (const { lines } of formattedTicks) {\n height = Math.max(height, TICK_LENGTH + TICK_MARGIN + lines.length * TICK_LINE_HEIGHT);\n }\n\n return { virtualTextRef, formattedTicks, height };\n}\n\nexport default memo(BlockEndLabels) as typeof BlockEndLabels;\n\n// Renders the visible tick labels on the bottom axis, as well as their grid lines.\nfunction BlockEndLabels({\n axis = 'x',\n width,\n height,\n scale,\n title,\n ariaRoleDescription,\n offsetLeft = 0,\n offsetRight = 0,\n virtualTextRef,\n formattedTicks,\n isRTL = false,\n}: BlockEndLabelsProps) {\n const i18n = useInternalI18n('[charts]');\n\n const xOffset = scale.isCategorical() && axis === 'x' ? Math.max(0, scale.d3Scale.bandwidth() - 1) / 2 : 0;\n\n const offsetInlineStart = isRTL ? offsetRight : offsetLeft;\n const offsetInlineEnd = isRTL ? offsetLeft : offsetRight;\n\n const from = 0 - offsetInlineStart - xOffset;\n const until = width + offsetInlineEnd - xOffset;\n const balanceLabels = axis === 'x' && scale.scaleType !== 'log';\n const visibleTicks = getVisibleTicks(formattedTicks, from, until, balanceLabels);\n\n return (\n <g\n transform={`translate(0,${height})`}\n className={styles['labels-block-end']}\n aria-label={title}\n role=\"list\"\n aria-roledescription={i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription)}\n aria-hidden={true}\n >\n {visibleTicks.map(\n ({ position, lines }, index) =>\n isFinite(position) && (\n <g\n key={index}\n transform={`translate(${position + xOffset},0)`}\n className={clsx(styles.ticks, styles['ticks--bottom'], {\n [styles['ticks--x']]: axis === 'x',\n [styles['ticks--y']]: axis === 'y',\n })}\n role=\"listitem\"\n aria-label={lines.join('\\n')}\n >\n <line className={styles.ticks__line} x1={0} x2={0} y1={0} y2={TICK_LENGTH} aria-hidden=\"true\" />\n {lines.map((line, lineIndex) => (\n <text\n className={styles.ticks__text}\n key={lineIndex}\n x={0}\n y={TICK_LENGTH + TICK_MARGIN + lineIndex * TICK_LINE_HEIGHT}\n >\n {line}\n </text>\n ))}\n </g>\n )\n )}\n\n <text ref={virtualTextRef} x={0} y={0} style={{ visibility: 'hidden' }} aria-hidden=\"true\"></text>\n </g>\n );\n}\n"]}
1
+ {"version":3,"file":"block-end-labels.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/block-end-labels.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgBrC,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,aAAa,GAKd;IACC,MAAM,cAAc,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEpD,MAAM,QAAQ,GAAG,MAAM,CAA8B,EAAE,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,CAAC,KAAa,EAAE,EAAE;QACtC,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3E,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;QACD,IAAI,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,qBAAqB,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AU,gBACH,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAE5B,8BAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,iBAAc,MAAM,GAAG;YAC/F,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CAC9B,8BACE,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,GAAG,EAAE,SAAS,EACd,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,IAE1D,IAAI,CACA,CACR,CAAC,CACA,CACL,CACJ;QAED,8BAAM,GAAG,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAc,MAAM,GAAQ,CAChG,CACL,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { memo, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../../../i18n/context';\nimport { ChartDataTypes } from '../../../types/cartesian-chart';\nimport { TICK_LENGTH, TICK_LINE_HEIGHT, TICK_MARGIN } from './constants';\nimport { FormattedTick, formatTicks, getVisibleTicks } from './label-utils';\nimport { ChartScale, NumericChartScale } from './scales';\n\nimport styles from './styles.css.js';\n\ninterface BlockEndLabelsProps {\n axis?: 'x' | 'y';\n width: number;\n height: number;\n scale: ChartScale | NumericChartScale;\n title?: string;\n ariaRoleDescription?: string;\n offsetLeft?: number;\n offsetRight?: number;\n virtualTextRef: React.Ref<SVGTextElement>;\n formattedTicks: readonly FormattedTick[];\n isRTL?: boolean;\n}\n\nexport function useBLockEndLabels({\n ticks,\n scale,\n tickFormatter,\n}: {\n scale: ChartScale | NumericChartScale;\n ticks: readonly ChartDataTypes[];\n tickFormatter?: (value: ChartDataTypes) => string;\n}) {\n const virtualTextRef = useRef<SVGTextElement>(null);\n\n const cacheRef = useRef<{ [label: string]: number }>({});\n const getLabelSpace = (label: string) => {\n if (cacheRef.current[label] !== undefined && cacheRef.current[label] !== 0) {\n return cacheRef.current[label];\n }\n if (virtualTextRef.current && virtualTextRef.current.getComputedTextLength) {\n virtualTextRef.current.textContent = label;\n cacheRef.current[label] = virtualTextRef.current.getComputedTextLength();\n return cacheRef.current[label];\n }\n return 0;\n };\n\n const formattedTicks = formatTicks({ ticks, scale, getLabelSpace, tickFormatter });\n\n if (virtualTextRef.current) {\n virtualTextRef.current.textContent = '';\n }\n\n let height = TICK_LENGTH + TICK_MARGIN;\n for (const { lines } of formattedTicks) {\n height = Math.max(height, TICK_LENGTH + TICK_MARGIN + lines.length * TICK_LINE_HEIGHT);\n }\n\n return { virtualTextRef, formattedTicks, height };\n}\n\nexport default memo(BlockEndLabels) as typeof BlockEndLabels;\n\n// Renders the visible tick labels on the bottom axis, as well as their grid lines.\nfunction BlockEndLabels({\n axis = 'x',\n width,\n height,\n scale,\n title,\n ariaRoleDescription,\n offsetLeft = 0,\n offsetRight = 0,\n virtualTextRef,\n formattedTicks,\n isRTL = false,\n}: BlockEndLabelsProps) {\n const i18n = useInternalI18n('[charts]');\n\n const xOffset = scale.isCategorical() && axis === 'x' ? Math.max(0, scale.d3Scale.bandwidth() - 1) / 2 : 0;\n\n const offsetInlineStart = isRTL ? offsetRight : offsetLeft;\n const offsetInlineEnd = isRTL ? offsetLeft : offsetRight;\n\n const from = 0 - offsetInlineStart - xOffset;\n const until = width + offsetInlineEnd - xOffset;\n const balanceLabels = axis === 'x' && scale.scaleType !== 'log';\n const visibleTicks = getVisibleTicks(formattedTicks, from, until, balanceLabels);\n\n return (\n <g\n transform={`translate(0,${height})`}\n className={styles['labels-block-end']}\n aria-label={title}\n role=\"list\"\n aria-roledescription={i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription)}\n aria-hidden={true}\n >\n {visibleTicks.map(\n ({ position, lines }, index) =>\n isFinite(position) && (\n <g\n key={index}\n transform={`translate(${position + xOffset},0)`}\n className={clsx(styles.ticks, styles['ticks--bottom'], {\n [styles['ticks--x']]: axis === 'x',\n [styles['ticks--y']]: axis === 'y',\n })}\n role=\"listitem\"\n aria-label={lines.join('\\n')}\n >\n <line className={styles.ticks__line} x1={0} x2={0} y1={0} y2={TICK_LENGTH} aria-hidden=\"true\" />\n {lines.map((line, lineIndex) => (\n <text\n className={styles.ticks__text}\n key={lineIndex}\n x={0}\n y={TICK_LENGTH + TICK_MARGIN + lineIndex * TICK_LINE_HEIGHT}\n >\n {line}\n </text>\n ))}\n </g>\n )\n )}\n\n <text ref={virtualTextRef} x={0} y={0} style={{ visibility: 'hidden' }} aria-hidden=\"true\"></text>\n </g>\n );\n}\n"]}
@@ -1,210 +1,2 @@
1
- import { BaseComponentProps } from '../../base-component';
2
- import { NonCancelableEventHandler } from '../../events';
3
- export interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {
4
- /**
5
- * Determines the type of scale for values on the x axis.
6
- */
7
- xScaleType?: ScaleType;
8
- /**
9
- * Determines the type of scale for values on the y axis.
10
- */
11
- yScaleType?: 'linear' | 'log';
12
- /**
13
- * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.
14
- * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.
15
- * For categorical data this is represented as an array of strings that determine the categories to display.
16
- *
17
- * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.
18
- * When controlling this directly, make sure to update the value based on filtering changes.
19
- */
20
- xDomain?: ReadonlyArray<T>;
21
- /**
22
- * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.
23
- * The domain is defined by a tuple: `[minimumValue, maximumValue]`.
24
- *
25
- * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.
26
- * When controlling this directly, make sure to update the value based on filtering changes.
27
- */
28
- yDomain?: ReadonlyArray<number>;
29
- /**
30
- * The title of the x axis.
31
- */
32
- xTitle?: string;
33
- /**
34
- * The title of the y axis.
35
- */
36
- yTitle?: string;
37
- /**
38
- * Optional title for the legend.
39
- */
40
- legendTitle?: string;
41
- /**
42
- * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.
43
- * Do not use `ariaLabel` and `ariaLabelledby` at the same time.
44
- */
45
- ariaLabel?: string;
46
- /**
47
- * Sets `aria-labelledby` on the chart itself.
48
- * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.
49
- * Do not use `ariaLabel` and `ariaLabelledby` at the same time.
50
- */
51
- ariaLabelledby?: string;
52
- /**
53
- * A description of the chart that assistive technologies can use (through `aria-describedby`).
54
- * Provide a concise summary of the data visualized in the chart.
55
- */
56
- ariaDescription?: string;
57
- /**
58
- * An object containing all the necessary localized strings required by the component.
59
- * @i18n
60
- */
61
- i18nStrings?: CartesianChartProps.I18nStrings<T>;
62
- /**
63
- * Function to format the displayed label of an x axis tick.
64
- */
65
- xTickFormatter?: CartesianChartProps.TickFormatter<T>;
66
- /**
67
- * Function to format the displayed label of a y axis tick.
68
- */
69
- yTickFormatter?: CartesianChartProps.TickFormatter<number>;
70
- /**
71
- * An optional pixel value number that fixes the height of the chart area.
72
- * If not set explicitly, the component will use a default height that is defined internally.
73
- * When used with `fitHeight`, this property defines the minimum height of the chart area.
74
- */
75
- height?: number;
76
- /**
77
- * Determines the maximum width the detail popover will be limited to.
78
- */
79
- detailPopoverSize?: 'small' | 'medium' | 'large';
80
- /**
81
- * Additional content that is displayed at the bottom of the detail popover.
82
- */
83
- detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;
84
- /**
85
- * When set to `true`, the legend beneath the chart is not displayed.
86
- * It is highly recommended to keep this set to `false`.
87
- */
88
- hideLegend?: boolean;
89
- /**
90
- * When set to `true`, the default filtering dropdown is not displayed.
91
- * It is still possible to render additional filters with the `additionalFilters` slot.
92
- */
93
- hideFilter?: boolean;
94
- /**
95
- * Additional filters that are added above the chart component.
96
- * Make sure to update the `data` property when any of your custom filters change the data to be displayed.
97
- */
98
- additionalFilters?: React.ReactNode;
99
- /**
100
- * The currently highlighted data series, usually through hovering over a series or the legend.
101
- * A value of `null` means no series is highlighted.
102
- *
103
- * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).
104
- * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).
105
- */
106
- highlightedSeries?: Series | null;
107
- /**
108
- * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.
109
- * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).
110
- * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).
111
- */
112
- visibleSeries?: ReadonlyArray<Series>;
113
- /**
114
- * Specifies the current status of loading data.
115
- * * `loading`: data fetching is in progress.
116
- * * `finished`: data has loaded successfully.
117
- * * `error`: an error occurred during fetch. You should provide user an option to recover.
118
- **/
119
- statusType?: 'loading' | 'finished' | 'error';
120
- /**
121
- * Content that is displayed when the data passed to the component is empty.
122
- */
123
- empty?: React.ReactNode;
124
- /**
125
- * Content that is displayed when there is no data to display due to the built-in filtering.
126
- */
127
- noMatch?: React.ReactNode;
128
- /**
129
- * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `"loading"`.
130
- * @i18n
131
- */
132
- loadingText?: string;
133
- /**
134
- * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `"error"`.
135
- * @i18n
136
- */
137
- errorText?: string;
138
- /**
139
- * Text for the recovery button that is displayed next to the error text.
140
- * @i18n
141
- **/
142
- recoveryText?: string;
143
- /**
144
- * Called when the user clicks the recovery button that appears when there is an error state.
145
- * Use this to enable the user to retry a failed request or provide another option for the user
146
- * to recover from the error.
147
- */
148
- onRecoveryClick?: NonCancelableEventHandler;
149
- /**
150
- * Called when the values of the internal filter component changed.
151
- * This will **not** be called for any custom filter components you have defined in `additionalFilters`.
152
- */
153
- onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;
154
- /**
155
- * Called when the highlighted series has changed because of user interaction.
156
- */
157
- onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;
158
- /**
159
- * Enable this property to make the chart fit into the available height of the parent container.
160
- */
161
- fitHeight?: boolean;
162
- }
163
- export declare namespace CartesianChartProps {
164
- interface FilterChangeDetail<Series> {
165
- visibleSeries: ReadonlyArray<Series>;
166
- }
167
- interface HighlightChangeDetail<Series> {
168
- highlightedSeries: Series | null;
169
- }
170
- interface TickFormatter<T> {
171
- (value: T): string;
172
- }
173
- interface ValueFormatter<YType, XType = null> {
174
- (yValue: YType, xValue: XType): string;
175
- }
176
- interface DetailPopoverFooter<T> {
177
- (xValue: T): React.ReactNode;
178
- }
179
- interface I18nStrings<T> {
180
- /** Visible label of the default filter */
181
- filterLabel?: string;
182
- /** Placeholder text of the default filter */
183
- filterPlaceholder?: string;
184
- /** ARIA label for the default filter which is appended to any option that is selected */
185
- filterSelectedAriaLabel?: string;
186
- /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */
187
- legendAriaLabel?: string;
188
- /** ARIA label for details popover dismiss button */
189
- detailPopoverDismissAriaLabel?: string;
190
- /** Name of the ARIA role description of the chart, e.g. "line chart" */
191
- chartAriaRoleDescription?: string;
192
- /** Name of the ARIA role description of the x axis, e.g. "x axis" */
193
- xAxisAriaRoleDescription?: string;
194
- /** Name of the ARIA role description of the y axis, e.g. "y axis" */
195
- yAxisAriaRoleDescription?: string;
196
- /** @deprecated Use `xTickFormatter` on the component instead. */
197
- xTickFormatter?: TickFormatter<T>;
198
- /** @deprecated Use `yTickFormatter` on the component instead. */
199
- yTickFormatter?: TickFormatter<number>;
200
- }
201
- }
202
- export type ChartDataTypes = number | string | Date;
203
- export type ScaleType = 'linear' | 'log' | 'time' | 'categorical';
204
- export type XScaleType = 'linear' | 'log' | 'time' | 'categorical';
205
- export type YScaleType = 'linear' | 'log';
206
- export type ScaleRange = [number, number];
207
- export type ChartDomain<T extends ChartDataTypes> = ReadonlyArray<T>;
208
- export type XDomain<T extends ChartDataTypes> = ChartDomain<T>;
209
- export type YDomain = ChartDomain<number>;
1
+ export { CartesianChartProps, ChartDataTypes, ChartDomain, ScaleRange, ScaleType, XDomain, XScaleType, YDomain, YScaleType, } from '../../../types/cartesian-chart';
210
2
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAAE,MAAM,CAAE,SAAQ,kBAAkB;IAC/F;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAE9B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAE3B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,CAAC,EAAE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AAc,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KACxC;CACF;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAEpD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,aAAa,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,aAAa,CAAC;AACnE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;AAC1C,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1C,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,cAAc,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,cAAc,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAC/D,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,OAAO,EACP,UAAU,GACX,MAAM,gCAAgC,CAAC"}
@@ -1,2 +1,4 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  export {};
2
4
  //# sourceMappingURL=interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {\n /**\n * Determines the type of scale for values on the x axis.\n */\n xScaleType?: ScaleType;\n\n /**\n * Determines the type of scale for values on the y axis.\n */\n yScaleType?: 'linear' | 'log';\n\n /**\n * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.\n * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.\n * For categorical data this is represented as an array of strings that determine the categories to display.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n xDomain?: ReadonlyArray<T>;\n\n /**\n * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.\n * The domain is defined by a tuple: `[minimumValue, maximumValue]`.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n yDomain?: ReadonlyArray<number>;\n\n /**\n * The title of the x axis.\n */\n xTitle?: string;\n\n /**\n * The title of the y axis.\n */\n yTitle?: string;\n\n /**\n * Optional title for the legend.\n */\n legendTitle?: string;\n\n /**\n * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart itself.\n * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianChartProps.I18nStrings<T>;\n\n /**\n * Function to format the displayed label of an x axis tick.\n */\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n\n /**\n * Function to format the displayed label of a y axis tick.\n */\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n /**\n * An optional pixel value number that fixes the height of the chart area.\n * If not set explicitly, the component will use a default height that is defined internally.\n * When used with `fitHeight`, this property defines the minimum height of the chart area.\n */\n height?: number;\n\n /**\n * Determines the maximum width the detail popover will be limited to.\n */\n detailPopoverSize?: 'small' | 'medium' | 'large';\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;\n\n /**\n * When set to `true`, the legend beneath the chart is not displayed.\n * It is highly recommended to keep this set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * When set to `true`, the default filtering dropdown is not displayed.\n * It is still possible to render additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional filters that are added above the chart component.\n * Make sure to update the `data` property when any of your custom filters change the data to be displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * The currently highlighted data series, usually through hovering over a series or the legend.\n * A value of `null` means no series is highlighted.\n *\n * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).\n */\n highlightedSeries?: Series | null;\n\n /**\n * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.\n * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).\n */\n visibleSeries?: ReadonlyArray<Series>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading`: data fetching is in progress.\n * * `finished`: data has loaded successfully.\n * * `error`: an error occurred during fetch. You should provide user an option to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that is displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that is displayed when there is no data to display due to the built-in filtering.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `\"loading\"`.\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `\"error\"`.\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that is displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the values of the internal filter component changed.\n * This will **not** be called for any custom filter components you have defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;\n\n /**\n * Called when the highlighted series has changed because of user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;\n\n /**\n * Enable this property to make the chart fit into the available height of the parent container.\n */\n fitHeight?: boolean;\n}\nexport namespace CartesianChartProps {\n export interface FilterChangeDetail<Series> {\n visibleSeries: ReadonlyArray<Series>;\n }\n\n export interface HighlightChangeDetail<Series> {\n highlightedSeries: Series | null;\n }\n\n export interface TickFormatter<T> {\n (value: T): string;\n }\n\n export interface ValueFormatter<YType, XType = null> {\n (yValue: YType, xValue: XType): string;\n }\n\n export interface DetailPopoverFooter<T> {\n (xValue: T): React.ReactNode;\n }\n\n export interface I18nStrings<T> {\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"line chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the x axis, e.g. \"x axis\" */\n xAxisAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the y axis, e.g. \"y axis\" */\n yAxisAriaRoleDescription?: string;\n\n /** @deprecated Use `xTickFormatter` on the component instead. */\n xTickFormatter?: TickFormatter<T>;\n\n /** @deprecated Use `yTickFormatter` on the component instead. */\n yTickFormatter?: TickFormatter<number>;\n }\n}\n\nexport type ChartDataTypes = number | string | Date;\n\nexport type ScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type XScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type YScaleType = 'linear' | 'log';\nexport type ScaleRange = [number, number];\n\nexport type ChartDomain<T extends ChartDataTypes> = ReadonlyArray<T>;\nexport type XDomain<T extends ChartDataTypes> = ChartDomain<T>;\nexport type YDomain = ChartDomain<number>;\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// Backward-compatibility re-export for consumers importing this public type from the internal path.\nexport {\n CartesianChartProps,\n ChartDataTypes,\n ChartDomain,\n ScaleRange,\n ScaleType,\n XDomain,\n XScaleType,\n YDomain,\n YScaleType,\n} from '../../../types/cartesian-chart';\n"]}
@@ -1,4 +1,4 @@
1
- import { ChartDataTypes } from './interfaces';
1
+ import { ChartDataTypes } from '../../../types/cartesian-chart';
2
2
  import { ChartScale, NumericChartScale } from './scales';
3
3
  export interface FormattedTick {
4
4
  position: number;
@@ -1 +1 @@
1
- {"version":3,"file":"label-utils.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/label-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIzD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,aAAa,EACb,aAAa,GACd,EAAE;IACD,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;CACxC,GAAG,aAAa,EAAE,CAOlB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,UAAQ,4BAGjH;AAkDD,wBAAgB,cAAc,CAAC,OAAO,EAAE,IAAI,GAAG,cAAc,GAAG,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAK5G"}
1
+ {"version":3,"file":"label-utils.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/label-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIzD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,aAAa,EACb,aAAa,GACd,EAAE;IACD,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACtC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,M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port { ChartDataTypes } from './interfaces';\nimport { ChartScale, NumericChartScale } from './scales';\n\nconst SPACE_BETWEEN = 4;\n\nexport interface FormattedTick {\n position: number;\n space: number;\n lines: string[];\n}\n\nexport function formatTicks({\n ticks,\n scale,\n getLabelSpace,\n tickFormatter,\n}: {\n ticks: readonly ChartDataTypes[];\n scale: ChartScale | NumericChartScale;\n getLabelSpace: (label: string) => number;\n tickFormatter?: (value: any) => string;\n}): FormattedTick[] {\n return ticks.map(tick => {\n const position = scale.d3Scale(tick as any) ?? NaN;\n const label = tickFormatter ? tickFormatter(tick as any) : tick.toString();\n const lines = (label + '').split('\\n');\n return { position, lines, space: Math.max(...lines.map(getLabelSpace)) };\n });\n}\n\nexport function getVisibleTicks(ticks: readonly FormattedTick[], from: number, until: number, balanceTicks = false) {\n ticks = getTicksInRange(ticks, from, until);\n return balanceTicks ? getReducedTicks(ticks) : removeIntersections(ticks);\n}\n\nfunction getTicksInRange(ticks: readonly FormattedTick[], from: number, until: number) {\n return ticks.filter(tick => from <= tick.position - tick.space / 2 && tick.position + tick.space / 2 <= until);\n}\n\nfunction getReducedTicks(ticks: readonly FormattedTick[]): readonly FormattedTick[] {\n const reduceLabelRatio = findReduceLabelRatio(ticks);\n\n const reducedTicks = [];\n for (let index = 0; index < ticks.length; index += reduceLabelRatio) {\n reducedTicks.push(ticks[index]);\n }\n return reducedTicks;\n}\n\n// Returns a ratio such that all elements can be displayed with no intersections.\nfunction findReduceLabelRatio(ticks: readonly FormattedTick[], ratio = 1): number {\n if (ratio >= ticks.length) {\n return ratio;\n }\n for (let i = ratio; i < ticks.length; i += ratio) {\n if (hasIntersection(ticks[i - ratio], ticks[i])) {\n return findReduceLabelRatio(ticks, ratio + 1);\n }\n }\n return ratio;\n}\n\nfunction removeIntersections(ticks: readonly FormattedTick[]) {\n const visibleTicks = [];\n let prevTick = null;\n for (const tick of ticks) {\n if (!prevTick || !hasIntersection(prevTick, tick)) {\n visibleTicks.push(tick);\n prevTick = tick;\n }\n }\n return visibleTicks;\n}\n\nfunction hasIntersection(a: FormattedTick, b: FormattedTick) {\n const [left, right] = a.position < b.position ? [a, b] : [b, a];\n const leftEdge = left.position + left.space / 2 + SPACE_BETWEEN;\n const rightEdge = right.position - right.space / 2;\n return leftEdge > rightEdge;\n}\n\n// Ignoring as unsupported in JSDom.\n/* istanbul ignore next */\nexport function getSVGTextSize(element: null | SVGTextElement): undefined | { width: number; height: number } {\n if (element && element.getBBox) {\n return element.getBBox();\n }\n return undefined;\n}\n"]}
1
+ {"version":3,"file":"label-utils.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/label-utils.ts"],"names":[],"mappings":"AAKA,MAAM,aAAa,GAAG,CAAC,CAAC;AAQxB,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,aAAa,EACb,aAAa,GAMd;IACC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;;QACtB,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,OAAO,CAAC,IAAW,CAAC,mCAAI,GAAG,CAAC;QACnD,MAAM,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,IAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC3E,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAA+B,EAAE,IAAY,EAAE,KAAa,EAAE,YAAY,GAAG,KAAK;IAChH,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5C,OAAO,YAAY,CA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;AAED,SAAS,mBAAmB,CAAC,KAA+B;IAC1D,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;YAClD,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxB,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,eAAe,CAAC,CAAgB,EAAE,CAAgB;IACzD,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,aAAa,CAAC;IAChE,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;IACnD,OAAO,QAAQ,GAAG,SAAS,CAAC;AAC9B,CAAC;AAED,oCAAoC;AACpC,0BAA0B;AAC1B,MAAM,UAAU,cAAc,CAAC,OAA8B;IAC3D,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ChartDataTypes } from '../../../types/cartesian-chart';\nimport { ChartScale, NumericChartScale } from './scales';\n\nconst SPACE_BETWEEN = 4;\n\nexport interface FormattedTick {\n position: number;\n space: number;\n lines: string[];\n}\n\nexport function formatTicks({\n ticks,\n scale,\n getLabelSpace,\n tickFormatter,\n}: {\n ticks: readonly ChartDataTypes[];\n scale: ChartScale | NumericChartScale;\n getLabelSpace: (label: string) => number;\n tickFormatter?: (value: any) => string;\n}): FormattedTick[] {\n return ticks.map(tick => {\n const position = scale.d3Scale(tick as any) ?? NaN;\n const label = tickFormatter ? tickFormatter(tick as any) : tick.toString();\n const lines = (label + '').split('\\n');\n return { position, lines, space: Math.max(...lines.map(getLabelSpace)) };\n });\n}\n\nexport function getVisibleTicks(ticks: readonly FormattedTick[], from: number, until: number, balanceTicks = false) {\n ticks = getTicksInRange(ticks, from, until);\n return balanceTicks ? getReducedTicks(ticks) : removeIntersections(ticks);\n}\n\nfunction getTicksInRange(ticks: readonly FormattedTick[], from: number, until: number) {\n return ticks.filter(tick => from <= tick.position - tick.space / 2 && tick.position + tick.space / 2 <= until);\n}\n\nfunction getReducedTicks(ticks: readonly FormattedTick[]): readonly FormattedTick[] {\n const reduceLabelRatio = findReduceLabelRatio(ticks);\n\n const reducedTicks = [];\n for (let index = 0; index < ticks.length; index += reduceLabelRatio) {\n reducedTicks.push(ticks[index]);\n }\n return reducedTicks;\n}\n\n// Returns a ratio such that all elements can be displayed with no intersections.\nfunction findReduceLabelRatio(ticks: readonly FormattedTick[], ratio = 1): number {\n if (ratio >= ticks.length) {\n return ratio;\n }\n for (let i = ratio; i < ticks.length; i += ratio) {\n if (hasIntersection(ticks[i - ratio], ticks[i])) {\n return findReduceLabelRatio(ticks, ratio + 1);\n }\n }\n return ratio;\n}\n\nfunction removeIntersections(ticks: readonly FormattedTick[]) {\n const visibleTicks = [];\n let prevTick = null;\n for (const tick of ticks) {\n if (!prevTick || !hasIntersection(prevTick, tick)) {\n visibleTicks.push(tick);\n prevTick = tick;\n }\n }\n return visibleTicks;\n}\n\nfunction hasIntersection(a: FormattedTick, b: FormattedTick) {\n const [left, right] = a.position < b.position ? [a, b] : [b, a];\n const leftEdge = left.position + left.space / 2 + SPACE_BETWEEN;\n const rightEdge = right.position - right.space / 2;\n return leftEdge > rightEdge;\n}\n\n// Ignoring as unsupported in JSDom.\n/* istanbul ignore next */\nexport function getSVGTextSize(element: null | SVGTextElement): undefined | { width: number; height: number } {\n if (element && element.getBBox) {\n return element.getBBox();\n }\n return undefined;\n}\n"]}
@@ -1,5 +1,5 @@
1
+ import { ChartDataTypes, ChartDomain, ScaleRange, ScaleType } from '../../../types/cartesian-chart';
1
2
  import { ScaleBand, ScaleContinuousNumeric, ScaleTime } from '../../vendor/d3-scale';
2
- import { ChartDataTypes, ChartDomain, ScaleRange, ScaleType } from './interfaces';
3
3
  interface NumericD3Scale {
4
4
  type: 'numeric';
5
5
  scale: ScaleContinuousNumeric<number, number>;
@@ -1 +1 @@
1
- {"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/scales.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EAET,sBAAsB,EAGtB,SAAS,EAEV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAElF,UAAU,cAAc;IACtB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CAClC;AAED,KAAK,OAAO,GAAG,cAAc,GAAG,WAAW,GAAG,kBAAkB,CAAC;AAEjE,KAAK,aAAa,GAAG,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,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C,EAAE,QAAQ,CAAC,EAAE,UAAU;IAInG,SAAS,IAAI,IAAI,IAAI;QAAE,OAAO,EAAE,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;KAAE;IAIrG,MAAM,IAAI,IAAI,IAAI;QAAE,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KAAE;IAInF,aAAa,IAAI,IAAI,IAAI;QAAE,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;QAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;KAAE;CAG7F;AAED,qBAAa,iBAAiB;aAKV,SAAS,EAAE,QAAQ,GAAG,KAAK;IAJ7C,SAAgB,KAAK,EAAE,cAAc,CAAC;IACtC,SAAgB,OAAO,EAAE,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAG9C,SAAS,EAAE,QAAQ,GAAG,KAAK,EAC3C,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,EAC3B,KAAK,EAAE,UAAU,EACjB,YAAY,EAAE,IAAI,GAAG,MAAM;IAU7B,aAAa,IAAI,IAAI,IAAI,KAAK;CAG/B"}
@@ -1,5 +1,3 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
1
  import { scaleBand, scaleLinear, scaleLog, scaleTime, } from '../../vendor/d3-scale';
4
2
  function isNumericDomain(domain) {
5
3
  return domain.length > 0 && typeof domain[0] === 'number';