@cube-dev/ui-kit 0.0.0-canary-8ef678a → 0.0.0-canary-029af7f

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 (599) hide show
  1. package/README.md +1 -1
  2. package/dist/README.md +1 -1
  3. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  4. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  5. package/dist/_internal/hooks/use-event.js +1 -1
  6. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  7. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  8. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  9. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  10. package/dist/_internal/hooks/use-warn.js +1 -1
  11. package/dist/components/Block.js +1 -1
  12. package/dist/components/CollectionItem.js +1 -1
  13. package/dist/components/GlobalStyles.js +1 -1
  14. package/dist/components/GridProvider.js +1 -1
  15. package/dist/components/HiddenInput.js +1 -1
  16. package/dist/components/Root.js +1 -1
  17. package/dist/components/actions/Action/Action.js +1 -1
  18. package/dist/components/actions/Banner/Banner.js +1 -1
  19. package/dist/components/actions/Button/Button.js +1 -1
  20. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  21. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  22. package/dist/components/actions/ButtonSplit/context.js +1 -1
  23. package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
  24. package/dist/components/actions/CommandMenu/styled.js +1 -1
  25. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  26. package/dist/components/actions/ItemActionContext.js +1 -1
  27. package/dist/components/actions/ItemActionsWrapper.js +1 -1
  28. package/dist/components/actions/ItemButton/ItemButton.js +1 -3
  29. package/dist/components/actions/ItemButton/ItemButton.js.map +1 -1
  30. package/dist/components/actions/Link/Link.js +1 -1
  31. package/dist/components/actions/Menu/Menu.js +1 -1
  32. package/dist/components/actions/Menu/MenuItem.js +1 -1
  33. package/dist/components/actions/Menu/MenuSection.js +1 -1
  34. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  35. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  36. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  37. package/dist/components/actions/Menu/context.js +1 -1
  38. package/dist/components/actions/Menu/styled.js +1 -1
  39. package/dist/components/actions/actions-run.js +1 -1
  40. package/dist/components/actions/index.js +1 -1
  41. package/dist/components/actions/use-action.js +5 -3
  42. package/dist/components/actions/use-action.js.map +1 -1
  43. package/dist/components/actions/use-anchored-menu.js +1 -1
  44. package/dist/components/actions/use-context-menu.js +1 -1
  45. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  46. package/dist/components/content/Alert/Alert.js +1 -1
  47. package/dist/components/content/Alert/use-alert.js +1 -1
  48. package/dist/components/content/Avatar/Avatar.js +1 -1
  49. package/dist/components/content/Badge/Badge.js +1 -1
  50. package/dist/components/content/Card/Card.js +1 -1
  51. package/dist/components/content/Content.js +1 -1
  52. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  53. package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
  54. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  55. package/dist/components/content/Divider.js +1 -1
  56. package/dist/components/content/Footer.js +1 -1
  57. package/dist/components/content/Header.js +1 -1
  58. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  59. package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
  60. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  61. package/dist/components/content/Item/Item.js +3 -3
  62. package/dist/components/content/Item/Item.js.map +1 -1
  63. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  64. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  65. package/dist/components/content/Layout/GridLayout.js +1 -1
  66. package/dist/components/content/Layout/Layout.js +1 -1
  67. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  68. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  69. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  70. package/dist/components/content/Layout/LayoutContent.js +1 -1
  71. package/dist/components/content/Layout/LayoutContext.js +1 -1
  72. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  73. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  74. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  75. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  76. package/dist/components/content/Layout/LayoutPane.js +1 -1
  77. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  78. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  79. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  80. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  81. package/dist/components/content/Layout/index.js +1 -1
  82. package/dist/components/content/Layout/utils.js +1 -1
  83. package/dist/components/content/Paragraph.js +1 -1
  84. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  85. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  86. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  87. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  88. package/dist/components/content/Result/Result.js +1 -1
  89. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  90. package/dist/components/content/Tag/Tag.js +1 -1
  91. package/dist/components/content/Text.js +1 -1
  92. package/dist/components/content/TextItem/TextItem.js +1 -1
  93. package/dist/components/content/Title.js +1 -1
  94. package/dist/components/content/Tree/Tree.js +1 -1
  95. package/dist/components/content/Tree/TreeNode.js +1 -1
  96. package/dist/components/content/Tree/styled.js +1 -1
  97. package/dist/components/content/Tree/tree-index.js +1 -1
  98. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  99. package/dist/components/content/Tree/use-load-data.js +1 -1
  100. package/dist/components/content/highlightText.js +1 -1
  101. package/dist/components/content/use-auto-tooltip.js +1 -1
  102. package/dist/components/data/DataTable/DataTable.js +1 -1
  103. package/dist/components/data/ItemTable/ItemTable.js +1 -1
  104. package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
  105. package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
  106. package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
  107. package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
  108. package/dist/components/data/TableBase/ColumnResizer.js +1 -1
  109. package/dist/components/data/TableBase/RowCollection.js +1 -1
  110. package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
  111. package/dist/components/data/TableBase/TableRow.js +1 -1
  112. package/dist/components/data/TableBase/TableView.js +1 -1
  113. package/dist/components/data/TableBase/column-menu.js +1 -1
  114. package/dist/components/data/TableBase/column-tint.js +1 -1
  115. package/dist/components/data/TableBase/row-menu.js +1 -1
  116. package/dist/components/data/TableBase/styled.js +1 -1
  117. package/dist/components/data/TableBase/table-tree.js +1 -1
  118. package/dist/components/data/TableBase/types.js +1 -1
  119. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  120. package/dist/components/data/TableBase/use-column-order.js +1 -1
  121. package/dist/components/data/TableBase/use-container-width.js +1 -1
  122. package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
  123. package/dist/components/data/TableBase/use-scrollability.js +1 -1
  124. package/dist/components/data/TableBase/use-table-columns.js +1 -1
  125. package/dist/components/data/TableBase/use-table-search.js +1 -1
  126. package/dist/components/data/TableBase/use-table-selection.js +1 -1
  127. package/dist/components/data/TableBase/use-table-sort.js +1 -1
  128. package/dist/components/data/TableBase/use-table-sorts.js +1 -1
  129. package/dist/components/data/TableBase/use-table-storage.js +1 -1
  130. package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
  131. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  132. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  133. package/dist/components/fields/Checkbox/context.js +1 -1
  134. package/dist/components/fields/ColorInput/ColorInput.js +1 -1
  135. package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
  136. package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
  137. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
  138. package/dist/components/fields/ComboBox/ComboBox.js +85 -42
  139. package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
  140. package/dist/components/fields/CommandTextArea/CommandTextArea.js +3 -2
  141. package/dist/components/fields/CommandTextArea/CommandTextArea.js.map +1 -1
  142. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  143. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  144. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  145. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  146. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  147. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  148. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  149. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  150. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  151. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  152. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  153. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  154. package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
  155. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  156. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  157. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  158. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  159. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  160. package/dist/components/fields/DatePicker/period.js +1 -1
  161. package/dist/components/fields/DatePicker/props.js +1 -1
  162. package/dist/components/fields/DatePicker/utils.js +1 -1
  163. package/dist/components/fields/FileInput/FileInput.js +1 -1
  164. package/dist/components/fields/FilterListBox/FilterListBox.js +26 -17
  165. package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
  166. package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
  167. package/dist/components/fields/Input/Input.js +1 -1
  168. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  169. package/dist/components/fields/ListBox/ListBox.d.ts +2 -2
  170. package/dist/components/fields/ListBox/ListBox.js +1 -2
  171. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  172. package/dist/components/fields/ListBox/optionId.js +16 -0
  173. package/dist/components/fields/ListBox/optionId.js.map +1 -0
  174. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +100 -93
  175. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
  176. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  177. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +44 -22
  178. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js.map +1 -1
  179. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  180. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  181. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  182. package/dist/components/fields/Picker/Picker.js +1 -1
  183. package/dist/components/fields/RadioGroup/Radio.js +1 -1
  184. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  185. package/dist/components/fields/RadioGroup/context.js +1 -1
  186. package/dist/components/fields/SearchComboBox/SearchComboBox.js +3 -2
  187. package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
  188. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  189. package/dist/components/fields/Select/Select.js +1 -1
  190. package/dist/components/fields/Slider/Gradation.js +1 -1
  191. package/dist/components/fields/Slider/HueSlider.js +1 -1
  192. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  193. package/dist/components/fields/Slider/Slider.js +1 -1
  194. package/dist/components/fields/Slider/SliderBase.js +1 -1
  195. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  196. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  197. package/dist/components/fields/Slider/elements.js +1 -1
  198. package/dist/components/fields/Slider/index.js +1 -1
  199. package/dist/components/fields/Switch/Switch.js +1 -1
  200. package/dist/components/fields/TagInput/TagInput.d.ts +151 -0
  201. package/dist/components/fields/TagInput/TagInput.js +1538 -0
  202. package/dist/components/fields/TagInput/TagInput.js.map +1 -0
  203. package/dist/components/fields/TagInput/TagList.js +260 -0
  204. package/dist/components/fields/TagInput/TagList.js.map +1 -0
  205. package/dist/components/fields/TagInput/index.d.ts +2 -0
  206. package/dist/components/fields/TextArea/TextArea.js +1 -1
  207. package/dist/components/fields/TextInput/TextInput.js +1 -1
  208. package/dist/components/fields/TextInput/TextInputBase.d.ts +6 -0
  209. package/dist/components/fields/TextInput/TextInputBase.js +8 -6
  210. package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
  211. package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
  212. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  213. package/dist/components/fields/TriggerActions.js +1 -1
  214. package/dist/components/fields/color/ColorPanel.js +1 -1
  215. package/dist/components/fields/color/channels.js +1 -1
  216. package/dist/components/fields/color/color.js +1 -1
  217. package/dist/components/fields/color/context.js +1 -1
  218. package/dist/components/fields/index.d.ts +2 -0
  219. package/dist/components/form/FieldWrapper/FieldWrapper.js +2 -11
  220. package/dist/components/form/FieldWrapper/FieldWrapper.js.map +1 -1
  221. package/dist/components/form/Form/Field.js +1 -1
  222. package/dist/components/form/Form/Form.js +1 -1
  223. package/dist/components/form/Form/ModernFormRoot.js +1 -1
  224. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  225. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  226. package/dist/components/form/Form/SubmitError.js +1 -1
  227. package/dist/components/form/Form/backend.js +1 -1
  228. package/dist/components/form/Form/index.js +1 -1
  229. package/dist/components/form/Form/modern/actions.js +1 -1
  230. package/dist/components/form/Form/modern/context.js +1 -1
  231. package/dist/components/form/Form/modern/controller.js +1 -1
  232. package/dist/components/form/Form/modern/field-binding.js +1 -1
  233. package/dist/components/form/Form/modern/field.js +1 -1
  234. package/dist/components/form/Form/modern/react.js +1 -1
  235. package/dist/components/form/Form/modern/store.js +1 -1
  236. package/dist/components/form/Form/modern/validation.js +1 -1
  237. package/dist/components/form/Form/modern/values.js +1 -1
  238. package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
  239. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  240. package/dist/components/form/Form/use-field/use-field.js +1 -1
  241. package/dist/components/form/Form/use-form.js +1 -1
  242. package/dist/components/form/Form/validation.js +1 -1
  243. package/dist/components/form/Label.js +1 -1
  244. package/dist/components/form/legacy-tooltip.js +1 -1
  245. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  246. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  247. package/dist/components/form/validation/use-validation-props.js +1 -1
  248. package/dist/components/form/wrapper.js +1 -1
  249. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  250. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  251. package/dist/components/layout/Board/Board.js +1 -1
  252. package/dist/components/layout/Board/BoardProvider.js +1 -1
  253. package/dist/components/layout/Board/BoardResponsive.js +1 -1
  254. package/dist/components/layout/Board/Widget.js +1 -1
  255. package/dist/components/layout/Board/WidgetHost.js +1 -1
  256. package/dist/components/layout/Board/board-context.js +1 -1
  257. package/dist/components/layout/Board/board-store.js +1 -1
  258. package/dist/components/layout/Board/grid-core/calculate.js +1 -1
  259. package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
  260. package/dist/components/layout/Board/grid-core/collision.js +1 -1
  261. package/dist/components/layout/Board/grid-core/compactors.js +1 -1
  262. package/dist/components/layout/Board/grid-core/constraints.js +1 -1
  263. package/dist/components/layout/Board/grid-core/group-move.js +1 -1
  264. package/dist/components/layout/Board/grid-core/layout.js +1 -1
  265. package/dist/components/layout/Board/grid-core/placement.js +1 -1
  266. package/dist/components/layout/Board/grid-core/sort.js +1 -1
  267. package/dist/components/layout/Board/index.js +1 -1
  268. package/dist/components/layout/Board/responsive-utils.js +1 -1
  269. package/dist/components/layout/Board/use-board-layout.js +1 -1
  270. package/dist/components/layout/Board/use-board-registry.js +1 -1
  271. package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
  272. package/dist/components/layout/Board/use-board-selection.js +1 -1
  273. package/dist/components/layout/Flex.js +1 -1
  274. package/dist/components/layout/Flow.js +1 -1
  275. package/dist/components/layout/Grid.js +1 -1
  276. package/dist/components/layout/Panel.js +1 -1
  277. package/dist/components/layout/Prefix.js +1 -1
  278. package/dist/components/layout/ResizablePanel.js +1 -1
  279. package/dist/components/layout/Space.js +1 -1
  280. package/dist/components/layout/Suffix.js +1 -1
  281. package/dist/components/navigation/Pagination/Pagination.js +1 -1
  282. package/dist/components/navigation/Pagination/use-pagination.js +1 -1
  283. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  284. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  285. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  286. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  287. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  288. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  289. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  290. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  291. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  292. package/dist/components/navigation/Tabs/styled.js +1 -1
  293. package/dist/components/navigation/Tabs/types.js +1 -1
  294. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  295. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  296. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  297. package/dist/components/other/Calendar/Calendar.js +1 -1
  298. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  299. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  300. package/dist/components/other/Calendar/CalendarHeader.js +1 -1
  301. package/dist/components/other/Calendar/CalendarPanel.js +1 -1
  302. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  303. package/dist/components/other/Calendar/PeriodGrid.js +1 -1
  304. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  305. package/dist/components/other/Calendar/styled.js +1 -1
  306. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  307. package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
  308. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  309. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  310. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  311. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  312. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  313. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  314. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  315. package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
  316. package/dist/components/overlays/Dialog/context.js +1 -1
  317. package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
  318. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  319. package/dist/components/overlays/Modal/Modal.js +1 -1
  320. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  321. package/dist/components/overlays/Modal/Overlay.js +1 -1
  322. package/dist/components/overlays/Modal/Popover.js +1 -1
  323. package/dist/components/overlays/Modal/Tray.js +1 -1
  324. package/dist/components/overlays/Modal/Underlay.js +1 -1
  325. package/dist/components/overlays/Notifications/Notification.js +1 -1
  326. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  327. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  328. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  329. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  330. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  331. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  332. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  333. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  334. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  335. package/dist/components/overlays/Notifications/index.js +1 -1
  336. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  337. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  338. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  339. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  340. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  341. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  342. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  343. package/dist/components/overlays/Toast/index.js +1 -1
  344. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  345. package/dist/components/overlays/Toast/useToast.js +1 -1
  346. package/dist/components/overlays/Tooltip/Tooltip.js +12 -14
  347. package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
  348. package/dist/components/overlays/Tooltip/TooltipProvider.d.ts +0 -6
  349. package/dist/components/overlays/Tooltip/TooltipProvider.js +38 -43
  350. package/dist/components/overlays/Tooltip/TooltipProvider.js.map +1 -1
  351. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  352. package/dist/components/overlays/Tooltip/context.js +1 -1
  353. package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
  354. package/dist/components/portal/Portal.js +1 -1
  355. package/dist/components/portal/PortalProvider.js +1 -1
  356. package/dist/components/portal/usePortal.js +1 -1
  357. package/dist/components/shared/DraggableCollection.js +1 -1
  358. package/dist/components/shared/InvalidIcon.js +1 -1
  359. package/dist/components/shared/ValidIcon.js +1 -1
  360. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  361. package/dist/components/status/Spin/Cube.js +1 -1
  362. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  363. package/dist/components/status/Spin/Spin.js +1 -1
  364. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  365. package/dist/data/item-themes.js +1 -1
  366. package/dist/data/themes.js +1 -1
  367. package/dist/eslint-plugin/defaults.generated.js +43 -1
  368. package/dist/eslint-plugin/defaults.generated.js.map +1 -1
  369. package/dist/eslint-plugin/index.js +1 -1
  370. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  371. package/dist/i18n/I18nProvider.js +1 -1
  372. package/dist/i18n/createFormatter.js +1 -1
  373. package/dist/i18n/index.js +1 -1
  374. package/dist/i18n/instance.js +1 -1
  375. package/dist/i18n/locales/de-DE/uikit.js +15 -1
  376. package/dist/i18n/locales/en-US/uikit.js +15 -1
  377. package/dist/i18n/locales/en-US/uikit.json.d.ts +20 -2
  378. package/dist/i18n/locales/es-ES/uikit.js +15 -1
  379. package/dist/i18n/locales/es-MX/uikit.js +15 -1
  380. package/dist/i18n/locales/fr-FR/uikit.js +15 -1
  381. package/dist/i18n/locales/it-IT/uikit.js +15 -1
  382. package/dist/i18n/locales/ja-JP/uikit.js +15 -1
  383. package/dist/i18n/locales/nb-NO/uikit.js +15 -1
  384. package/dist/i18n/locales/pt-BR/uikit.js +15 -1
  385. package/dist/i18n/locales/pt-PT/uikit.js +15 -1
  386. package/dist/i18n/locales/sv-SE/uikit.js +15 -1
  387. package/dist/i18n/locales/vi-VN/uikit.js +15 -1
  388. package/dist/i18n/locales.js +1 -1
  389. package/dist/i18n/useFormatter.js +1 -1
  390. package/dist/i18n/useI18n.js +1 -1
  391. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  392. package/dist/icons/AdjustmentsIcon.js +1 -1
  393. package/dist/icons/AiIcon.js +1 -1
  394. package/dist/icons/AreaChartIcon.js +1 -1
  395. package/dist/icons/ArrowNarrowDownIcon.js +1 -1
  396. package/dist/icons/ArrowNarrowUpIcon.js +1 -1
  397. package/dist/icons/BackwardIcon.js +1 -1
  398. package/dist/icons/BarChartIcon.js +1 -1
  399. package/dist/icons/BellFilledIcon.js +1 -1
  400. package/dist/icons/BellIcon.js +1 -1
  401. package/dist/icons/BooleanIcon.js +1 -1
  402. package/dist/icons/CalendarEditIcon.js +1 -1
  403. package/dist/icons/CalendarIcon.js +1 -1
  404. package/dist/icons/CaretDownIcon.js +1 -1
  405. package/dist/icons/CaretUpIcon.js +1 -1
  406. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  407. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  408. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  409. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  410. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  411. package/dist/icons/ChartBarLineIcon.js +1 -1
  412. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  413. package/dist/icons/ChartBarStackedIcon.js +1 -1
  414. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  415. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  416. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  417. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  418. package/dist/icons/ChartBubbleIcon.js +1 -1
  419. package/dist/icons/ChartDonut2Icon.js +1 -1
  420. package/dist/icons/ChartFunnelIcon.js +1 -1
  421. package/dist/icons/ChartHeatmapIcon.js +1 -1
  422. package/dist/icons/ChartKPIIcon.js +1 -1
  423. package/dist/icons/ChartPie2Icon.js +1 -1
  424. package/dist/icons/ChartScatterIcon.js +1 -1
  425. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  426. package/dist/icons/CheckCircleIcon.js +1 -1
  427. package/dist/icons/CheckIcon.js +1 -1
  428. package/dist/icons/CircleFilledIcon.js +1 -1
  429. package/dist/icons/ClearIcon.js +1 -1
  430. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  431. package/dist/icons/CloseCircleIcon.js +1 -1
  432. package/dist/icons/CloseIcon.js +1 -1
  433. package/dist/icons/CodeIcon.js +1 -1
  434. package/dist/icons/ColumnTotalIcon.js +1 -1
  435. package/dist/icons/CopyIcon.js +1 -1
  436. package/dist/icons/CountIcon.js +1 -1
  437. package/dist/icons/CubeIcon.js +1 -1
  438. package/dist/icons/CubePauseIcon.js +1 -1
  439. package/dist/icons/CubePlayIcon.js +1 -1
  440. package/dist/icons/CurrencyDollarIcon.js +1 -1
  441. package/dist/icons/DangerIcon.js +1 -1
  442. package/dist/icons/DashboardIcon.js +1 -1
  443. package/dist/icons/DatabaseIcon.js +1 -1
  444. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  445. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  446. package/dist/icons/DirectionIcon.js +1 -1
  447. package/dist/icons/DonutIcon.js +1 -1
  448. package/dist/icons/DownIcon.js +1 -1
  449. package/dist/icons/EditIcon.js +1 -1
  450. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  451. package/dist/icons/ExclamationCircleIcon.js +1 -1
  452. package/dist/icons/ExclamationIcon.js +1 -1
  453. package/dist/icons/EyeIcon.js +1 -1
  454. package/dist/icons/EyeInvisibleIcon.js +1 -1
  455. package/dist/icons/FilterIcon.js +1 -1
  456. package/dist/icons/FolderFilledIcon.js +1 -1
  457. package/dist/icons/FolderIcon.js +1 -1
  458. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  459. package/dist/icons/FolderOpenIcon.js +1 -1
  460. package/dist/icons/ForwardIcon.js +1 -1
  461. package/dist/icons/GripVerticalIcon.js +1 -1
  462. package/dist/icons/HierarchyIcon.js +1 -1
  463. package/dist/icons/HierarchyOpenIcon.js +1 -1
  464. package/dist/icons/Icon.js +1 -1
  465. package/dist/icons/InfoCircleIcon.js +1 -1
  466. package/dist/icons/InfoIcon.js +1 -1
  467. package/dist/icons/KeyIcon.js +1 -1
  468. package/dist/icons/LeftIcon.js +1 -1
  469. package/dist/icons/LineChartIcon.js +1 -1
  470. package/dist/icons/LoadingIcon.js +1 -1
  471. package/dist/icons/LockFilledIcon.js +1 -1
  472. package/dist/icons/LockIcon.js +1 -1
  473. package/dist/icons/MoreIcon.js +1 -1
  474. package/dist/icons/NotAllowedIcon.js +1 -1
  475. package/dist/icons/Number123Icon.js +1 -1
  476. package/dist/icons/NumberIcon.js +1 -1
  477. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  478. package/dist/icons/PauseCircleIcon.js +1 -1
  479. package/dist/icons/PauseIcon.js +1 -1
  480. package/dist/icons/PercentageIcon.js +1 -1
  481. package/dist/icons/PieChartIcon.js +1 -1
  482. package/dist/icons/PipetteIcon.js +1 -1
  483. package/dist/icons/PlayCircleIcon.js +1 -1
  484. package/dist/icons/PlayIcon.js +1 -1
  485. package/dist/icons/PlusIcon.js +1 -1
  486. package/dist/icons/ProgressBarIcon.js +1 -1
  487. package/dist/icons/ReloadIcon.js +1 -1
  488. package/dist/icons/ReportIcon.js +1 -1
  489. package/dist/icons/ReturnIcon.js +1 -1
  490. package/dist/icons/RightIcon.js +1 -1
  491. package/dist/icons/RowTotalsIcon.js +1 -1
  492. package/dist/icons/SchemeIcon.js +1 -1
  493. package/dist/icons/SearchIcon.js +1 -1
  494. package/dist/icons/SemanticQueryIcon.js +1 -1
  495. package/dist/icons/SettingsIcon.js +1 -1
  496. package/dist/icons/ShieldFilledIcon.js +1 -1
  497. package/dist/icons/ShieldIcon.js +1 -1
  498. package/dist/icons/SlashIcon.js +1 -1
  499. package/dist/icons/SparklesIcon.js +1 -1
  500. package/dist/icons/SqlIcon.js +1 -1
  501. package/dist/icons/StatsIcon.js +1 -1
  502. package/dist/icons/StopIcon.js +1 -1
  503. package/dist/icons/StringIcon.js +1 -1
  504. package/dist/icons/SubtotalsIcon.js +1 -1
  505. package/dist/icons/SwitchIcon.js +1 -1
  506. package/dist/icons/TableIcon.js +1 -1
  507. package/dist/icons/ThumbsDownIcon.js +1 -1
  508. package/dist/icons/ThumbsUpIcon.js +1 -1
  509. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  510. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  511. package/dist/icons/ThunderboltIcon.js +1 -1
  512. package/dist/icons/TimeIcon.js +1 -1
  513. package/dist/icons/TrashIcon.js +1 -1
  514. package/dist/icons/UnlockIcon.js +1 -1
  515. package/dist/icons/UpIcon.js +1 -1
  516. package/dist/icons/UserGroupIcon.js +1 -1
  517. package/dist/icons/UserIcon.js +1 -1
  518. package/dist/icons/UserLockIcon.js +1 -1
  519. package/dist/icons/ViewIcon.js +1 -1
  520. package/dist/icons/WarningFilledIcon.js +1 -1
  521. package/dist/icons/WarningIcon.js +1 -1
  522. package/dist/icons/wrap-icon.js +1 -1
  523. package/dist/index.d.ts +2 -1
  524. package/dist/index.js +3 -2
  525. package/dist/index.js.map +1 -1
  526. package/dist/probe/canonicalize.js +1 -1
  527. package/dist/probe/css.js +1 -1
  528. package/dist/probe/index.js +1 -1
  529. package/dist/provider.js +1 -1
  530. package/dist/providers/TrackingProvider.js +1 -1
  531. package/dist/providers/navigationAdapter.default.js +1 -1
  532. package/dist/tokens/all-tokens.js +1 -1
  533. package/dist/tokens/base.js +1 -1
  534. package/dist/tokens/color-seed.js +1 -1
  535. package/dist/tokens/color-theme.js +1 -1
  536. package/dist/tokens/colors.js +1 -1
  537. package/dist/tokens/layout.js +1 -1
  538. package/dist/tokens/lazy-styles.js +1 -1
  539. package/dist/tokens/legacy-color.js +1 -1
  540. package/dist/tokens/palette-config.js +1 -1
  541. package/dist/tokens/palette.js +1 -1
  542. package/dist/tokens/resolve.js +1 -1
  543. package/dist/tokens/shadows.js +1 -1
  544. package/dist/tokens/sizes.js +1 -1
  545. package/dist/tokens/spacing.js +1 -1
  546. package/dist/tokens/typography.d.ts +0 -1
  547. package/dist/tokens/typography.js +1 -10
  548. package/dist/tokens/typography.js.map +1 -1
  549. package/dist/utils/ResizeSensor.js +1 -1
  550. package/dist/utils/colors.js +1 -1
  551. package/dist/utils/dotize.js +1 -1
  552. package/dist/utils/is-dev-env.js +1 -1
  553. package/dist/utils/modules.js +1 -1
  554. package/dist/utils/promise.js +1 -1
  555. package/dist/utils/raf.js +1 -1
  556. package/dist/utils/random.js +1 -1
  557. package/dist/utils/range.js +1 -1
  558. package/dist/utils/react/RenderCache.js +1 -1
  559. package/dist/utils/react/Slots.js +1 -1
  560. package/dist/utils/react/chain.js +1 -1
  561. package/dist/utils/react/disabledProps.js +1 -1
  562. package/dist/utils/react/escapePropagation.js +1 -1
  563. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  564. package/dist/utils/react/index.js +1 -1
  565. package/dist/utils/react/interactions.js +1 -1
  566. package/dist/utils/react/isTextOnly.js +1 -1
  567. package/dist/utils/react/mapProps.js +1 -1
  568. package/dist/utils/react/mergeProps.js +1 -1
  569. package/dist/utils/react/nullableValue.js +1 -1
  570. package/dist/utils/react/programmaticFocus.js +1 -1
  571. package/dist/utils/react/resolveIcon.js +1 -1
  572. package/dist/utils/react/sharedStore.js +1 -1
  573. package/dist/utils/react/useBufferedValue.js +1 -1
  574. package/dist/utils/react/useCombinedRefs.js +1 -1
  575. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  576. package/dist/utils/react/useEventBus.js +1 -1
  577. package/dist/utils/react/useId.js +1 -1
  578. package/dist/utils/react/useIsDarwin.js +1 -1
  579. package/dist/utils/react/useKeySymbols.js +1 -1
  580. package/dist/utils/react/useLayoutEffect.js +1 -1
  581. package/dist/utils/react/useLocalStorage.js +1 -1
  582. package/dist/utils/react/useMergeStyles.js +1 -1
  583. package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
  584. package/dist/utils/react/usePopoverSync.js +1 -1
  585. package/dist/utils/react/useQaProps.js +1 -1
  586. package/dist/utils/react/useScheme.js +1 -1
  587. package/dist/utils/react/useViewportSize.js +1 -1
  588. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  589. package/dist/utils/selection.js +1 -1
  590. package/dist/utils/styles.js +1 -1
  591. package/dist/utils/tree.js +1 -1
  592. package/dist/utils/warnings.js +1 -1
  593. package/dist/version.js +2 -2
  594. package/docs/Usage.md +9 -10
  595. package/docs/components/actions/ItemButton.md +2 -2
  596. package/docs/components/fields/TagInput.md +338 -0
  597. package/docs/components/overlays/TooltipProvider.md +0 -1
  598. package/package.json +1 -1
  599. package/tasty.config.ts +1 -2
