@cloudscape-design/components 3.0.238 → 3.0.239

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 (1244) hide show
  1. package/alert/index.d.ts.map +1 -1
  2. package/alert/index.js.map +1 -1
  3. package/alert/interfaces.d.ts.map +1 -1
  4. package/alert/interfaces.js.map +1 -1
  5. package/alert/internal.d.ts.map +1 -1
  6. package/alert/internal.js.map +1 -1
  7. package/annotation-context/annotation/annotation-icon.d.ts.map +1 -1
  8. package/annotation-context/annotation/annotation-icon.js.map +1 -1
  9. package/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
  10. package/annotation-context/annotation/annotation-popover.js.map +1 -1
  11. package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
  12. package/annotation-context/annotation/annotation-trigger.js.map +1 -1
  13. package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
  14. package/annotation-context/annotation/closed-annotation.js.map +1 -1
  15. package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
  16. package/annotation-context/annotation/open-annotation.js.map +1 -1
  17. package/annotation-context/context.d.ts.map +1 -1
  18. package/annotation-context/context.js.map +1 -1
  19. package/annotation-context/index.d.ts.map +1 -1
  20. package/annotation-context/index.js.map +1 -1
  21. package/annotation-context/interfaces.d.ts.map +1 -1
  22. package/annotation-context/interfaces.js.map +1 -1
  23. package/annotation-context/utils.d.ts.map +1 -1
  24. package/annotation-context/utils.js.map +1 -1
  25. package/app-layout/content-wrapper/index.d.ts.map +1 -1
  26. package/app-layout/content-wrapper/index.js.map +1 -1
  27. package/app-layout/defaults.d.ts.map +1 -1
  28. package/app-layout/defaults.js.map +1 -1
  29. package/app-layout/drawer/index.d.ts.map +1 -1
  30. package/app-layout/drawer/index.js.map +1 -1
  31. package/app-layout/index.d.ts.map +1 -1
  32. package/app-layout/index.js.map +1 -1
  33. package/app-layout/interfaces.d.ts.map +1 -1
  34. package/app-layout/interfaces.js.map +1 -1
  35. package/app-layout/mobile-toolbar/index.d.ts.map +1 -1
  36. package/app-layout/mobile-toolbar/index.js.map +1 -1
  37. package/app-layout/notifications/index.d.ts.map +1 -1
  38. package/app-layout/notifications/index.js.map +1 -1
  39. package/app-layout/split-panel-drawer/index.d.ts.map +1 -1
  40. package/app-layout/split-panel-drawer/index.js.map +1 -1
  41. package/app-layout/toggles/index.d.ts.map +1 -1
  42. package/app-layout/toggles/index.js.map +1 -1
  43. package/app-layout/toggles/interfaces.d.ts.map +1 -1
  44. package/app-layout/toggles/interfaces.js.map +1 -1
  45. package/app-layout/utils/use-content-height.d.ts.map +1 -1
  46. package/app-layout/utils/use-content-height.js.map +1 -1
  47. package/app-layout/utils/use-content-width.d.ts.map +1 -1
  48. package/app-layout/utils/use-content-width.js.map +1 -1
  49. package/app-layout/utils/use-focus-control.d.ts.map +1 -1
  50. package/app-layout/utils/use-focus-control.js.map +1 -1
  51. package/app-layout/utils/use-observed-element.d.ts.map +1 -1
  52. package/app-layout/utils/use-observed-element.js.map +1 -1
  53. package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
  54. package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
  55. package/app-layout/utils/use-window-width.d.ts.map +1 -1
  56. package/app-layout/utils/use-window-width.js.map +1 -1
  57. package/app-layout/visual-refresh/app-bar.d.ts.map +1 -1
  58. package/app-layout/visual-refresh/app-bar.js.map +1 -1
  59. package/app-layout/visual-refresh/background.d.ts.map +1 -1
  60. package/app-layout/visual-refresh/background.js.map +1 -1
  61. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  62. package/app-layout/visual-refresh/context.js.map +1 -1
  63. package/app-layout/visual-refresh/header.d.ts.map +1 -1
  64. package/app-layout/visual-refresh/header.js.map +1 -1
  65. package/app-layout/visual-refresh/index.d.ts.map +1 -1
  66. package/app-layout/visual-refresh/index.js.map +1 -1
  67. package/app-layout/visual-refresh/layout.d.ts.map +1 -1
  68. package/app-layout/visual-refresh/layout.js.map +1 -1
  69. package/app-layout/visual-refresh/main.d.ts.map +1 -1
  70. package/app-layout/visual-refresh/main.js.map +1 -1
  71. package/app-layout/visual-refresh/navigation.d.ts.map +1 -1
  72. package/app-layout/visual-refresh/navigation.js.map +1 -1
  73. package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
  74. package/app-layout/visual-refresh/notifications.js.map +1 -1
  75. package/app-layout/visual-refresh/split-panel.d.ts.map +1 -1
  76. package/app-layout/visual-refresh/split-panel.js.map +1 -1
  77. package/app-layout/visual-refresh/tools.d.ts.map +1 -1
  78. package/app-layout/visual-refresh/tools.js.map +1 -1
  79. package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
  80. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  81. package/area-chart/chart-container.d.ts.map +1 -1
  82. package/area-chart/chart-container.js.map +1 -1
  83. package/area-chart/elements/area-chart-filter.d.ts.map +1 -1
  84. package/area-chart/elements/area-chart-filter.js.map +1 -1
  85. package/area-chart/elements/area-chart-legend.d.ts.map +1 -1
  86. package/area-chart/elements/area-chart-legend.js.map +1 -1
  87. package/area-chart/elements/area-series.d.ts.map +1 -1
  88. package/area-chart/elements/area-series.js.map +1 -1
  89. package/area-chart/elements/chart-popover.d.ts.map +1 -1
  90. package/area-chart/elements/chart-popover.js.map +1 -1
  91. package/area-chart/elements/data-series.d.ts.map +1 -1
  92. package/area-chart/elements/data-series.js.map +1 -1
  93. package/area-chart/elements/highlighted-point.d.ts.map +1 -1
  94. package/area-chart/elements/highlighted-point.js.map +1 -1
  95. package/area-chart/elements/threshold-series.d.ts.map +1 -1
  96. package/area-chart/elements/threshold-series.js.map +1 -1
  97. package/area-chart/elements/use-highlight-details.d.ts.map +1 -1
  98. package/area-chart/elements/use-highlight-details.js.map +1 -1
  99. package/area-chart/elements/vertical-marker.d.ts.map +1 -1
  100. package/area-chart/elements/vertical-marker.js.map +1 -1
  101. package/area-chart/index.d.ts.map +1 -1
  102. package/area-chart/index.js.map +1 -1
  103. package/area-chart/interfaces.d.ts.map +1 -1
  104. package/area-chart/interfaces.js.map +1 -1
  105. package/area-chart/internal.d.ts.map +1 -1
  106. package/area-chart/internal.js.map +1 -1
  107. package/area-chart/model/async-store.d.ts.map +1 -1
  108. package/area-chart/model/async-store.js.map +1 -1
  109. package/area-chart/model/compute-chart-props.d.ts.map +1 -1
  110. package/area-chart/model/compute-chart-props.js.map +1 -1
  111. package/area-chart/model/create-series-decorator.d.ts.map +1 -1
  112. package/area-chart/model/create-series-decorator.js.map +1 -1
  113. package/area-chart/model/index.d.ts.map +1 -1
  114. package/area-chart/model/index.js.map +1 -1
  115. package/area-chart/model/interactions-store.d.ts.map +1 -1
  116. package/area-chart/model/interactions-store.js.map +1 -1
  117. package/area-chart/model/use-chart-model.d.ts.map +1 -1
  118. package/area-chart/model/use-chart-model.js.map +1 -1
  119. package/area-chart/model/use-filter-props.d.ts.map +1 -1
  120. package/area-chart/model/use-filter-props.js.map +1 -1
  121. package/area-chart/model/use-highlight-props.d.ts.map +1 -1
  122. package/area-chart/model/use-highlight-props.js.map +1 -1
  123. package/area-chart/model/utils.d.ts.map +1 -1
  124. package/area-chart/model/utils.js.map +1 -1
  125. package/attribute-editor/additional-info.d.ts.map +1 -1
  126. package/attribute-editor/additional-info.js.map +1 -1
  127. package/attribute-editor/index.d.ts.map +1 -1
  128. package/attribute-editor/index.js.map +1 -1
  129. package/attribute-editor/interfaces.d.ts +7 -0
  130. package/attribute-editor/interfaces.d.ts.map +1 -1
  131. package/attribute-editor/interfaces.js.map +1 -1
  132. package/attribute-editor/internal.d.ts.map +1 -1
  133. package/attribute-editor/internal.js +6 -1
  134. package/attribute-editor/internal.js.map +1 -1
  135. package/attribute-editor/row.d.ts.map +1 -1
  136. package/attribute-editor/row.js.map +1 -1
  137. package/autosuggest/autosuggest-option.d.ts.map +1 -1
  138. package/autosuggest/autosuggest-option.js.map +1 -1
  139. package/autosuggest/index.d.ts.map +1 -1
  140. package/autosuggest/index.js.map +1 -1
  141. package/autosuggest/interfaces.d.ts +2 -2
  142. package/autosuggest/interfaces.d.ts.map +1 -1
  143. package/autosuggest/interfaces.js.map +1 -1
  144. package/autosuggest/internal.d.ts.map +1 -1
  145. package/autosuggest/internal.js.map +1 -1
  146. package/autosuggest/load-more-controller.d.ts.map +1 -1
  147. package/autosuggest/load-more-controller.js.map +1 -1
  148. package/autosuggest/options-controller.d.ts.map +1 -1
  149. package/autosuggest/options-controller.js.map +1 -1
  150. package/autosuggest/options-list.d.ts.map +1 -1
  151. package/autosuggest/options-list.js.map +1 -1
  152. package/autosuggest/plain-list.d.ts.map +1 -1
  153. package/autosuggest/plain-list.js.map +1 -1
  154. package/autosuggest/utils/utils.d.ts.map +1 -1
  155. package/autosuggest/utils/utils.js.map +1 -1
  156. package/autosuggest/virtual-list.d.ts.map +1 -1
  157. package/autosuggest/virtual-list.js.map +1 -1
  158. package/badge/index.d.ts.map +1 -1
  159. package/badge/index.js.map +1 -1
  160. package/badge/interfaces.d.ts.map +1 -1
  161. package/badge/interfaces.js.map +1 -1
  162. package/bar-chart/index.d.ts.map +1 -1
  163. package/bar-chart/index.js.map +1 -1
  164. package/bar-chart/interfaces.d.ts.map +1 -1
  165. package/bar-chart/interfaces.js.map +1 -1
  166. package/box/index.d.ts.map +1 -1
  167. package/box/index.js.map +1 -1
  168. package/box/interfaces.d.ts.map +1 -1
  169. package/box/interfaces.js.map +1 -1
  170. package/box/internal.d.ts.map +1 -1
  171. package/box/internal.js.map +1 -1
  172. package/breadcrumb-group/index.d.ts.map +1 -1
  173. package/breadcrumb-group/index.js.map +1 -1
  174. package/breadcrumb-group/interfaces.d.ts.map +1 -1
  175. package/breadcrumb-group/interfaces.js.map +1 -1
  176. package/breadcrumb-group/internal.d.ts.map +1 -1
  177. package/breadcrumb-group/internal.js.map +1 -1
  178. package/breadcrumb-group/item/item.d.ts.map +1 -1
  179. package/breadcrumb-group/item/item.js.map +1 -1
  180. package/button/icon-helper.d.ts.map +1 -1
  181. package/button/icon-helper.js.map +1 -1
  182. package/button/index.d.ts.map +1 -1
  183. package/button/index.js.map +1 -1
  184. package/button/interfaces.d.ts.map +1 -1
  185. package/button/interfaces.js.map +1 -1
  186. package/button/internal.d.ts.map +1 -1
  187. package/button/internal.js.map +1 -1
  188. package/button-dropdown/category-elements/category-element.d.ts.map +1 -1
  189. package/button-dropdown/category-elements/category-element.js.map +1 -1
  190. package/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  191. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  192. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  193. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  194. package/button-dropdown/index.d.ts.map +1 -1
  195. package/button-dropdown/index.js.map +1 -1
  196. package/button-dropdown/interfaces.d.ts.map +1 -1
  197. package/button-dropdown/interfaces.js.map +1 -1
  198. package/button-dropdown/internal.d.ts.map +1 -1
  199. package/button-dropdown/internal.js.map +1 -1
  200. package/button-dropdown/item-element/index.d.ts.map +1 -1
  201. package/button-dropdown/item-element/index.js.map +1 -1
  202. package/button-dropdown/items-list.d.ts.map +1 -1
  203. package/button-dropdown/items-list.js.map +1 -1
  204. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.d.ts.map +1 -1
  205. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
  206. package/button-dropdown/tooltip.d.ts.map +1 -1
  207. package/button-dropdown/tooltip.js.map +1 -1
  208. package/button-dropdown/utils/create-items-tree.d.ts.map +1 -1
  209. package/button-dropdown/utils/create-items-tree.js.map +1 -1
  210. package/button-dropdown/utils/menu-item.d.ts.map +1 -1
  211. package/button-dropdown/utils/menu-item.js.map +1 -1
  212. package/button-dropdown/utils/move-highlight.d.ts.map +1 -1
  213. package/button-dropdown/utils/move-highlight.js.map +1 -1
  214. package/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
  215. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  216. package/button-dropdown/utils/use-hidden-description.d.ts.map +1 -1
  217. package/button-dropdown/utils/use-hidden-description.js.map +1 -1
  218. package/button-dropdown/utils/use-highlighted-menu.d.ts.map +1 -1
  219. package/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
  220. package/button-dropdown/utils/utils.d.ts.map +1 -1
  221. package/button-dropdown/utils/utils.js.map +1 -1
  222. package/calendar/grid/index.d.ts.map +1 -1
  223. package/calendar/grid/index.js.map +1 -1
  224. package/calendar/header/header-button.d.ts.map +1 -1
  225. package/calendar/header/header-button.js.map +1 -1
  226. package/calendar/header/index.d.ts.map +1 -1
  227. package/calendar/header/index.js.map +1 -1
  228. package/calendar/index.d.ts.map +1 -1
  229. package/calendar/index.js.map +1 -1
  230. package/calendar/interfaces.d.ts.map +1 -1
  231. package/calendar/interfaces.js.map +1 -1
  232. package/calendar/internal.d.ts.map +1 -1
  233. package/calendar/internal.js.map +1 -1
  234. package/calendar/utils/intl.d.ts.map +1 -1
  235. package/calendar/utils/intl.js.map +1 -1
  236. package/calendar/utils/navigation.d.ts.map +1 -1
  237. package/calendar/utils/navigation.js.map +1 -1
  238. package/cards/cards-layout-helper.d.ts.map +1 -1
  239. package/cards/cards-layout-helper.js.map +1 -1
  240. package/cards/index.d.ts.map +1 -1
  241. package/cards/index.js.map +1 -1
  242. package/cards/interfaces.d.ts.map +1 -1
  243. package/cards/interfaces.js.map +1 -1
  244. package/checkbox/base-checkbox.d.ts.map +1 -1
  245. package/checkbox/base-checkbox.js.map +1 -1
  246. package/checkbox/index.d.ts.map +1 -1
  247. package/checkbox/index.js.map +1 -1
  248. package/checkbox/interfaces.d.ts.map +1 -1
  249. package/checkbox/interfaces.js.map +1 -1
  250. package/checkbox/internal.d.ts.map +1 -1
  251. package/checkbox/internal.js.map +1 -1
  252. package/code-editor/ace-modes.d.ts.map +1 -1
  253. package/code-editor/ace-modes.js.map +1 -1
  254. package/code-editor/ace-themes.d.ts.map +1 -1
  255. package/code-editor/ace-themes.js.map +1 -1
  256. package/code-editor/error-screen.d.ts.map +1 -1
  257. package/code-editor/error-screen.js.map +1 -1
  258. package/code-editor/index.d.ts.map +1 -1
  259. package/code-editor/index.js.map +1 -1
  260. package/code-editor/interfaces.d.ts.map +1 -1
  261. package/code-editor/interfaces.js.map +1 -1
  262. package/code-editor/listeners.d.ts.map +1 -1
  263. package/code-editor/listeners.js.map +1 -1
  264. package/code-editor/loading-screen.d.ts.map +1 -1
  265. package/code-editor/loading-screen.js.map +1 -1
  266. package/code-editor/pane.d.ts.map +1 -1
  267. package/code-editor/pane.js.map +1 -1
  268. package/code-editor/preferences-modal.d.ts.map +1 -1
  269. package/code-editor/preferences-modal.js.map +1 -1
  270. package/code-editor/resizable-box/index.d.ts.map +1 -1
  271. package/code-editor/resizable-box/index.js.map +1 -1
  272. package/code-editor/setup-editor.d.ts.map +1 -1
  273. package/code-editor/setup-editor.js.map +1 -1
  274. package/code-editor/status-bar.d.ts.map +1 -1
  275. package/code-editor/status-bar.js.map +1 -1
  276. package/code-editor/tab-button.d.ts.map +1 -1
  277. package/code-editor/tab-button.js.map +1 -1
  278. package/code-editor/util.d.ts.map +1 -1
  279. package/code-editor/util.js.map +1 -1
  280. package/collection-preferences/index.d.ts.map +1 -1
  281. package/collection-preferences/index.js.map +1 -1
  282. package/collection-preferences/interfaces.d.ts.map +1 -1
  283. package/collection-preferences/interfaces.js.map +1 -1
  284. package/collection-preferences/utils.d.ts.map +1 -1
  285. package/collection-preferences/utils.js.map +1 -1
  286. package/collection-preferences/visible-content.d.ts.map +1 -1
  287. package/collection-preferences/visible-content.js.map +1 -1
  288. package/column-layout/index.d.ts.map +1 -1
  289. package/column-layout/index.js.map +1 -1
  290. package/column-layout/interfaces.d.ts.map +1 -1
  291. package/column-layout/interfaces.js.map +1 -1
  292. package/column-layout/internal.d.ts.map +1 -1
  293. package/column-layout/internal.js.map +1 -1
  294. package/column-layout/util.d.ts.map +1 -1
  295. package/column-layout/util.js.map +1 -1
  296. package/container/index.d.ts.map +1 -1
  297. package/container/index.js.map +1 -1
  298. package/container/interfaces.d.ts.map +1 -1
  299. package/container/interfaces.js.map +1 -1
  300. package/container/internal.d.ts.map +1 -1
  301. package/container/internal.js.map +1 -1
  302. package/container/use-sticky-header.d.ts.map +1 -1
  303. package/container/use-sticky-header.js.map +1 -1
  304. package/content-layout/index.d.ts.map +1 -1
  305. package/content-layout/index.js.map +1 -1
  306. package/content-layout/interfaces.d.ts.map +1 -1
  307. package/content-layout/interfaces.js.map +1 -1
  308. package/content-layout/internal.d.ts.map +1 -1
  309. package/content-layout/internal.js.map +1 -1
  310. package/contexts/form-field.d.ts.map +1 -1
  311. package/contexts/form-field.js.map +1 -1
  312. package/date-input/index.d.ts.map +1 -1
  313. package/date-input/index.js.map +1 -1
  314. package/date-input/interfaces.d.ts.map +1 -1
  315. package/date-input/interfaces.js.map +1 -1
  316. package/date-input/internal.d.ts.map +1 -1
  317. package/date-input/internal.js.map +1 -1
  318. package/date-picker/index.d.ts.map +1 -1
  319. package/date-picker/index.js.map +1 -1
  320. package/date-picker/interfaces.d.ts.map +1 -1
  321. package/date-picker/interfaces.js.map +1 -1
  322. package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
  323. package/date-range-picker/calendar/grids/grid.js.map +1 -1
  324. package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
  325. package/date-range-picker/calendar/grids/index.js.map +1 -1
  326. package/date-range-picker/calendar/header/header-button.d.ts.map +1 -1
  327. package/date-range-picker/calendar/header/header-button.js.map +1 -1
  328. package/date-range-picker/calendar/header/index.d.ts.map +1 -1
  329. package/date-range-picker/calendar/header/index.js.map +1 -1
  330. package/date-range-picker/calendar/index.d.ts.map +1 -1
  331. package/date-range-picker/calendar/index.js.map +1 -1
  332. package/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
  333. package/date-range-picker/calendar/range-inputs.js.map +1 -1
  334. package/date-range-picker/calendar/utils.d.ts.map +1 -1
  335. package/date-range-picker/calendar/utils.js.map +1 -1
  336. package/date-range-picker/dropdown.d.ts.map +1 -1
  337. package/date-range-picker/dropdown.js.map +1 -1
  338. package/date-range-picker/index.d.ts.map +1 -1
  339. package/date-range-picker/index.js.map +1 -1
  340. package/date-range-picker/interfaces.d.ts.map +1 -1
  341. package/date-range-picker/interfaces.js.map +1 -1
  342. package/date-range-picker/mode-switcher.d.ts.map +1 -1
  343. package/date-range-picker/mode-switcher.js.map +1 -1
  344. package/date-range-picker/relative-range/index.d.ts.map +1 -1
  345. package/date-range-picker/relative-range/index.js.map +1 -1
  346. package/date-range-picker/time-offset.d.ts.map +1 -1
  347. package/date-range-picker/time-offset.js.map +1 -1
  348. package/date-range-picker/utils.d.ts.map +1 -1
  349. package/date-range-picker/utils.js.map +1 -1
  350. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  351. package/expandable-section/expandable-section-container.js.map +1 -1
  352. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  353. package/expandable-section/expandable-section-header.js.map +1 -1
  354. package/expandable-section/index.d.ts.map +1 -1
  355. package/expandable-section/index.js.map +1 -1
  356. package/expandable-section/interfaces.d.ts.map +1 -1
  357. package/expandable-section/interfaces.js.map +1 -1
  358. package/expandable-section/internal.d.ts.map +1 -1
  359. package/expandable-section/internal.js.map +1 -1
  360. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  361. package/flashbar/collapsible-flashbar.js.map +1 -1
  362. package/flashbar/common.d.ts.map +1 -1
  363. package/flashbar/common.js.map +1 -1
  364. package/flashbar/constant.d.ts.map +1 -1
  365. package/flashbar/constant.js.map +1 -1
  366. package/flashbar/flash.d.ts.map +1 -1
  367. package/flashbar/flash.js.map +1 -1
  368. package/flashbar/index.d.ts.map +1 -1
  369. package/flashbar/index.js.map +1 -1
  370. package/flashbar/interfaces.d.ts.map +1 -1
  371. package/flashbar/interfaces.js.map +1 -1
  372. package/flashbar/internal/analytics.d.ts.map +1 -1
  373. package/flashbar/internal/analytics.js.map +1 -1
  374. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  375. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  376. package/flashbar/utils.d.ts.map +1 -1
  377. package/flashbar/utils.js.map +1 -1
  378. package/form/index.d.ts.map +1 -1
  379. package/form/index.js.map +1 -1
  380. package/form/interfaces.d.ts.map +1 -1
  381. package/form/interfaces.js.map +1 -1
  382. package/form/internal.d.ts.map +1 -1
  383. package/form/internal.js.map +1 -1
  384. package/form-field/index.d.ts.map +1 -1
  385. package/form-field/index.js.map +1 -1
  386. package/form-field/interfaces.d.ts +0 -6
  387. package/form-field/interfaces.d.ts.map +1 -1
  388. package/form-field/interfaces.js.map +1 -1
  389. package/form-field/internal.d.ts +1 -1
  390. package/form-field/internal.d.ts.map +1 -1
  391. package/form-field/internal.js +1 -2
  392. package/form-field/internal.js.map +1 -1
  393. package/form-field/util.d.ts.map +1 -1
  394. package/form-field/util.js.map +1 -1
  395. package/grid/index.d.ts.map +1 -1
  396. package/grid/index.js.map +1 -1
  397. package/grid/interfaces.d.ts.map +1 -1
  398. package/grid/interfaces.js.map +1 -1
  399. package/grid/internal.d.ts.map +1 -1
  400. package/grid/internal.js.map +1 -1
  401. package/header/index.d.ts.map +1 -1
  402. package/header/index.js.map +1 -1
  403. package/header/interfaces.d.ts.map +1 -1
  404. package/header/interfaces.js.map +1 -1
  405. package/header/internal.d.ts.map +1 -1
  406. package/header/internal.js.map +1 -1
  407. package/help-panel/index.d.ts.map +1 -1
  408. package/help-panel/index.js.map +1 -1
  409. package/help-panel/interfaces.d.ts.map +1 -1
  410. package/help-panel/interfaces.js.map +1 -1
  411. package/hotspot/index.d.ts.map +1 -1
  412. package/hotspot/index.js.map +1 -1
  413. package/hotspot/interfaces.d.ts.map +1 -1
  414. package/hotspot/interfaces.js.map +1 -1
  415. package/icon/index.d.ts.map +1 -1
  416. package/icon/index.js.map +1 -1
  417. package/icon/interfaces.d.ts.map +1 -1
  418. package/icon/interfaces.js.map +1 -1
  419. package/icon/internal.d.ts.map +1 -1
  420. package/icon/internal.js.map +1 -1
  421. package/index.d.ts.map +1 -1
  422. package/index.js.map +1 -1
  423. package/input/index.d.ts.map +1 -1
  424. package/input/index.js.map +1 -1
  425. package/input/interfaces.d.ts +7 -5
  426. package/input/interfaces.d.ts.map +1 -1
  427. package/input/interfaces.js.map +1 -1
  428. package/input/internal.d.ts.map +1 -1
  429. package/input/internal.js +4 -16
  430. package/input/internal.js.map +1 -1
  431. package/input/utils.d.ts.map +1 -1
  432. package/input/utils.js.map +1 -1
  433. package/interfaces.d.ts.map +1 -1
  434. package/interfaces.js.map +1 -1
  435. package/internal/animate.d.ts.map +1 -1
  436. package/internal/animate.js.map +1 -1
  437. package/internal/base-component/index.d.ts.map +1 -1
  438. package/internal/base-component/index.js.map +1 -1
  439. package/internal/breakpoints.d.ts.map +1 -1
  440. package/internal/breakpoints.js.map +1 -1
  441. package/internal/components/abstract-switch/index.d.ts.map +1 -1
  442. package/internal/components/abstract-switch/index.js.map +1 -1
  443. package/internal/components/autosuggest-input/index.d.ts +2 -3
  444. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  445. package/internal/components/autosuggest-input/index.js.map +1 -1
  446. package/internal/components/button-trigger/index.d.ts.map +1 -1
  447. package/internal/components/button-trigger/index.js.map +1 -1
  448. package/internal/components/cartesian-chart/axis-label.d.ts.map +1 -1
  449. package/internal/components/cartesian-chart/axis-label.js.map +1 -1
  450. package/internal/components/cartesian-chart/bottom-labels.d.ts.map +1 -1
  451. package/internal/components/cartesian-chart/bottom-labels.js.map +1 -1
  452. package/internal/components/cartesian-chart/constants.d.ts.map +1 -1
  453. package/internal/components/cartesian-chart/constants.js.map +1 -1
  454. package/internal/components/cartesian-chart/emphasized-baseline.d.ts.map +1 -1
  455. package/internal/components/cartesian-chart/emphasized-baseline.js.map +1 -1
  456. package/internal/components/cartesian-chart/highlighted-point.d.ts.map +1 -1
  457. package/internal/components/cartesian-chart/highlighted-point.js.map +1 -1
  458. package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
  459. package/internal/components/cartesian-chart/interfaces.js.map +1 -1
  460. package/internal/components/cartesian-chart/label-utils.d.ts.map +1 -1
  461. package/internal/components/cartesian-chart/label-utils.js.map +1 -1
  462. package/internal/components/cartesian-chart/labels-measure.d.ts.map +1 -1
  463. package/internal/components/cartesian-chart/labels-measure.js.map +1 -1
  464. package/internal/components/cartesian-chart/left-labels.d.ts.map +1 -1
  465. package/internal/components/cartesian-chart/left-labels.js.map +1 -1
  466. package/internal/components/cartesian-chart/scales.d.ts.map +1 -1
  467. package/internal/components/cartesian-chart/scales.js.map +1 -1
  468. package/internal/components/cartesian-chart/ticks.d.ts.map +1 -1
  469. package/internal/components/cartesian-chart/ticks.js.map +1 -1
  470. package/internal/components/cartesian-chart/vertical-grid-lines.d.ts.map +1 -1
  471. package/internal/components/cartesian-chart/vertical-grid-lines.js.map +1 -1
  472. package/internal/components/cartesian-chart/vertical-marker.d.ts.map +1 -1
  473. package/internal/components/cartesian-chart/vertical-marker.js.map +1 -1
  474. package/internal/components/chart-filter/index.d.ts.map +1 -1
  475. package/internal/components/chart-filter/index.js.map +1 -1
  476. package/internal/components/chart-legend/index.d.ts.map +1 -1
  477. package/internal/components/chart-legend/index.js.map +1 -1
  478. package/internal/components/chart-plot/application-controller.d.ts.map +1 -1
  479. package/internal/components/chart-plot/application-controller.js.map +1 -1
  480. package/internal/components/chart-plot/focus-outline.d.ts.map +1 -1
  481. package/internal/components/chart-plot/focus-outline.js.map +1 -1
  482. package/internal/components/chart-plot/index.d.ts.map +1 -1
  483. package/internal/components/chart-plot/index.js.map +1 -1
  484. package/internal/components/chart-plot/interfaces.d.ts.map +1 -1
  485. package/internal/components/chart-plot/interfaces.js.map +1 -1
  486. package/internal/components/chart-popover/index.d.ts.map +1 -1
  487. package/internal/components/chart-popover/index.js.map +1 -1
  488. package/internal/components/chart-series-details/index.d.ts.map +1 -1
  489. package/internal/components/chart-series-details/index.js.map +1 -1
  490. package/internal/components/chart-series-marker/index.d.ts.map +1 -1
  491. package/internal/components/chart-series-marker/index.js.map +1 -1
  492. package/internal/components/chart-status-container/index.d.ts.map +1 -1
  493. package/internal/components/chart-status-container/index.js.map +1 -1
  494. package/internal/components/checkbox-icon/index.d.ts.map +1 -1
  495. package/internal/components/checkbox-icon/index.js.map +1 -1
  496. package/internal/components/dark-ribbon/index.d.ts.map +1 -1
  497. package/internal/components/dark-ribbon/index.js.map +1 -1
  498. package/internal/components/dropdown/context.d.ts.map +1 -1
  499. package/internal/components/dropdown/context.js.map +1 -1
  500. package/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
  501. package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
  502. package/internal/components/dropdown/index.d.ts.map +1 -1
  503. package/internal/components/dropdown/index.js.map +1 -1
  504. package/internal/components/dropdown/interfaces.d.ts.map +1 -1
  505. package/internal/components/dropdown/interfaces.js.map +1 -1
  506. package/internal/components/dropdown-footer/index.d.ts.map +1 -1
  507. package/internal/components/dropdown-footer/index.js.map +1 -1
  508. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  509. package/internal/components/dropdown-status/index.js.map +1 -1
  510. package/internal/components/dropdown-status/interfaces.d.ts.map +1 -1
  511. package/internal/components/dropdown-status/interfaces.js.map +1 -1
  512. package/internal/components/filtering-token/index.d.ts.map +1 -1
  513. package/internal/components/filtering-token/index.js.map +1 -1
  514. package/internal/components/focus-lock/index.d.ts.map +1 -1
  515. package/internal/components/focus-lock/index.js.map +1 -1
  516. package/internal/components/focus-lock/utils.d.ts +2 -2
  517. package/internal/components/focus-lock/utils.d.ts.map +1 -1
  518. package/internal/components/focus-lock/utils.js.map +1 -1
  519. package/internal/components/interfaces.d.ts.map +1 -1
  520. package/internal/components/interfaces.js.map +1 -1
  521. package/internal/components/live-region/index.d.ts.map +1 -1
  522. package/internal/components/live-region/index.js.map +1 -1
  523. package/internal/components/masked-input/index.d.ts.map +1 -1
  524. package/internal/components/masked-input/index.js.map +1 -1
  525. package/internal/components/masked-input/interfaces.d.ts.map +1 -1
  526. package/internal/components/masked-input/interfaces.js.map +1 -1
  527. package/internal/components/masked-input/keyboard-handler.d.ts.map +1 -1
  528. package/internal/components/masked-input/keyboard-handler.js.map +1 -1
  529. package/internal/components/masked-input/use-mask.d.ts.map +1 -1
  530. package/internal/components/masked-input/use-mask.js.map +1 -1
  531. package/internal/components/masked-input/utils/keys.d.ts.map +1 -1
  532. package/internal/components/masked-input/utils/keys.js.map +1 -1
  533. package/internal/components/masked-input/utils/mask-format.d.ts.map +1 -1
  534. package/internal/components/masked-input/utils/mask-format.js.map +1 -1
  535. package/internal/components/masked-input/utils/strings.d.ts.map +1 -1
  536. package/internal/components/masked-input/utils/strings.js.map +1 -1
  537. package/internal/components/menu-dropdown/index.d.ts.map +1 -1
  538. package/internal/components/menu-dropdown/index.js.map +1 -1
  539. package/internal/components/menu-dropdown/interfaces.d.ts.map +1 -1
  540. package/internal/components/menu-dropdown/interfaces.js.map +1 -1
  541. package/internal/components/option/highlight-match.d.ts.map +1 -1
  542. package/internal/components/option/highlight-match.js.map +1 -1
  543. package/internal/components/option/index.d.ts +1 -1
  544. package/internal/components/option/index.d.ts.map +1 -1
  545. package/internal/components/option/index.js +11 -2
  546. package/internal/components/option/index.js.map +1 -1
  547. package/internal/components/option/interfaces.d.ts +1 -0
  548. package/internal/components/option/interfaces.d.ts.map +1 -1
  549. package/internal/components/option/interfaces.js.map +1 -1
  550. package/internal/components/option/option-announcer.d.ts.map +1 -1
  551. package/internal/components/option/option-announcer.js.map +1 -1
  552. package/internal/components/option/option-parts.d.ts.map +1 -1
  553. package/internal/components/option/option-parts.js.map +1 -1
  554. package/internal/components/option/utils/filter-options.d.ts.map +1 -1
  555. package/internal/components/option/utils/filter-options.js.map +1 -1
  556. package/internal/components/option/utils/flatten-options.d.ts.map +1 -1
  557. package/internal/components/option/utils/flatten-options.js.map +1 -1
  558. package/internal/components/option/utils/prepare-options.d.ts.map +1 -1
  559. package/internal/components/option/utils/prepare-options.js.map +1 -1
  560. package/internal/components/options-list/index.d.ts.map +1 -1
  561. package/internal/components/options-list/index.js.map +1 -1
  562. package/internal/components/options-list/utils/test-indexes.d.ts.map +1 -1
  563. package/internal/components/options-list/utils/test-indexes.js.map +1 -1
  564. package/internal/components/options-list/utils/use-highlight-option.d.ts.map +1 -1
  565. package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
  566. package/internal/components/options-list/utils/use-ids.d.ts.map +1 -1
  567. package/internal/components/options-list/utils/use-ids.js.map +1 -1
  568. package/internal/components/options-list/utils/use-keyboard.d.ts.map +1 -1
  569. package/internal/components/options-list/utils/use-keyboard.js.map +1 -1
  570. package/internal/components/options-list/utils/use-open-state.d.ts.map +1 -1
  571. package/internal/components/options-list/utils/use-open-state.js.map +1 -1
  572. package/internal/components/portal/index.d.ts.map +1 -1
  573. package/internal/components/portal/index.js.map +1 -1
  574. package/internal/components/screenreader-only/index.d.ts.map +1 -1
  575. package/internal/components/screenreader-only/index.js.map +1 -1
  576. package/internal/components/selectable-item/index.d.ts.map +1 -1
  577. package/internal/components/selectable-item/index.js.map +1 -1
  578. package/internal/components/tab-trap/index.d.ts.map +1 -1
  579. package/internal/components/tab-trap/index.js.map +1 -1
  580. package/internal/components/token-list/index.d.ts +4 -0
  581. package/internal/components/token-list/index.d.ts.map +1 -0
  582. package/internal/components/token-list/index.js +31 -0
  583. package/internal/components/token-list/index.js.map +1 -0
  584. package/internal/components/token-list/interfaces.d.ts +16 -0
  585. package/internal/components/token-list/interfaces.d.ts.map +1 -0
  586. package/internal/components/token-list/interfaces.js +4 -0
  587. package/internal/components/token-list/interfaces.js.map +1 -0
  588. package/internal/components/token-list/styles.css.js +14 -0
  589. package/internal/components/token-list/styles.scoped.css +232 -0
  590. package/internal/components/token-list/styles.selectors.js +15 -0
  591. package/internal/components/token-list/token-focus-controller.d.ts +5 -0
  592. package/internal/components/token-list/token-focus-controller.d.ts.map +1 -0
  593. package/internal/components/token-list/token-focus-controller.js +49 -0
  594. package/internal/components/token-list/token-focus-controller.js.map +1 -0
  595. package/internal/components/token-list/token-limit-toggle.d.ts +14 -0
  596. package/internal/components/token-list/token-limit-toggle.d.ts.map +1 -0
  597. package/{token-group/toggle.js → internal/components/token-list/token-limit-toggle.js} +6 -7
  598. package/internal/components/token-list/token-limit-toggle.js.map +1 -0
  599. package/internal/components/transition/index.d.ts.map +1 -1
  600. package/internal/components/transition/index.js.map +1 -1
  601. package/internal/components/visual-context/index.d.ts.map +1 -1
  602. package/internal/components/visual-context/index.js.map +1 -1
  603. package/internal/context/app-layout-context.d.ts.map +1 -1
  604. package/internal/context/app-layout-context.js.map +1 -1
  605. package/internal/context/form-field-context.d.ts +2 -6
  606. package/internal/context/form-field-context.d.ts.map +1 -1
  607. package/internal/context/form-field-context.js +1 -7
  608. package/internal/context/form-field-context.js.map +1 -1
  609. package/internal/context/split-panel-context.d.ts.map +1 -1
  610. package/internal/context/split-panel-context.js.map +1 -1
  611. package/internal/debounce.d.ts.map +1 -1
  612. package/internal/debounce.js.map +1 -1
  613. package/internal/environment.js +1 -1
  614. package/internal/events/index.d.ts.map +1 -1
  615. package/internal/events/index.js.map +1 -1
  616. package/internal/focus-tracker.d.ts.map +1 -1
  617. package/internal/focus-tracker.js.map +1 -1
  618. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  619. package/internal/generated/custom-css-properties/index.js.map +1 -1
  620. package/internal/hooks/check-controlled/index.d.ts.map +1 -1
  621. package/internal/hooks/check-controlled/index.js.map +1 -1
  622. package/internal/hooks/container-queries/index.d.ts.map +1 -1
  623. package/internal/hooks/container-queries/index.js.map +1 -1
  624. package/internal/hooks/container-queries/interfaces.d.ts.map +1 -1
  625. package/internal/hooks/container-queries/interfaces.js.map +1 -1
  626. package/internal/hooks/container-queries/use-container-breakpoints.d.ts.map +1 -1
  627. package/internal/hooks/container-queries/use-container-breakpoints.js.map +1 -1
  628. package/internal/hooks/container-queries/use-container-query.d.ts.map +1 -1
  629. package/internal/hooks/container-queries/use-container-query.js.map +1 -1
  630. package/internal/hooks/container-queries/use-resize-observer.d.ts.map +1 -1
  631. package/internal/hooks/container-queries/use-resize-observer.js.map +1 -1
  632. package/internal/hooks/focus-visible/index.d.ts.map +1 -1
  633. package/internal/hooks/focus-visible/index.js.map +1 -1
  634. package/internal/hooks/forward-focus/index.d.ts.map +1 -1
  635. package/internal/hooks/forward-focus/index.js.map +1 -1
  636. package/internal/hooks/forward-focus/radio-group.d.ts.map +1 -1
  637. package/internal/hooks/forward-focus/radio-group.js.map +1 -1
  638. package/internal/hooks/use-base-component/index.d.ts.map +1 -1
  639. package/internal/hooks/use-base-component/index.js.map +1 -1
  640. package/internal/hooks/use-controllable/index.d.ts.map +1 -1
  641. package/internal/hooks/use-controllable/index.js.map +1 -1
  642. package/internal/hooks/use-date-cache/index.d.ts.map +1 -1
  643. package/internal/hooks/use-date-cache/index.js.map +1 -1
  644. package/internal/hooks/use-debounce-callback/index.d.ts.map +1 -1
  645. package/internal/hooks/use-debounce-callback/index.js.map +1 -1
  646. package/internal/hooks/use-dynamic-overlap/index.d.ts.map +1 -1
  647. package/internal/hooks/use-dynamic-overlap/index.js.map +1 -1
  648. package/internal/hooks/use-effect-on-update.d.ts.map +1 -1
  649. package/internal/hooks/use-effect-on-update.js.map +1 -1
  650. package/internal/hooks/use-focus-tracker.d.ts.map +1 -1
  651. package/internal/hooks/use-focus-tracker.js.map +1 -1
  652. package/internal/hooks/use-has-rendered/index.d.ts.map +1 -1
  653. package/internal/hooks/use-has-rendered/index.js.map +1 -1
  654. package/internal/hooks/use-intersection-observer/index.d.ts.map +1 -1
  655. package/internal/hooks/use-intersection-observer/index.js.map +1 -1
  656. package/internal/hooks/use-merge-refs/index.d.ts.map +1 -1
  657. package/internal/hooks/use-merge-refs/index.js.map +1 -1
  658. package/internal/hooks/use-mobile/index.d.ts.map +1 -1
  659. package/internal/hooks/use-mobile/index.js.map +1 -1
  660. package/internal/hooks/use-mouse-down-target.d.ts.map +1 -1
  661. package/internal/hooks/use-mouse-down-target.js.map +1 -1
  662. package/internal/hooks/use-mutation-observer/index.d.ts.map +1 -1
  663. package/internal/hooks/use-mutation-observer/index.js.map +1 -1
  664. package/internal/hooks/use-portal-mode-classes/index.d.ts.map +1 -1
  665. package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
  666. package/internal/hooks/use-previous/index.d.ts.map +1 -1
  667. package/internal/hooks/use-previous/index.js.map +1 -1
  668. package/internal/hooks/use-scroll-sync/index.d.ts.map +1 -1
  669. package/internal/hooks/use-scroll-sync/index.js.map +1 -1
  670. package/internal/hooks/use-singleton-handler/index.d.ts.map +1 -1
  671. package/internal/hooks/use-singleton-handler/index.js.map +1 -1
  672. package/internal/hooks/use-stable-event-handler/index.d.ts.map +1 -1
  673. package/internal/hooks/use-stable-event-handler/index.js.map +1 -1
  674. package/internal/hooks/use-telemetry/index.d.ts.map +1 -1
  675. package/internal/hooks/use-telemetry/index.js.map +1 -1
  676. package/internal/hooks/use-unique-id/index.d.ts.map +1 -1
  677. package/internal/hooks/use-unique-id/index.js.map +1 -1
  678. package/internal/hooks/use-visual-mode/index.d.ts.map +1 -1
  679. package/internal/hooks/use-visual-mode/index.js.map +1 -1
  680. package/internal/i18n/context.d.ts.map +1 -1
  681. package/internal/i18n/context.js.map +1 -1
  682. package/internal/i18n/index.d.ts.map +1 -1
  683. package/internal/i18n/index.js.map +1 -1
  684. package/internal/i18n/provider.d.ts.map +1 -1
  685. package/internal/i18n/provider.js.map +1 -1
  686. package/internal/is-development.d.ts.map +1 -1
  687. package/internal/is-development.js.map +1 -1
  688. package/internal/keycode.d.ts.map +1 -1
  689. package/internal/keycode.js.map +1 -1
  690. package/internal/logging.d.ts.map +1 -1
  691. package/internal/logging.js.map +1 -1
  692. package/internal/manifest.json +1 -1
  693. package/internal/motion.d.ts.map +1 -1
  694. package/internal/motion.js.map +1 -1
  695. package/internal/styles/colors.d.ts.map +1 -1
  696. package/internal/styles/colors.js.map +1 -1
  697. package/internal/types.d.ts.map +1 -1
  698. package/internal/types.js.map +1 -1
  699. package/internal/utils/apply-display-name.d.ts.map +1 -1
  700. package/internal/utils/apply-display-name.js.map +1 -1
  701. package/internal/utils/browser-scrollbar-size.d.ts.map +1 -1
  702. package/internal/utils/browser-scrollbar-size.js.map +1 -1
  703. package/internal/utils/calculate-once.d.ts.map +1 -1
  704. package/internal/utils/calculate-once.js.map +1 -1
  705. package/internal/utils/check-safe-url.d.ts.map +1 -1
  706. package/internal/utils/check-safe-url.js.map +1 -1
  707. package/internal/utils/create-category-color-scale.d.ts.map +1 -1
  708. package/internal/utils/create-category-color-scale.js.map +1 -1
  709. package/internal/utils/date-time/display-format.d.ts.map +1 -1
  710. package/internal/utils/date-time/display-format.js.map +1 -1
  711. package/internal/utils/date-time/format-date-range.d.ts.map +1 -1
  712. package/internal/utils/date-time/format-date-range.js.map +1 -1
  713. package/internal/utils/date-time/format-date-time.d.ts.map +1 -1
  714. package/internal/utils/date-time/format-date-time.js.map +1 -1
  715. package/internal/utils/date-time/format-date.d.ts.map +1 -1
  716. package/internal/utils/date-time/format-date.js.map +1 -1
  717. package/internal/utils/date-time/format-time.d.ts.map +1 -1
  718. package/internal/utils/date-time/format-time.js.map +1 -1
  719. package/internal/utils/date-time/format-timezone-offset.d.ts.map +1 -1
  720. package/internal/utils/date-time/format-timezone-offset.js.map +1 -1
  721. package/internal/utils/date-time/index.d.ts.map +1 -1
  722. package/internal/utils/date-time/index.js.map +1 -1
  723. package/internal/utils/date-time/is-iso-date-only.d.ts.map +1 -1
  724. package/internal/utils/date-time/is-iso-date-only.js.map +1 -1
  725. package/internal/utils/date-time/join-date-time.d.ts.map +1 -1
  726. package/internal/utils/date-time/join-date-time.js.map +1 -1
  727. package/internal/utils/date-time/parse-date.d.ts.map +1 -1
  728. package/internal/utils/date-time/parse-date.js.map +1 -1
  729. package/internal/utils/date-time/parse-timezone-offset.d.ts.map +1 -1
  730. package/internal/utils/date-time/parse-timezone-offset.js.map +1 -1
  731. package/internal/utils/date-time/shift-timezone-offset.d.ts.map +1 -1
  732. package/internal/utils/date-time/shift-timezone-offset.js.map +1 -1
  733. package/internal/utils/dom.d.ts.map +1 -1
  734. package/internal/utils/dom.js.map +1 -1
  735. package/internal/utils/external-props.d.ts.map +1 -1
  736. package/internal/utils/external-props.js.map +1 -1
  737. package/internal/utils/focus-svg-element.d.ts.map +1 -1
  738. package/internal/utils/focus-svg-element.js.map +1 -1
  739. package/internal/utils/has-value.d.ts.map +1 -1
  740. package/internal/utils/has-value.js.map +1 -1
  741. package/internal/utils/locale/index.d.ts.map +1 -1
  742. package/internal/utils/locale/index.js.map +1 -1
  743. package/internal/utils/locale/merge-locales.d.ts.map +1 -1
  744. package/internal/utils/locale/merge-locales.js.map +1 -1
  745. package/internal/utils/locale/normalize-locale.d.ts.map +1 -1
  746. package/internal/utils/locale/normalize-locale.js.map +1 -1
  747. package/internal/utils/locale/normalize-start-of-week.d.ts.map +1 -1
  748. package/internal/utils/locale/normalize-start-of-week.js.map +1 -1
  749. package/internal/utils/promises.d.ts.map +1 -1
  750. package/internal/utils/promises.js.map +1 -1
  751. package/internal/utils/scrollable-containers.d.ts.map +1 -1
  752. package/internal/utils/scrollable-containers.js.map +1 -1
  753. package/internal/utils/strings/index.d.ts.map +1 -1
  754. package/internal/utils/strings/index.js.map +1 -1
  755. package/internal/utils/strings/join-strings.d.ts.map +1 -1
  756. package/internal/utils/strings/join-strings.js.map +1 -1
  757. package/internal/utils/strings/pad-left-zeros.d.ts.map +1 -1
  758. package/internal/utils/strings/pad-left-zeros.js.map +1 -1
  759. package/internal/utils/throttle.d.ts.map +1 -1
  760. package/internal/utils/throttle.js.map +1 -1
  761. package/internal/utils/use-container-width.d.ts.map +1 -1
  762. package/internal/utils/use-container-width.js.map +1 -1
  763. package/line-chart/index.d.ts.map +1 -1
  764. package/line-chart/index.js.map +1 -1
  765. package/line-chart/interfaces.d.ts.map +1 -1
  766. package/line-chart/interfaces.js.map +1 -1
  767. package/link/index.d.ts.map +1 -1
  768. package/link/index.js.map +1 -1
  769. package/link/interfaces.d.ts.map +1 -1
  770. package/link/interfaces.js.map +1 -1
  771. package/link/internal.d.ts.map +1 -1
  772. package/link/internal.js.map +1 -1
  773. package/mixed-line-bar-chart/bar-groups.d.ts.map +1 -1
  774. package/mixed-line-bar-chart/bar-groups.js.map +1 -1
  775. package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
  776. package/mixed-line-bar-chart/bar-series.js.map +1 -1
  777. package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  778. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  779. package/mixed-line-bar-chart/chart-filters.d.ts.map +1 -1
  780. package/mixed-line-bar-chart/chart-filters.js.map +1 -1
  781. package/mixed-line-bar-chart/chart-legend.d.ts.map +1 -1
  782. package/mixed-line-bar-chart/chart-legend.js.map +1 -1
  783. package/mixed-line-bar-chart/chart-popover.d.ts.map +1 -1
  784. package/mixed-line-bar-chart/chart-popover.js.map +1 -1
  785. package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
  786. package/mixed-line-bar-chart/data-series.js.map +1 -1
  787. package/mixed-line-bar-chart/domain.d.ts.map +1 -1
  788. package/mixed-line-bar-chart/domain.js.map +1 -1
  789. package/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
  790. package/mixed-line-bar-chart/format-highlighted.js.map +1 -1
  791. package/mixed-line-bar-chart/hooks/use-mouse-hover.d.ts.map +1 -1
  792. package/mixed-line-bar-chart/hooks/use-mouse-hover.js.map +1 -1
  793. package/mixed-line-bar-chart/hooks/use-navigation.d.ts.map +1 -1
  794. package/mixed-line-bar-chart/hooks/use-navigation.js.map +1 -1
  795. package/mixed-line-bar-chart/hooks/use-popover.d.ts.map +1 -1
  796. package/mixed-line-bar-chart/hooks/use-popover.js.map +1 -1
  797. package/mixed-line-bar-chart/index.d.ts.map +1 -1
  798. package/mixed-line-bar-chart/index.js.map +1 -1
  799. package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
  800. package/mixed-line-bar-chart/interfaces.js.map +1 -1
  801. package/mixed-line-bar-chart/internal.d.ts.map +1 -1
  802. package/mixed-line-bar-chart/internal.js.map +1 -1
  803. package/mixed-line-bar-chart/line-series.d.ts.map +1 -1
  804. package/mixed-line-bar-chart/line-series.js.map +1 -1
  805. package/mixed-line-bar-chart/make-scaled-bar-groups.d.ts.map +1 -1
  806. package/mixed-line-bar-chart/make-scaled-bar-groups.js.map +1 -1
  807. package/mixed-line-bar-chart/make-scaled-series.d.ts.map +1 -1
  808. package/mixed-line-bar-chart/make-scaled-series.js.map +1 -1
  809. package/mixed-line-bar-chart/utils.d.ts.map +1 -1
  810. package/mixed-line-bar-chart/utils.js.map +1 -1
  811. package/modal/body-scroll.d.ts.map +1 -1
  812. package/modal/body-scroll.js.map +1 -1
  813. package/modal/index.d.ts.map +1 -1
  814. package/modal/index.js.map +1 -1
  815. package/modal/interfaces.d.ts.map +1 -1
  816. package/modal/interfaces.js.map +1 -1
  817. package/modal/internal.d.ts.map +1 -1
  818. package/modal/internal.js.map +1 -1
  819. package/multiselect/index.d.ts.map +1 -1
  820. package/multiselect/index.js.map +1 -1
  821. package/multiselect/interfaces.d.ts.map +1 -1
  822. package/multiselect/interfaces.js.map +1 -1
  823. package/multiselect/internal.d.ts.map +1 -1
  824. package/multiselect/internal.js.map +1 -1
  825. package/package.json +1 -1
  826. package/pagination/index.d.ts.map +1 -1
  827. package/pagination/index.js.map +1 -1
  828. package/pagination/interfaces.d.ts.map +1 -1
  829. package/pagination/interfaces.js.map +1 -1
  830. package/pagination/internal.d.ts.map +1 -1
  831. package/pagination/internal.js.map +1 -1
  832. package/pagination/utils.d.ts.map +1 -1
  833. package/pagination/utils.js.map +1 -1
  834. package/pie-chart/index.d.ts.map +1 -1
  835. package/pie-chart/index.js.map +1 -1
  836. package/pie-chart/interfaces.d.ts.map +1 -1
  837. package/pie-chart/interfaces.js.map +1 -1
  838. package/pie-chart/labels.d.ts.map +1 -1
  839. package/pie-chart/labels.js.map +1 -1
  840. package/pie-chart/pie-chart.d.ts.map +1 -1
  841. package/pie-chart/pie-chart.js.map +1 -1
  842. package/pie-chart/responsive-text.d.ts.map +1 -1
  843. package/pie-chart/responsive-text.js.map +1 -1
  844. package/pie-chart/segments.d.ts.map +1 -1
  845. package/pie-chart/segments.js.map +1 -1
  846. package/pie-chart/utils.d.ts.map +1 -1
  847. package/pie-chart/utils.js.map +1 -1
  848. package/popover/arrow.d.ts.map +1 -1
  849. package/popover/arrow.js.map +1 -1
  850. package/popover/body.d.ts.map +1 -1
  851. package/popover/body.js.map +1 -1
  852. package/popover/container.d.ts.map +1 -1
  853. package/popover/container.js.map +1 -1
  854. package/popover/index.d.ts.map +1 -1
  855. package/popover/index.js.map +1 -1
  856. package/popover/interfaces.d.ts.map +1 -1
  857. package/popover/interfaces.js.map +1 -1
  858. package/popover/internal.d.ts.map +1 -1
  859. package/popover/internal.js.map +1 -1
  860. package/popover/utils/positions.d.ts.map +1 -1
  861. package/popover/utils/positions.js.map +1 -1
  862. package/progress-bar/index.d.ts.map +1 -1
  863. package/progress-bar/index.js.map +1 -1
  864. package/progress-bar/interfaces.d.ts.map +1 -1
  865. package/progress-bar/interfaces.js.map +1 -1
  866. package/progress-bar/internal.d.ts.map +1 -1
  867. package/progress-bar/internal.js.map +1 -1
  868. package/property-filter/controller.d.ts +6 -0
  869. package/property-filter/controller.d.ts.map +1 -1
  870. package/property-filter/controller.js +9 -0
  871. package/property-filter/controller.js.map +1 -1
  872. package/property-filter/filter-options.d.ts.map +1 -1
  873. package/property-filter/filter-options.js.map +1 -1
  874. package/property-filter/index.d.ts.map +1 -1
  875. package/property-filter/index.js +13 -18
  876. package/property-filter/index.js.map +1 -1
  877. package/property-filter/interfaces.d.ts.map +1 -1
  878. package/property-filter/interfaces.js.map +1 -1
  879. package/property-filter/property-editor.d.ts.map +1 -1
  880. package/property-filter/property-editor.js.map +1 -1
  881. package/property-filter/property-filter-autosuggest.d.ts.map +1 -1
  882. package/property-filter/property-filter-autosuggest.js.map +1 -1
  883. package/property-filter/styles.css.js +29 -31
  884. package/property-filter/styles.scoped.css +31 -43
  885. package/property-filter/styles.selectors.js +29 -31
  886. package/property-filter/token-editor.d.ts.map +1 -1
  887. package/property-filter/token-editor.js.map +1 -1
  888. package/property-filter/token.d.ts.map +1 -1
  889. package/property-filter/token.js +5 -8
  890. package/property-filter/token.js.map +1 -1
  891. package/property-filter/use-load-items.d.ts.map +1 -1
  892. package/property-filter/use-load-items.js.map +1 -1
  893. package/property-filter/utils.d.ts.map +1 -1
  894. package/property-filter/utils.js.map +1 -1
  895. package/radio-group/index.d.ts.map +1 -1
  896. package/radio-group/index.js.map +1 -1
  897. package/radio-group/interfaces.d.ts.map +1 -1
  898. package/radio-group/interfaces.js.map +1 -1
  899. package/radio-group/internal.d.ts.map +1 -1
  900. package/radio-group/internal.js.map +1 -1
  901. package/radio-group/radio-button.d.ts.map +1 -1
  902. package/radio-group/radio-button.js.map +1 -1
  903. package/s3-resource-selector/index.d.ts.map +1 -1
  904. package/s3-resource-selector/index.js.map +1 -1
  905. package/s3-resource-selector/interfaces.d.ts.map +1 -1
  906. package/s3-resource-selector/interfaces.js.map +1 -1
  907. package/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
  908. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  909. package/s3-resource-selector/s3-in-context/search-input.d.ts.map +1 -1
  910. package/s3-resource-selector/s3-in-context/search-input.js.map +1 -1
  911. package/s3-resource-selector/s3-in-context/use-versions-fetch.d.ts.map +1 -1
  912. package/s3-resource-selector/s3-in-context/use-versions-fetch.js.map +1 -1
  913. package/s3-resource-selector/s3-in-context/validation.d.ts.map +1 -1
  914. package/s3-resource-selector/s3-in-context/validation.js.map +1 -1
  915. package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
  916. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  917. package/s3-resource-selector/s3-modal/buckets-table.d.ts.map +1 -1
  918. package/s3-resource-selector/s3-modal/buckets-table.js.map +1 -1
  919. package/s3-resource-selector/s3-modal/column-formats.d.ts.map +1 -1
  920. package/s3-resource-selector/s3-modal/column-formats.js.map +1 -1
  921. package/s3-resource-selector/s3-modal/empty-state.d.ts.map +1 -1
  922. package/s3-resource-selector/s3-modal/empty-state.js.map +1 -1
  923. package/s3-resource-selector/s3-modal/index.d.ts.map +1 -1
  924. package/s3-resource-selector/s3-modal/index.js.map +1 -1
  925. package/s3-resource-selector/s3-modal/objects-table.d.ts.map +1 -1
  926. package/s3-resource-selector/s3-modal/objects-table.js.map +1 -1
  927. package/s3-resource-selector/s3-modal/table-utils.d.ts.map +1 -1
  928. package/s3-resource-selector/s3-modal/table-utils.js.map +1 -1
  929. package/s3-resource-selector/s3-modal/versions-table.d.ts.map +1 -1
  930. package/s3-resource-selector/s3-modal/versions-table.js.map +1 -1
  931. package/s3-resource-selector/utils.d.ts.map +1 -1
  932. package/s3-resource-selector/utils.js.map +1 -1
  933. package/segmented-control/index.d.ts.map +1 -1
  934. package/segmented-control/index.js.map +1 -1
  935. package/segmented-control/interfaces.d.ts.map +1 -1
  936. package/segmented-control/interfaces.js.map +1 -1
  937. package/segmented-control/internal-segmented-control.d.ts.map +1 -1
  938. package/segmented-control/internal-segmented-control.js.map +1 -1
  939. package/segmented-control/internal.d.ts.map +1 -1
  940. package/segmented-control/internal.js.map +1 -1
  941. package/segmented-control/segment.d.ts.map +1 -1
  942. package/segmented-control/segment.js.map +1 -1
  943. package/select/index.d.ts.map +1 -1
  944. package/select/index.js.map +1 -1
  945. package/select/interfaces.d.ts.map +1 -1
  946. package/select/interfaces.js.map +1 -1
  947. package/select/internal.d.ts.map +1 -1
  948. package/select/internal.js.map +1 -1
  949. package/select/parts/filter.d.ts +1 -1
  950. package/select/parts/filter.d.ts.map +1 -1
  951. package/select/parts/filter.js.map +1 -1
  952. package/select/parts/item.d.ts.map +1 -1
  953. package/select/parts/item.js.map +1 -1
  954. package/select/parts/multiselect-item.d.ts.map +1 -1
  955. package/select/parts/multiselect-item.js.map +1 -1
  956. package/select/parts/plain-list.d.ts.map +1 -1
  957. package/select/parts/plain-list.js.map +1 -1
  958. package/select/parts/trigger.d.ts.map +1 -1
  959. package/select/parts/trigger.js.map +1 -1
  960. package/select/parts/virtual-list.d.ts.map +1 -1
  961. package/select/parts/virtual-list.js.map +1 -1
  962. package/select/utils/check-option-value-field.d.ts.map +1 -1
  963. package/select/utils/check-option-value-field.js.map +1 -1
  964. package/select/utils/connect-options.d.ts.map +1 -1
  965. package/select/utils/connect-options.js.map +1 -1
  966. package/select/utils/get-item-props.d.ts.map +1 -1
  967. package/select/utils/get-item-props.js.map +1 -1
  968. package/select/utils/render-options.d.ts.map +1 -1
  969. package/select/utils/render-options.js.map +1 -1
  970. package/select/utils/use-announcement.d.ts.map +1 -1
  971. package/select/utils/use-announcement.js.map +1 -1
  972. package/select/utils/use-load-items.d.ts.map +1 -1
  973. package/select/utils/use-load-items.js.map +1 -1
  974. package/select/utils/use-native-search.d.ts.map +1 -1
  975. package/select/utils/use-native-search.js.map +1 -1
  976. package/select/utils/use-select.d.ts.map +1 -1
  977. package/select/utils/use-select.js.map +1 -1
  978. package/side-navigation/index.d.ts.map +1 -1
  979. package/side-navigation/index.js.map +1 -1
  980. package/side-navigation/interfaces.d.ts.map +1 -1
  981. package/side-navigation/interfaces.js.map +1 -1
  982. package/side-navigation/internal.d.ts.map +1 -1
  983. package/side-navigation/internal.js.map +1 -1
  984. package/side-navigation/util.d.ts.map +1 -1
  985. package/side-navigation/util.js.map +1 -1
  986. package/space-between/index.d.ts.map +1 -1
  987. package/space-between/index.js.map +1 -1
  988. package/space-between/interfaces.d.ts.map +1 -1
  989. package/space-between/interfaces.js.map +1 -1
  990. package/space-between/internal.d.ts.map +1 -1
  991. package/space-between/internal.js +1 -3
  992. package/space-between/internal.js.map +1 -1
  993. package/spinner/index.d.ts.map +1 -1
  994. package/spinner/index.js.map +1 -1
  995. package/spinner/interfaces.d.ts.map +1 -1
  996. package/spinner/interfaces.js.map +1 -1
  997. package/spinner/internal.d.ts.map +1 -1
  998. package/spinner/internal.js.map +1 -1
  999. package/split-panel/bottom.d.ts.map +1 -1
  1000. package/split-panel/bottom.js.map +1 -1
  1001. package/split-panel/icons/bottom-icon-refresh.d.ts.map +1 -1
  1002. package/split-panel/icons/bottom-icon-refresh.js.map +1 -1
  1003. package/split-panel/icons/bottom-icon.d.ts.map +1 -1
  1004. package/split-panel/icons/bottom-icon.js.map +1 -1
  1005. package/split-panel/icons/resize-handler.d.ts.map +1 -1
  1006. package/split-panel/icons/resize-handler.js.map +1 -1
  1007. package/split-panel/icons/side-position-refresh.d.ts.map +1 -1
  1008. package/split-panel/icons/side-position-refresh.js.map +1 -1
  1009. package/split-panel/icons/side-position.d.ts.map +1 -1
  1010. package/split-panel/icons/side-position.js.map +1 -1
  1011. package/split-panel/index.d.ts.map +1 -1
  1012. package/split-panel/index.js.map +1 -1
  1013. package/split-panel/interfaces.d.ts.map +1 -1
  1014. package/split-panel/interfaces.js.map +1 -1
  1015. package/split-panel/preferences-modal.d.ts.map +1 -1
  1016. package/split-panel/preferences-modal.js.map +1 -1
  1017. package/split-panel/side.d.ts.map +1 -1
  1018. package/split-panel/side.js.map +1 -1
  1019. package/split-panel/utils/size-utils.d.ts.map +1 -1
  1020. package/split-panel/utils/size-utils.js.map +1 -1
  1021. package/split-panel/utils/use-keyboard-events.d.ts.map +1 -1
  1022. package/split-panel/utils/use-keyboard-events.js.map +1 -1
  1023. package/split-panel/utils/use-pointer-events.d.ts.map +1 -1
  1024. package/split-panel/utils/use-pointer-events.js.map +1 -1
  1025. package/status-indicator/index.d.ts.map +1 -1
  1026. package/status-indicator/index.js.map +1 -1
  1027. package/status-indicator/internal.d.ts.map +1 -1
  1028. package/status-indicator/internal.js.map +1 -1
  1029. package/table/body-cell/click-away.d.ts.map +1 -1
  1030. package/table/body-cell/click-away.js.map +1 -1
  1031. package/table/body-cell/index.d.ts.map +1 -1
  1032. package/table/body-cell/index.js +5 -17
  1033. package/table/body-cell/index.js.map +1 -1
  1034. package/table/body-cell/inline-editor.d.ts.map +1 -1
  1035. package/table/body-cell/inline-editor.js +1 -1
  1036. package/table/body-cell/inline-editor.js.map +1 -1
  1037. package/table/body-cell/styles.css.js +18 -18
  1038. package/table/body-cell/styles.scoped.css +50 -50
  1039. package/table/body-cell/styles.selectors.js +18 -18
  1040. package/table/body-cell/td-element.d.ts.map +1 -1
  1041. package/table/body-cell/td-element.js.map +1 -1
  1042. package/table/header-cell/index.d.ts.map +1 -1
  1043. package/table/header-cell/index.js.map +1 -1
  1044. package/table/header-cell/utils.d.ts.map +1 -1
  1045. package/table/header-cell/utils.js.map +1 -1
  1046. package/table/index.d.ts.map +1 -1
  1047. package/table/index.js.map +1 -1
  1048. package/table/interfaces.d.ts.map +1 -1
  1049. package/table/interfaces.js.map +1 -1
  1050. package/table/internal.d.ts.map +1 -1
  1051. package/table/internal.js.map +1 -1
  1052. package/table/resizer/index.d.ts.map +1 -1
  1053. package/table/resizer/index.js.map +1 -1
  1054. package/table/selection-control/index.d.ts.map +1 -1
  1055. package/table/selection-control/index.js.map +1 -1
  1056. package/table/sticky-header.d.ts.map +1 -1
  1057. package/table/sticky-header.js.map +1 -1
  1058. package/table/sticky-scrollbar.d.ts.map +1 -1
  1059. package/table/sticky-scrollbar.js.map +1 -1
  1060. package/table/sticky-scrolling.d.ts.map +1 -1
  1061. package/table/sticky-scrolling.js.map +1 -1
  1062. package/table/thead.d.ts.map +1 -1
  1063. package/table/thead.js.map +1 -1
  1064. package/table/tools-header.d.ts.map +1 -1
  1065. package/table/tools-header.js.map +1 -1
  1066. package/table/use-column-widths.d.ts.map +1 -1
  1067. package/table/use-column-widths.js.map +1 -1
  1068. package/table/use-row-events.d.ts.map +1 -1
  1069. package/table/use-row-events.js.map +1 -1
  1070. package/table/use-selection.d.ts.map +1 -1
  1071. package/table/use-selection.js.map +1 -1
  1072. package/table/use-sticky-header.d.ts.map +1 -1
  1073. package/table/use-sticky-header.js.map +1 -1
  1074. package/table/use-sticky-scrollbar.d.ts.map +1 -1
  1075. package/table/use-sticky-scrollbar.js.map +1 -1
  1076. package/table/use-table-focus-navigation.d.ts.map +1 -1
  1077. package/table/use-table-focus-navigation.js +5 -1
  1078. package/table/use-table-focus-navigation.js.map +1 -1
  1079. package/table/utils.d.ts.map +1 -1
  1080. package/table/utils.js.map +1 -1
  1081. package/tabs/index.d.ts.map +1 -1
  1082. package/tabs/index.js.map +1 -1
  1083. package/tabs/interfaces.d.ts.map +1 -1
  1084. package/tabs/interfaces.js.map +1 -1
  1085. package/tabs/native-smooth-scroll-supported.d.ts.map +1 -1
  1086. package/tabs/native-smooth-scroll-supported.js.map +1 -1
  1087. package/tabs/scroll-utils.d.ts.map +1 -1
  1088. package/tabs/scroll-utils.js.map +1 -1
  1089. package/tabs/smooth-scroll.d.ts.map +1 -1
  1090. package/tabs/smooth-scroll.js.map +1 -1
  1091. package/tabs/tab-header-bar.d.ts.map +1 -1
  1092. package/tabs/tab-header-bar.js.map +1 -1
  1093. package/tag-editor/index.d.ts.map +1 -1
  1094. package/tag-editor/index.js +25 -2
  1095. package/tag-editor/index.js.map +1 -1
  1096. package/tag-editor/interfaces.d.ts.map +1 -1
  1097. package/tag-editor/interfaces.js.map +1 -1
  1098. package/tag-editor/internal.d.ts.map +1 -1
  1099. package/tag-editor/internal.js.map +1 -1
  1100. package/tag-editor/utils.d.ts.map +1 -1
  1101. package/tag-editor/utils.js.map +1 -1
  1102. package/tag-editor/validation.d.ts.map +1 -1
  1103. package/tag-editor/validation.js.map +1 -1
  1104. package/test-utils/dom/property-filter/index.js +4 -3
  1105. package/test-utils/dom/property-filter/index.js.map +1 -1
  1106. package/test-utils/dom/token-group/index.js +3 -3
  1107. package/test-utils/dom/token-group/index.js.map +1 -1
  1108. package/test-utils/selectors/property-filter/index.js +4 -3
  1109. package/test-utils/selectors/property-filter/index.js.map +1 -1
  1110. package/test-utils/selectors/token-group/index.js +3 -3
  1111. package/test-utils/selectors/token-group/index.js.map +1 -1
  1112. package/test-utils/tsconfig.tsbuildinfo +1 -1
  1113. package/text-content/index.d.ts.map +1 -1
  1114. package/text-content/index.js.map +1 -1
  1115. package/text-content/interfaces.d.ts.map +1 -1
  1116. package/text-content/interfaces.js.map +1 -1
  1117. package/text-filter/index.d.ts.map +1 -1
  1118. package/text-filter/index.js.map +1 -1
  1119. package/text-filter/interfaces.d.ts.map +1 -1
  1120. package/text-filter/interfaces.js.map +1 -1
  1121. package/text-filter/internal.d.ts.map +1 -1
  1122. package/text-filter/internal.js.map +1 -1
  1123. package/text-filter/search-results.d.ts.map +1 -1
  1124. package/text-filter/search-results.js.map +1 -1
  1125. package/textarea/index.d.ts.map +1 -1
  1126. package/textarea/index.js.map +1 -1
  1127. package/textarea/interfaces.d.ts.map +1 -1
  1128. package/textarea/interfaces.js.map +1 -1
  1129. package/theming/index.d.ts.map +1 -1
  1130. package/theming/index.js.map +1 -1
  1131. package/tiles/index.d.ts.map +1 -1
  1132. package/tiles/index.js.map +1 -1
  1133. package/tiles/interfaces.d.ts.map +1 -1
  1134. package/tiles/interfaces.js.map +1 -1
  1135. package/tiles/internal.d.ts.map +1 -1
  1136. package/tiles/internal.js.map +1 -1
  1137. package/tiles/tile.d.ts.map +1 -1
  1138. package/tiles/tile.js.map +1 -1
  1139. package/time-input/index.d.ts.map +1 -1
  1140. package/time-input/index.js.map +1 -1
  1141. package/time-input/interfaces.d.ts.map +1 -1
  1142. package/time-input/interfaces.js.map +1 -1
  1143. package/time-input/internal.d.ts.map +1 -1
  1144. package/time-input/internal.js.map +1 -1
  1145. package/toggle/index.d.ts.map +1 -1
  1146. package/toggle/index.js.map +1 -1
  1147. package/toggle/interfaces.d.ts.map +1 -1
  1148. package/toggle/interfaces.js.map +1 -1
  1149. package/toggle/internal.d.ts.map +1 -1
  1150. package/toggle/internal.js.map +1 -1
  1151. package/token-group/dismiss-button.d.ts +3 -3
  1152. package/token-group/dismiss-button.d.ts.map +1 -1
  1153. package/token-group/dismiss-button.js +4 -13
  1154. package/token-group/dismiss-button.js.map +1 -1
  1155. package/token-group/index.d.ts.map +1 -1
  1156. package/token-group/index.js.map +1 -1
  1157. package/token-group/interfaces.d.ts.map +1 -1
  1158. package/token-group/interfaces.js.map +1 -1
  1159. package/token-group/internal.d.ts +1 -1
  1160. package/token-group/internal.d.ts.map +1 -1
  1161. package/token-group/internal.js +16 -10
  1162. package/token-group/internal.js.map +1 -1
  1163. package/token-group/styles.css.js +5 -7
  1164. package/token-group/styles.scoped.css +13 -108
  1165. package/token-group/styles.selectors.js +5 -7
  1166. package/token-group/token.d.ts +13 -0
  1167. package/token-group/token.d.ts.map +1 -0
  1168. package/token-group/token.js +12 -0
  1169. package/token-group/token.js.map +1 -0
  1170. package/top-navigation/1.0-beta/index.d.ts.map +1 -1
  1171. package/top-navigation/1.0-beta/index.js.map +1 -1
  1172. package/top-navigation/1.0-beta/interfaces.d.ts.map +1 -1
  1173. package/top-navigation/1.0-beta/interfaces.js.map +1 -1
  1174. package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
  1175. package/top-navigation/1.0-beta/internal.js.map +1 -1
  1176. package/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +1 -1
  1177. package/top-navigation/1.0-beta/parts/overflow-menu.js.map +1 -1
  1178. package/top-navigation/1.0-beta/parts/utility.d.ts.map +1 -1
  1179. package/top-navigation/1.0-beta/parts/utility.js.map +1 -1
  1180. package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +1 -1
  1181. package/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
  1182. package/top-navigation/index.d.ts.map +1 -1
  1183. package/top-navigation/index.js.map +1 -1
  1184. package/top-navigation/interfaces.d.ts.map +1 -1
  1185. package/top-navigation/interfaces.js.map +1 -1
  1186. package/top-navigation/internal.d.ts.map +1 -1
  1187. package/top-navigation/internal.js.map +1 -1
  1188. package/top-navigation/parts/overflow-menu/header.d.ts.map +1 -1
  1189. package/top-navigation/parts/overflow-menu/header.js.map +1 -1
  1190. package/top-navigation/parts/overflow-menu/index.d.ts.map +1 -1
  1191. package/top-navigation/parts/overflow-menu/index.js.map +1 -1
  1192. package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
  1193. package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
  1194. package/top-navigation/parts/overflow-menu/router.d.ts.map +1 -1
  1195. package/top-navigation/parts/overflow-menu/router.js.map +1 -1
  1196. package/top-navigation/parts/overflow-menu/views/submenu.d.ts.map +1 -1
  1197. package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
  1198. package/top-navigation/parts/overflow-menu/views/utilities.d.ts.map +1 -1
  1199. package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
  1200. package/top-navigation/parts/utility.d.ts.map +1 -1
  1201. package/top-navigation/parts/utility.js.map +1 -1
  1202. package/top-navigation/use-top-navigation.d.ts.map +1 -1
  1203. package/top-navigation/use-top-navigation.js.map +1 -1
  1204. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.d.ts.map +1 -1
  1205. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
  1206. package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
  1207. package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
  1208. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
  1209. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  1210. package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
  1211. package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  1212. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  1213. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  1214. package/tutorial-panel/index.d.ts.map +1 -1
  1215. package/tutorial-panel/index.js.map +1 -1
  1216. package/tutorial-panel/interfaces.d.ts.map +1 -1
  1217. package/tutorial-panel/interfaces.js.map +1 -1
  1218. package/wizard/index.d.ts.map +1 -1
  1219. package/wizard/index.js.map +1 -1
  1220. package/wizard/interfaces.d.ts.map +1 -1
  1221. package/wizard/interfaces.js.map +1 -1
  1222. package/wizard/internal/analytics.d.ts.map +1 -1
  1223. package/wizard/internal/analytics.js.map +1 -1
  1224. package/wizard/unmount.d.ts.map +1 -1
  1225. package/wizard/unmount.js.map +1 -1
  1226. package/wizard/wizard-actions.d.ts.map +1 -1
  1227. package/wizard/wizard-actions.js.map +1 -1
  1228. package/wizard/wizard-form-header.d.ts.map +1 -1
  1229. package/wizard/wizard-form-header.js.map +1 -1
  1230. package/wizard/wizard-form.d.ts.map +1 -1
  1231. package/wizard/wizard-form.js.map +1 -1
  1232. package/wizard/wizard-navigation.d.ts.map +1 -1
  1233. package/wizard/wizard-navigation.js.map +1 -1
  1234. package/table/body-cell/use-stable-scroll-position.d.ts +0 -17
  1235. package/table/body-cell/use-stable-scroll-position.d.ts.map +0 -1
  1236. package/table/body-cell/use-stable-scroll-position.js +0 -51
  1237. package/table/body-cell/use-stable-scroll-position.js.map +0 -1
  1238. package/token-group/generic-token-group.d.ts +0 -24
  1239. package/token-group/generic-token-group.d.ts.map +0 -1
  1240. package/token-group/generic-token-group.js +0 -31
  1241. package/token-group/generic-token-group.js.map +0 -1
  1242. package/token-group/toggle.d.ts +0 -14
  1243. package/token-group/toggle.d.ts.map +0 -1
  1244. package/token-group/toggle.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-plot/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,qBAAyC,MAAM,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C,MAAM,CAAC,IAAI,EAAE;gBAC3B,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,WAAW;gBAC/B,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS;aAC5B,CAAC,EACF,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,aAAa;YAExB,oBAAC,YAAY,IAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAI;YAEpF,2BAAG,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO;gBACnC,oBAAC,qBAAqB,IACpB,gBAAgB,EAAE,gBAAgB,IAAI,IAAI,EAC1C,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,oBAAoB,GAC/B;gBAGD,eAAe,IAAI,aAAa,IAAI,CACnC,6CAAkB,MAAM,EAAC,EAAE,EAAE,qBAAqB,IAC/C,eAAe,CACX,CACR;gBAEA,QAAQ;gBAET,oBAAC,YAAY,IACX,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,oBAAoB,IAAI,gBAAgB,EACpD,MAAM,EAAE,wBAAwB,GAChC,CACA,CACA;QAEN,oBAAC,UAAU,QAAE,cAAc,CAAc,CACxC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { useUniqueId } from '../../hooks/use-unique-id';\n\nimport { KeyCode } from '../../keycode';\nimport LiveRegion from '../live-region/index';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\nimport focusSvgElement from '../../utils/focus-svg-element';\nimport { Offset } from '../interfaces';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number;\n height: number;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: React.ReactNode;\n isClickable?: boolean;\n isPrecise?: boolean;\n onMouseDown?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onMouseDown,\n onKeyDown,\n onFocus,\n onBlur,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n ...restProps\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => focusSvgElement(svgRef.current!),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onMouseDown && onMouseDown(event);\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current && !plotClickedRef.current) {\n setPlotFocused(true);\n }\n // The click should focus the underling application bypassing the svg.\n else if (plotClickedRef.current) {\n applicationRef.current!.focus();\n }\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onFocus && onFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onBlur && onBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': ariaRoleDescription,\n }\n : {};\n\n return (\n <>\n <svg\n {...restProps}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n width={width}\n height={height}\n style={{\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform} role=\"group\">\n <ApplicationController\n activeElementKey={activeElementKey || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onApplicationFocus}\n onBlur={onApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <LiveRegion>{ariaLiveRegion}</LiveRegion>\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-plot/index.tsx"],"names":[],"mappings":";AAAA,qEAA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Ac,CACxC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { useUniqueId } from '../../hooks/use-unique-id';\n\nimport { KeyCode } from '../../keycode';\nimport LiveRegion from '../live-region/index';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\nimport focusSvgElement from '../../utils/focus-svg-element';\nimport { Offset } from '../interfaces';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number;\n height: number;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: React.ReactNode;\n isClickable?: boolean;\n isPrecise?: boolean;\n onMouseDown?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onMouseDown,\n onKeyDown,\n onFocus,\n onBlur,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n ...restProps\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => focusSvgElement(svgRef.current!),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onMouseDown && onMouseDown(event);\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current && !plotClickedRef.current) {\n setPlotFocused(true);\n }\n // The click should focus the underling application bypassing the svg.\n else if (plotClickedRef.current) {\n applicationRef.current!.focus();\n }\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onFocus && onFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onBlur && onBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': ariaRoleDescription,\n }\n : {};\n\n return (\n <>\n <svg\n {...restProps}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n width={width}\n height={height}\n style={{\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform} role=\"group\">\n <ApplicationController\n activeElementKey={activeElementKey || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onApplicationFocus}\n onBlur={onApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <LiveRegion>{ariaLiveRegion}</LiveRegion>\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-plot/interfaces.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/components/chart-plot/interfaces.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-plot/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport type Offset = number | { x: number; y: number };\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/chart-plot/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport type Offset = number | { x: number; y: number };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD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,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5C,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEjD,sBAAsB;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;;AAED,wBAA8C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-popover/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAmCrC,eAAe,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAE9C,SAAS,YAAY,CACnB,EAmBoB,EACpB,GAA2B;QApB3B,EACE,QAAQ,GAAG,OAAO,EAClB,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,aAAa,GAAG,KAAK,EACrB,gBAAgB,EAEhB,QAAQ,EAER,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EAET,YAAY,EACZ,YAAY,OAGM,EADf,SAAS,cAlBd,8KAmBC,CADa;IAId,MAAM,S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B,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CACjB,6BAAK,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAC;gBACpF,6BAAK,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,GAAI;gBAChD,6BAAK,SAAS,EAAE,aAAa,CAAC,aAAa,CAAC,GAAI,CAC5C,CACP;YAED,6BAAK,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC;gBAClC,oBAAC,WAAW,IACV,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EACb,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAEhC,QAAQ,CACG,CACV,CACW,CACf,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../../base-component';\n\nimport { PopoverProps } from '../../../popover/interfaces';\nimport PopoverContainer from '../../../popover/container';\nimport PopoverBody from '../../../popover/body';\nimport popoverStyles from '../../../popover/styles.css.js';\nimport { nodeContains } from '../../utils/dom';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\n\nimport styles from './styles.css.js';\n\nexport interface ChartPopoverProps extends PopoverProps {\n /** Title of the popover */\n title?: React.ReactNode;\n\n /** References the element the container is positioned against. */\n trackRef: React.RefObject<Element>;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n\n /** Optional container element that prevents any clicks in there from dismissing the popover */\n container: Element | null;\n\n /** Event that is fired when the popover is dismissed */\n onDismiss: (outsideClick?: boolean) => void;\n\n /** Fired when the pointer enters the hoverable area around the popover */\n onMouseEnter?: (event: React.MouseEvent) => void;\n\n /** Fired when the pointer leaves the hoverable area around the popover */\n onMouseLeave?: (event: React.MouseEvent) => void;\n\n /** Popover content */\n children?: React.ReactNode;\n}\n\nexport default React.forwardRef(ChartPopover);\n\nfunction ChartPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n dismissButton = false,\n dismissAriaLabel,\n\n children,\n\n title,\n trackRef,\n trackKey,\n onDismiss,\n container,\n\n onMouseEnter,\n onMouseLeave,\n\n ...restProps\n }: ChartPopoverProps,\n ref: React.Ref<HTMLElement>\n) {\n const baseProps = getBaseProps(restProps);\n const popoverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const popoverRef = useMergeRefs(popoverObjectRef, ref);\n\n useEffect(() => {\n const onDocumentClick = (event: MouseEvent) => {\n if (\n event.target &&\n !nodeContains(popoverObjectRef.current, event.target as Element) && // click not in popover\n !nodeContains(container, event.target as Element) // click not in segment\n ) {\n onDismiss(true);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick, { capture: true });\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, { capture: true });\n };\n }, [container, onDismiss]);\n\n return (\n <div\n {...baseProps}\n className={clsx(popoverStyles.root, styles.root, baseProps.className, { [styles.dismissable]: dismissButton })}\n ref={popoverRef}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={trackRef}\n trackKey={trackKey}\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n >\n <div className={styles['hover-area']}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={title}\n onDismiss={onDismiss}\n className={styles['popover-body']}\n >\n {children}\n </PopoverBody>\n </div>\n </PopoverContainer>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-popover/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAmCrC,eAAe,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAE9C,SAAS,YAAY,CACnB,EAmBoB,EACpB,GAA2B;QApB3B,EACE,QAAQ,GAAG,OAAO,EAClB,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,aAAa,GAAG,KAAK,EACrB,gBAAgB,EAEhB,QAAQ,EAER,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EAET,YAAY,EACZ,YAAY,OAGM,EADf,SAAS,cAlBd,8KAmBC,CADa;IAId,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,gBAAgB,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAE7D,MAAM,UAAU,GAAG,YAAY,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,eAAe,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC5C,IACE,KAAK,CAAC,MAAM;gBACZ,CAAC,YAAY,CAAC,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AC,YAAY,CAAC;gBAClC,oBAAC,WAAW,IACV,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EACb,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAEhC,QAAQ,CACG,CACV,CACW,CACf,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../../base-component';\n\nimport { PopoverProps } from '../../../popover/interfaces';\nimport PopoverContainer from '../../../popover/container';\nimport PopoverBody from '../../../popover/body';\nimport popoverStyles from '../../../popover/styles.css.js';\nimport { nodeContains } from '../../utils/dom';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\n\nimport styles from './styles.css.js';\n\nexport interface ChartPopoverProps extends PopoverProps {\n /** Title of the popover */\n title?: React.ReactNode;\n\n /** References the element the container is positioned against. */\n trackRef: React.RefObject<Element>;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n\n /** Optional container element that prevents any clicks in there from dismissing the popover */\n container: Element | null;\n\n /** Event that is fired when the popover is dismissed */\n onDismiss: (outsideClick?: boolean) => void;\n\n /** Fired when the pointer enters the hoverable area around the popover */\n onMouseEnter?: (event: React.MouseEvent) => void;\n\n /** Fired when the pointer leaves the hoverable area around the popover */\n onMouseLeave?: (event: React.MouseEvent) => void;\n\n /** Popover content */\n children?: React.ReactNode;\n}\n\nexport default React.forwardRef(ChartPopover);\n\nfunction ChartPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n dismissButton = false,\n dismissAriaLabel,\n\n children,\n\n title,\n trackRef,\n trackKey,\n onDismiss,\n container,\n\n onMouseEnter,\n onMouseLeave,\n\n ...restProps\n }: ChartPopoverProps,\n ref: React.Ref<HTMLElement>\n) {\n const baseProps = getBaseProps(restProps);\n const popoverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const popoverRef = useMergeRefs(popoverObjectRef, ref);\n\n useEffect(() => {\n const onDocumentClick = (event: MouseEvent) => {\n if (\n event.target &&\n !nodeContains(popoverObjectRef.current, event.target as Element) && // click not in popover\n !nodeContains(container, event.target as Element) // click not in segment\n ) {\n onDismiss(true);\n }\n };\n\n document.addEventListener('mousedown', onDocumentClick, { capture: true });\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, { capture: true });\n };\n }, [container, onDismiss]);\n\n return (\n <div\n {...baseProps}\n className={clsx(popoverStyles.root, styles.root, baseProps.className, { [styles.dismissable]: dismissButton })}\n ref={popoverRef}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={trackRef}\n trackKey={trackKey}\n arrow={position => (\n <div className={clsx(popoverStyles.arrow, popoverStyles[`arrow-position-${position}`])}>\n <div className={popoverStyles['arrow-outer']} />\n <div className={popoverStyles['arrow-inner']} />\n </div>\n )}\n >\n <div className={styles['hover-area']}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={title}\n onDismiss={onDismiss}\n className={styles['popover-body']}\n >\n {children}\n </PopoverBody>\n </div>\n </PopoverContainer>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-series-details/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAA0B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC/C;;AAED,wBAAwC;AAExC,iBAAS,kBAAkB,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,EAAE,uBAAuB,eAyB7E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/chart-series-details/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAA0B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC/C;;AAED,wBAAwC;AAExC,iBAAS,kBAAkB,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,EAAE,uBAAuB,eAyB7E"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,IAAI,MAAM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apache-2.0\nimport React, { memo } from 'react';\nimport clsx from 'clsx';\n\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport InternalBox from '../../../box/internal';\nimport { ChartDetailPair } from '../../../pie-chart/interfaces';\nimport ChartSeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport styles from './styles.css.js';\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n markerType?: ChartSeriesMarkerType;\n color?: string;\n isDimmed?: boolean;\n}\n\nexport interface ChartSeriesDetailsProps extends BaseComponentProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n}\n\nexport default memo(ChartSeriesDetails);\n\nfunction ChartSeriesDetails({ details, ...restProps }: ChartSeriesDetailsProps) {\n const baseProps = getBaseProps(restProps);\n const className = clsx(baseProps.className, styles.root);\n\n return (\n <div {...baseProps} className={className}>\n <ul className={styles.list}>\n {details.map(({ key, value, markerType, color, isDimmed }, index) => (\n <li\n key={index}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles['list-item']]: true,\n })}\n >\n <div className={styles.key}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <span>{key}</span>\n </div>\n <InternalBox textAlign=\"right\">{value}</InternalBox>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,iBAA4C,MAAM,wBAAwB,CAAC;AAClF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAYrC,eAAe,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAExC,SAAS,kBAAkB,CAAC,EAAkD;QAAlD,EAAE,OAAO,OAAyC,EAApC,SAAS,cAAvB,WAAyB,CAAF;IACjD,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAEzD,OAAO,CACL,6CAAS,SAAS,IAAE,SAAS,EAAE,SAAS;QACtC,4BAAI,SAAS,EAAE,MAAM,CAAC,IAAI,IACvB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CACnE,4BACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,IAAI,CAAC;gBACd,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ;gBACzB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI;aAC5B,CAAC;YAEF,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG;gBACvB,UAAU,IAAI,KAAK,IAAI,oBAAC,iBAAiB,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI;gBAC7E,kCAAO,GAAG,CAAQ,CACd;YACN,oBAAC,WAAW,IAAC,SAAS,EAAC,OAAO,IAAE,KAAK,CAAe,CACjD,CACN,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { memo } from 'react';\nimport clsx from 'clsx';\n\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport InternalBox from '../../../box/internal';\nimport { ChartDetailPair } from '../../../pie-chart/interfaces';\nimport ChartSeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport styles from './styles.css.js';\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n markerType?: ChartSeriesMarkerType;\n color?: string;\n isDimmed?: boolean;\n}\n\nexport interface ChartSeriesDetailsProps extends BaseComponentProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n}\n\nexport default memo(ChartSeriesDetails);\n\nfunction ChartSeriesDetails({ details, ...restProps }: ChartSeriesDetailsProps) {\n const baseProps = getBaseProps(restProps);\n const className = clsx(baseProps.className, styles.root);\n\n return (\n <div {...baseProps} className={className}>\n <ul className={styles.list}>\n {details.map(({ key, value, markerType, color, isDimmed }, index) => (\n <li\n key={index}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles['list-item']]: true,\n })}\n >\n <div className={styles.key}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <span>{key}</span>\n </div>\n <InternalBox textAlign=\"right\">{value}</InternalBox>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-series-marker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AAEzF,UAAU,sBAAuB,SAAQ,kBAAkB;IACzD,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;;AAED,wBAAuC;AAEvC,iBAAS,iBAAiB,CAAC,EAAE,IAAa,EAAE,KAAK,EAAE,EAAE,sBAAsB,eAQ1E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/chart-series-marker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AAEzF,UAAU,sBAAuB,SAAQ,kBAAkB;IACzD,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;;AAED,wBAAuC;AAEvC,iBAAS,iBAAiB,CAAC,EAAE,IAAa,EAAE,KAAK,EAAE,EAAE,sBAAsB,eAQ1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-series-marker/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC,eAAe,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAEvC,SAAS,iBAAiB,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAA0B;IACzE,OAAO,CACL,8BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,EACzD,KAAK,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,iBACrB,MAAM,GACZ,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { memo } from 'react';\nimport clsx from 'clsx';\n\nimport { BaseComponentProps } from '../../base-component';\nimport styles from './styles.css.js';\n\nexport type ChartSeriesMarkerType = 'line' | 'rectangle' | 'dashed' | 'hollow-rectangle';\n\ninterface ChartSeriesMarkerProps extends BaseComponentProps {\n type: ChartSeriesMarkerType;\n color: string;\n}\n\nexport default memo(ChartSeriesMarker);\n\nfunction ChartSeriesMarker({ type = 'line', color }: ChartSeriesMarkerProps) {\n return (\n <span\n className={clsx(styles.marker, styles[`marker--${type}`])}\n style={{ backgroundColor: color }}\n aria-hidden=\"true\"\n ></span>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-series-marker/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC,eAAe,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAEvC,SAAS,iBAAiB,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAA0B;IACzE,OAAO,CACL,8BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,EACzD,KAAK,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,iBACrB,MAAM,GACZ,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { memo } from 'react';\nimport clsx from 'clsx';\n\nimport { BaseComponentProps } from '../../base-component';\nimport styles from './styles.css.js';\n\nexport type ChartSeriesMarkerType = 'line' | 'rectangle' | 'dashed' | 'hollow-rectangle';\n\ninterface ChartSeriesMarkerProps extends BaseComponentProps {\n type: ChartSeriesMarkerType;\n color: string;\n}\n\nexport default memo(ChartSeriesMarker);\n\nfunction ChartSeriesMarker({ type = 'line', color }: ChartSeriesMarkerProps) {\n return (\n <span\n className={clsx(styles.marker, styles[`marker--${type}`])}\n style={{ backgroundColor: color }}\n aria-hidden=\"true\"\n ></span>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAA0B,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAMjF,UAAU,yBAA0B,SAAQ,kBAAkB;IAC5D,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IAE7C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAG5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EACnC,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE;IACD,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;CAC9C;;;;EAKA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,SAAS,GACV,EAAE,yBAAyB,eAqC3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAA0B,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAMjF,UAAU,yBAA0B,SAAQ,kBAAkB;IAC5D,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IAE7C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAG5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EACnC,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE;IACD,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;CAC9C;;;;EAKA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,SAAS,GACV,EAAE,yBAAyB,eAqC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AACjF,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,OAAO,MAAM,MA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D;QAED,IAAI,OAAO,EAAE;YACX,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,KAAK,CAAO,CAAC;SACpD;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAE5G,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,eAAY,QAAQ,iBAAa,MAAM,IAC/D,CAAC,SAAS,IAAI,eAAe,CAC1B,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\n\nimport { BaseComponentProps } from '../../base-component';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport InternalLink from '../../../link/internal';\n\nimport styles from './styles.css.js';\n\ninterface ChartStatusContainerProps extends BaseComponentProps {\n statusType: 'loading' | 'finished' | 'error';\n\n empty?: React.ReactNode;\n noMatch?: React.ReactNode;\n\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n\n onRecoveryClick?: NonCancelableEventHandler;\n\n // From `getChartStatus`\n isEmpty?: boolean;\n isNoMatch?: boolean;\n showChart?: boolean;\n}\n\nexport function getChartStatus<T, U>({\n externalData,\n visibleData,\n statusType,\n}: {\n externalData: ReadonlyArray<T>;\n visibleData: ReadonlyArray<U>;\n statusType: 'loading' | 'finished' | 'error';\n}) {\n const isEmpty = !visibleData || visibleData.length === 0;\n const isNoMatch = isEmpty && visibleData.length !== externalData.length;\n const showChart = statusType === 'finished' && !isEmpty;\n return { isEmpty, isNoMatch, showChart };\n}\n\nexport default function ChartStatusContainer({\n statusType,\n errorText,\n loadingText,\n recoveryText,\n noMatch,\n empty,\n onRecoveryClick,\n isNoMatch,\n isEmpty,\n showChart,\n}: ChartStatusContainerProps) {\n const statusContainer = useMemo(() => {\n const handleRecoveryClick = (event: CustomEvent) => {\n event.preventDefault();\n fireNonCancelableEvent(onRecoveryClick);\n };\n if (statusType === 'error') {\n return (\n <span>\n <InternalStatusIndicator type=\"error\">{errorText}</InternalStatusIndicator>{' '}\n {recoveryText && (\n <InternalLink onFollow={handleRecoveryClick} variant=\"recovery\">\n {recoveryText}\n </InternalLink>\n )}\n </span>\n );\n }\n\n if (statusType === 'loading') {\n return <InternalStatusIndicator type=\"loading\">{loadingText}</InternalStatusIndicator>;\n }\n\n if (isNoMatch) {\n return <div className={styles.empty}>{noMatch}</div>;\n }\n\n if (isEmpty) {\n return <div className={styles.empty}>{empty}</div>;\n }\n }, [statusType, onRecoveryClick, isEmpty, isNoMatch, recoveryText, loadingText, errorText, empty, noMatch]);\n\n return (\n <div className={styles.root} aria-live=\"polite\" aria-atomic=\"true\">\n {!showChart && statusContainer}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AACjF,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,UAAU,cAAc,CAAO,EACnC,YAAY,EACZ,WAAW,EACX,UAAU,GAKX;IACC,MAAM,OAAO,GAAG,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,OAAO,IAAI,WAAW,CAAC,MAAM,KAAK,YAAY,CAAC,MAAM,CAAC;IACxE,MAAM,SAAS,GAAG,UAAU,KAAK,UAAU,IAAI,CAAC,OAAO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Q,iBAAa,MAAM,IAC/D,CAAC,SAAS,IAAI,eAAe,CAC1B,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\n\nimport { BaseComponentProps } from '../../base-component';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport InternalLink from '../../../link/internal';\n\nimport styles from './styles.css.js';\n\ninterface ChartStatusContainerProps extends BaseComponentProps {\n statusType: 'loading' | 'finished' | 'error';\n\n empty?: React.ReactNode;\n noMatch?: React.ReactNode;\n\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n\n onRecoveryClick?: NonCancelableEventHandler;\n\n // From `getChartStatus`\n isEmpty?: boolean;\n isNoMatch?: boolean;\n showChart?: boolean;\n}\n\nexport function getChartStatus<T, U>({\n externalData,\n visibleData,\n statusType,\n}: {\n externalData: ReadonlyArray<T>;\n visibleData: ReadonlyArray<U>;\n statusType: 'loading' | 'finished' | 'error';\n}) {\n const isEmpty = !visibleData || visibleData.length === 0;\n const isNoMatch = isEmpty && visibleData.length !== externalData.length;\n const showChart = statusType === 'finished' && !isEmpty;\n return { isEmpty, isNoMatch, showChart };\n}\n\nexport default function ChartStatusContainer({\n statusType,\n errorText,\n loadingText,\n recoveryText,\n noMatch,\n empty,\n onRecoveryClick,\n isNoMatch,\n isEmpty,\n showChart,\n}: ChartStatusContainerProps) {\n const statusContainer = useMemo(() => {\n const handleRecoveryClick = (event: CustomEvent) => {\n event.preventDefault();\n fireNonCancelableEvent(onRecoveryClick);\n };\n if (statusType === 'error') {\n return (\n <span>\n <InternalStatusIndicator type=\"error\">{errorText}</InternalStatusIndicator>{' '}\n {recoveryText && (\n <InternalLink onFollow={handleRecoveryClick} variant=\"recovery\">\n {recoveryText}\n </InternalLink>\n )}\n </span>\n );\n }\n\n if (statusType === 'loading') {\n return <InternalStatusIndicator type=\"loading\">{loadingText}</InternalStatusIndicator>;\n }\n\n if (isNoMatch) {\n return <div className={styles.empty}>{noMatch}</div>;\n }\n\n if (isEmpty) {\n return <div className={styles.empty}>{empty}</div>;\n }\n }, [statusType, onRecoveryClick, isEmpty, isNoMatch, recoveryText, loadingText, errorText, empty, noMatch]);\n\n return (\n <div className={styles.root} aria-live=\"polite\" aria-atomic=\"true\">\n {!showChart && statusContainer}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/checkbox-icon/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAIxE,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,SAAS,CAiBnF,CAAC;AAEF,QAAA,MAAM,YAAY,uDAAgE,iBAAiB,gBA2BlG,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/checkbox-icon/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAIxE,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,SAAS,CAiBnF,CAAC;AAEF,QAAA,MAAM,YAAY,uDAAgE,iBAAiB,gBA2BlG,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/checkbox-icon/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgBrC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAA0D;IACtF,OAAO,EAAE;QACP,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,iBAAiB;QAC1B,EAAE,EAAE,GAAG;QACP,CAAC,EAAE,GAAG;QACN,IAAI,EAAE,EAAE;KACT;IACD,OAAO,EAAE;QACP,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,iBAAiB;QAC1B,EAAE,EAAE,CAAC;QACL,CAAC,EAAE,CAAC;QACJ,IAAI,EAAE,EAAE;KACT;CACF,CAAC;AAEF,MAAM,YAAY,GAAG,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CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport styles from './styles.css.js';\n\nexport interface CheckboxIconProps extends BaseComponentProps {\n checked?: boolean;\n indeterminate?: boolean;\n disabled?: boolean;\n}\nexport interface Dimension {\n viewBox: string;\n indeterminate: string;\n checked: string;\n xy: number;\n r: number;\n size: number;\n}\n\n// Can't use css variables for svg attributes\nexport const dimensionsByTheme: Record<NonNullable<'default' | 'refresh'>, Dimension> = {\n default: {\n viewBox: '0 0 14 14',\n indeterminate: '2.5,7 11.5,7',\n checked: '2.5,7 6,10 11,3',\n xy: 0.5,\n r: 1.5,\n size: 13,\n },\n refresh: {\n viewBox: '0 0 16 16',\n indeterminate: '3.5,8 12.5,8',\n checked: '3.5,8 7,11 12,4',\n xy: 1,\n r: 2,\n size: 14,\n },\n};\n\nconst CheckboxIcon = ({ checked, indeterminate, disabled = false, ...restProps }: CheckboxIconProps) => {\n const baseProps = getBaseProps(restProps);\n const theme = useVisualRefresh() ? 'refresh' : 'default';\n const dimensions = dimensionsByTheme[theme];\n return (\n <svg className={styles.root} viewBox={dimensions.viewBox} aria-hidden=\"true\" focusable=\"false\" {...baseProps}>\n <rect\n className={clsx(styles['styled-box'], {\n [styles['styled-box-checked']]: checked,\n [styles['styled-box-indeterminate']]: indeterminate,\n [styles['styled-box-disabled']]: disabled,\n })}\n x={dimensions.xy}\n y={dimensions.xy}\n rx={dimensions.r}\n ry={dimensions.r}\n width={dimensions.size}\n height={dimensions.size}\n />\n {checked || indeterminate ? (\n <polyline\n className={clsx(styles['styled-line'], { [styles['styled-line-disabled']]: disabled })}\n points={indeterminate ? dimensions.indeterminate : dimensions.checked}\n />\n ) : null}\n </svg>\n );\n};\n\nexport default CheckboxIcon;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/checkbox-icon/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgBrC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,iBAAiB,GAA0D;IACtF,OAAO,EAAE;QACP,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,iBAAiB;QAC1B,EAAE,EAAE,GAAG;QACP,CAAC,EAAE,GAAG;QACN,IAAI,EAAE,EAAE;KACT;IACD,OAAO,EAAE;QACP,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,iBAAiB;QAC1B,EAAE,EAAE,CAAC;QACL,CAAC,EAAE,CAAC;QACJ,IAAI,EAAE,EAAE;KACT;CACF,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,EAA6E,EAAE,EAAE;QAAjF,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,GAAG,KAAK,OAAmC,EAA9B,SAAS,cAAxD,wCAA0D,CAAF;IAC5E,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACzD,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC5C,OAAO,CACL,2CAAK,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,iBAAc,MAAM,EAAC,SAAS,EAAC,OAAO,IAAK,SAAS;QAC1G,8BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;gBACpC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO;gBACvC,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,EAAE,aAAa;gBACnD,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,EAAE,QAAQ;aAC1C,CAAC,EACF,CAAC,EAAE,UAAU,CAAC,EAAE,EAChB,CAAC,EAAE,UAAU,CAAC,EAAE,EAChB,EAAE,EAAE,UAAU,CAAC,CAAC,EAChB,EAAE,EAAE,UAAU,CAAC,CAAC,EAChB,KAAK,EAAE,UAAU,CAAC,IAAI,EACtB,MAAM,EAAE,UAAU,CAAC,IAAI,GACvB;QACD,OAAO,IAAI,aAAa,CAAC,CAAC,CAAC,CAC1B,kCACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EACtF,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,GACrE,CACH,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport styles from './styles.css.js';\n\nexport interface CheckboxIconProps extends BaseComponentProps {\n checked?: boolean;\n indeterminate?: boolean;\n disabled?: boolean;\n}\nexport interface Dimension {\n viewBox: string;\n indeterminate: string;\n checked: string;\n xy: number;\n r: number;\n size: number;\n}\n\n// Can't use css variables for svg attributes\nexport const dimensionsByTheme: Record<NonNullable<'default' | 'refresh'>, Dimension> = {\n default: {\n viewBox: '0 0 14 14',\n indeterminate: '2.5,7 11.5,7',\n checked: '2.5,7 6,10 11,3',\n xy: 0.5,\n r: 1.5,\n size: 13,\n },\n refresh: {\n viewBox: '0 0 16 16',\n indeterminate: '3.5,8 12.5,8',\n checked: '3.5,8 7,11 12,4',\n xy: 1,\n r: 2,\n size: 14,\n },\n};\n\nconst CheckboxIcon = ({ checked, indeterminate, disabled = false, ...restProps }: CheckboxIconProps) => {\n const baseProps = getBaseProps(restProps);\n const theme = useVisualRefresh() ? 'refresh' : 'default';\n const dimensions = dimensionsByTheme[theme];\n return (\n <svg className={styles.root} viewBox={dimensions.viewBox} aria-hidden=\"true\" focusable=\"false\" {...baseProps}>\n <rect\n className={clsx(styles['styled-box'], {\n [styles['styled-box-checked']]: checked,\n [styles['styled-box-indeterminate']]: indeterminate,\n [styles['styled-box-disabled']]: disabled,\n })}\n x={dimensions.xy}\n y={dimensions.xy}\n rx={dimensions.r}\n ry={dimensions.r}\n width={dimensions.size}\n height={dimensions.size}\n />\n {checked || indeterminate ? (\n <polyline\n className={clsx(styles['styled-line'], { [styles['styled-line-disabled']]: disabled })}\n points={indeterminate ? dimensions.indeterminate : dimensions.checked}\n />\n ) : null}\n </svg>\n );\n};\n\nexport default CheckboxIcon;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dark-ribbon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAQD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,eAAe,eA0C3F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dark-ribbon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAQD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,eAAe,eA0C3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dark-ribbon/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,SAAS,YAAY,CAAC,QAAgB,EAAE,QAAgB,EAAE,MAAkC;IAC1F,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,MAAM,CAAC,QAAQ,CAAC,CAAC;KAClB;AACH,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAmB;IAC1F,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,qBAAqB,CAAC,CAAC,IAAiB,EAAE,EAAe,EAAE,EAAE;QAC7E,0EAA0E;QAC1E,6CAA6C;QAC7C,wEAAwE;QACxE,MAAM,IAAI,GA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M,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,IAAI,eAAe,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE;QAC1C,OAAO,0CAAG,QAAQ,CAAI,CAAC;KACxB;IAED,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,8BAA8B;QAC9D,6BAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,GAAI;QAC3D,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAO,CAC5C,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { useMutationObserver } from '../../hooks/use-mutation-observer';\nimport { useStableEventHandler } from '../../hooks/use-stable-event-handler';\nimport styles from './styles.css.js';\n\ninterface DarkRibbonProps {\n children: React.ReactNode;\n isRefresh: boolean;\n hasPlainStyling?: boolean;\n}\n\nfunction setIfChanged(oldValue: string, newValue: string, setter: (newValue: string) => void) {\n if (oldValue !== newValue) {\n setter(newValue);\n }\n}\n\nexport default function DarkRibbon({ children, isRefresh, hasPlainStyling }: DarkRibbonProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const fillRef = useRef<HTMLDivElement>(null);\n const syncSizes = useStableEventHandler((from: HTMLElement, to: HTMLElement) => {\n // JSDOM calls mutation observer callback even if attribute did not change\n // https://github.com/jsdom/jsdom/issues/3305\n // To prevent infinite loops, we need to check the values before setting\n const size = from.getBoundingClientRect();\n const { height: oldHeight, left: oldLeft, right: oldRight } = to.style;\n setIfChanged(oldHeight, `${size.height}px`, newHeight => (to.style.height = newHeight));\n setIfChanged(oldLeft, `${-1 * size.left}px`, newLeft => (to.style.left = newLeft));\n setIfChanged(\n oldRight,\n `${-1 * (document.body.clientWidth - size.right)}px`,\n newRight => (to.style.right = newRight)\n );\n });\n useMutationObserver(containerRef, node => {\n if (fillRef.current) {\n syncSizes(node, fillRef.current);\n }\n });\n useEffect(() => {\n const handler = () => {\n if (containerRef.current && fillRef.current) {\n syncSizes(containerRef.current, fillRef.current);\n }\n };\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, [syncSizes]);\n\n if (hasPlainStyling === true || !isRefresh) {\n return <>{children}</>;\n }\n\n return (\n <div ref={containerRef} className=\"awsui-context-content-header\">\n <div ref={fillRef} className={styles['background-fill']} />\n <div className={styles.content}>{children}</div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dark-ribbon/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,SAAS,YAAY,CAAC,QAAgB,EAAE,QAAgB,EAAE,MAAkC;IAC1F,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,MAAM,CAAC,QAAQ,CAAC,CAAC;KAClB;AACH,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAmB;IAC1F,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,qBAAqB,CAAC,CAAC,IAAiB,EAAE,EAAe,EAAE,EAAE;QAC7E,0EAA0E;QAC1E,6CAA6C;QAC7C,wEAAwE;QACxE,MAAM,IAAI,G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AM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,IAAI,eAAe,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE;QAC1C,OAAO,0CAAG,QAAQ,CAAI,CAAC;KACxB;IAED,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,8BAA8B;QAC9D,6BAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,GAAI;QAC3D,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAO,CAC5C,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { useMutationObserver } from '../../hooks/use-mutation-observer';\nimport { useStableEventHandler } from '../../hooks/use-stable-event-handler';\nimport styles from './styles.css.js';\n\ninterface DarkRibbonProps {\n children: React.ReactNode;\n isRefresh: boolean;\n hasPlainStyling?: boolean;\n}\n\nfunction setIfChanged(oldValue: string, newValue: string, setter: (newValue: string) => void) {\n if (oldValue !== newValue) {\n setter(newValue);\n }\n}\n\nexport default function DarkRibbon({ children, isRefresh, hasPlainStyling }: DarkRibbonProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const fillRef = useRef<HTMLDivElement>(null);\n const syncSizes = useStableEventHandler((from: HTMLElement, to: HTMLElement) => {\n // JSDOM calls mutation observer callback even if attribute did not change\n // https://github.com/jsdom/jsdom/issues/3305\n // To prevent infinite loops, we need to check the values before setting\n const size = from.getBoundingClientRect();\n const { height: oldHeight, left: oldLeft, right: oldRight } = to.style;\n setIfChanged(oldHeight, `${size.height}px`, newHeight => (to.style.height = newHeight));\n setIfChanged(oldLeft, `${-1 * size.left}px`, newLeft => (to.style.left = newLeft));\n setIfChanged(\n oldRight,\n `${-1 * (document.body.clientWidth - size.right)}px`,\n newRight => (to.style.right = newRight)\n );\n });\n useMutationObserver(containerRef, node => {\n if (fillRef.current) {\n syncSizes(node, fillRef.current);\n }\n });\n useEffect(() => {\n const handler = () => {\n if (containerRef.current && fillRef.current) {\n syncSizes(containerRef.current, fillRef.current);\n }\n };\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, [syncSizes]);\n\n if (hasPlainStyling === true || !isRefresh) {\n return <>{children}</>;\n }\n\n return (\n <div ref={containerRef} className=\"awsui-context-content-header\">\n <div ref={fillRef} className={styles['background-fill']} />\n <div className={styles.content}>{children}</div>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,KAAK,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAM1E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,uBAAuB,CAAC,EAAE,QAAQ,EAAE,QAAyB,EAAE,EAAE,4BAA4B,eAE5G;AAED,wBAAgB,kBAAkB;;EAEjC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,KAAK,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAM1E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,uBAAuB,CAAC,EAAE,QAAQ,EAAE,QAAyB,EAAE,EAAE,4BAA4B,eAE5G;AAED,wBAAgB,kBAAkB;;EAEjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAyB;IAClE,QAAQ,EAAE,cAAc;CACzB,CAAC,CAAC;AAOH,MAAM,UAAU,uBAAuB,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,cAAc,EAAgC;IAC3G,OAAO,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAG,QAAQ,CAA4B,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext } from 'react';\n\ntype Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nconst DropdownContext = React.createContext<{ position: Position }>({\n position: 'bottom-right',\n});\n\nexport interface DropdownContextProviderProps {\n position?: Position;\n children?: React.ReactNode;\n}\n\nexport function DropdownContextProvider({ children, position = 'bottom-right' }: DropdownContextProviderProps) {\n return <DropdownContext.Provider value={{ position }}>{children}</DropdownContext.Provider>;\n}\n\nexport function useDropdownContext() {\n return useContext(DropdownContext);\n}\n"]}
