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

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