@@ -0,0 +1,1538 @@
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-029af7f | Cube Dev Team */
2
+ import { extractStyles } from "../../../utils/styles.js";
3
+ import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
+ import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
5
+ import { useEvent } from "../../../_internal/hooks/use-event.js";
6
+ import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
7
+ import { _CollectionItem } from "../../CollectionItem.js";
8
+ import { useI18n } from "../../../i18n/useI18n.js";
9
+ import { useFormatter } from "../../../i18n/useFormatter.js";
10
+ import { DirectionIcon } from "../../../icons/DirectionIcon.js";
11
+ import { generateRandomId } from "../../../utils/random.js";
12
+ import { castNullableArrayValue } from "../../../utils/react/nullableValue.js";
13
+ import { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
14
+ import { wrapWithField } from "../../form/wrapper.js";
15
+ import { getListBoxOptionId } from "../ListBox/optionId.js";
16
+ import { TextInputBase } from "../TextInput/TextInputBase.js";
17
+ import { ListBoxPopover } from "../ListBoxPopover/ListBoxPopover.js";
18
+ import { useCompositeFocus } from "../ListBoxPopover/useCompositeFocus.js";
19
+ import { collectVisibleKeys, filterCollectionNodes, getEdgeVisibleKey, getNextVisibleKey, markKeyboardFocus } from "../ListBoxPopover/listNavigation.js";
20
+ import { TagList } from "./TagList.js";
21
+ import { c } from "react-compiler-runtime";
22
+ import { CONTAINER_STYLES, tasty } from "@tenphi/tasty";
23
+ import { cloneElement, forwardRef, isValidElement, useEffect, useLayoutEffect, useRef, useState } from "react";
24
+ import { jsx, jsxs } from "react/jsx-runtime";
25
+ import { VisuallyHidden, useFilter, useId as useId$1, useTextField } from "react-aria";
26
+ import { Section, useListState } from "react-stately";
27
+ import { useControlledState } from "@react-stately/utils";
28
+
29
+ //#region src/components/fields/TagInput/TagInput.tsx
30
+ const TagInputElement = tasty({
31
+ qa: "TagInputContainer",
32
+ styles: {
33
+ display: "flex",
34
+ flow: "column",
35
+ gap: "1x"
36
+ }
37
+ });
38
+ const TAG_SIZES = {
39
+ small: "xsmall",
40
+ medium: "xsmall",
41
+ large: "small"
42
+ };
43
+ const DEFAULT_DELIMITERS = [","];
44
+ const LINE_BREAK = /\r\n|\r|\n/;
45
+ function escapeRegExp(text) {
46
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
47
+ }
48
+ function delimiterPattern(delimiters) {
49
+ const separators = delimiters.filter(Boolean).map(escapeRegExp);
50
+ return separators.length ? new RegExp(separators.join("|")) : null;
51
+ }
52
+ /** Splits `text` on the delimiters and line breaks into trimmed, non-empty parts. */
53
+ function splitTagText(text, delimiters) {
54
+ const separators = delimiters.filter(Boolean).map(escapeRegExp);
55
+ const pattern = new RegExp([LINE_BREAK.source, ...separators].join("|"), "g");
56
+ return text.split(pattern).map((part) => part.trim()).filter(Boolean);
57
+ }
58
+ function isComposingKey(e) {
59
+ return e.nativeEvent.isComposing || e.keyCode === 229;
60
+ }
61
+ function TagInput(props, ref) {
62
+ const $ = c(397);
63
+ let t0;
64
+ if ($[0] !== props) {
65
+ t0 = castNullableArrayValue(props);
66
+ $[0] = props;
67
+ $[1] = t0;
68
+ } else t0 = $[1];
69
+ props = t0;
70
+ let t1;
71
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
72
+ t1 = {
73
+ defaultValidationTrigger: "onChange",
74
+ valuePropsMapper: _temp
75
+ };
76
+ $[2] = t1;
77
+ } else t1 = $[2];
78
+ props = useFieldProps(props, t1);
79
+ const { t } = useI18n();
80
+ const { formatList } = useFormatter();
81
+ let allowsCustomValue;
82
+ let autoComplete;
83
+ let autoFocus;
84
+ let className;
85
+ let containerPadding;
86
+ let defaultInputValue;
87
+ let defaultValue;
88
+ let delimiters;
89
+ let direction;
90
+ let disabledKeys;
91
+ let errorMessage;
92
+ let filter;
93
+ let headingStyles;
94
+ let hideTrigger;
95
+ let icon;
96
+ let id;
97
+ let inputRefProp;
98
+ let inputStyles;
99
+ let inputValueProp;
100
+ let isDisabled;
101
+ let isInvalid;
102
+ let isLoading;
103
+ let isReadOnly;
104
+ let isRequired;
105
+ let isValid;
106
+ let items;
107
+ let label;
108
+ let listBoxRefProp;
109
+ let listBoxStyles;
110
+ let message;
111
+ let mods;
112
+ let onBlur;
113
+ let onChange_0;
114
+ let onFocus;
115
+ let onInputChange;
116
+ let onKeyDown;
117
+ let onOpenChange;
118
+ let optionStyles;
119
+ let otherProps;
120
+ let overlayOffset;
121
+ let overlayStyles;
122
+ let placeholder;
123
+ let popoverRefProp;
124
+ let popoverTrigger;
125
+ let prefix;
126
+ let qa;
127
+ let qaVal;
128
+ let renderChildren;
129
+ let sectionStyles;
130
+ let shouldCommitOnBlur;
131
+ let shouldFlip;
132
+ let size;
133
+ let style;
134
+ let suffix;
135
+ let suffixPosition;
136
+ let t2;
137
+ let tagListStyles;
138
+ let tagProps;
139
+ let tagStyles;
140
+ let triggerStyles;
141
+ let userLabelProps;
142
+ let validateTag;
143
+ let valueProp;
144
+ let wrapperRefProp;
145
+ let wrapperStyles;
146
+ if ($[3] !== props) {
147
+ const { qa: t3, id: t4, label: t5, value: t6, defaultValue: t7, onChange: t8, inputValue: t9, defaultInputValue: t10, onInputChange: t11, placeholder: t12, autoFocus: t13, autoComplete: t14, onFocus: t15, onBlur: t16, onKeyDown: t17, delimiters: t18, validateTag: t19, shouldCommitOnBlur: t20, items: t21, children: t22, allowsCustomValue: t23, filter: t24, disabledKeys: t25, popoverTrigger: t26, onOpenChange: t27, hideTrigger: t28, direction: t29, shouldFlip: t30, overlayOffset: t31, containerPadding: t32, tagProps: t33, icon: t34, prefix: t35, suffix: t36, suffixPosition: t37, size: t38, isDisabled: t39, isReadOnly: t40, isRequired: t41, isLoading: t42, isInvalid: t43, isValid: t44, message: t45, errorMessage: t46, inputRef: t47, wrapperRef: t48, popoverRef: t49, listBoxRef: t50, wrapperStyles: t51, inputStyles: t52, tagListStyles: t53, tagStyles: t54, triggerStyles: t55, overlayStyles: t56, listBoxStyles: t57, optionStyles: t58, sectionStyles: t59, headingStyles: t60, labelProps: t61, mods: t62, className: t63, style: t64, qaVal: t65, name, form, ...t66 } = props;
148
+ qa = t3;
149
+ id = t4;
150
+ label = t5;
151
+ valueProp = t6;
152
+ defaultValue = t7;
153
+ onChange_0 = t8;
154
+ inputValueProp = t9;
155
+ defaultInputValue = t10;
156
+ onInputChange = t11;
157
+ placeholder = t12;
158
+ autoFocus = t13;
159
+ onFocus = t15;
160
+ onBlur = t16;
161
+ onKeyDown = t17;
162
+ validateTag = t19;
163
+ items = t21;
164
+ renderChildren = t22;
165
+ allowsCustomValue = t23;
166
+ filter = t24;
167
+ disabledKeys = t25;
168
+ onOpenChange = t27;
169
+ hideTrigger = t28;
170
+ tagProps = t33;
171
+ icon = t34;
172
+ prefix = t35;
173
+ suffix = t36;
174
+ suffixPosition = t37;
175
+ isDisabled = t39;
176
+ isReadOnly = t40;
177
+ isRequired = t41;
178
+ isLoading = t42;
179
+ isInvalid = t43;
180
+ isValid = t44;
181
+ message = t45;
182
+ errorMessage = t46;
183
+ inputRefProp = t47;
184
+ wrapperRefProp = t48;
185
+ popoverRefProp = t49;
186
+ listBoxRefProp = t50;
187
+ wrapperStyles = t51;
188
+ inputStyles = t52;
189
+ tagListStyles = t53;
190
+ tagStyles = t54;
191
+ triggerStyles = t55;
192
+ overlayStyles = t56;
193
+ listBoxStyles = t57;
194
+ optionStyles = t58;
195
+ sectionStyles = t59;
196
+ headingStyles = t60;
197
+ userLabelProps = t61;
198
+ mods = t62;
199
+ className = t63;
200
+ style = t64;
201
+ qaVal = t65;
202
+ otherProps = t66;
203
+ autoComplete = t14 === void 0 ? "off" : t14;
204
+ delimiters = t18 === void 0 ? DEFAULT_DELIMITERS : t18;
205
+ shouldCommitOnBlur = t20 === void 0 ? true : t20;
206
+ popoverTrigger = t26 === void 0 ? "input" : t26;
207
+ direction = t29 === void 0 ? "bottom" : t29;
208
+ shouldFlip = t30 === void 0 ? true : t30;
209
+ overlayOffset = t31 === void 0 ? 8 : t31;
210
+ containerPadding = t32 === void 0 ? 8 : t32;
211
+ size = t38 === void 0 ? "medium" : t38;
212
+ t2 = extractStyles(otherProps, CONTAINER_STYLES);
213
+ $[3] = props;
214
+ $[4] = allowsCustomValue;
215
+ $[5] = autoComplete;
216
+ $[6] = autoFocus;
217
+ $[7] = className;
218
+ $[8] = containerPadding;
219
+ $[9] = defaultInputValue;
220
+ $[10] = defaultValue;
221
+ $[11] = delimiters;
222
+ $[12] = direction;
223
+ $[13] = disabledKeys;
224
+ $[14] = errorMessage;
225
+ $[15] = filter;
226
+ $[16] = headingStyles;
227
+ $[17] = hideTrigger;
228
+ $[18] = icon;
229
+ $[19] = id;
230
+ $[20] = inputRefProp;
231
+ $[21] = inputStyles;
232
+ $[22] = inputValueProp;
233
+ $[23] = isDisabled;
234
+ $[24] = isInvalid;
235
+ $[25] = isLoading;
236
+ $[26] = isReadOnly;
237
+ $[27] = isRequired;
238
+ $[28] = isValid;
239
+ $[29] = items;
240
+ $[30] = label;
241
+ $[31] = listBoxRefProp;
242
+ $[32] = listBoxStyles;
243
+ $[33] = message;
244
+ $[34] = mods;
245
+ $[35] = onBlur;
246
+ $[36] = onChange_0;
247
+ $[37] = onFocus;
248
+ $[38] = onInputChange;
249
+ $[39] = onKeyDown;
250
+ $[40] = onOpenChange;
251
+ $[41] = optionStyles;
252
+ $[42] = otherProps;
253
+ $[43] = overlayOffset;
254
+ $[44] = overlayStyles;
255
+ $[45] = placeholder;
256
+ $[46] = popoverRefProp;
257
+ $[47] = popoverTrigger;
258
+ $[48] = prefix;
259
+ $[49] = qa;
260
+ $[50] = qaVal;
261
+ $[51] = renderChildren;
262
+ $[52] = sectionStyles;
263
+ $[53] = shouldCommitOnBlur;
264
+ $[54] = shouldFlip;
265
+ $[55] = size;
266
+ $[56] = style;
267
+ $[57] = suffix;
268
+ $[58] = suffixPosition;
269
+ $[59] = t2;
270
+ $[60] = tagListStyles;
271
+ $[61] = tagProps;
272
+ $[62] = tagStyles;
273
+ $[63] = triggerStyles;
274
+ $[64] = userLabelProps;
275
+ $[65] = validateTag;
276
+ $[66] = valueProp;
277
+ $[67] = wrapperRefProp;
278
+ $[68] = wrapperStyles;
279
+ } else {
280
+ allowsCustomValue = $[4];
281
+ autoComplete = $[5];
282
+ autoFocus = $[6];
283
+ className = $[7];
284
+ containerPadding = $[8];
285
+ defaultInputValue = $[9];
286
+ defaultValue = $[10];
287
+ delimiters = $[11];
288
+ direction = $[12];
289
+ disabledKeys = $[13];
290
+ errorMessage = $[14];
291
+ filter = $[15];
292
+ headingStyles = $[16];
293
+ hideTrigger = $[17];
294
+ icon = $[18];
295
+ id = $[19];
296
+ inputRefProp = $[20];
297
+ inputStyles = $[21];
298
+ inputValueProp = $[22];
299
+ isDisabled = $[23];
300
+ isInvalid = $[24];
301
+ isLoading = $[25];
302
+ isReadOnly = $[26];
303
+ isRequired = $[27];
304
+ isValid = $[28];
305
+ items = $[29];
306
+ label = $[30];
307
+ listBoxRefProp = $[31];
308
+ listBoxStyles = $[32];
309
+ message = $[33];
310
+ mods = $[34];
311
+ onBlur = $[35];
312
+ onChange_0 = $[36];
313
+ onFocus = $[37];
314
+ onInputChange = $[38];
315
+ onKeyDown = $[39];
316
+ onOpenChange = $[40];
317
+ optionStyles = $[41];
318
+ otherProps = $[42];
319
+ overlayOffset = $[43];
320
+ overlayStyles = $[44];
321
+ placeholder = $[45];
322
+ popoverRefProp = $[46];
323
+ popoverTrigger = $[47];
324
+ prefix = $[48];
325
+ qa = $[49];
326
+ qaVal = $[50];
327
+ renderChildren = $[51];
328
+ sectionStyles = $[52];
329
+ shouldCommitOnBlur = $[53];
330
+ shouldFlip = $[54];
331
+ size = $[55];
332
+ style = $[56];
333
+ suffix = $[57];
334
+ suffixPosition = $[58];
335
+ t2 = $[59];
336
+ tagListStyles = $[60];
337
+ tagProps = $[61];
338
+ tagStyles = $[62];
339
+ triggerStyles = $[63];
340
+ userLabelProps = $[64];
341
+ validateTag = $[65];
342
+ valueProp = $[66];
343
+ wrapperRefProp = $[67];
344
+ wrapperStyles = $[68];
345
+ }
346
+ const styles = t2;
347
+ const rootRef = useCombinedRefs(ref);
348
+ const inputRef = useCombinedRefs(inputRefProp);
349
+ const wrapperRef = useCombinedRefs(wrapperRefProp);
350
+ const popoverRef = useCombinedRefs(popoverRefProp);
351
+ const listBoxRef = useCombinedRefs(listBoxRefProp);
352
+ const tagListRef = useRef(null);
353
+ const listStateRef = useRef(null);
354
+ let t3;
355
+ if ($[69] === Symbol.for("react.memo_cache_sentinel")) {
356
+ t3 = generateRandomId();
357
+ $[69] = t3;
358
+ } else t3 = $[69];
359
+ const listBoxId = `TagInputListBox-${t3}`;
360
+ const tagListId = useId$1();
361
+ const summaryId = useId$1();
362
+ const triggerId = useId$1();
363
+ let t4;
364
+ if ($[70] !== defaultValue) {
365
+ t4 = defaultValue ?? [];
366
+ $[70] = defaultValue;
367
+ $[71] = t4;
368
+ } else t4 = $[71];
369
+ const [values, setValues] = useControlledState(valueProp, t4, onChange_0);
370
+ let t5;
371
+ if ($[72] !== values) {
372
+ t5 = new Set((values ?? []).map(String));
373
+ $[72] = values;
374
+ $[73] = t5;
375
+ } else t5 = $[73];
376
+ let t6;
377
+ if ($[74] !== t5) {
378
+ t6 = [...t5];
379
+ $[74] = t5;
380
+ $[75] = t6;
381
+ } else t6 = $[75];
382
+ const uniqueValues = t6;
383
+ const [draft, setDraftState] = useControlledState(inputValueProp, defaultInputValue ?? "", onInputChange);
384
+ const [tagError, setTagErrorState] = useState(null);
385
+ let t7;
386
+ if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
387
+ t7 = (text) => {
388
+ setTagErrorState((prev) => text == null ? null : {
389
+ id: (prev?.id ?? 0) + 1,
390
+ text
391
+ });
392
+ };
393
+ $[76] = t7;
394
+ } else t7 = $[76];
395
+ const setTagError = useEvent(t7);
396
+ let t8;
397
+ if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
398
+ t8 = {
399
+ id: 0,
400
+ text: ""
401
+ };
402
+ $[77] = t8;
403
+ } else t8 = $[77];
404
+ const [announcement, setAnnouncement] = useState(t8);
405
+ let children;
406
+ if ($[78] !== items || $[79] !== renderChildren) {
407
+ children = renderChildren;
408
+ if (items && typeof renderChildren === "function") children = Array.from(items).map((item, index) => {
409
+ const rendered = renderChildren(item);
410
+ if (isValidElement(rendered) && rendered.key == null) return cloneElement(rendered, { key: item?.key ?? item?.id ?? index });
411
+ return rendered;
412
+ });
413
+ $[78] = items;
414
+ $[79] = renderChildren;
415
+ $[80] = children;
416
+ } else children = $[80];
417
+ const hasOptions = children != null && children !== false;
418
+ const t9 = children;
419
+ let t10;
420
+ if ($[81] !== t9) {
421
+ t10 = {
422
+ children: t9,
423
+ selectionMode: "none"
424
+ };
425
+ $[81] = t9;
426
+ $[82] = t10;
427
+ } else t10 = $[82];
428
+ const collection = useListState(t10).collection;
429
+ let t11;
430
+ if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
431
+ t11 = { sensitivity: "base" };
432
+ $[83] = t11;
433
+ } else t11 = $[83];
434
+ const { contains } = useFilter(t11);
435
+ let t12;
436
+ if ($[84] === Symbol.for("react.memo_cache_sentinel")) {
437
+ const collator = new Intl.Collator(void 0, { sensitivity: "base" });
438
+ t12 = { isEqual: (a, b) => collator.compare(a, b) === 0 };
439
+ $[84] = t12;
440
+ } else t12 = $[84];
441
+ const { isEqual: isSameText } = t12;
442
+ let t13;
443
+ if ($[85] !== contains || $[86] !== filter) {
444
+ t13 = filter === false ? _temp2 : filter || contains;
445
+ $[85] = contains;
446
+ $[86] = filter;
447
+ $[87] = t13;
448
+ } else t13 = $[87];
449
+ const textFilterFn = t13;
450
+ const [isFilterActive, setIsFilterActive] = useState(false);
451
+ let t14;
452
+ if ($[88] !== draft) {
453
+ t14 = draft.trim();
454
+ $[88] = draft;
455
+ $[89] = t14;
456
+ } else t14 = $[89];
457
+ const term = t14;
458
+ const [knownLabels, setKnownLabels] = useState(_temp3);
459
+ let t15;
460
+ if ($[90] !== collection || $[91] !== knownLabels) {
461
+ t15 = (key) => collection.getItem(key)?.textValue || knownLabels.get(key) || key;
462
+ $[90] = collection;
463
+ $[91] = knownLabels;
464
+ $[92] = t15;
465
+ } else t15 = $[92];
466
+ const getOptionLabel = t15;
467
+ let t16;
468
+ if ($[93] !== disabledKeys) {
469
+ t16 = new Set([...disabledKeys ?? []].map(String));
470
+ $[93] = disabledKeys;
471
+ $[94] = t16;
472
+ } else t16 = $[94];
473
+ const disabledKeySet = t16;
474
+ let t17;
475
+ let t18;
476
+ if ($[95] !== collection || $[96] !== knownLabels || $[97] !== uniqueValues) {
477
+ t17 = () => {
478
+ let next = null;
479
+ for (const value_0 of uniqueValues) {
480
+ const label_0 = collection.getItem(value_0)?.textValue;
481
+ if (label_0 && knownLabels.get(value_0) !== label_0) {
482
+ if (!next) next = new Map(knownLabels);
483
+ next.set(value_0, label_0);
484
+ }
485
+ }
486
+ if (next) setKnownLabels(next);
487
+ };
488
+ t18 = [
489
+ uniqueValues,
490
+ collection,
491
+ knownLabels
492
+ ];
493
+ $[95] = collection;
494
+ $[96] = knownLabels;
495
+ $[97] = uniqueValues;
496
+ $[98] = t17;
497
+ $[99] = t18;
498
+ } else {
499
+ t17 = $[98];
500
+ t18 = $[99];
501
+ }
502
+ useEffect(t17, t18);
503
+ let t19;
504
+ if ($[100] !== collection || $[101] !== hasOptions) {
505
+ t19 = (text_0) => {
506
+ if (!hasOptions) return null;
507
+ for (const node of collection) {
508
+ const nodes = node.type === "section" ? [...node.childNodes] : [node];
509
+ for (const child of nodes) {
510
+ if (child.type !== "item") continue;
511
+ if (String(child.key) === text_0 || isSameText(child.textValue || "", text_0)) return String(child.key);
512
+ }
513
+ }
514
+ return null;
515
+ };
516
+ $[100] = collection;
517
+ $[101] = hasOptions;
518
+ $[102] = t19;
519
+ } else t19 = $[102];
520
+ const findOptionKey = t19;
521
+ let t20;
522
+ if ($[103] !== isFilterActive || $[104] !== term || $[105] !== textFilterFn) {
523
+ t20 = (nodes_0) => {
524
+ if (!isFilterActive || !term) return nodes_0;
525
+ return filterCollectionNodes(nodes_0, term, textFilterFn);
526
+ };
527
+ $[103] = isFilterActive;
528
+ $[104] = term;
529
+ $[105] = textFilterFn;
530
+ $[106] = t20;
531
+ } else t20 = $[106];
532
+ const optionFilterFn = t20;
533
+ let t21;
534
+ bb0: {
535
+ if (!hasOptions) {
536
+ let t22;
537
+ if ($[107] === Symbol.for("react.memo_cache_sentinel")) {
538
+ t22 = [];
539
+ $[107] = t22;
540
+ } else t22 = $[107];
541
+ t21 = t22;
542
+ break bb0;
543
+ }
544
+ let keys;
545
+ if ($[108] !== collection || $[109] !== disabledKeys || $[110] !== optionFilterFn) {
546
+ keys = [];
547
+ collectVisibleKeys(optionFilterFn(collection), keys, disabledKeys ? new Set(disabledKeys) : void 0);
548
+ $[108] = collection;
549
+ $[109] = disabledKeys;
550
+ $[110] = optionFilterFn;
551
+ $[111] = keys;
552
+ } else keys = $[111];
553
+ t21 = keys;
554
+ }
555
+ const visibleOptionKeys = t21;
556
+ const customTerm = hasOptions && allowsCustomValue && term && findOptionKey(term) == null && !uniqueValues.includes(term) ? term : null;
557
+ let t22;
558
+ bb1: {
559
+ if (!customTerm) {
560
+ t22 = children;
561
+ break bb1;
562
+ }
563
+ let t23;
564
+ if ($[112] !== customTerm) {
565
+ t23 = /* @__PURE__ */ jsx(_CollectionItem, {
566
+ textValue: customTerm,
567
+ children: customTerm
568
+ }, customTerm);
569
+ $[112] = customTerm;
570
+ $[113] = t23;
571
+ } else t23 = $[113];
572
+ const customOption = t23;
573
+ if (!visibleOptionKeys.length) {
574
+ t22 = customOption;
575
+ break bb1;
576
+ }
577
+ let t24;
578
+ if ($[114] !== t) {
579
+ t24 = t("tagInput.customValue", "Custom value");
580
+ $[114] = t;
581
+ $[115] = t24;
582
+ } else t24 = $[115];
583
+ let t25;
584
+ if ($[116] !== customOption || $[117] !== t24) {
585
+ t25 = /* @__PURE__ */ jsx(Section, {
586
+ "aria-label": t24,
587
+ children: customOption
588
+ }, "__custom_value__");
589
+ $[116] = customOption;
590
+ $[117] = t24;
591
+ $[118] = t25;
592
+ } else t25 = $[118];
593
+ const customSection = t25;
594
+ if ([...collection].some(_temp4)) {
595
+ let t26;
596
+ if ($[119] !== children) {
597
+ t26 = Array.isArray(children) ? children : [children];
598
+ $[119] = children;
599
+ $[120] = t26;
600
+ } else t26 = $[120];
601
+ let t27;
602
+ if ($[121] !== customSection || $[122] !== t26) {
603
+ t27 = [...t26, customSection];
604
+ $[121] = customSection;
605
+ $[122] = t26;
606
+ $[123] = t27;
607
+ } else t27 = $[123];
608
+ t22 = t27;
609
+ break bb1;
610
+ }
611
+ let t26;
612
+ if ($[124] !== t) {
613
+ t26 = t("tagInput.options", "Options");
614
+ $[124] = t;
615
+ $[125] = t26;
616
+ } else t26 = $[125];
617
+ const t27 = children;
618
+ let t28;
619
+ if ($[126] !== t26 || $[127] !== t27) {
620
+ t28 = /* @__PURE__ */ jsx(Section, {
621
+ "aria-label": t26,
622
+ children: t27
623
+ }, "__options__");
624
+ $[126] = t26;
625
+ $[127] = t27;
626
+ $[128] = t28;
627
+ } else t28 = $[128];
628
+ let t29;
629
+ if ($[129] !== customSection || $[130] !== t28) {
630
+ t29 = [t28, customSection];
631
+ $[129] = customSection;
632
+ $[130] = t28;
633
+ $[131] = t29;
634
+ } else t29 = $[131];
635
+ t22 = t29;
636
+ }
637
+ const popoverChildren = t22;
638
+ const hasResults = visibleOptionKeys.length > 0 || customTerm != null;
639
+ const visibleOptionsSignature = visibleOptionKeys.join("\0");
640
+ const [isPopoverOpen, setIsPopoverOpen] = useState(false);
641
+ const isInteractive = !isDisabled && !isReadOnly;
642
+ const shouldShowPopover = hasOptions && isInteractive && isPopoverOpen && hasResults;
643
+ let t23;
644
+ let t24;
645
+ if ($[132] !== hasOptions || $[133] !== hasResults || $[134] !== isPopoverOpen) {
646
+ t23 = () => {
647
+ if (isPopoverOpen && hasOptions && !hasResults) setIsPopoverOpen(false);
648
+ };
649
+ t24 = [
650
+ isPopoverOpen,
651
+ hasOptions,
652
+ hasResults
653
+ ];
654
+ $[132] = hasOptions;
655
+ $[133] = hasResults;
656
+ $[134] = isPopoverOpen;
657
+ $[135] = t23;
658
+ $[136] = t24;
659
+ } else {
660
+ t23 = $[135];
661
+ t24 = $[136];
662
+ }
663
+ useEffect(t23, t24);
664
+ const notifiedOpenRef = useRef(false);
665
+ let t25;
666
+ let t26;
667
+ if ($[137] !== onOpenChange || $[138] !== shouldShowPopover) {
668
+ t25 = () => {
669
+ if (notifiedOpenRef.current === shouldShowPopover) return;
670
+ notifiedOpenRef.current = shouldShowPopover;
671
+ onOpenChange?.(shouldShowPopover);
672
+ };
673
+ t26 = [shouldShowPopover, onOpenChange];
674
+ $[137] = onOpenChange;
675
+ $[138] = shouldShowPopover;
676
+ $[139] = t25;
677
+ $[140] = t26;
678
+ } else {
679
+ t25 = $[139];
680
+ t26 = $[140];
681
+ }
682
+ useEffect(t25, t26);
683
+ const [activeOptionKey, setActiveOptionKey] = useState(null);
684
+ let t27;
685
+ if ($[141] === Symbol.for("react.memo_cache_sentinel")) {
686
+ t27 = (key_0) => {
687
+ const listState = listStateRef.current;
688
+ if (!listState || key_0 == null) return;
689
+ markKeyboardFocus(listState);
690
+ listState.selectionManager.setFocusedKey(key_0);
691
+ setActiveOptionKey(key_0);
692
+ };
693
+ $[141] = t27;
694
+ } else t27 = $[141];
695
+ const moveVirtualFocus = useEvent(t27);
696
+ const [popoverMinWidth, setPopoverMinWidth] = useState();
697
+ const exactOptionKey = term ? findOptionKey(term) : null;
698
+ const focusTermRef = useRef(null);
699
+ let t28;
700
+ if ($[142] !== customTerm || $[143] !== exactOptionKey || $[144] !== moveVirtualFocus || $[145] !== shouldShowPopover || $[146] !== term || $[147] !== visibleOptionKeys || $[148] !== wrapperRef) {
701
+ t28 = () => {
702
+ if (!shouldShowPopover) {
703
+ setActiveOptionKey(null);
704
+ focusTermRef.current = null;
705
+ return;
706
+ }
707
+ setPopoverMinWidth(wrapperRef.current?.offsetWidth);
708
+ const visibleKeys = customTerm ? [...visibleOptionKeys, customTerm] : visibleOptionKeys;
709
+ const preferredKey = exactOptionKey != null && visibleKeys.includes(exactOptionKey) ? exactOptionKey : visibleKeys[0] ?? null;
710
+ const isNewTerm = !!term && focusTermRef.current !== term;
711
+ focusTermRef.current = term;
712
+ let attempts = 0;
713
+ const tick = () => {
714
+ const listState_0 = listStateRef.current;
715
+ if (!listState_0) {
716
+ attempts = attempts + 1;
717
+ if (attempts < 8) requestAnimationFrame(tick);
718
+ return;
719
+ }
720
+ const focused = listState_0.selectionManager.focusedKey;
721
+ if (focused == null || !visibleKeys.includes(focused) || isNewTerm) moveVirtualFocus(preferredKey);
722
+ };
723
+ requestAnimationFrame(() => requestAnimationFrame(tick));
724
+ };
725
+ $[142] = customTerm;
726
+ $[143] = exactOptionKey;
727
+ $[144] = moveVirtualFocus;
728
+ $[145] = shouldShowPopover;
729
+ $[146] = term;
730
+ $[147] = visibleOptionKeys;
731
+ $[148] = wrapperRef;
732
+ $[149] = t28;
733
+ } else t28 = $[149];
734
+ let t29;
735
+ if ($[150] !== customTerm || $[151] !== exactOptionKey || $[152] !== shouldShowPopover || $[153] !== term || $[154] !== visibleOptionsSignature) {
736
+ t29 = [
737
+ shouldShowPopover,
738
+ visibleOptionsSignature,
739
+ customTerm,
740
+ term,
741
+ exactOptionKey
742
+ ];
743
+ $[150] = customTerm;
744
+ $[151] = exactOptionKey;
745
+ $[152] = shouldShowPopover;
746
+ $[153] = term;
747
+ $[154] = visibleOptionsSignature;
748
+ $[155] = t29;
749
+ } else t29 = $[155];
750
+ useLayoutEffect(t28, t29);
751
+ let t30;
752
+ if ($[156] !== setDraftState) {
753
+ t30 = (next_0) => {
754
+ setDraftState(next_0);
755
+ setIsFilterActive(!!next_0.trim());
756
+ };
757
+ $[156] = setDraftState;
758
+ $[157] = t30;
759
+ } else t30 = $[157];
760
+ const setDraft = useEvent(t30);
761
+ let t31;
762
+ if ($[158] === Symbol.for("react.memo_cache_sentinel")) {
763
+ t31 = (text_1) => {
764
+ setAnnouncement((prev_0) => ({
765
+ id: prev_0.id + 1,
766
+ text: text_1
767
+ }));
768
+ };
769
+ $[158] = t31;
770
+ } else t31 = $[158];
771
+ const announce = useEvent(t31);
772
+ let t32;
773
+ if ($[159] !== t) {
774
+ t32 = (rejection) => {
775
+ if (rejection.message) return rejection.message;
776
+ switch (rejection.reason) {
777
+ case "duplicate": return t("tagInput.duplicateValue", "\"{{value}}\" is already added", { value: rejection.text });
778
+ case "unknown": return t("tagInput.unknownValue", "\"{{value}}\" is not in the list", { value: rejection.text });
779
+ case "unavailable": return t("tagInput.unavailableValue", "\"{{value}}\" is not available", { value: rejection.text });
780
+ default: return t("tagInput.invalidValue", "\"{{value}}\" is not a valid value", { value: rejection.text });
781
+ }
782
+ };
783
+ $[159] = t;
784
+ $[160] = t32;
785
+ } else t32 = $[160];
786
+ const rejectionMessage = useEvent(t32);
787
+ const joiner = delimiters[0] ? `${delimiters[0]} ` : " ";
788
+ const hasFieldMessage = !!label || !!props.forceField;
789
+ let t33;
790
+ if ($[161] !== allowsCustomValue || $[162] !== announce || $[163] !== disabledKeySet || $[164] !== findOptionKey || $[165] !== formatList || $[166] !== getOptionLabel || $[167] !== hasFieldMessage || $[168] !== hasOptions || $[169] !== joiner || $[170] !== rejectionMessage || $[171] !== setTagError || $[172] !== setValues || $[173] !== t || $[174] !== uniqueValues || $[175] !== validateTag) {
791
+ t33 = (parts) => {
792
+ if (!parts.length) return "";
793
+ const present = new Set(uniqueValues);
794
+ const accepted = [];
795
+ const rejected = [];
796
+ for (const part of parts) {
797
+ const optionKey = findOptionKey(part);
798
+ const nextValue = optionKey ?? part;
799
+ if (optionKey != null && disabledKeySet.has(optionKey)) {
800
+ rejected.push({
801
+ text: part,
802
+ reason: "unavailable"
803
+ });
804
+ continue;
805
+ }
806
+ if (optionKey == null && hasOptions && !allowsCustomValue) {
807
+ rejected.push({
808
+ text: part,
809
+ reason: "unknown"
810
+ });
811
+ continue;
812
+ }
813
+ if (present.has(nextValue)) {
814
+ rejected.push({
815
+ text: part,
816
+ reason: "duplicate"
817
+ });
818
+ continue;
819
+ }
820
+ if (optionKey == null && validateTag) {
821
+ const result = validateTag(nextValue);
822
+ if (result === false || typeof result === "string") {
823
+ rejected.push({
824
+ text: part,
825
+ reason: "invalid",
826
+ message: typeof result === "string" ? result : void 0
827
+ });
828
+ continue;
829
+ }
830
+ }
831
+ present.add(nextValue);
832
+ accepted.push(nextValue);
833
+ }
834
+ const error = rejected.length ? rejectionMessage(rejected[0]) : null;
835
+ const messages = [];
836
+ if (accepted.length) {
837
+ setValues([...uniqueValues, ...accepted]);
838
+ messages.push(t("tagInput.added", "Added {{value}}", { value: formatList(accepted.map(getOptionLabel)) }));
839
+ }
840
+ if (error && !hasFieldMessage) messages.push(error);
841
+ if (messages.length) announce(messages.join(" "));
842
+ setTagError(error);
843
+ return rejected.map(_temp5).join(joiner);
844
+ };
845
+ $[161] = allowsCustomValue;
846
+ $[162] = announce;
847
+ $[163] = disabledKeySet;
848
+ $[164] = findOptionKey;
849
+ $[165] = formatList;
850
+ $[166] = getOptionLabel;
851
+ $[167] = hasFieldMessage;
852
+ $[168] = hasOptions;
853
+ $[169] = joiner;
854
+ $[170] = rejectionMessage;
855
+ $[171] = setTagError;
856
+ $[172] = setValues;
857
+ $[173] = t;
858
+ $[174] = uniqueValues;
859
+ $[175] = validateTag;
860
+ $[176] = t33;
861
+ } else t33 = $[176];
862
+ const commitParts = useEvent(t33);
863
+ let t34;
864
+ if ($[177] !== commitParts || $[178] !== delimiters || $[179] !== draft || $[180] !== setDraft) {
865
+ t34 = () => {
866
+ setDraft(commitParts(splitTagText(draft, delimiters)));
867
+ };
868
+ $[177] = commitParts;
869
+ $[178] = delimiters;
870
+ $[179] = draft;
871
+ $[180] = setDraft;
872
+ $[181] = t34;
873
+ } else t34 = $[181];
874
+ const commitDraft = useEvent(t34);
875
+ let t35;
876
+ if ($[182] !== announce || $[183] !== formatList || $[184] !== getOptionLabel || $[185] !== inputRef || $[186] !== setTagError || $[187] !== setValues || $[188] !== t || $[189] !== uniqueValues) {
877
+ t35 = (keys_0) => {
878
+ const removed = new Set(keys_0);
879
+ const next_1 = uniqueValues.filter((value_1) => !removed.has(value_1));
880
+ if (!next_1.length) inputRef.current?.focus();
881
+ setValues(next_1);
882
+ setTagError(null);
883
+ announce(t("tagInput.removed", "Removed {{value}}", { value: formatList(keys_0.map(getOptionLabel)) }));
884
+ };
885
+ $[182] = announce;
886
+ $[183] = formatList;
887
+ $[184] = getOptionLabel;
888
+ $[185] = inputRef;
889
+ $[186] = setTagError;
890
+ $[187] = setValues;
891
+ $[188] = t;
892
+ $[189] = uniqueValues;
893
+ $[190] = t35;
894
+ } else t35 = $[190];
895
+ const removeValues = useEvent(t35);
896
+ let t36;
897
+ if ($[191] !== commitParts || $[192] !== removeValues || $[193] !== setDraft || $[194] !== setTagError || $[195] !== uniqueValues) {
898
+ t36 = (key_1) => {
899
+ setTagError(null);
900
+ if (uniqueValues.includes(key_1)) {
901
+ removeValues([key_1]);
902
+ setDraft("");
903
+ } else setDraft(commitParts([key_1]));
904
+ };
905
+ $[191] = commitParts;
906
+ $[192] = removeValues;
907
+ $[193] = setDraft;
908
+ $[194] = setTagError;
909
+ $[195] = uniqueValues;
910
+ $[196] = t36;
911
+ } else t36 = $[196];
912
+ const toggleOption = useEvent(t36);
913
+ let t37;
914
+ if ($[197] !== collection || $[198] !== customTerm || $[199] !== inputRef || $[200] !== toggleOption || $[201] !== uniqueValues) {
915
+ t37 = (selection) => {
916
+ if (!Array.isArray(selection)) return;
917
+ const next_2 = new Set(selection.map(String));
918
+ const changed = [...[...next_2].filter((key_2) => !uniqueValues.includes(key_2)), ...uniqueValues.filter((value_2) => !next_2.has(value_2) && (collection.getItem(value_2) != null || value_2 === customTerm))];
919
+ changed.forEach(toggleOption);
920
+ const clicked = changed[changed.length - 1];
921
+ if (clicked != null) {
922
+ listStateRef.current?.selectionManager.setFocusedKey(clicked);
923
+ setActiveOptionKey(clicked);
924
+ }
925
+ setTimeout(() => inputRef.current?.focus(), 0);
926
+ };
927
+ $[197] = collection;
928
+ $[198] = customTerm;
929
+ $[199] = inputRef;
930
+ $[200] = toggleOption;
931
+ $[201] = uniqueValues;
932
+ $[202] = t37;
933
+ } else t37 = $[202];
934
+ const handlePopoverSelection = useEvent(t37);
935
+ const isTabbingRef = useRef(false);
936
+ let t38;
937
+ if ($[203] !== commitDraft || $[204] !== commitParts || $[205] !== delimiters || $[206] !== draft || $[207] !== hasOptions || $[208] !== hasResults || $[209] !== isInteractive || $[210] !== joiner || $[211] !== moveVirtualFocus || $[212] !== onKeyDown || $[213] !== setDraft || $[214] !== setTagError || $[215] !== shouldShowPopover || $[216] !== term || $[217] !== toggleOption) {
938
+ t38 = (e) => {
939
+ isTabbingRef.current = e.key === "Tab";
940
+ onKeyDown?.(e);
941
+ if (e.defaultPrevented || !isInteractive) return;
942
+ const listState_1 = listStateRef.current;
943
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
944
+ if (!hasOptions) return;
945
+ e.preventDefault();
946
+ if (!shouldShowPopover) {
947
+ if (!hasResults) setIsFilterActive(false);
948
+ setIsPopoverOpen(true);
949
+ return;
950
+ }
951
+ if (listState_1) moveVirtualFocus(getNextVisibleKey(listState_1, e.key === "ArrowDown" ? 1 : -1));
952
+ return;
953
+ }
954
+ if ((e.key === "Home" || e.key === "End") && shouldShowPopover) {
955
+ e.preventDefault();
956
+ if (listState_1) moveVirtualFocus(getEdgeVisibleKey(listState_1, e.key === "Home" ? "first" : "last"));
957
+ return;
958
+ }
959
+ if (e.key === "Enter") {
960
+ if (isComposingKey(e)) return;
961
+ const focusedKey = shouldShowPopover ? listState_1?.selectionManager.focusedKey : null;
962
+ if (focusedKey != null) {
963
+ e.preventDefault();
964
+ toggleOption(String(focusedKey));
965
+ return;
966
+ }
967
+ if (!term) return;
968
+ e.preventDefault();
969
+ commitDraft();
970
+ return;
971
+ }
972
+ if (delimiters.includes(e.key)) {
973
+ if (isComposingKey(e)) return;
974
+ e.preventDefault();
975
+ const el = e.currentTarget;
976
+ const start = el.selectionStart ?? draft.length;
977
+ const end = el.selectionEnd ?? start;
978
+ setDraft([commitParts(splitTagText(draft.slice(0, start), delimiters)), draft.slice(end).trimStart()].filter(Boolean).join(joiner));
979
+ return;
980
+ }
981
+ if (e.key === "Escape") {
982
+ if (shouldShowPopover) {
983
+ e.preventDefault();
984
+ e.stopPropagation();
985
+ setIsPopoverOpen(false);
986
+ } else if (draft) {
987
+ e.preventDefault();
988
+ e.stopPropagation();
989
+ setDraft("");
990
+ setTagError(null);
991
+ }
992
+ }
993
+ };
994
+ $[203] = commitDraft;
995
+ $[204] = commitParts;
996
+ $[205] = delimiters;
997
+ $[206] = draft;
998
+ $[207] = hasOptions;
999
+ $[208] = hasResults;
1000
+ $[209] = isInteractive;
1001
+ $[210] = joiner;
1002
+ $[211] = moveVirtualFocus;
1003
+ $[212] = onKeyDown;
1004
+ $[213] = setDraft;
1005
+ $[214] = setTagError;
1006
+ $[215] = shouldShowPopover;
1007
+ $[216] = term;
1008
+ $[217] = toggleOption;
1009
+ $[218] = t38;
1010
+ } else t38 = $[218];
1011
+ const handleKeyDown = useEvent(t38);
1012
+ let t39;
1013
+ if ($[219] !== commitParts || $[220] !== delimiters || $[221] !== hasOptions || $[222] !== joiner || $[223] !== popoverTrigger || $[224] !== setDraft || $[225] !== setTagError) {
1014
+ t39 = (next_3) => {
1015
+ setTagError(null);
1016
+ const pattern = delimiterPattern(delimiters);
1017
+ const parts_0 = pattern ? next_3.split(pattern) : [next_3];
1018
+ let nextDraft = next_3;
1019
+ if (parts_0.length > 1) {
1020
+ const rest = (parts_0.pop() ?? "").trimStart();
1021
+ nextDraft = [commitParts(parts_0.map(_temp6).filter(Boolean)), rest].filter(Boolean).join(joiner);
1022
+ }
1023
+ setDraft(nextDraft);
1024
+ if (hasOptions && popoverTrigger !== "manual" && nextDraft.trim()) setIsPopoverOpen(true);
1025
+ };
1026
+ $[219] = commitParts;
1027
+ $[220] = delimiters;
1028
+ $[221] = hasOptions;
1029
+ $[222] = joiner;
1030
+ $[223] = popoverTrigger;
1031
+ $[224] = setDraft;
1032
+ $[225] = setTagError;
1033
+ $[226] = t39;
1034
+ } else t39 = $[226];
1035
+ const handleInputChange = useEvent(t39);
1036
+ let t40;
1037
+ if ($[227] !== commitParts || $[228] !== delimiters || $[229] !== draft || $[230] !== isInteractive || $[231] !== setDraft || $[232] !== setTagError) {
1038
+ t40 = (e_0) => {
1039
+ if (!isInteractive) return;
1040
+ const pasted = e_0.clipboardData.getData("text");
1041
+ if (!pasted || splitTagText(pasted, delimiters).length < 2) return;
1042
+ e_0.preventDefault();
1043
+ const el_0 = e_0.currentTarget;
1044
+ const start_0 = el_0.selectionStart ?? draft.length;
1045
+ const end_0 = el_0.selectionEnd ?? draft.length;
1046
+ setTagError(null);
1047
+ setDraft(commitParts(splitTagText(`${draft.slice(0, start_0)}\n${pasted}\n${draft.slice(end_0)}`, delimiters)));
1048
+ };
1049
+ $[227] = commitParts;
1050
+ $[228] = delimiters;
1051
+ $[229] = draft;
1052
+ $[230] = isInteractive;
1053
+ $[231] = setDraft;
1054
+ $[232] = setTagError;
1055
+ $[233] = t40;
1056
+ } else t40 = $[233];
1057
+ const handlePaste = useEvent(t40);
1058
+ let t41;
1059
+ if ($[234] !== allowsCustomValue || $[235] !== commitDraft || $[236] !== findOptionKey || $[237] !== hasOptions || $[238] !== isInteractive || $[239] !== setDraft || $[240] !== setTagError || $[241] !== shouldCommitOnBlur || $[242] !== term) {
1060
+ t41 = () => {
1061
+ if (!term || !shouldCommitOnBlur || !isInteractive) return;
1062
+ if (hasOptions && !allowsCustomValue && findOptionKey(term) == null) {
1063
+ setDraft("");
1064
+ setTagError(null);
1065
+ } else commitDraft();
1066
+ };
1067
+ $[234] = allowsCustomValue;
1068
+ $[235] = commitDraft;
1069
+ $[236] = findOptionKey;
1070
+ $[237] = hasOptions;
1071
+ $[238] = isInteractive;
1072
+ $[239] = setDraft;
1073
+ $[240] = setTagError;
1074
+ $[241] = shouldCommitOnBlur;
1075
+ $[242] = term;
1076
+ $[243] = t41;
1077
+ } else t41 = $[243];
1078
+ const settleDraft = useEvent(t41);
1079
+ let t42;
1080
+ if ($[244] !== onBlur || $[245] !== settleDraft) {
1081
+ t42 = () => {
1082
+ setIsPopoverOpen(false);
1083
+ settleDraft();
1084
+ onBlur?.();
1085
+ };
1086
+ $[244] = onBlur;
1087
+ $[245] = settleDraft;
1088
+ $[246] = t42;
1089
+ } else t42 = $[246];
1090
+ const handleCompositeBlur = useEvent(t42);
1091
+ const t43 = rootRef;
1092
+ const t44 = popoverRef;
1093
+ let t45;
1094
+ if ($[247] !== handleCompositeBlur || $[248] !== isDisabled || $[249] !== onFocus || $[250] !== t43 || $[251] !== t44) {
1095
+ t45 = {
1096
+ wrapperRef: t43,
1097
+ popoverRef: t44,
1098
+ onFocus,
1099
+ onBlur: handleCompositeBlur,
1100
+ isDisabled
1101
+ };
1102
+ $[247] = handleCompositeBlur;
1103
+ $[248] = isDisabled;
1104
+ $[249] = onFocus;
1105
+ $[250] = t43;
1106
+ $[251] = t44;
1107
+ $[252] = t45;
1108
+ } else t45 = $[252];
1109
+ const { compositeFocusProps } = useCompositeFocus(t45);
1110
+ let t46;
1111
+ if ($[253] !== rootRef || $[254] !== settleDraft) {
1112
+ t46 = (e_1) => {
1113
+ const isTabbing = isTabbingRef.current;
1114
+ const next_4 = e_1.relatedTarget;
1115
+ isTabbingRef.current = false;
1116
+ if (!isTabbing || !next_4 || !rootRef.current?.contains(next_4)) return;
1117
+ setIsPopoverOpen(false);
1118
+ settleDraft();
1119
+ };
1120
+ $[253] = rootRef;
1121
+ $[254] = settleDraft;
1122
+ $[255] = t46;
1123
+ } else t46 = $[255];
1124
+ const handleInputBlur = useEvent(t46);
1125
+ let t47;
1126
+ if ($[256] !== hasOptions || $[257] !== isInteractive || $[258] !== popoverTrigger) {
1127
+ t47 = () => {
1128
+ if (hasOptions && popoverTrigger === "focus" && isInteractive) setIsPopoverOpen(true);
1129
+ };
1130
+ $[256] = hasOptions;
1131
+ $[257] = isInteractive;
1132
+ $[258] = popoverTrigger;
1133
+ $[259] = t47;
1134
+ } else t47 = $[259];
1135
+ const handleInputFocus = useEvent(t47);
1136
+ let t48;
1137
+ if ($[260] !== collection || $[261] !== getOptionLabel || $[262] !== knownLabels || $[263] !== t || $[264] !== tagProps || $[265] !== uniqueValues || $[266] !== validateTag) {
1138
+ t48 = uniqueValues.map((value_3) => {
1139
+ const result_0 = !(collection.getItem(value_3) != null || knownLabels.has(value_3)) && validateTag ? validateTag(value_3) : true;
1140
+ const label_1 = getOptionLabel(value_3);
1141
+ return {
1142
+ key: value_3,
1143
+ label: label_1,
1144
+ invalidMessage: typeof result_0 === "string" ? result_0 : result_0 === false ? t("tagInput.invalidValue", "\"{{value}}\" is not a valid value", { value: label_1 }) : void 0,
1145
+ tagProps: tagProps?.(value_3)
1146
+ };
1147
+ });
1148
+ $[260] = collection;
1149
+ $[261] = getOptionLabel;
1150
+ $[262] = knownLabels;
1151
+ $[263] = t;
1152
+ $[264] = tagProps;
1153
+ $[265] = uniqueValues;
1154
+ $[266] = validateTag;
1155
+ $[267] = t48;
1156
+ } else t48 = $[267];
1157
+ const tags = t48;
1158
+ const effectiveIsInvalid = tagError ? true : isInvalid;
1159
+ let t49;
1160
+ if ($[268] !== autoFocus || $[269] !== draft || $[270] !== effectiveIsInvalid || $[271] !== handleInputChange || $[272] !== id || $[273] !== isDisabled || $[274] !== isReadOnly || $[275] !== isRequired || $[276] !== label || $[277] !== otherProps || $[278] !== placeholder) {
1161
+ t49 = {
1162
+ ...otherProps,
1163
+ id,
1164
+ label,
1165
+ value: draft,
1166
+ placeholder,
1167
+ isDisabled,
1168
+ isReadOnly,
1169
+ isRequired,
1170
+ isInvalid: effectiveIsInvalid,
1171
+ autoFocus,
1172
+ onChange: handleInputChange
1173
+ };
1174
+ $[268] = autoFocus;
1175
+ $[269] = draft;
1176
+ $[270] = effectiveIsInvalid;
1177
+ $[271] = handleInputChange;
1178
+ $[272] = id;
1179
+ $[273] = isDisabled;
1180
+ $[274] = isReadOnly;
1181
+ $[275] = isRequired;
1182
+ $[276] = label;
1183
+ $[277] = otherProps;
1184
+ $[278] = placeholder;
1185
+ $[279] = t49;
1186
+ } else t49 = $[279];
1187
+ const { labelProps, inputProps } = useTextField(t49, inputRef);
1188
+ const labelId = label ? labelProps.id : void 0;
1189
+ let t50;
1190
+ if ($[280] !== activeOptionKey || $[281] !== autoComplete || $[282] !== handleInputBlur || $[283] !== handleInputFocus || $[284] !== handleKeyDown || $[285] !== handlePaste || $[286] !== hasOptions || $[287] !== inputProps || $[288] !== shouldShowPopover || $[289] !== summaryId || $[290] !== uniqueValues.length) {
1191
+ let t51;
1192
+ if ($[292] !== inputProps || $[293] !== summaryId || $[294] !== uniqueValues.length) {
1193
+ t51 = [inputProps["aria-describedby"], uniqueValues.length ? summaryId : null].filter(Boolean).join(" ") || void 0;
1194
+ $[292] = inputProps;
1195
+ $[293] = summaryId;
1196
+ $[294] = uniqueValues.length;
1197
+ $[295] = t51;
1198
+ } else t51 = $[295];
1199
+ t50 = mergeProps$1(inputProps, {
1200
+ onKeyDown: handleKeyDown,
1201
+ onPaste: handlePaste,
1202
+ onBlur: handleInputBlur,
1203
+ onFocus: handleInputFocus,
1204
+ autoComplete,
1205
+ "data-input-type": "taginput",
1206
+ "aria-describedby": t51
1207
+ }, hasOptions ? {
1208
+ role: "combobox",
1209
+ "aria-autocomplete": "list",
1210
+ "aria-haspopup": "listbox",
1211
+ "aria-expanded": shouldShowPopover,
1212
+ "aria-controls": shouldShowPopover ? listBoxId : void 0,
1213
+ "aria-activedescendant": shouldShowPopover && activeOptionKey != null ? getListBoxOptionId(listBoxId, activeOptionKey) : void 0
1214
+ } : null);
1215
+ $[280] = activeOptionKey;
1216
+ $[281] = autoComplete;
1217
+ $[282] = handleInputBlur;
1218
+ $[283] = handleInputFocus;
1219
+ $[284] = handleKeyDown;
1220
+ $[285] = handlePaste;
1221
+ $[286] = hasOptions;
1222
+ $[287] = inputProps;
1223
+ $[288] = shouldShowPopover;
1224
+ $[289] = summaryId;
1225
+ $[290] = uniqueValues.length;
1226
+ $[291] = t50;
1227
+ } else t50 = $[291];
1228
+ const tagInputProps = t50;
1229
+ let t51;
1230
+ if ($[296] !== hasResults || $[297] !== inputRef || $[298] !== shouldShowPopover) {
1231
+ t51 = () => {
1232
+ const willOpen = !shouldShowPopover;
1233
+ if (willOpen && !hasResults) setIsFilterActive(false);
1234
+ setIsPopoverOpen(willOpen);
1235
+ inputRef.current?.focus();
1236
+ };
1237
+ $[296] = hasResults;
1238
+ $[297] = inputRef;
1239
+ $[298] = shouldShowPopover;
1240
+ $[299] = t51;
1241
+ } else t51 = $[299];
1242
+ const handleTriggerPress = useEvent(t51);
1243
+ let t52;
1244
+ if ($[300] !== handleTriggerPress || $[301] !== hasOptions || $[302] !== hideTrigger || $[303] !== isInteractive || $[304] !== labelId || $[305] !== shouldShowPopover || $[306] !== size || $[307] !== t || $[308] !== triggerId || $[309] !== triggerStyles) {
1245
+ t52 = hasOptions && !hideTrigger ? /* @__PURE__ */ jsx(ItemAction, {
1246
+ "data-popover-trigger": true,
1247
+ id: triggerId,
1248
+ qa: "TagInputTrigger",
1249
+ icon: /* @__PURE__ */ jsx(DirectionIcon, { to: shouldShowPopover ? "up" : "down" }),
1250
+ size,
1251
+ isDisabled: !isInteractive,
1252
+ styles: triggerStyles,
1253
+ mods: { pressed: shouldShowPopover },
1254
+ tabIndex: -1,
1255
+ "aria-expanded": shouldShowPopover,
1256
+ "aria-haspopup": "listbox",
1257
+ "aria-label": t("tagInput.showOptions", "Show options"),
1258
+ "aria-labelledby": labelId ? `${triggerId} ${labelId}` : void 0,
1259
+ onPress: handleTriggerPress
1260
+ }) : null;
1261
+ $[300] = handleTriggerPress;
1262
+ $[301] = hasOptions;
1263
+ $[302] = hideTrigger;
1264
+ $[303] = isInteractive;
1265
+ $[304] = labelId;
1266
+ $[305] = shouldShowPopover;
1267
+ $[306] = size;
1268
+ $[307] = t;
1269
+ $[308] = triggerId;
1270
+ $[309] = triggerStyles;
1271
+ $[310] = t52;
1272
+ } else t52 = $[310];
1273
+ const trigger = t52;
1274
+ const t53 = qa || "TagInput";
1275
+ let t54;
1276
+ if ($[311] !== hasOptions) {
1277
+ t54 = hasOptions ? { "data-popover-keep": "" } : void 0;
1278
+ $[311] = hasOptions;
1279
+ $[312] = t54;
1280
+ } else t54 = $[312];
1281
+ let t55;
1282
+ if ($[313] !== autoFocus || $[314] !== effectiveIsInvalid || $[315] !== icon || $[316] !== inputRef || $[317] !== inputStyles || $[318] !== isDisabled || $[319] !== isLoading || $[320] !== isValid || $[321] !== mods || $[322] !== prefix || $[323] !== size || $[324] !== suffix || $[325] !== suffixPosition || $[326] !== t53 || $[327] !== t54 || $[328] !== tagInputProps || $[329] !== trigger || $[330] !== wrapperRef || $[331] !== wrapperStyles) {
1283
+ t55 = /* @__PURE__ */ jsx(TextInputBase, {
1284
+ qa: t53,
1285
+ inputRef,
1286
+ wrapperRef,
1287
+ wrapperProps: t54,
1288
+ inputProps: tagInputProps,
1289
+ mods,
1290
+ icon,
1291
+ prefix,
1292
+ suffix,
1293
+ suffixPosition,
1294
+ actions: trigger,
1295
+ size,
1296
+ autoFocus,
1297
+ isDisabled,
1298
+ isLoading,
1299
+ isInvalid: effectiveIsInvalid,
1300
+ isValid,
1301
+ styles: wrapperStyles,
1302
+ inputStyles
1303
+ });
1304
+ $[313] = autoFocus;
1305
+ $[314] = effectiveIsInvalid;
1306
+ $[315] = icon;
1307
+ $[316] = inputRef;
1308
+ $[317] = inputStyles;
1309
+ $[318] = isDisabled;
1310
+ $[319] = isLoading;
1311
+ $[320] = isValid;
1312
+ $[321] = mods;
1313
+ $[322] = prefix;
1314
+ $[323] = size;
1315
+ $[324] = suffix;
1316
+ $[325] = suffixPosition;
1317
+ $[326] = t53;
1318
+ $[327] = t54;
1319
+ $[328] = tagInputProps;
1320
+ $[329] = trigger;
1321
+ $[330] = wrapperRef;
1322
+ $[331] = wrapperStyles;
1323
+ $[332] = t55;
1324
+ } else t55 = $[332];
1325
+ let t56;
1326
+ if ($[333] !== isDisabled || $[334] !== isReadOnly || $[335] !== labelId || $[336] !== removeValues || $[337] !== size || $[338] !== t || $[339] !== tagListId || $[340] !== tagListStyles || $[341] !== tagStyles || $[342] !== tags) {
1327
+ t56 = tags.length ? /* @__PURE__ */ jsx(TagList, {
1328
+ id: tagListId,
1329
+ listRef: tagListRef,
1330
+ "aria-label": t("tagInput.selectedValues", "Selected values"),
1331
+ "aria-labelledby": labelId,
1332
+ tags,
1333
+ size: TAG_SIZES[size] ?? "xsmall",
1334
+ isDisabled,
1335
+ isReadOnly,
1336
+ styles: tagListStyles,
1337
+ tagStyles,
1338
+ onRemove: removeValues
1339
+ }) : null;
1340
+ $[333] = isDisabled;
1341
+ $[334] = isReadOnly;
1342
+ $[335] = labelId;
1343
+ $[336] = removeValues;
1344
+ $[337] = size;
1345
+ $[338] = t;
1346
+ $[339] = tagListId;
1347
+ $[340] = tagListStyles;
1348
+ $[341] = tagStyles;
1349
+ $[342] = tags;
1350
+ $[343] = t56;
1351
+ } else t56 = $[343];
1352
+ let t57;
1353
+ if ($[344] !== formatList || $[345] !== t || $[346] !== tags) {
1354
+ t57 = tags.length ? t("tagInput.summary", "Selected: {{values}}", { values: formatList(tags.map(_temp7)) }) : null;
1355
+ $[344] = formatList;
1356
+ $[345] = t;
1357
+ $[346] = tags;
1358
+ $[347] = t57;
1359
+ } else t57 = $[347];
1360
+ let t58;
1361
+ if ($[348] !== summaryId || $[349] !== t57) {
1362
+ t58 = /* @__PURE__ */ jsx("span", {
1363
+ hidden: true,
1364
+ id: summaryId,
1365
+ children: t57
1366
+ });
1367
+ $[348] = summaryId;
1368
+ $[349] = t57;
1369
+ $[350] = t58;
1370
+ } else t58 = $[350];
1371
+ let t59;
1372
+ if ($[351] !== announcement.id || $[352] !== announcement.text) {
1373
+ t59 = /* @__PURE__ */ jsx(VisuallyHidden, {
1374
+ role: "status",
1375
+ "aria-live": "polite",
1376
+ "aria-atomic": "true",
1377
+ children: /* @__PURE__ */ jsx("span", { children: announcement.text }, announcement.id)
1378
+ });
1379
+ $[351] = announcement.id;
1380
+ $[352] = announcement.text;
1381
+ $[353] = t59;
1382
+ } else t59 = $[353];
1383
+ let t60;
1384
+ if ($[354] !== compositeFocusProps || $[355] !== containerPadding || $[356] !== direction || $[357] !== disabledKeys || $[358] !== handlePopoverSelection || $[359] !== hasOptions || $[360] !== headingStyles || $[361] !== isDisabled || $[362] !== isFilterActive || $[363] !== label || $[364] !== listBoxRef || $[365] !== listBoxStyles || $[366] !== optionFilterFn || $[367] !== optionStyles || $[368] !== overlayOffset || $[369] !== overlayStyles || $[370] !== popoverChildren || $[371] !== popoverMinWidth || $[372] !== popoverRef || $[373] !== props || $[374] !== sectionStyles || $[375] !== shouldFlip || $[376] !== shouldShowPopover || $[377] !== size || $[378] !== term || $[379] !== uniqueValues || $[380] !== wrapperRef) {
1385
+ t60 = hasOptions ? /* @__PURE__ */ jsx(ListBoxPopover, {
1386
+ isOpen: shouldShowPopover,
1387
+ triggerRef: wrapperRef,
1388
+ popoverRef,
1389
+ listBoxRef,
1390
+ direction,
1391
+ shouldFlip,
1392
+ overlayOffset,
1393
+ containerPadding,
1394
+ comboBoxWidth: popoverMinWidth,
1395
+ listBoxId,
1396
+ overlayStyles,
1397
+ listBoxStyles,
1398
+ optionStyles,
1399
+ optionHighlight: isFilterActive ? term : void 0,
1400
+ sectionStyles,
1401
+ headingStyles,
1402
+ selectionMode: "multiple",
1403
+ selectedKeys: uniqueValues,
1404
+ isCheckable: true,
1405
+ isDisabled,
1406
+ disabledKeys,
1407
+ listStateRef,
1408
+ label,
1409
+ ariaLabel: props["aria-label"],
1410
+ compositeFocusProps,
1411
+ filter: optionFilterFn,
1412
+ size,
1413
+ onSelectionChange: handlePopoverSelection,
1414
+ onClose: () => setIsPopoverOpen(false),
1415
+ children: popoverChildren
1416
+ }) : null;
1417
+ $[354] = compositeFocusProps;
1418
+ $[355] = containerPadding;
1419
+ $[356] = direction;
1420
+ $[357] = disabledKeys;
1421
+ $[358] = handlePopoverSelection;
1422
+ $[359] = hasOptions;
1423
+ $[360] = headingStyles;
1424
+ $[361] = isDisabled;
1425
+ $[362] = isFilterActive;
1426
+ $[363] = label;
1427
+ $[364] = listBoxRef;
1428
+ $[365] = listBoxStyles;
1429
+ $[366] = optionFilterFn;
1430
+ $[367] = optionStyles;
1431
+ $[368] = overlayOffset;
1432
+ $[369] = overlayStyles;
1433
+ $[370] = popoverChildren;
1434
+ $[371] = popoverMinWidth;
1435
+ $[372] = popoverRef;
1436
+ $[373] = props;
1437
+ $[374] = sectionStyles;
1438
+ $[375] = shouldFlip;
1439
+ $[376] = shouldShowPopover;
1440
+ $[377] = size;
1441
+ $[378] = term;
1442
+ $[379] = uniqueValues;
1443
+ $[380] = wrapperRef;
1444
+ $[381] = t60;
1445
+ } else t60 = $[381];
1446
+ let t61;
1447
+ if ($[382] !== className || $[383] !== compositeFocusProps || $[384] !== qaVal || $[385] !== rootRef || $[386] !== style || $[387] !== styles || $[388] !== t55 || $[389] !== t56 || $[390] !== t58 || $[391] !== t59 || $[392] !== t60) {
1448
+ t61 = /* @__PURE__ */ jsxs(TagInputElement, {
1449
+ ref: rootRef,
1450
+ className,
1451
+ style,
1452
+ qaVal,
1453
+ styles,
1454
+ ...compositeFocusProps,
1455
+ children: [
1456
+ t55,
1457
+ t56,
1458
+ t58,
1459
+ t59,
1460
+ t60
1461
+ ]
1462
+ });
1463
+ $[382] = className;
1464
+ $[383] = compositeFocusProps;
1465
+ $[384] = qaVal;
1466
+ $[385] = rootRef;
1467
+ $[386] = style;
1468
+ $[387] = styles;
1469
+ $[388] = t55;
1470
+ $[389] = t56;
1471
+ $[390] = t58;
1472
+ $[391] = t59;
1473
+ $[392] = t60;
1474
+ $[393] = t61;
1475
+ } else t61 = $[393];
1476
+ const tagInputField = t61;
1477
+ const { children: _children, ...fieldProps } = props;
1478
+ const fieldRef = useCombinedRefs();
1479
+ let t62;
1480
+ if ($[394] !== message || $[395] !== tagError) {
1481
+ t62 = tagError ? /* @__PURE__ */ jsx("span", { children: tagError.text }, tagError.id) : message;
1482
+ $[394] = message;
1483
+ $[395] = tagError;
1484
+ $[396] = t62;
1485
+ } else t62 = $[396];
1486
+ return wrapWithField(tagInputField, fieldRef, {
1487
+ ...fieldProps,
1488
+ labelProps: mergeProps$1(labelProps, userLabelProps),
1489
+ isInvalid: effectiveIsInvalid,
1490
+ message: t62,
1491
+ errorMessage: tagError ? void 0 : errorMessage
1492
+ });
1493
+ }
1494
+ /**
1495
+ * A field for a list of values, shown as removable chips below a single-line
1496
+ * input. Values are typed (Enter or a separator commits them) or picked from
1497
+ * suggested options.
1498
+ */
1499
+ function _temp7(tag) {
1500
+ return tag.label;
1501
+ }
1502
+ function _temp6(part_0) {
1503
+ return part_0.trim();
1504
+ }
1505
+ function _temp5(rejection_0) {
1506
+ return rejection_0.text;
1507
+ }
1508
+ function _temp4(node_0) {
1509
+ return node_0.type === "section";
1510
+ }
1511
+ function _temp3() {
1512
+ return /* @__PURE__ */ new Map();
1513
+ }
1514
+ function _temp2() {
1515
+ return true;
1516
+ }
1517
+ function _temp(t0) {
1518
+ const { value, onChange } = t0;
1519
+ return {
1520
+ value: value ?? [],
1521
+ onChange
1522
+ };
1523
+ }
1524
+ const _TagInput = forwardRef(TagInput);
1525
+ Object.assign(_TagInput, {
1526
+ Item: _CollectionItem,
1527
+ Section,
1528
+ displayName: "TagInput"
1529
+ });
1530
+ Object.defineProperty(_TagInput, "cubeInputType", {
1531
+ value: "CheckboxGroup",
1532
+ enumerable: false,
1533
+ configurable: false
1534
+ });
1535
+
1536
+ //#endregion
1537
+ export { _TagInput };
1538
+ //# sourceMappingURL=TagInput.js.map