1
+ {"version":3,"file":"context.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAyB;IAClE,QAAQ,EAAE,cAAc;CACzB,CAAC,CAAC;AAOH,MAAM,UAAU,uBAAuB,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,cAAc,EAAgC;IAC3G,OAAO,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAG,QAAQ,CAA4B,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext } from 'react';\n\ntype Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nconst DropdownContext = React.createContext<{ position: Position }>({\n position: 'bottom-right',\n});\n\nexport interface DropdownContextProviderProps {\n position?: Position;\n children?: React.ReactNode;\n}\n\nexport function DropdownContextProvider({ children, position = 'bottom-right' }: DropdownContextProviderProps) {\n return <DropdownContext.Provider value={{ position }}>{children}</DropdownContext.Provider>;\n}\n\nexport function useDropdownContext() {\n return useContext(DropdownContext);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-fit-handler.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/dropdown-fit-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAmD,MAAM,mCAAmC,CAAC;AAOhH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAgBD,eAAO,MAAM,iBAAiB,YACnB,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,8DAG/B,OAAO,KACjB,cA8BF,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAC3B,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,aAC/B,OAAO,KACjB,cA+BF,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACrB,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,aAC/B,MAAM,sFAIN,OAAO,KACjB,gBAiDF,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAC7B,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,aAC/B,OAAO,KACjB,wBAmCF,CAAC;AAEF,eAAO,MAAM,iBAAiB,oBACX,cAAc,kBACf,cAAc,4BACJ,cAAc,YAC9B,OAAO,oBACC,OAAO,gBACX,OAAO,gBACP,OAAO,iBACN,OAAO,YACZ,OAAO,aACN,MAAM,KAChB,CAAC,gBAAgB,EAAE,OAAO,CA4B5B,CAAC"}
1
+ {"version":3,"file":"dropdown-fit-handler.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/dropdown-fit-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAmD,MAAM,mCAAmC,CAAC;AAOhH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAgBD,eAAO,MAAM,iBAAiB,YACnB,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,8DAG/B,OAAO,KACjB,cA8BF,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAC3B,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,aAC/B,OAAO,KACjB,cA+BF,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACrB,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,aAC/B,MAAM,sFAIN,OAAO,KACjB,gBAiDF,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAC7B,WAAW,YACV,WAAW,mBACJ,cAAc,UAAU,CAAC,aAC/B,OAAO,KACjB,wBAmCF,CAAC;AAEF,eAAO,MAAM,iBAAiB,oBACX,cAAc,kBACf,cAAc,4BACJ,cAAc,YAC9B,OAAO,oBACC,OAAO,gBACX,OAAO,gBACP,OAAO,iBACN,OAAO,YACZ,OAAO,aACN,MAAM,KAChB,CAAC,gBAAgB,EAAE,OAAO,CA4B5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-fit-handler.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/dropdown-fit-handler.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAc,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAC3C,MAAM,uCAAuC,GAAG,EAAE,CAAC,CAAC,UAAU;AAC9D,MAAM,yCAAyC,GAAG,EAAE,CAAC;AAoBrD,MAAM,0BAA0B,GAAG,CAAC,OAAoB,EAAO,EAAE;IAC/D,MAAM,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;QACnD,M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E,CAAC;IAC9C,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;IACjC,eAAe,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;IAC/B,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;IAClC,eAAe,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;IAEhC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC/D,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAChE,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAE7D,MAAM,eAAe,GAAG,2BAA2B,CAAC,eAAe,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;IAChH,MAAM,QAAQ,GAAG,QAAQ;QACvB,CAAC,CAAC,2BAA2B,CAAC,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,CAAC;QACzF,CAAC,CAAC,mBAAmB,CACjB,cAAc,EACd,eAAe,EACf,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,CACT,CAAC;IACN,MAAM,UAAU,GAAG,cAAc,CAAC,qBAAqB,EAAE,CAAC;IAC1D,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AAChC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Dimensions, getOverflowParents, getOverflowParentDimensions } from '../../utils/scrollable-containers';\nimport styles from './styles.css.js';\n\nconst AVAILABLE_SPACE_RESERVE_DEFAULT = 50;\nconst AVAILABLE_SPACE_RESERVE_MOBILE_VERTICAL = 19; // 50 - 31\nconst AVAILABLE_SPACE_RESERVE_MOBILE_HORIZONTAL = 20;\n\ninterface AvailableSpace {\n above: number;\n below: number;\n left: number;\n right: number;\n}\nexport interface DropdownPosition {\n height: string;\n width: string;\n dropUp: boolean;\n dropLeft: boolean;\n left: string;\n}\nexport interface InteriorDropdownPosition extends DropdownPosition {\n bottom: string;\n top: string;\n}\n\nconst getClosestParentDimensions = (element: HTMLElement): any => {\n const parents = getOverflowParents(element).map(el => {\n const { height, width, top, left } = el.getBoundingClientRect();\n return {\n height,\n width,\n top,\n left,\n };\n });\n\n return parents.shift();\n};\n\nexport const getAvailableSpace = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n stretchWidth = false,\n stretchHeight = false,\n isMobile?: boolean\n): AvailableSpace => {\n const availableSpaceReserveVertical = stretchHeight\n ? 0\n : isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_VERTICAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const availableSpaceReserveHorizontal = stretchWidth\n ? 0\n : isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_HORIZONTAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const { bottom: triggerBottom, left: triggerLeft, right: triggerRight } = trigger.getBoundingClientRect();\n\n return overflowParents.reduce(\n ({ above, below, left, right }, overflowParent) => {\n const offsetTop = triggerBottom - overflowParent.top;\n const currentAbove = offsetTop - trigger.offsetHeight - availableSpaceReserveVertical;\n const currentBelow = overflowParent.height - offsetTop - availableSpaceReserveVertical;\n const currentLeft = triggerRight - overflowParent.left - availableSpaceReserveHorizontal;\n const currentRight = overflowParent.left + overflowParent.width - triggerLeft - availableSpaceReserveHorizontal;\n\n return {\n above: Math.min(above, currentAbove),\n below: Math.min(below, currentBelow),\n left: Math.min(left, currentLeft),\n right: Math.min(right, currentRight),\n };\n },\n { above: Number.MAX_VALUE, below: Number.MAX_VALUE, left: Number.MAX_VALUE, right: Number.MAX_VALUE }\n );\n};\n\nexport const getInteriorAvailableSpace = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n isMobile?: boolean\n): AvailableSpace => {\n const AVAILABLE_SPACE_RESERVE_VERTICAL = isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_VERTICAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const AVAILABLE_SPACE_RESERVE_HORIZONTAL = isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_HORIZONTAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const {\n bottom: triggerBottom,\n top: triggerTop,\n left: triggerLeft,\n right: triggerRight,\n } = trigger.getBoundingClientRect();\n\n return overflowParents.reduce(\n ({ above, below, left, right }, overflowParent) => {\n const currentAbove = triggerBottom - overflowParent.top - AVAILABLE_SPACE_RESERVE_VERTICAL;\n const currentBelow = overflowParent.height - triggerTop + overflowParent.top - AVAILABLE_SPACE_RESERVE_VERTICAL;\n const currentLeft = triggerLeft - overflowParent.left - AVAILABLE_SPACE_RESERVE_HORIZONTAL;\n const currentRight =\n overflowParent.left + overflowParent.width - triggerRight - AVAILABLE_SPACE_RESERVE_HORIZONTAL;\n\n return {\n above: Math.min(above, currentAbove),\n below: Math.min(below, currentBelow),\n left: Math.min(left, currentLeft),\n right: Math.min(right, currentRight),\n };\n },\n { above: Number.MAX_VALUE, below: Number.MAX_VALUE, left: Number.MAX_VALUE, right: Number.MAX_VALUE }\n );\n};\n\nexport const getDropdownPosition = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n minWidth?: number,\n preferCenter = false,\n stretchWidth = false,\n stretchHeight = false,\n isMobile?: boolean\n): DropdownPosition => {\n const availableSpace = getAvailableSpace(trigger, dropdown, overflowParents, stretchWidth, stretchHeight, isMobile);\n const triggerWidth = trigger.getBoundingClientRect().width;\n minWidth = minWidth ? Math.min(triggerWidth, minWidth) : triggerWidth;\n const requiredWidth = dropdown.getBoundingClientRect().width;\n // dropdown should not be smaller than the trigger\n const idealWidth = Math.max(requiredWidth, minWidth);\n\n let dropLeft: boolean;\n let left: number | null = null;\n let width = idealWidth;\n\n //1. Can it be positioned with ideal width to the right?\n if (idealWidth <= availableSpace.right) {\n dropLeft = false;\n //2. Can it be positioned with ideal width to the left?\n } else if (idealWidth <= availableSpace.left) {\n dropLeft = true;\n //3. Fit into biggest available space either on left or right\n } else {\n dropLeft = availableSpace.left > availableSpace.right;\n width = Math.max(availableSpace.left, availableSpace.right, minWidth);\n }\n\n if (preferCenter) {\n const spillOver = (idealWidth - triggerWidth) / 2;\n\n // availableSpace always includes the trigger width, but we want to exclude that\n const availableOutsideLeft = availableSpace.left - triggerWidth;\n const availableOutsideRight = availableSpace.right - triggerWidth;\n\n const fitsInCenter = availableOutsideLeft >= spillOver && availableOutsideRight >= spillOver;\n if (fitsInCenter) {\n left = -spillOver;\n }\n }\n\n const dropUp = availableSpace.below < dropdown.offsetHeight && availableSpace.above > availableSpace.below;\n const availableHeight = dropUp ? availableSpace.above : availableSpace.below;\n // Try and crop the bottom item when all options can't be displayed, affordance for \"there's more\"\n const croppedHeight = stretchHeight ? availableHeight : Math.floor(availableHeight / 31) * 31 + 16;\n\n return {\n dropUp,\n dropLeft,\n left: left === null ? 'auto' : `${left}px`,\n height: `${croppedHeight}px`,\n width: `${width}px`,\n };\n};\n\nexport const getInteriorDropdownPosition = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n isMobile?: boolean\n): InteriorDropdownPosition => {\n const availableSpace = getInteriorAvailableSpace(trigger, dropdown, overflowParents, isMobile);\n const { bottom: triggerBottom, top: triggerTop, width: triggerWidth } = trigger.getBoundingClientRect();\n const { top: parentDropdownTop, height: parentDropdownHeight } = getClosestParentDimensions(trigger);\n\n let dropLeft;\n\n let width = dropdown.getBoundingClientRect().width;\n const top = triggerTop - parentDropdownTop;\n if (width <= availableSpace.right) {\n dropLeft = false;\n } else if (width <= availableSpace.left) {\n dropLeft = true;\n } else {\n dropLeft = availableSpace.left > availableSpace.right;\n width = Math.max(availableSpace.left, availableSpace.right);\n }\n\n const left = dropLeft ? 0 - width : triggerWidth;\n\n const dropUp = availableSpace.below < dropdown.offsetHeight && availableSpace.above > availableSpace.below;\n const bottom = dropUp ? parentDropdownTop + parentDropdownHeight - triggerBottom : 0;\n const availableHeight = dropUp ? availableSpace.above : availableSpace.below;\n // Try and crop the bottom item when all options can't be displayed, affordance for \"there's more\"\n const croppedHeight = Math.floor(availableHeight / 31) * 31 + 16;\n\n return {\n dropUp,\n dropLeft,\n height: `${croppedHeight}px`,\n width: `${width}px`,\n top: `${top}px`,\n bottom: `${bottom}px`,\n left: `${left}px`,\n };\n};\n\nexport const calculatePosition = (\n dropdownElement: HTMLDivElement,\n triggerElement: HTMLDivElement,\n verticalContainerElement: HTMLDivElement,\n interior: boolean,\n expandToViewport: boolean,\n preferCenter: boolean,\n stretchWidth: boolean,\n stretchHeight: boolean,\n isMobile: boolean,\n minWidth?: number\n): [DropdownPosition, DOMRect] => {\n // cleaning previously assigned values,\n // so that they are not reused in case of screen resize and similar events\n verticalContainerElement.style.maxHeight = '';\n dropdownElement.style.width = '';\n dropdownElement.style.top = '';\n dropdownElement.style.bottom = '';\n dropdownElement.style.left = '';\n\n dropdownElement.classList.remove(styles['dropdown-drop-left']);\n dropdownElement.classList.remove(styles['dropdown-drop-right']);\n dropdownElement.classList.remove(styles['dropdown-drop-up']);\n\n const overflowParents = getOverflowParentDimensions(dropdownElement, interior, expandToViewport, stretchHeight);\n const position = interior\n ? getInteriorDropdownPosition(triggerElement, dropdownElement, overflowParents, isMobile)\n : getDropdownPosition(\n triggerElement,\n dropdownElement,\n overflowParents,\n minWidth,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile\n );\n const triggerBox = triggerElement.getBoundingClientRect();\n return [position, triggerBox];\n};\n"]}
1
+ {"version":3,"file":"dropdown-fit-handler.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/dropdown-fit-handler.ts"],"names":[],"mappings":"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MAAM,UAAU,GAAG,cAAc,CAAC,qBAAqB,EAAE,CAAC;IAC1D,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AAChC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Dimensions, getOverflowParents, getOverflowParentDimensions } from '../../utils/scrollable-containers';\nimport styles from './styles.css.js';\n\nconst AVAILABLE_SPACE_RESERVE_DEFAULT = 50;\nconst AVAILABLE_SPACE_RESERVE_MOBILE_VERTICAL = 19; // 50 - 31\nconst AVAILABLE_SPACE_RESERVE_MOBILE_HORIZONTAL = 20;\n\ninterface AvailableSpace {\n above: number;\n below: number;\n left: number;\n right: number;\n}\nexport interface DropdownPosition {\n height: string;\n width: string;\n dropUp: boolean;\n dropLeft: boolean;\n left: string;\n}\nexport interface InteriorDropdownPosition extends DropdownPosition {\n bottom: string;\n top: string;\n}\n\nconst getClosestParentDimensions = (element: HTMLElement): any => {\n const parents = getOverflowParents(element).map(el => {\n const { height, width, top, left } = el.getBoundingClientRect();\n return {\n height,\n width,\n top,\n left,\n };\n });\n\n return parents.shift();\n};\n\nexport const getAvailableSpace = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n stretchWidth = false,\n stretchHeight = false,\n isMobile?: boolean\n): AvailableSpace => {\n const availableSpaceReserveVertical = stretchHeight\n ? 0\n : isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_VERTICAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const availableSpaceReserveHorizontal = stretchWidth\n ? 0\n : isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_HORIZONTAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const { bottom: triggerBottom, left: triggerLeft, right: triggerRight } = trigger.getBoundingClientRect();\n\n return overflowParents.reduce(\n ({ above, below, left, right }, overflowParent) => {\n const offsetTop = triggerBottom - overflowParent.top;\n const currentAbove = offsetTop - trigger.offsetHeight - availableSpaceReserveVertical;\n const currentBelow = overflowParent.height - offsetTop - availableSpaceReserveVertical;\n const currentLeft = triggerRight - overflowParent.left - availableSpaceReserveHorizontal;\n const currentRight = overflowParent.left + overflowParent.width - triggerLeft - availableSpaceReserveHorizontal;\n\n return {\n above: Math.min(above, currentAbove),\n below: Math.min(below, currentBelow),\n left: Math.min(left, currentLeft),\n right: Math.min(right, currentRight),\n };\n },\n { above: Number.MAX_VALUE, below: Number.MAX_VALUE, left: Number.MAX_VALUE, right: Number.MAX_VALUE }\n );\n};\n\nexport const getInteriorAvailableSpace = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n isMobile?: boolean\n): AvailableSpace => {\n const AVAILABLE_SPACE_RESERVE_VERTICAL = isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_VERTICAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const AVAILABLE_SPACE_RESERVE_HORIZONTAL = isMobile\n ? AVAILABLE_SPACE_RESERVE_MOBILE_HORIZONTAL\n : AVAILABLE_SPACE_RESERVE_DEFAULT;\n const {\n bottom: triggerBottom,\n top: triggerTop,\n left: triggerLeft,\n right: triggerRight,\n } = trigger.getBoundingClientRect();\n\n return overflowParents.reduce(\n ({ above, below, left, right }, overflowParent) => {\n const currentAbove = triggerBottom - overflowParent.top - AVAILABLE_SPACE_RESERVE_VERTICAL;\n const currentBelow = overflowParent.height - triggerTop + overflowParent.top - AVAILABLE_SPACE_RESERVE_VERTICAL;\n const currentLeft = triggerLeft - overflowParent.left - AVAILABLE_SPACE_RESERVE_HORIZONTAL;\n const currentRight =\n overflowParent.left + overflowParent.width - triggerRight - AVAILABLE_SPACE_RESERVE_HORIZONTAL;\n\n return {\n above: Math.min(above, currentAbove),\n below: Math.min(below, currentBelow),\n left: Math.min(left, currentLeft),\n right: Math.min(right, currentRight),\n };\n },\n { above: Number.MAX_VALUE, below: Number.MAX_VALUE, left: Number.MAX_VALUE, right: Number.MAX_VALUE }\n );\n};\n\nexport const getDropdownPosition = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n minWidth?: number,\n preferCenter = false,\n stretchWidth = false,\n stretchHeight = false,\n isMobile?: boolean\n): DropdownPosition => {\n const availableSpace = getAvailableSpace(trigger, dropdown, overflowParents, stretchWidth, stretchHeight, isMobile);\n const triggerWidth = trigger.getBoundingClientRect().width;\n minWidth = minWidth ? Math.min(triggerWidth, minWidth) : triggerWidth;\n const requiredWidth = dropdown.getBoundingClientRect().width;\n // dropdown should not be smaller than the trigger\n const idealWidth = Math.max(requiredWidth, minWidth);\n\n let dropLeft: boolean;\n let left: number | null = null;\n let width = idealWidth;\n\n //1. Can it be positioned with ideal width to the right?\n if (idealWidth <= availableSpace.right) {\n dropLeft = false;\n //2. Can it be positioned with ideal width to the left?\n } else if (idealWidth <= availableSpace.left) {\n dropLeft = true;\n //3. Fit into biggest available space either on left or right\n } else {\n dropLeft = availableSpace.left > availableSpace.right;\n width = Math.max(availableSpace.left, availableSpace.right, minWidth);\n }\n\n if (preferCenter) {\n const spillOver = (idealWidth - triggerWidth) / 2;\n\n // availableSpace always includes the trigger width, but we want to exclude that\n const availableOutsideLeft = availableSpace.left - triggerWidth;\n const availableOutsideRight = availableSpace.right - triggerWidth;\n\n const fitsInCenter = availableOutsideLeft >= spillOver && availableOutsideRight >= spillOver;\n if (fitsInCenter) {\n left = -spillOver;\n }\n }\n\n const dropUp = availableSpace.below < dropdown.offsetHeight && availableSpace.above > availableSpace.below;\n const availableHeight = dropUp ? availableSpace.above : availableSpace.below;\n // Try and crop the bottom item when all options can't be displayed, affordance for \"there's more\"\n const croppedHeight = stretchHeight ? availableHeight : Math.floor(availableHeight / 31) * 31 + 16;\n\n return {\n dropUp,\n dropLeft,\n left: left === null ? 'auto' : `${left}px`,\n height: `${croppedHeight}px`,\n width: `${width}px`,\n };\n};\n\nexport const getInteriorDropdownPosition = (\n trigger: HTMLElement,\n dropdown: HTMLElement,\n overflowParents: ReadonlyArray<Dimensions>,\n isMobile?: boolean\n): InteriorDropdownPosition => {\n const availableSpace = getInteriorAvailableSpace(trigger, dropdown, overflowParents, isMobile);\n const { bottom: triggerBottom, top: triggerTop, width: triggerWidth } = trigger.getBoundingClientRect();\n const { top: parentDropdownTop, height: parentDropdownHeight } = getClosestParentDimensions(trigger);\n\n let dropLeft;\n\n let width = dropdown.getBoundingClientRect().width;\n const top = triggerTop - parentDropdownTop;\n if (width <= availableSpace.right) {\n dropLeft = false;\n } else if (width <= availableSpace.left) {\n dropLeft = true;\n } else {\n dropLeft = availableSpace.left > availableSpace.right;\n width = Math.max(availableSpace.left, availableSpace.right);\n }\n\n const left = dropLeft ? 0 - width : triggerWidth;\n\n const dropUp = availableSpace.below < dropdown.offsetHeight && availableSpace.above > availableSpace.below;\n const bottom = dropUp ? parentDropdownTop + parentDropdownHeight - triggerBottom : 0;\n const availableHeight = dropUp ? availableSpace.above : availableSpace.below;\n // Try and crop the bottom item when all options can't be displayed, affordance for \"there's more\"\n const croppedHeight = Math.floor(availableHeight / 31) * 31 + 16;\n\n return {\n dropUp,\n dropLeft,\n height: `${croppedHeight}px`,\n width: `${width}px`,\n top: `${top}px`,\n bottom: `${bottom}px`,\n left: `${left}px`,\n };\n};\n\nexport const calculatePosition = (\n dropdownElement: HTMLDivElement,\n triggerElement: HTMLDivElement,\n verticalContainerElement: HTMLDivElement,\n interior: boolean,\n expandToViewport: boolean,\n preferCenter: boolean,\n stretchWidth: boolean,\n stretchHeight: boolean,\n isMobile: boolean,\n minWidth?: number\n): [DropdownPosition, DOMRect] => {\n // cleaning previously assigned values,\n // so that they are not reused in case of screen resize and similar events\n verticalContainerElement.style.maxHeight = '';\n dropdownElement.style.width = '';\n dropdownElement.style.top = '';\n dropdownElement.style.bottom = '';\n dropdownElement.style.left = '';\n\n dropdownElement.classList.remove(styles['dropdown-drop-left']);\n dropdownElement.classList.remove(styles['dropdown-drop-right']);\n dropdownElement.classList.remove(styles['dropdown-drop-up']);\n\n const overflowParents = getOverflowParentDimensions(dropdownElement, interior, expandToViewport, stretchHeight);\n const position = interior\n ? getInteriorDropdownPosition(triggerElement, dropdownElement, overflowParents, isMobile)\n : getDropdownPosition(\n triggerElement,\n dropdownElement,\n overflowParents,\n minWidth,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile\n );\n const triggerBox = triggerElement.getBoundingClientRect();\n return [position, triggerBox];\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiG7C,QAAA,MAAM,QAAQ,6QAsBX,aAAa,gBA6Qf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiG7C,QAAA,MAAM,QAAQ,6QAsBX,aAAa,gBA6Qf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAA8C,iBAAi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Q,EAClB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,IAEjB,QAAQ,CACS;gBAEpB,oBAAC,OAAO,IACN,iBAAiB,EAAE,GAAG,EAAE,WAAC,OAAA,UAAU,CAAC,OAAO,KAAI,MAAA,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC7F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport { DropdownPosition, InteriorDropdownPosition, calculatePosition } from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(<div id={id}>{children}</div>, document.body);\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles['is-empty']]: !header && !children,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n })}\n ref={contentRef}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n onMouseDown={onMouseDown}\n >\n <div className={clsx(styles['dropdown-content-wrapper'], isRefresh && styles.refresh)}>\n <div className={styles['ie11-wrapper']}>\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !wrapperRef.current.contains(element)) &&\n (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!dropdownRef.current?.contains(e.target as Node) && !triggerRef.current?.contains(e.target as Node)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer renderWithPortal={expandToViewport && !interior} id={dropdownId} open={open}>\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI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gB,CAAC,UAAU,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC5F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B;gBAEF,oBAAC,iBAAiB,IAChB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,GAAG,EAClB,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,IAEjB,QAAQ,CACS;gBAEpB,oBAAC,OAAO,IACN,iBAAiB,EAAE,GAAG,EAAE,WAAC,OAAA,UAAU,CAAC,OAAO,KAAI,MAAA,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC7F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport { DropdownPosition, InteriorDropdownPosition, calculatePosition } from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(<div id={id}>{children}</div>, document.body);\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles['is-empty']]: !header && !children,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n })}\n ref={contentRef}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n onMouseDown={onMouseDown}\n >\n <div className={clsx(styles['dropdown-content-wrapper'], isRefresh && styles.refresh)}>\n <div className={styles['ie11-wrapper']}>\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !wrapperRef.current.contains(element)) &&\n (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!dropdownRef.current?.contains(e.target as Node) && !triggerRef.current?.contains(e.target as Node)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer renderWithPortal={expandToViewport && !interior} id={dropdownId} open={open}>\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC9D,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;;;;;;;QAaI;IACJ,WAAW,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAClD;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACtC;;OAEG;IACH,UA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AAE,QAAQ,GAAG,eAAe,CAAC,CAAC,CAAC;IAExF;;OAEG;IACH,MAAM,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,GAAG,eAAe,CAAC,CAAC,CAAC;CACxF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../../events';\nimport React from 'react';\n\nexport type OptionsFilteringType = 'none' | 'auto' | 'manual';\nexport interface OptionsLoadItemsDetail {\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n}\n\nexport interface BaseDropdownHostProps extends ExpandToViewport {\n /**\n * If you have more than 500 options, enable this flag to apply a performance optimization\n * that makes the filtering experience smoother. We don't recommend enabling the feature if you\n * have less than 500 options, because the improvements to performance are offset by a\n * visible scrolling lag.\n *\n * When you set this flag to `true`, it removes options that are not currently in view from the DOM.\n * If your test accesses such options, you need to first scroll the options container\n * to the correct offset, before performing any operations on them. Use the element returned\n * by the `findOptionsContainer` test utility for this.\n */\n virtualScroll?: boolean;\n\n /**\n * Use this event to implement the asynchronous behavior for the component.\n *\n * The event is called in the following situations:\n * * The user scrolls to the end of the list of options, if `statusType` is set to `pending`.\n * * The user clicks on the recovery button in the error state.\n * * The user types inside the input field.\n * * The user focuses the input field.\n *\n * The detail object contains the following properties:\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n **/\n onLoadItems?: NonCancelableEventHandler<OptionsLoadItemsDetail>;\n}\n\nexport interface DropdownProps extends ExpandToViewport {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * \"Sticky\" header of the dropdown content\n */\n header?: React.ReactNode;\n /**\n * Footer slot fixed at the bottom of the dropdown\n */\n footer?: React.ReactNode;\n /**\n * Dropdown content elements.\n */\n children?: React.ReactNode;\n /**\n * Updating content key triggers dropdown position re-evaluation.\n */\n contentKey?: string;\n /**\n * Open state of the dropdown.\n */\n open?: boolean;\n /**\n * Called when a user clicks outside of the dropdown content, when it is open.\n */\n onDropdownClose?: NonCancelableEventHandler<null>;\n /**\n * Called when a mouse button is pressed inside the dropdown content.\n */\n onMouseDown?: React.MouseEventHandler;\n /**\n * Dropdown id\n */\n dropdownId?: string;\n /**\n * Stretches dropdown to occupy entire width.\n */\n stretchWidth?: boolean;\n /**\n * Stretches dropdown to occupy entire height.\n */\n stretchHeight?: boolean;\n\n /**\n * Stretches the trigger to the height of the dropdown container.\n */\n stretchTriggerHeight?: boolean;\n\n /**\n * Whether the dropdown content should be at least as wide as the trigger.\n *\n * @defaultValue true\n */\n stretchToTriggerWidth?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Indicates if this dropdown lies within a parent dropdown and positions itself relative to it (as a fly out).\n */\n interior?: boolean;\n /**\n * Sets the min width of the dropdown (in px)\n */\n minWidth?: number;\n /**\n * Whether the dropdown will have a scrollbar or not\n */\n scrollable?: boolean;\n\n /**\n * Whether the dropdown will have a focus loop including trigger, header, content and footer.\n */\n loopFocus?: boolean;\n\n /**\n * Called when focus enters the trigger or dropdown content.\n */\n onFocus?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * Called when focus leaves the trigger or dropdown content.\n */\n onBlur?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n}\n\nexport interface ExpandToViewport {\n /**\n * Enabling this property will allow the dropdown to extend beyond its parent by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n * If you want the dropdown to ignore the `overflow` CSS property of its parents,\n * such as in a split view layout, enable this property.\n * However, use discretion. If you don't need to, we recommend you don't enable this property because fixed positioning results\n * in a slight, visible lag when scrolling complex pages.\n */\n expandToViewport?: boolean;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../../events';\nimport React from 'react';\n\nexport type OptionsFilteringType = 'none' | 'auto' | 'manual';\nexport interface OptionsLoadItemsDetail {\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n}\n\nexport interface BaseDropdownHostProps extends ExpandToViewport {\n /**\n * If you have more than 500 options, enable this flag to apply a performance optimization\n * that makes the filtering experience smoother. We don't recommend enabling the feature if you\n * have less than 500 options, because the improvements to performance are offset by a\n * visible scrolling lag.\n *\n * When you set this flag to `true`, it removes options that are not currently in view from the DOM.\n * If your test accesses such options, you need to first scroll the options container\n * to the correct offset, before performing any operations on them. Use the element returned\n * by the `findOptionsContainer` test utility for this.\n */\n virtualScroll?: boolean;\n\n /**\n * Use this event to implement the asynchronous behavior for the component.\n *\n * The event is called in the following situations:\n * * The user scrolls to the end of the list of options, if `statusType` is set to `pending`.\n * * The user clicks on the recovery button in the error state.\n * * The user types inside the input field.\n * * The user focuses the input field.\n *\n * The detail object contains the following properties:\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n **/\n onLoadItems?: NonCancelableEventHandler<OptionsLoadItemsDetail>;\n}\n\nexport interface DropdownProps extends ExpandToViewport {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * \"Sticky\" header of the dropdown content\n */\n header?: React.ReactNode;\n /**\n * Footer slot fixed at the bottom of the dropdown\n */\n footer?: React.ReactNode;\n /**\n * Dropdown content elements.\n */\n children?: React.ReactNode;\n /**\n * Updating content key triggers dropdown position re-evaluation.\n */\n contentKey?: string;\n /**\n * Open state of the dropdown.\n */\n open?: boolean;\n /**\n * Called when a user clicks outside of the dropdown content, when it is open.\n */\n onDropdownClose?: NonCancelableEventHandler<null>;\n /**\n * Called when a mouse button is pressed inside the dropdown content.\n */\n onMouseDown?: React.MouseEventHandler;\n /**\n * Dropdown id\n */\n dropdownId?: string;\n /**\n * Stretches dropdown to occupy entire width.\n */\n stretchWidth?: boolean;\n /**\n * Stretches dropdown to occupy entire height.\n */\n stretchHeight?: boolean;\n\n /**\n * Stretches the trigger to the height of the dropdown container.\n */\n stretchTriggerHeight?: boolean;\n\n /**\n * Whether the dropdown content should be at least as wide as the trigger.\n *\n * @defaultValue true\n */\n stretchToTriggerWidth?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Indicates if this dropdown lies within a parent dropdown and positions itself relative to it (as a fly out).\n */\n interior?: boolean;\n /**\n * Sets the min width of the dropdown (in px)\n */\n minWidth?: number;\n /**\n * Whether the dropdown will have a scrollbar or not\n */\n scrollable?: boolean;\n\n /**\n * Whether the dropdown will have a focus loop including trigger, header, content and footer.\n */\n loopFocus?: boolean;\n\n /**\n * Called when focus enters the trigger or dropdown content.\n */\n onFocus?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * Called when focus leaves the trigger or dropdown content.\n */\n onBlur?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n}\n\nexport interface ExpandToViewport {\n /**\n * Enabling this property will allow the dropdown to extend beyond its parent by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n * If you want the dropdown to ignore the `overflow` CSS property of its parents,\n * such as in a split view layout, enable this property.\n * However, use discretion. If you don't need to, we recommend you don't enable this property because fixed positioning results\n * in a slight, visible lag when scrolling complex pages.\n */\n expandToViewport?: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAM5C,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAM5C,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAOjD,MAAM,cAAc,GAA6B,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,EAAkB,EAAE,EAAE,CAAC,CACjG,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;IACvG,oBAAC,UAAU,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,KAAK,IACrC,OAAO,IAAI,oBAAC,cAAc,QAAE,OAAO,CAAkB,CAC3C,CACT,CACP,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport DropdownStatus from '../dropdown-status/index.js';\nimport LiveRegion from '../live-region/index.js';\n\ninterface DropdownFooter {\n content?: React.ReactNode | null;\n hasItems?: boolean;\n}\n\nconst DropdownFooter: React.FC<DropdownFooter> = ({ content, hasItems = true }: DropdownFooter) => (\n <div className={clsx(styles.root, { [styles.hidden]: content === null, [styles['no-items']]: !hasItems })}>\n <LiveRegion visible={true} tagName=\"div\">\n {content && <DropdownStatus>{content}</DropdownStatus>}\n </LiveRegion>\n </div>\n);\n\nexport default DropdownFooter;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAOjD,MAAM,cAAc,GAA6B,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,EAAkB,EAAE,EAAE,CAAC,CACjG,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;IACvG,oBAAC,UAAU,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,KAAK,IACrC,OAAO,IAAI,oBAAC,cAAc,QAAE,OAAO,CAAkB,CAC3C,CACT,CACP,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport DropdownStatus from '../dropdown-status/index.js';\nimport LiveRegion from '../live-region/index.js';\n\ninterface DropdownFooter {\n content?: React.ReactNode | null;\n hasItems?: boolean;\n}\n\nconst DropdownFooter: React.FC<DropdownFooter> = ({ content, hasItems = true }: DropdownFooter) => (\n <div className={clsx(styles.root, { [styles.hidden]: content === null, [styles['no-items']]: !hasItems })}>\n <LiveRegion visible={true} tagName=\"div\">\n {content && <DropdownStatus>{content}</DropdownStatus>}\n </LiveRegion>\n </div>\n);\n\nexport default DropdownFooter;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,yBAAyB,EAA0B,MAAM,cAAc,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,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