@cube-dev/ui-kit 0.190.2 → 0.190.4

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