@cube-dev/ui-kit 0.0.0-canary-ac46c4b → 0.0.0-canary-9bde021

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 (621) hide show
  1. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  2. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  3. package/dist/_internal/hooks/use-event.js +1 -1
  4. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  5. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  6. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  7. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  8. package/dist/_internal/hooks/use-warn.js +1 -1
  9. package/dist/components/Block.js +1 -1
  10. package/dist/components/CollectionItem.js +1 -1
  11. package/dist/components/GlobalStyles.js +1 -1
  12. package/dist/components/GridProvider.js +1 -1
  13. package/dist/components/HiddenInput.js +1 -1
  14. package/dist/components/Root.js +1 -1
  15. package/dist/components/actions/Action/Action.js +1 -1
  16. package/dist/components/actions/Banner/Banner.js +1 -1
  17. package/dist/components/actions/Button/Button.js +1 -1
  18. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  19. package/dist/components/actions/ButtonSplit/ButtonSplit.js +2 -1
  20. package/dist/components/actions/ButtonSplit/ButtonSplit.js.map +1 -1
  21. package/dist/components/actions/ButtonSplit/context.js +1 -1
  22. package/dist/components/actions/CommandMenu/CommandMenu.js +1 -8
  23. package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
  24. package/dist/components/actions/CommandMenu/styled.js +1 -1
  25. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  26. package/dist/components/actions/ItemActionContext.js +1 -1
  27. package/dist/components/actions/ItemActionsWrapper.js +1 -1
  28. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  29. package/dist/components/actions/Link/Link.js +1 -1
  30. package/dist/components/actions/Menu/Menu.js +1 -1
  31. package/dist/components/actions/Menu/Menu.js.map +1 -1
  32. package/dist/components/actions/Menu/MenuItem.js +19 -15
  33. package/dist/components/actions/Menu/MenuItem.js.map +1 -1
  34. package/dist/components/actions/Menu/MenuSection.js +1 -8
  35. package/dist/components/actions/Menu/MenuSection.js.map +1 -1
  36. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  37. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -7
  38. package/dist/components/actions/Menu/SubMenuTrigger.js.map +1 -1
  39. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  40. package/dist/components/actions/Menu/context.js +1 -1
  41. package/dist/components/actions/Menu/styled.js +1 -1
  42. package/dist/components/actions/actions-run.js +1 -1
  43. package/dist/components/actions/index.js +1 -1
  44. package/dist/components/actions/use-action.js +1 -1
  45. package/dist/components/actions/use-anchored-menu.js +1 -1
  46. package/dist/components/actions/use-context-menu.js +1 -1
  47. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  48. package/dist/components/content/Alert/Alert.js +1 -1
  49. package/dist/components/content/Alert/use-alert.js +1 -1
  50. package/dist/components/content/Avatar/Avatar.js +1 -1
  51. package/dist/components/content/Badge/Badge.js +1 -1
  52. package/dist/components/content/Card/Card.js +1 -1
  53. package/dist/components/content/Content.js +1 -2
  54. package/dist/components/content/Content.js.map +1 -1
  55. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  56. package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
  57. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  58. package/dist/components/content/Divider.js +1 -1
  59. package/dist/components/content/Footer.js +1 -1
  60. package/dist/components/content/Header.js +1 -1
  61. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  62. package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
  63. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  64. package/dist/components/content/Item/Item.d.ts +27 -2
  65. package/dist/components/content/Item/Item.js +240 -231
  66. package/dist/components/content/Item/Item.js.map +1 -1
  67. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  68. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  69. package/dist/components/content/Layout/GridLayout.js +1 -1
  70. package/dist/components/content/Layout/Layout.js +1 -1
  71. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  72. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  73. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  74. package/dist/components/content/Layout/LayoutContent.js +1 -1
  75. package/dist/components/content/Layout/LayoutContext.js +1 -1
  76. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  77. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  78. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  79. package/dist/components/content/Layout/LayoutHeader.js +123 -118
  80. package/dist/components/content/Layout/LayoutHeader.js.map +1 -1
  81. package/dist/components/content/Layout/LayoutPane.js +1 -1
  82. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  83. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  84. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  85. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  86. package/dist/components/content/Layout/index.js +1 -1
  87. package/dist/components/content/Layout/utils.js +1 -1
  88. package/dist/components/content/Paragraph.js +1 -1
  89. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  90. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  91. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  92. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  93. package/dist/components/content/Result/Result.js +1 -1
  94. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  95. package/dist/components/content/Tag/Tag.js +1 -1
  96. package/dist/components/content/Text.d.ts +14 -14
  97. package/dist/components/content/Text.js +1 -1
  98. package/dist/components/content/TextItem/TextItem.js +1 -1
  99. package/dist/components/content/Title.js +1 -1
  100. package/dist/components/content/Tree/Tree.js +1 -1
  101. package/dist/components/content/Tree/TreeNode.js +1 -1
  102. package/dist/components/content/Tree/styled.js +1 -1
  103. package/dist/components/content/Tree/tree-index.js +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.d.ts +1 -1
  108. package/dist/components/content/use-auto-tooltip.js +231 -125
  109. package/dist/components/content/use-auto-tooltip.js.map +1 -1
  110. package/dist/components/data/DataTable/DataTable.js +1 -1
  111. package/dist/components/data/ItemTable/ItemTable.js +1 -1
  112. package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
  113. package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
  114. package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
  115. package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
  116. package/dist/components/data/TableBase/ColumnResizer.js +1 -1
  117. package/dist/components/data/TableBase/RowCollection.js +1 -1
  118. package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
  119. package/dist/components/data/TableBase/TableRow.js +1 -1
  120. package/dist/components/data/TableBase/TableView.js +1 -1
  121. package/dist/components/data/TableBase/column-menu.js +1 -1
  122. package/dist/components/data/TableBase/column-tint.js +1 -1
  123. package/dist/components/data/TableBase/row-menu.js +1 -1
  124. package/dist/components/data/TableBase/styled.d.ts +1 -0
  125. package/dist/components/data/TableBase/styled.js +1 -1
  126. package/dist/components/data/TableBase/table-tree.js +1 -1
  127. package/dist/components/data/TableBase/types.js +1 -1
  128. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  129. package/dist/components/data/TableBase/use-column-order.js +1 -1
  130. package/dist/components/data/TableBase/use-container-width.js +1 -1
  131. package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
  132. package/dist/components/data/TableBase/use-scrollability.js +1 -1
  133. package/dist/components/data/TableBase/use-table-columns.js +1 -1
  134. package/dist/components/data/TableBase/use-table-search.js +1 -1
  135. package/dist/components/data/TableBase/use-table-selection.js +1 -1
  136. package/dist/components/data/TableBase/use-table-sort.js +1 -1
  137. package/dist/components/data/TableBase/use-table-sorts.js +1 -1
  138. package/dist/components/data/TableBase/use-table-storage.js +1 -1
  139. package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
  140. package/dist/components/fields/Checkbox/Checkbox.d.ts +8 -0
  141. package/dist/components/fields/Checkbox/Checkbox.js +58 -39
  142. package/dist/components/fields/Checkbox/Checkbox.js.map +1 -1
  143. package/dist/components/fields/Checkbox/CheckboxGroup.js +2 -2
  144. package/dist/components/fields/Checkbox/CheckboxGroup.js.map +1 -1
  145. package/dist/components/fields/Checkbox/context.js +1 -1
  146. package/dist/components/fields/ColorInput/ColorInput.js +1 -1
  147. package/dist/components/fields/ColorPicker/ColorPicker.d.ts +1 -1
  148. package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
  149. package/dist/components/fields/ColorPicker/ColorPicker.js.map +1 -1
  150. package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
  151. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
  152. package/dist/components/fields/ComboBox/ComboBox.js +1 -1
  153. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  154. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  155. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  156. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  157. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  158. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  159. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  160. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  161. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  162. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  163. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  164. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  165. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  166. package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
  167. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  168. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  169. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  170. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  171. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  172. package/dist/components/fields/DatePicker/period.js +1 -1
  173. package/dist/components/fields/DatePicker/props.js +1 -1
  174. package/dist/components/fields/DatePicker/utils.js +1 -1
  175. package/dist/components/fields/FileInput/FileInput.js +1 -1
  176. package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
  177. package/dist/components/fields/FilterPicker/FilterPicker.d.ts +2 -2
  178. package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
  179. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  180. package/dist/components/fields/Input/Input.js +1 -1
  181. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  182. package/dist/components/fields/ListBox/ListBox.js +1 -1
  183. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  184. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  185. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  186. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  187. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  188. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  189. package/dist/components/fields/Picker/Picker.d.ts +2 -2
  190. package/dist/components/fields/Picker/Picker.js +1 -1
  191. package/dist/components/fields/Picker/Picker.js.map +1 -1
  192. package/dist/components/fields/RadioGroup/Radio.d.ts +10 -2
  193. package/dist/components/fields/RadioGroup/Radio.js +215 -213
  194. package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
  195. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  196. package/dist/components/fields/RadioGroup/context.js +1 -1
  197. package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
  198. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  199. package/dist/components/fields/Select/Select.d.ts +3 -2
  200. package/dist/components/fields/Select/Select.js +5 -2
  201. package/dist/components/fields/Select/Select.js.map +1 -1
  202. package/dist/components/fields/Slider/Gradation.js +1 -1
  203. package/dist/components/fields/Slider/HueSlider.js +1 -1
  204. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  205. package/dist/components/fields/Slider/Slider.js +1 -1
  206. package/dist/components/fields/Slider/SliderBase.js +1 -1
  207. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  208. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  209. package/dist/components/fields/Slider/elements.js +1 -1
  210. package/dist/components/fields/Slider/index.js +1 -1
  211. package/dist/components/fields/Switch/Switch.js +1 -1
  212. package/dist/components/fields/TextArea/TextArea.js +1 -1
  213. package/dist/components/fields/TextInput/TextInput.js +1 -1
  214. package/dist/components/fields/TextInput/TextInputBase.js +2 -2
  215. package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
  216. package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
  217. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  218. package/dist/components/fields/TriggerActions.js +1 -1
  219. package/dist/components/fields/color/ColorPanel.js +1 -1
  220. package/dist/components/fields/color/channels.js +1 -1
  221. package/dist/components/fields/color/color.js +1 -1
  222. package/dist/components/fields/color/context.js +1 -1
  223. package/dist/components/form/FieldWrapper/FieldWrapper.d.ts +1 -1
  224. package/dist/components/form/FieldWrapper/FieldWrapper.js +11 -9
  225. package/dist/components/form/FieldWrapper/FieldWrapper.js.map +1 -1
  226. package/dist/components/form/FieldWrapper/types.d.ts +1 -1
  227. package/dist/components/form/Form/Field.js +6 -4
  228. package/dist/components/form/Form/Field.js.map +1 -1
  229. package/dist/components/form/Form/Form.js +5 -20
  230. package/dist/components/form/Form/Form.js.map +1 -1
  231. package/dist/components/form/Form/ModernFormRoot.js +1 -1
  232. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  233. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  234. package/dist/components/form/Form/SubmitError.js +1 -1
  235. package/dist/components/form/Form/backend.js +1 -1
  236. package/dist/components/form/Form/index.js +1 -1
  237. package/dist/components/form/Form/modern/actions.js +1 -1
  238. package/dist/components/form/Form/modern/context.js +1 -1
  239. package/dist/components/form/Form/modern/controller.js +1 -1
  240. package/dist/components/form/Form/modern/field-binding.js +1 -1
  241. package/dist/components/form/Form/modern/field.js +1 -1
  242. package/dist/components/form/Form/modern/react.js +1 -1
  243. package/dist/components/form/Form/modern/store.js +1 -1
  244. package/dist/components/form/Form/modern/validation.js +1 -1
  245. package/dist/components/form/Form/modern/values.js +1 -1
  246. package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
  247. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  248. package/dist/components/form/Form/use-field/use-field.js +1 -1
  249. package/dist/components/form/Form/use-form.js +1 -1
  250. package/dist/components/form/Form/validation.js +1 -1
  251. package/dist/components/form/Label.js +1 -1
  252. package/dist/components/form/legacy-tooltip.js +28 -0
  253. package/dist/components/form/legacy-tooltip.js.map +1 -0
  254. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  255. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  256. package/dist/components/form/validation/use-validation-props.js +1 -1
  257. package/dist/components/form/wrapper.js +5 -3
  258. package/dist/components/form/wrapper.js.map +1 -1
  259. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  260. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  261. package/dist/components/layout/Board/Board.js +1 -1
  262. package/dist/components/layout/Board/BoardProvider.js +1 -1
  263. package/dist/components/layout/Board/BoardResponsive.js +1 -1
  264. package/dist/components/layout/Board/Widget.js +1 -1
  265. package/dist/components/layout/Board/WidgetHost.js +1 -1
  266. package/dist/components/layout/Board/board-context.js +1 -1
  267. package/dist/components/layout/Board/board-store.js +1 -1
  268. package/dist/components/layout/Board/grid-core/calculate.js +1 -1
  269. package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
  270. package/dist/components/layout/Board/grid-core/collision.js +1 -1
  271. package/dist/components/layout/Board/grid-core/compactors.js +1 -1
  272. package/dist/components/layout/Board/grid-core/constraints.js +1 -1
  273. package/dist/components/layout/Board/grid-core/group-move.js +1 -1
  274. package/dist/components/layout/Board/grid-core/layout.js +1 -1
  275. package/dist/components/layout/Board/grid-core/placement.js +1 -1
  276. package/dist/components/layout/Board/grid-core/sort.js +1 -1
  277. package/dist/components/layout/Board/index.js +1 -1
  278. package/dist/components/layout/Board/responsive-utils.js +1 -1
  279. package/dist/components/layout/Board/use-board-layout.js +1 -1
  280. package/dist/components/layout/Board/use-board-registry.js +1 -1
  281. package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
  282. package/dist/components/layout/Board/use-board-selection.js +1 -1
  283. package/dist/components/layout/Flex.js +1 -1
  284. package/dist/components/layout/Flow.js +1 -1
  285. package/dist/components/layout/Grid.js +1 -1
  286. package/dist/components/layout/Panel.js +1 -1
  287. package/dist/components/layout/Prefix.js +1 -1
  288. package/dist/components/layout/ResizablePanel.js +1 -1
  289. package/dist/components/layout/Space.js +1 -1
  290. package/dist/components/layout/Suffix.js +1 -1
  291. package/dist/components/navigation/Pagination/Pagination.js +1 -1
  292. package/dist/components/navigation/Pagination/use-pagination.js +1 -1
  293. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  294. package/dist/components/navigation/Tabs/TabButton.js +131 -110
  295. package/dist/components/navigation/Tabs/TabButton.js.map +1 -1
  296. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  297. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  298. package/dist/components/navigation/Tabs/TabPicker.js +2 -1
  299. package/dist/components/navigation/Tabs/TabPicker.js.map +1 -1
  300. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  301. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  302. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  303. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  304. package/dist/components/navigation/Tabs/styled.js +2 -2
  305. package/dist/components/navigation/Tabs/styled.js.map +1 -1
  306. package/dist/components/navigation/Tabs/types.js +1 -1
  307. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  308. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  309. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  310. package/dist/components/other/Calendar/Calendar.js +1 -1
  311. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  312. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  313. package/dist/components/other/Calendar/CalendarHeader.js +1 -1
  314. package/dist/components/other/Calendar/CalendarPanel.js +1 -1
  315. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  316. package/dist/components/other/Calendar/PeriodGrid.js +1 -1
  317. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  318. package/dist/components/other/Calendar/styled.js +1 -1
  319. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  320. package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
  321. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  322. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  323. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  324. package/dist/components/overlays/Dialog/Dialog.js +9 -18
  325. package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
  326. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  327. package/dist/components/overlays/Dialog/DialogForm.js +5 -6
  328. package/dist/components/overlays/Dialog/DialogForm.js.map +1 -1
  329. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  330. package/dist/components/overlays/Dialog/ModernDialogForm.js +64 -71
  331. package/dist/components/overlays/Dialog/ModernDialogForm.js.map +1 -1
  332. package/dist/components/overlays/Dialog/context.js +1 -1
  333. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  334. package/dist/components/overlays/Modal/Modal.js +1 -1
  335. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  336. package/dist/components/overlays/Modal/Overlay.js +1 -1
  337. package/dist/components/overlays/Modal/Popover.js +1 -1
  338. package/dist/components/overlays/Modal/Tray.js +1 -1
  339. package/dist/components/overlays/Modal/Underlay.js +1 -1
  340. package/dist/components/overlays/Notifications/Notification.js +1 -1
  341. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  342. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  343. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  344. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  345. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  346. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  347. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  348. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  349. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  350. package/dist/components/overlays/Notifications/index.js +1 -1
  351. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  352. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  353. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  354. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  355. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  356. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  357. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  358. package/dist/components/overlays/Toast/index.js +1 -1
  359. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  360. package/dist/components/overlays/Toast/useToast.js +1 -1
  361. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  362. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  363. package/dist/components/overlays/Tooltip/TooltipTrigger.js +72 -69
  364. package/dist/components/overlays/Tooltip/TooltipTrigger.js.map +1 -1
  365. package/dist/components/overlays/Tooltip/context.js +1 -1
  366. package/dist/components/overlays/Tooltip/split-trigger-props.d.ts +16 -0
  367. package/dist/components/overlays/Tooltip/split-trigger-props.js +54 -0
  368. package/dist/components/overlays/Tooltip/split-trigger-props.js.map +1 -0
  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.js +1 -1
  537. package/dist/probe/canonicalize.js +1 -1
  538. package/dist/probe/css.js +1 -1
  539. package/dist/probe/index.js +1 -1
  540. package/dist/provider.js +1 -1
  541. package/dist/providers/TrackingProvider.js +1 -1
  542. package/dist/providers/navigationAdapter.default.js +1 -1
  543. package/dist/shared/form.d.ts +9 -2
  544. package/dist/tokens/all-tokens.js +1 -1
  545. package/dist/tokens/base.js +1 -1
  546. package/dist/tokens/color-seed.js +1 -1
  547. package/dist/tokens/color-theme.js +1 -1
  548. package/dist/tokens/colors.js +1 -1
  549. package/dist/tokens/layout.js +1 -1
  550. package/dist/tokens/lazy-styles.js +1 -1
  551. package/dist/tokens/legacy-color.js +1 -1
  552. package/dist/tokens/palette-config.js +1 -1
  553. package/dist/tokens/palette.js +1 -1
  554. package/dist/tokens/resolve.js +1 -1
  555. package/dist/tokens/shadows.js +1 -1
  556. package/dist/tokens/sizes.js +1 -1
  557. package/dist/tokens/spacing.js +1 -1
  558. package/dist/tokens/typography.js +1 -1
  559. package/dist/utils/ResizeSensor.js +1 -1
  560. package/dist/utils/colors.js +1 -1
  561. package/dist/utils/dotize.js +1 -1
  562. package/dist/utils/is-dev-env.js +1 -1
  563. package/dist/utils/modules.js +1 -1
  564. package/dist/utils/promise.js +1 -1
  565. package/dist/utils/raf.js +1 -1
  566. package/dist/utils/random.js +1 -1
  567. package/dist/utils/range.js +1 -1
  568. package/dist/utils/react/RenderCache.js +1 -1
  569. package/dist/utils/react/Slots.js +1 -1
  570. package/dist/utils/react/chain.js +1 -1
  571. package/dist/utils/react/disabledProps.js +1 -1
  572. package/dist/utils/react/escapePropagation.js +1 -1
  573. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  574. package/dist/utils/react/index.js +1 -1
  575. package/dist/utils/react/interactions.js +1 -1
  576. package/dist/utils/react/isTextOnly.js +1 -1
  577. package/dist/utils/react/mapProps.js +1 -1
  578. package/dist/utils/react/mergeProps.js +1 -1
  579. package/dist/utils/react/nullableValue.js +1 -1
  580. package/dist/utils/react/programmaticFocus.js +1 -1
  581. package/dist/utils/react/resolveIcon.js +1 -1
  582. package/dist/utils/react/sharedStore.js +1 -1
  583. package/dist/utils/react/useBufferedValue.js +1 -1
  584. package/dist/utils/react/useCombinedRefs.js +1 -1
  585. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  586. package/dist/utils/react/useEventBus.js +1 -1
  587. package/dist/utils/react/useId.js +1 -1
  588. package/dist/utils/react/useIsDarwin.js +1 -1
  589. package/dist/utils/react/useKeySymbols.js +1 -1
  590. package/dist/utils/react/useLayoutEffect.js +1 -1
  591. package/dist/utils/react/useLocalStorage.js +1 -1
  592. package/dist/utils/react/useMergeStyles.js +1 -1
  593. package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
  594. package/dist/utils/react/usePopoverSync.js +1 -1
  595. package/dist/utils/react/useQaProps.js +1 -1
  596. package/dist/utils/react/useScheme.js +1 -1
  597. package/dist/utils/react/useViewportSize.js +1 -1
  598. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  599. package/dist/utils/selection.js +1 -1
  600. package/dist/utils/styles.js +1 -1
  601. package/dist/utils/tree.js +1 -1
  602. package/dist/utils/warnings.js +1 -1
  603. package/dist/version.js +2 -2
  604. package/docs/FieldProperties.md +2 -2
  605. package/docs/components/actions/ButtonSplit.md +2 -0
  606. package/docs/components/content/InfoBadge.md +1 -1
  607. package/docs/components/content/Layout.md +1 -1
  608. package/docs/components/fields/Checkbox.md +11 -0
  609. package/docs/components/fields/ColorPicker.md +1 -1
  610. package/docs/components/fields/FilterPicker.md +1 -1
  611. package/docs/components/fields/Picker.md +1 -1
  612. package/docs/components/fields/RadioGroup.md +2 -2
  613. package/docs/components/fields/Select.md +3 -0
  614. package/docs/components/form/Field.md +2 -2
  615. package/docs/components/form/Form.md +0 -2
  616. package/docs/components/navigation/Tabs.md +3 -3
  617. package/docs/components/overlays/Dialog.md +3 -30
  618. package/docs/components/overlays/DialogForm.md +0 -1
  619. package/package.json +1 -1
  620. package/dist/components/overlays/Dialog/use-content-overflow.js +0 -68
  621. package/dist/components/overlays/Dialog/use-content-overflow.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","names":["useFocusableRef","BaseProps","CONTAINER_STYLES","ContainerStyleProps","filterBaseProps","OUTER_STYLES","tasty","forwardRef","useMemo","useRef","useHover","useRadio","FieldBaseProps","mergeProps","useFocus","extractStyles","CubeItemProps","Item","getValidationMods","getValidationTheme","INLINE_LABEL_STYLES","useFieldProps","HiddenInput","RADIO_SIZE_MAP","useRadioProvider","RadioGroup","AriaRadioProps","RadioButtonElement","qa","as","styles","preset","lineHeight","flexGrow","gridTemplate","placeContent","shadow","fill","color","radius","margin","zIndex","Label","placeSelf","RadioWrapperElement","position","display","placeItems","gap","flow","width","button","checked","RadioNormalElement","disabled","border","invalid","valid","height","outline","focused","transition","whiteSpace","RadioCircle","RadioCircleElement","RadioLabelElement","ITEM_PROPS","const","RadioItemProps","Pick","CubeRadioProps","Omit","type","buttonType","value","size","Radio","props","ref","$","_c","t0","Symbol","for","defaultValidationTrigger","isDisabled","isInvalid","isValid","children","label","autoFocus","labelStyles","labelProps","ariaLabel","form","otherProps","itemProps","itemPropName","Record","t1","radioGroupProps","state","name","contextSize","contextButtonType","contextType","contextIsDisabled","Error","effectiveType","isButton","effectiveSize","effectiveButtonType","forceSelectedMod","baseButtonType","selectedValue","baseIsDisabled","isLoadingButton","isLoading","effectiveIsDisabled","t2","isFocused","focusProps","t3","hoverProps","isHovered","inputRef","domRef","t4","inputProps","isRadioDisabled","isSelected","isRadioSelected","t5","t6","t7","hovered","tabs","mods","t9","includeValid","t11","selected","t12","t13","t14","t15","t16","t17","undefined","_Radio","Tabs","ButtonGroup","__Radio","Object","assign","Group","Button","displayName"],"sources":["../../../../src/components/fields/RadioGroup/Radio.tsx"],"sourcesContent":["import { useFocusableRef } from '@react-spectrum/utils';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n filterBaseProps,\n OUTER_STYLES,\n tasty,\n} from '@tenphi/tasty';\nimport { forwardRef, useMemo, useRef } from 'react';\nimport { useHover, useRadio } from 'react-aria';\n\nimport { FieldBaseProps } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { extractStyles } from '../../../utils/styles';\nimport { CubeItemProps, Item } from '../../content/Item/Item';\nimport {\n getValidationMods,\n getValidationTheme,\n INLINE_LABEL_STYLES,\n useFieldProps,\n} from '../../form';\nimport { HiddenInput } from '../../HiddenInput';\nimport { RADIO_SIZE_MAP } from '../../navigation/Tabs/types';\n\nimport { useRadioProvider } from './context';\nimport { RadioGroup } from './RadioGroup';\n\nimport type { AriaRadioProps } from 'react-aria';\n\nexport { AriaRadioProps };\nexport { useRadio };\n\nconst RadioButtonElement = tasty(Item, {\n qa: 'RadioButton',\n as: 'label',\n styles: {\n preset: 't3m',\n lineHeight: '1em',\n flexGrow: 1,\n // Same areas as `Item`, but every column is `max-content` — a radio button\n // is sized by its content, not stretched like a list item. The\n // `description` rows have to be repeated here because a plain string would\n // replace `Item`'s whole state map and leave the description without a\n // grid area to land in.\n gridTemplate: {\n '': '\"icon prefix label suffix rightIcon actions\" auto / max-content max-content max-content max-content max-content max-content',\n 'description=inline':\n '\"icon prefix description suffix rightIcon actions\" auto / max-content max-content max-content max-content max-content max-content',\n 'description=inline & has-label':\n '\"icon prefix label suffix rightIcon actions\" auto \"icon prefix description suffix rightIcon actions\" auto / max-content max-content max-content max-content max-content max-content',\n 'description=block':\n '\"icon prefix label suffix rightIcon actions\" auto \"description description description description description description\" auto / max-content max-content max-content max-content max-content max-content',\n },\n placeContent: 'center',\n shadow: {\n '': false,\n 'tabs & selected': '$item-shadow',\n 'tabs & selected & disabled': false,\n },\n fill: {\n 'selected & tabs': '#surface',\n 'selected & tabs & disabled': '#surface.6',\n },\n color: {\n 'selected & tabs': '#dark',\n 'selected & tabs & disabled': '#dark.3',\n },\n\n // Mirror the ButtonSplit grouping: the corner radius is shared so the\n // first/last items keep only their outer-side radius and middle items go\n // square; a -1bw left margin overlaps adjacent borders into a single\n // continuous edge. The selected button is bumped above its siblings so its\n // brand-tinted border is visible from all four sides — without the bump\n // the right edge of an adjacent sibling would paint over the selected\n // button's left edge (and vice-versa). Hover / focus-visible bump higher\n // still so they always read on top of the selected highlight.\n radius: {\n '': true,\n '!tabs & !:last-child': '1r left',\n '!tabs & !:first-child': '1r right',\n '!tabs & !:first-child & !:last-child': 0,\n },\n margin: {\n '': 0,\n '!tabs & !:first-child': '-1bw left',\n },\n zIndex: {\n '!tabs & selected': 1,\n },\n\n Label: {\n placeSelf: {\n '': 'center start',\n '!has-prefix & !has-suffix & !has-icon & !has-right-icon': 'center',\n },\n },\n },\n});\n\nconst RadioWrapperElement = tasty({\n as: 'label',\n qa: 'RadioWrapper',\n styles: {\n position: 'relative',\n display: 'grid',\n placeItems: 'center start',\n placeContent: 'center start',\n gap: '1x',\n flow: 'column',\n preset: 'default',\n width: 'min-content',\n radius: true,\n margin: {\n '': '1x right',\n button: '0',\n },\n zIndex: {\n '': 'initial',\n checked: 1,\n },\n flexGrow: 1,\n },\n});\n\nconst RadioNormalElement = tasty({\n styles: {\n display: 'grid',\n placeItems: 'center',\n radius: 'round',\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n },\n color: {\n '': '#clear',\n checked: '#primary-text',\n 'invalid & checked': '#danger-text',\n 'valid & checked': '#success-text',\n 'disabled | !checked': '#clear',\n 'disabled & checked': '#dark.12',\n },\n border: {\n '': '#dark-04',\n checked: '#primary-text',\n invalid: '#danger-text.50',\n valid: '#success-text.50',\n disabled: '#dark.12',\n },\n width: '2x',\n height: '2x',\n outline: {\n '': '#primary-text.0 / 1bw',\n focused: '1bw #primary-text / 1bw',\n },\n transition: 'theme',\n whiteSpace: 'nowrap',\n\n RadioCircle: {\n display: 'block',\n radius: 'round',\n width: '1x',\n height: '1x',\n fill: '#current',\n },\n },\n});\n\nconst RadioCircleElement = <div data-element=\"RadioCircle\" />;\n\nconst RadioLabelElement = tasty({\n qa: 'RadioLabel',\n styles: INLINE_LABEL_STYLES,\n});\n\n/**\n * `Item` props a button-type radio hands straight to the `Item` it renders, so\n * `Radio.Button` accepts the same content and presentation API as an\n * `ItemButton`. Kept as a runtime list so a new `Item` prop only has to be\n * added in one place.\n *\n * Deliberately absent:\n * - `size`, `type`, `theme`, `isSelected`, `isDisabled`, `mods`, `styles` —\n * owned by the radio (they come from the prop/context/validation resolution\n * below).\n * - `shape` — the radius is owned by the button-group layout below, which keeps\n * only the outer-side radius on the first/last radio so the group reads as one\n * continuous control. Forwarding `shape` would have no effect.\n * - `htmlType`, `as`, `insideWrapper`, `showActions` — internal to `Item` /\n * `ItemButton`.\n * - `actions`, `autoHideActions`, `preserveActionsSpace`,\n * `disableActionsFocus` — a button radio renders as a `<label>`, and a click\n * anywhere inside a label activates its control, so nested action buttons\n * would select the radio (and nested interactive content is invalid inside a\n * label to begin with).\n */\nconst ITEM_PROPS = [\n 'icon',\n 'rightIcon',\n 'prefix',\n 'suffix',\n 'description',\n 'descriptionPlacement',\n 'descriptionProps',\n 'tooltip',\n 'hotkeys',\n 'keyboardShortcutProps',\n 'level',\n 'isLoading',\n 'loadingSlot',\n 'highlight',\n 'highlightCaseSensitive',\n 'highlightStyles',\n 'labelRef',\n] as const;\n\ntype RadioItemProps = Pick<CubeItemProps, (typeof ITEM_PROPS)[number]>;\n\nexport interface CubeRadioProps\n extends BaseProps,\n AriaRadioProps,\n Omit<FieldBaseProps, 'tooltip'>,\n /**\n * Container style props apply to button-type radios (they style the `Item`\n * the radio renders). A classic radio only reads the outer subset —\n * everything else belongs to its inner circle and label.\n */\n ContainerStyleProps,\n /** All of these apply to button/tabs-type radios only. */\n RadioItemProps {\n 'aria-label'?: string;\n /* The visual type of the radio button */\n type?: 'button' | 'radio';\n buttonType?: CubeItemProps['type'];\n value?: string;\n /* Size of the button (for button type only) */\n size?: Omit<CubeItemProps['size'], 'inline'>;\n}\n\nfunction Radio(props: CubeRadioProps, ref) {\n props = useFieldProps(props, { defaultValidationTrigger: 'onChange' });\n\n let {\n qa,\n isDisabled,\n isInvalid,\n isValid,\n children,\n label,\n autoFocus,\n labelStyles,\n labelProps,\n type,\n buttonType,\n size,\n 'aria-label': ariaLabel,\n form,\n ...otherProps\n } = props;\n\n label = label || children;\n\n // Only the props the caller actually passed, so an unset one keeps `Item`'s\n // own default instead of being overridden with `undefined`.\n const itemProps: Record<string, unknown> = {};\n\n for (const itemPropName of ITEM_PROPS) {\n if (itemPropName in props) {\n itemProps[itemPropName] = (props as Record<string, unknown>)[\n itemPropName\n ];\n }\n }\n\n labelStyles = {\n ...INLINE_LABEL_STYLES,\n ...labelStyles,\n };\n\n let radioGroupProps = useRadioProvider();\n\n let state = radioGroupProps && radioGroupProps.state;\n let name = radioGroupProps && radioGroupProps.name;\n let contextSize = radioGroupProps?.size;\n let contextButtonType = radioGroupProps?.buttonType;\n let contextType = radioGroupProps?.type;\n let contextIsDisabled = radioGroupProps?.isDisabled;\n\n if (!state) {\n throw new Error('CubeUI: The Radio button is used outside the RadioGroup.');\n }\n\n // Determine effective type from props or context\n let effectiveType = type ?? contextType ?? 'radio';\n let isButton = effectiveType === 'button' || effectiveType === 'tabs';\n\n // A button radio *is* an `Item`, so it takes the same container style props an\n // `ItemButton` does. A classic radio only exposes the outer subset: the rest\n // would land on the wrapper that holds the circle and the label, where\n // `padding` / `fill` / `preset` mean something entirely different.\n let styles = extractStyles(\n otherProps,\n isButton ? CONTAINER_STYLES : OUTER_STYLES,\n );\n\n // Determine effective size with priority: prop > context > default\n let effectiveSize: CubeItemProps['size'] = (size ??\n contextSize ??\n 'medium') as CubeItemProps['size'];\n\n // Apply size mapping for tabs mode button radios.\n // API sizes mapped to Item button sizes: large -> medium (40px), medium -> xsmall (32px).\n if (effectiveType === 'tabs' && isButton) {\n effectiveSize =\n RADIO_SIZE_MAP[effectiveSize === 'large' ? 'large' : 'medium'];\n }\n\n // Determine effective button type\n // In tabs mode, always use 'clear' and ignore buttonType prop.\n let effectiveButtonType: string;\n // When buttonType is 'primary', non-selected radios use 'outline' with a\n // visual-only `selected` mod (mods.selected=true) to render the brand-tinted\n // outline+selected look — this is the only place mods.selected intentionally\n // decouples from the aria/isSelected state. Suppressed while disabled: the\n // real selected radio is then painted with the brand-tinted disabled chip\n // (`accent-disabled-surface`), and faking `selected` on its siblings would\n // give them the outline variant of that same chip and erase the distinction.\n let forceSelectedMod = false;\n if (effectiveType === 'tabs') {\n effectiveButtonType = 'clear';\n } else {\n const baseButtonType = buttonType ?? contextButtonType ?? 'outline';\n if (baseButtonType === 'primary') {\n if (state.selectedValue === props.value) {\n effectiveButtonType = 'primary';\n } else {\n effectiveButtonType = 'outline';\n forceSelectedMod = true;\n }\n } else {\n effectiveButtonType = baseButtonType;\n }\n }\n\n // Use context isDisabled if prop isDisabled is not explicitly set\n let baseIsDisabled = isDisabled ?? contextIsDisabled ?? false;\n\n // Loading has to disable the radio here, not inside `Item`. `useRadio` and the\n // `HiddenInput` covering the button own the actual selection, so leaving it to\n // `Item` would render a spinner on an option that still takes clicks and arrow\n // keys. And because this component always passes a resolved `isDisabled` down,\n // an unresolved `isLoading` would additionally read to `Item` as an explicit\n // `isDisabled={false}` and cancel its own loading-disables-the-item rule.\n //\n // Same precedence as `Item` / `ItemButton`: an explicit `isDisabled={false}`\n // still wins over loading. Button-type only — a classic radio has no spinner,\n // so disabling it on `isLoading` would leave no visible reason why.\n let isLoadingButton = isButton && props.isLoading === true;\n let effectiveIsDisabled =\n baseIsDisabled === true || (isLoadingButton && isDisabled !== false);\n\n let { isFocused, focusProps } = useFocus(\n { isDisabled: effectiveIsDisabled },\n true,\n );\n let { hoverProps, isHovered } = useHover({ isDisabled: effectiveIsDisabled });\n\n let inputRef = useRef(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n let {\n inputProps,\n isDisabled: isRadioDisabled,\n isSelected: isRadioSelected,\n } = useRadio(\n {\n name,\n ...props,\n isDisabled: effectiveIsDisabled,\n },\n state,\n inputRef,\n );\n\n const mods = useMemo(\n () => ({\n checked: isRadioSelected,\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isRadioDisabled,\n hovered: isHovered,\n button: isButton,\n focused: isFocused,\n tabs: effectiveType === 'tabs',\n }),\n [\n isRadioSelected,\n isInvalid,\n isValid,\n isRadioDisabled,\n isHovered,\n isButton,\n isFocused,\n effectiveType,\n ],\n );\n\n // Render button type using Item\n if (isButton) {\n return (\n <RadioButtonElement\n ref={domRef}\n type={effectiveButtonType}\n theme={getValidationTheme(\n 'default',\n { isInvalid, isValid },\n { includeValid: true },\n )}\n size={effectiveSize}\n {...itemProps}\n isSelected={isRadioSelected}\n isDisabled={isRadioDisabled}\n mods={{\n ...mods,\n ...(forceSelectedMod && !isRadioDisabled ? { selected: true } : {}),\n }}\n styles={styles}\n {...mergeProps(hoverProps, focusProps)}\n >\n <HiddenInput\n qa={qa || 'Radio'}\n data-input-type=\"radio\"\n aria-label={ariaLabel}\n {...inputProps}\n ref={inputRef}\n form={null}\n mods={{ button: isButton, disabled: isRadioDisabled }}\n />\n {label}\n </RadioButtonElement>\n );\n }\n\n // Render classic radio type\n return (\n <RadioWrapperElement\n styles={styles}\n {...hoverProps}\n ref={domRef}\n mods={mods}\n data-type={type}\n >\n <HiddenInput\n qa={qa || 'Radio'}\n data-input-type=\"radio\"\n aria-label={ariaLabel}\n {...mergeProps(inputProps, focusProps)}\n ref={inputRef}\n mods={{ button: isButton }}\n />\n <RadioNormalElement data-element=\"Input\" mods={mods} data-type={type}>\n {RadioCircleElement}\n </RadioNormalElement>\n {label && (\n <RadioLabelElement\n mods={mods}\n styles={labelStyles}\n {...(labelProps ? filterBaseProps(labelProps) : undefined)}\n >\n {label}\n </RadioLabelElement>\n )}\n </RadioWrapperElement>\n );\n}\n\n/**\n * Radio buttons allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _Radio = forwardRef(Radio);\n\nconst Tabs = tasty(RadioGroup, {\n type: 'tabs',\n});\n\nconst ButtonGroup = tasty(RadioGroup, {\n type: 'button',\n});\n\nconst __Radio = Object.assign(\n _Radio as typeof _Radio & {\n Group: typeof RadioGroup;\n Tabs: typeof Tabs;\n ButtonGroup: typeof ButtonGroup;\n Button: typeof _Radio;\n },\n {\n Group: RadioGroup,\n Tabs,\n ButtonGroup,\n Button: _Radio,\n },\n);\n\n__Radio.displayName = 'Radio';\n\nexport { __Radio as Radio };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,MAAM2B,qBAAqBrB,MAAMW,OAAM;CACrCW,IAAI;CACJC,IAAI;CACJC,QAAQ;EACNC,QAAQ;EACRC,YAAY;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D,IAAA,MAAAkE;OAAAA,OAAAlE,EAAA;CAAA,IAAAmE;AAAA,KAAAnE,EAAA,QAAA+C,UAAA/C,EAAA,QAAA4C,cAAA5C,EAAA,QAAA0D,QAAA1D,EAAA,QAAAjD,UAAAiD,EAAA,QAAAgE,OAAAhE,EAAA,QAAAiE,OAAAjE,EAAA,QAAAkE,OAAAlE,EAAA,QAAAP,MAAA;AA1BH0E,QAAA,qBAAC;GACSpH;GAAM,GACV6F;GACCG,KAAAA;GACCW;GACKjE,aAAAA;;IAEXuE;IAQAC;IAGCC;;IASmB;AAAAlE,IAAA,MAAA+C;AAAA/C,IAAA,MAAA4C;AAAA5C,IAAA,MAAA0D;AAAA1D,IAAA,MAAAjD;AAAAiD,IAAA,MAAAgE;AAAAhE,IAAA,MAAAiE;AAAAjE,IAAA,MAAAkE;AAAAlE,IAAA,MAAAP;AAAAO,IAAA,MAAAmE;OAAAA,OAAAnE,EAAA;AAAA,QA3BtBmE;;;;;;AAmCJ,MAAMG,SAAS9I,WAAWqE,MAAM;AAEhC,MAAM0E,OAAOhJ,MAAMmB,aAAY,EAC7B+C,MAAM,QACP,CAAC;AAEF,MAAM+E,cAAcjJ,MAAMmB,aAAY,EACpC+C,MAAM,UACP,CAAC;AAEF,MAAMgF,UAAUC,OAAOC,OACrBL,QAMA;CACEM,OAAOlI;CACP6H;CACAC;CACAK,QAAQP;CAEZ,CAAC;AAEDG,QAAQK,cAAc"}
1
+ {"version":3,"file":"Radio.js","names":["useFocusableRef","BaseProps","CONTAINER_STYLES","ContainerStyleProps","filterBaseProps","OUTER_STYLES","tasty","forwardRef","useMemo","useRef","useHover","useRadio","FieldBaseProps","mergeProps","useFocus","extractStyles","CubeItemProps","Item","useAutoTooltip","getValidationMods","getValidationTheme","INLINE_LABEL_STYLES","useFieldProps","HiddenInput","RADIO_SIZE_MAP","mergeTooltipFocusProps","splitTooltipTriggerProps","useRadioProvider","RadioGroup","AriaRadioProps","RADIO_BUTTON_COLUMNS","RADIO_BUTTON_BLOCK_COLUMNS","RadioButtonElement","qa","as","styles","preset","lineHeight","flexGrow","gridTemplate","placeContent","shadow","fill","color","radius","margin","zIndex","Label","placeSelf","RadioWrapperElement","position","display","placeItems","gap","flow","width","button","checked","RadioNormalElement","disabled","border","invalid","valid","height","outline","focused","transition","whiteSpace","RadioCircle","RadioCircleElement","RadioLabelElement","ITEM_PROPS","const","RadioItemProps","Pick","CubeRadioProps","Omit","type","buttonType","value","size","Radio","props","ref","$","_c","t0","Symbol","for","defaultValidationTrigger","isDisabled","isInvalid","isValid","children","label","t1","autoFocus","labelStyles","t2","labelProps","ariaLabel","form","otherProps","itemProps","itemPropName","Record","radioGroupProps","state","name","contextSize","contextButtonType","contextType","contextIsDisabled","Error","effectiveType","isButton","effectiveSize","effectiveButtonType","forceSelectedMod","baseButtonType","selectedValue","baseIsDisabled","isLoadingButton","isLoading","effectiveIsDisabled","t3","isFocused","focusProps","t4","hoverProps","isHovered","t5","undefined","tooltip","t6","labelRef","t7","isDynamicLabel","tooltipLabelRef","renderWithTooltip","inputRef","domRef","t8","inputProps","isRadioDisabled","isSelected","isRadioSelected","t9","t10","t11","hovered","tabs","mods","t13","includeValid","t15","selected","t16","t17","t18","tooltipFocusProps","t19","t12","tooltipTriggerProps","tooltipRef","pointerProps","tooltipFocusProps_0","element","current","HTMLElement","_Radio","Tabs","ButtonGroup","__Radio","Object","assign","Group","Button","displayName"],"sources":["../../../../src/components/fields/RadioGroup/Radio.tsx"],"sourcesContent":["import { useFocusableRef } from '@react-spectrum/utils';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n filterBaseProps,\n OUTER_STYLES,\n tasty,\n} from '@tenphi/tasty';\nimport { forwardRef, useMemo, useRef } from 'react';\nimport { useHover, useRadio } from 'react-aria';\n\nimport { FieldBaseProps } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { extractStyles } from '../../../utils/styles';\nimport { CubeItemProps, Item } from '../../content/Item/Item';\nimport { useAutoTooltip } from '../../content/use-auto-tooltip';\nimport {\n getValidationMods,\n getValidationTheme,\n INLINE_LABEL_STYLES,\n useFieldProps,\n} from '../../form';\nimport { HiddenInput } from '../../HiddenInput';\nimport { RADIO_SIZE_MAP } from '../../navigation/Tabs/types';\nimport {\n mergeTooltipFocusProps,\n splitTooltipTriggerProps,\n} from '../../overlays/Tooltip/split-trigger-props';\n\nimport { useRadioProvider } from './context';\nimport { RadioGroup } from './RadioGroup';\n\nimport type { AriaRadioProps } from 'react-aria';\n\nexport { AriaRadioProps };\nexport { useRadio };\n\n/**\n * Same columns as `Item`, but none of them stretches — a radio button is sized\n * by its content, not stretched like a list item. The label column still has a\n * zero minimum, the way `Item`'s `1sf` does, so a radio given less room than\n * its label truncates the label instead of overflowing the button — which is\n * also what lets the auto tooltip (`tooltip` / `tooltip={true}`) fire.\n */\nconst RADIO_BUTTON_COLUMNS =\n 'max-content max-content minmax(0, max-content) max-content max-content max-content';\n\n/**\n * A `block` description spans every column, and a spanning item's width goes\n * to the columns with an intrinsic minimum. With a zero-minimum label column\n * that is every column but the label's — so the description's width lands in\n * the empty icon / prefix / suffix columns and the button grows to label plus\n * description instead of the wider of the two. Only this layout keeps the\n * all-`max-content` columns, and with them a label that does not truncate.\n */\nconst RADIO_BUTTON_BLOCK_COLUMNS =\n 'max-content max-content max-content max-content max-content max-content';\n\nconst RadioButtonElement = tasty(Item, {\n qa: 'RadioButton',\n as: 'label',\n styles: {\n preset: 't3m',\n lineHeight: '1em',\n flexGrow: 1,\n // Same areas as `Item`. The `description` rows have to be repeated here\n // because a plain string would replace `Item`'s whole state map and leave\n // the description without a grid area to land in.\n gridTemplate: {\n '': `\"icon prefix label suffix rightIcon actions\" auto / ${RADIO_BUTTON_COLUMNS}`,\n 'description=inline': `\"icon prefix description suffix rightIcon actions\" auto / ${RADIO_BUTTON_COLUMNS}`,\n 'description=inline & has-label': `\"icon prefix label suffix rightIcon actions\" auto \"icon prefix description suffix rightIcon actions\" auto / ${RADIO_BUTTON_COLUMNS}`,\n 'description=block': `\"icon prefix label suffix rightIcon actions\" auto \"description description description description description description\" auto / ${RADIO_BUTTON_BLOCK_COLUMNS}`,\n },\n placeContent: 'center',\n shadow: {\n '': false,\n 'tabs & selected': '$item-shadow',\n 'tabs & selected & disabled': false,\n },\n fill: {\n 'selected & tabs': '#surface',\n 'selected & tabs & disabled': '#surface.6',\n },\n color: {\n 'selected & tabs': '#dark',\n 'selected & tabs & disabled': '#dark.3',\n },\n\n // Mirror the ButtonSplit grouping: the corner radius is shared so the\n // first/last items keep only their outer-side radius and middle items go\n // square; a -1bw left margin overlaps adjacent borders into a single\n // continuous edge. The selected button is bumped above its siblings so its\n // brand-tinted border is visible from all four sides — without the bump\n // the right edge of an adjacent sibling would paint over the selected\n // button's left edge (and vice-versa). Hover / focus-visible bump higher\n // still so they always read on top of the selected highlight.\n radius: {\n '': true,\n '!tabs & !:last-child': '1r left',\n '!tabs & !:first-child': '1r right',\n '!tabs & !:first-child & !:last-child': 0,\n },\n margin: {\n '': 0,\n '!tabs & !:first-child': '-1bw left',\n },\n zIndex: {\n '!tabs & selected': 1,\n },\n\n Label: {\n placeSelf: {\n '': 'center start',\n '!has-prefix & !has-suffix & !has-icon & !has-right-icon': 'center',\n },\n },\n },\n});\n\nconst RadioWrapperElement = tasty({\n as: 'label',\n qa: 'RadioWrapper',\n styles: {\n position: 'relative',\n display: 'grid',\n placeItems: 'center start',\n placeContent: 'center start',\n gap: '1x',\n flow: 'column',\n preset: 'default',\n width: 'min-content',\n radius: true,\n margin: {\n '': '1x right',\n button: '0',\n },\n zIndex: {\n '': 'initial',\n checked: 1,\n },\n flexGrow: 1,\n },\n});\n\nconst RadioNormalElement = tasty({\n styles: {\n display: 'grid',\n placeItems: 'center',\n radius: 'round',\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n },\n color: {\n '': '#clear',\n checked: '#primary-text',\n 'invalid & checked': '#danger-text',\n 'valid & checked': '#success-text',\n 'disabled | !checked': '#clear',\n 'disabled & checked': '#dark.12',\n },\n border: {\n '': '#dark-04',\n checked: '#primary-text',\n invalid: '#danger-text.50',\n valid: '#success-text.50',\n disabled: '#dark.12',\n },\n width: '2x',\n height: '2x',\n outline: {\n '': '#primary-text.0 / 1bw',\n focused: '1bw #primary-text / 1bw',\n },\n transition: 'theme',\n whiteSpace: 'nowrap',\n\n RadioCircle: {\n display: 'block',\n radius: 'round',\n width: '1x',\n height: '1x',\n fill: '#current',\n },\n },\n});\n\nconst RadioCircleElement = <div data-element=\"RadioCircle\" />;\n\nconst RadioLabelElement = tasty({\n qa: 'RadioLabel',\n styles: INLINE_LABEL_STYLES,\n});\n\n/**\n * `Item` props a button-type radio hands straight to the `Item` it renders, so\n * `Radio.Button` accepts the same content and presentation API as an\n * `ItemButton`. Kept as a runtime list so a new `Item` prop only has to be\n * added in one place.\n *\n * A classic radio ignores all of them except `tooltip` and `labelRef`, which\n * it resolves itself (see `useAutoTooltip` in `Radio`).\n *\n * Deliberately absent:\n * - `size`, `type`, `theme`, `isSelected`, `isDisabled`, `mods`, `styles` —\n * owned by the radio (they come from the prop/context/validation resolution\n * below).\n * - `shape` — the radius is owned by the button-group layout below, which keeps\n * only the outer-side radius on the first/last radio so the group reads as one\n * continuous control. Forwarding `shape` would have no effect.\n * - `htmlType`, `as`, `insideWrapper`, `showActions` — internal to `Item` /\n * `ItemButton`.\n * - `actions`, `autoHideActions`, `preserveActionsSpace`,\n * `disableActionsFocus` — a button radio renders as a `<label>`, and a click\n * anywhere inside a label activates its control, so nested action buttons\n * would select the radio (and nested interactive content is invalid inside a\n * label to begin with).\n */\nconst ITEM_PROPS = [\n 'icon',\n 'rightIcon',\n 'prefix',\n 'suffix',\n 'description',\n 'descriptionPlacement',\n 'descriptionProps',\n 'tooltip',\n 'hotkeys',\n 'keyboardShortcutProps',\n 'level',\n 'isLoading',\n 'loadingSlot',\n 'highlight',\n 'highlightCaseSensitive',\n 'highlightStyles',\n 'labelRef',\n] as const;\n\ntype RadioItemProps = Pick<CubeItemProps, (typeof ITEM_PROPS)[number]>;\n\nexport interface CubeRadioProps\n extends BaseProps,\n AriaRadioProps,\n // `labelTooltip` belongs to the group's label: a single radio has none.\n Omit<FieldBaseProps, 'labelTooltip'>,\n /**\n * Container style props apply to button-type radios (they style the `Item`\n * the radio renders). A classic radio only reads the outer subset —\n * everything else belongs to its inner circle and label.\n */\n ContainerStyleProps,\n /**\n * All of these apply to button/tabs-type radios only, except `tooltip`\n * and `labelRef`, which a classic radio supports too.\n */\n RadioItemProps {\n 'aria-label'?: string;\n /* The visual type of the radio button */\n type?: 'button' | 'radio';\n buttonType?: CubeItemProps['type'];\n value?: string;\n /* Size of the button (for button type only) */\n size?: Omit<CubeItemProps['size'], 'inline'>;\n}\n\nfunction Radio(props: CubeRadioProps, ref) {\n props = useFieldProps(props, { defaultValidationTrigger: 'onChange' });\n\n let {\n qa,\n isDisabled,\n isInvalid,\n isValid,\n children,\n label,\n autoFocus,\n labelStyles,\n labelProps,\n type,\n buttonType,\n size,\n 'aria-label': ariaLabel,\n form,\n ...otherProps\n } = props;\n\n label = label || children;\n\n // Only the props the caller actually passed, so an unset one keeps `Item`'s\n // own default instead of being overridden with `undefined`.\n const itemProps: Record<string, unknown> = {};\n\n for (const itemPropName of ITEM_PROPS) {\n if (itemPropName in props) {\n itemProps[itemPropName] = (props as Record<string, unknown>)[\n itemPropName\n ];\n }\n }\n\n labelStyles = {\n ...INLINE_LABEL_STYLES,\n ...labelStyles,\n };\n\n let radioGroupProps = useRadioProvider();\n\n let state = radioGroupProps && radioGroupProps.state;\n let name = radioGroupProps && radioGroupProps.name;\n let contextSize = radioGroupProps?.size;\n let contextButtonType = radioGroupProps?.buttonType;\n let contextType = radioGroupProps?.type;\n let contextIsDisabled = radioGroupProps?.isDisabled;\n\n if (!state) {\n throw new Error('CubeUI: The Radio button is used outside the RadioGroup.');\n }\n\n // Determine effective type from props or context\n let effectiveType = type ?? contextType ?? 'radio';\n let isButton = effectiveType === 'button' || effectiveType === 'tabs';\n\n // A button radio *is* an `Item`, so it takes the same container style props an\n // `ItemButton` does. A classic radio only exposes the outer subset: the rest\n // would land on the wrapper that holds the circle and the label, where\n // `padding` / `fill` / `preset` mean something entirely different.\n let styles = extractStyles(\n otherProps,\n isButton ? CONTAINER_STYLES : OUTER_STYLES,\n );\n\n // Determine effective size with priority: prop > context > default\n let effectiveSize: CubeItemProps['size'] = (size ??\n contextSize ??\n 'medium') as CubeItemProps['size'];\n\n // Apply size mapping for tabs mode button radios.\n // API sizes mapped to Item button sizes: large -> medium (40px), medium -> xsmall (32px).\n if (effectiveType === 'tabs' && isButton) {\n effectiveSize =\n RADIO_SIZE_MAP[effectiveSize === 'large' ? 'large' : 'medium'];\n }\n\n // Determine effective button type\n // In tabs mode, always use 'clear' and ignore buttonType prop.\n let effectiveButtonType: string;\n // When buttonType is 'primary', non-selected radios use 'outline' with a\n // visual-only `selected` mod (mods.selected=true) to render the brand-tinted\n // outline+selected look — this is the only place mods.selected intentionally\n // decouples from the aria/isSelected state. Suppressed while disabled: the\n // real selected radio is then painted with the brand-tinted disabled chip\n // (`accent-disabled-surface`), and faking `selected` on its siblings would\n // give them the outline variant of that same chip and erase the distinction.\n let forceSelectedMod = false;\n if (effectiveType === 'tabs') {\n effectiveButtonType = 'clear';\n } else {\n const baseButtonType = buttonType ?? contextButtonType ?? 'outline';\n if (baseButtonType === 'primary') {\n if (state.selectedValue === props.value) {\n effectiveButtonType = 'primary';\n } else {\n effectiveButtonType = 'outline';\n forceSelectedMod = true;\n }\n } else {\n effectiveButtonType = baseButtonType;\n }\n }\n\n // Use context isDisabled if prop isDisabled is not explicitly set\n let baseIsDisabled = isDisabled ?? contextIsDisabled ?? false;\n\n // Loading has to disable the radio here, not inside `Item`. `useRadio` and the\n // `HiddenInput` covering the button own the actual selection, so leaving it to\n // `Item` would render a spinner on an option that still takes clicks and arrow\n // keys. And because this component always passes a resolved `isDisabled` down,\n // an unresolved `isLoading` would additionally read to `Item` as an explicit\n // `isDisabled={false}` and cancel its own loading-disables-the-item rule.\n //\n // Same precedence as `Item` / `ItemButton`: an explicit `isDisabled={false}`\n // still wins over loading. Button-type only — a classic radio has no spinner,\n // so disabling it on `isLoading` would leave no visible reason why.\n let isLoadingButton = isButton && props.isLoading === true;\n let effectiveIsDisabled =\n baseIsDisabled === true || (isLoadingButton && isDisabled !== false);\n\n let { isFocused, focusProps } = useFocus(\n { isDisabled: effectiveIsDisabled },\n true,\n );\n let { hoverProps, isHovered } = useHover({ isDisabled: effectiveIsDisabled });\n\n // A button radio hands `tooltip` to its `Item`, which resolves it around the\n // element it renders. A classic radio has no `Item`, so it resolves its own —\n // otherwise the prop the type accepts would render nothing at all.\n let { labelRef: tooltipLabelRef, renderWithTooltip } = useAutoTooltip({\n tooltip: isButton ? undefined : props.tooltip,\n children: label,\n labelRef: isButton ? undefined : props.labelRef,\n // As for a button radio's `Item`: an auto tooltip that mounted only once\n // the label truncated would remount the radio, and its focused input.\n isDynamicLabel: true,\n });\n\n let inputRef = useRef(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n let {\n inputProps,\n isDisabled: isRadioDisabled,\n isSelected: isRadioSelected,\n } = useRadio(\n {\n name,\n ...props,\n isDisabled: effectiveIsDisabled,\n },\n state,\n inputRef,\n );\n\n const mods = useMemo(\n () => ({\n checked: isRadioSelected,\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isRadioDisabled,\n hovered: isHovered,\n button: isButton,\n focused: isFocused,\n tabs: effectiveType === 'tabs',\n }),\n [\n isRadioSelected,\n isInvalid,\n isValid,\n isRadioDisabled,\n isHovered,\n isButton,\n isFocused,\n effectiveType,\n ],\n );\n\n // Render button type using Item\n if (isButton) {\n return (\n <RadioButtonElement\n ref={domRef}\n type={effectiveButtonType}\n theme={getValidationTheme(\n 'default',\n { isInvalid, isValid },\n { includeValid: true },\n )}\n size={effectiveSize}\n {...itemProps}\n isSelected={isRadioSelected}\n isDisabled={isRadioDisabled}\n mods={{\n ...mods,\n ...(forceSelectedMod && !isRadioDisabled ? { selected: true } : {}),\n }}\n styles={styles}\n {...mergeProps(hoverProps, focusProps)}\n // Outside the label, so `Item` sees the label alone: its auto tooltip\n // and `highlight` only work on a string label, and an input counted as\n // label content gave an icon-only radio an empty, padded `Label`.\n // Its label's room follows the group's, so whether it truncates can\n // change while it has focus — keep the tooltip from remounting it.\n isDynamicLabel\n // A function, so the input — where keyboard focus lands — gets the\n // tooltip's focus-side trigger props: the tooltip opens on focus and\n // describes the control a screen reader announces.\n hiddenContent={(tooltipFocusProps) => (\n <HiddenInput\n qa={qa || 'Radio'}\n data-input-type=\"radio\"\n aria-label={ariaLabel}\n {...mergeTooltipFocusProps(inputProps, tooltipFocusProps)}\n ref={inputRef}\n form={null}\n mods={{ button: isButton, disabled: isRadioDisabled }}\n />\n )}\n >\n {label}\n </RadioButtonElement>\n );\n }\n\n // Render classic radio type\n return renderWithTooltip((tooltipTriggerProps, tooltipRef) => {\n // Hover on the wrapper, focus on the input it holds (see the button branch).\n const { pointerProps, focusProps: tooltipFocusProps } =\n splitTooltipTriggerProps(tooltipTriggerProps);\n\n return (\n <RadioWrapperElement\n styles={styles}\n {...mergeProps(hoverProps, pointerProps)}\n ref={\n tooltipRef\n ? // Written only when React attaches the node, never during render.\n (element: HTMLLabelElement | null) => {\n (domRef as { current: HTMLElement | null }).current = element;\n (tooltipRef as { current: HTMLElement | null }).current =\n element;\n }\n : domRef\n }\n mods={mods}\n data-type={type}\n >\n <HiddenInput\n qa={qa || 'Radio'}\n data-input-type=\"radio\"\n aria-label={ariaLabel}\n {...mergeTooltipFocusProps(\n mergeProps(inputProps, focusProps),\n tooltipFocusProps,\n )}\n ref={inputRef}\n mods={{ button: isButton }}\n />\n <RadioNormalElement data-element=\"Input\" mods={mods} data-type={type}>\n {RadioCircleElement}\n </RadioNormalElement>\n {label && (\n <RadioLabelElement\n ref={tooltipLabelRef}\n mods={mods}\n styles={labelStyles}\n {...(labelProps ? filterBaseProps(labelProps) : undefined)}\n >\n {label}\n </RadioLabelElement>\n )}\n </RadioWrapperElement>\n );\n }, 'top');\n}\n\n/**\n * Radio buttons allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _Radio = forwardRef(Radio);\n\nconst Tabs = tasty(RadioGroup, {\n type: 'tabs',\n});\n\nconst ButtonGroup = tasty(RadioGroup, {\n type: 'button',\n});\n\nconst __Radio = Object.assign(\n _Radio as typeof _Radio & {\n Group: typeof RadioGroup;\n Tabs: typeof Tabs;\n ButtonGroup: typeof ButtonGroup;\n Button: typeof _Radio;\n },\n {\n Group: RadioGroup,\n Tabs,\n ButtonGroup,\n Button: _Radio,\n },\n);\n\n__Radio.displayName = 'Radio';\n\nexport { __Radio as Radio };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAM8B,uBACJ;;;;;;;;;AAUF,MAAMC,6BACJ;AAEF,MAAMC,qBAAqB1B,MAAMW,OAAM;CACrCgB,IAAI;CACJC,IAAI;CACJC,QAAQ;EACNC,QAAQ;EACRC,YAAY;EACZC,UAAU;EAIVC,cAAc;GACZ,IAAI,uDAAuDT;GAC3D,sBAAsB,6DAA6DA;GACnF,kCAAkC,+GAA+GA;GACjJ,qBAAqB,sIAAsIC;GAC5J;EACDS,cAAc;EACdC,QAAQ;GACN,IAAI;GACJ,mBAAmB;GACnB,8BAA8B;GAC/B;EACDC,MAAM;GACJ,mBAAmB;GACnB,8BAA8B;GAC/B;EACDC,OAAO;GACL,mBAAmB;GACnB,8BAA8B;GAC/B;EAUDC,QAAQ;GACN,IAAI;GACJ,wBAAwB;GACxB,yBAAyB;GACzB,wCAAwC;GACzC;EACDC,QAAQ;GACN,IAAI;GACJ,yBAAyB;GAC1B;EACDC,QAAQ,EACN,oBAAoB,GACrB;EAEDC,OAAO,EACLC,WAAW;GACT,IAAI;GACJ,2DAA2D;GAC7D,EACF;EACF;CACD,CAAC;AAEF,MAAMC,sBAAsB3C,MAAM;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AActK,MAAMsB,aAAY,EACpCiD,MAAM,UACP,CAAC;AAEF,MAAMgG,UAAUC,OAAOC,OACrBL,QAMA;CACEM,OAAOpJ;CACP+I;CACAC;CACAK,QAAQP;CAEZ,CAAC;AAEDG,QAAQK,cAAc"}
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | 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 { castNullableStringValue } from "../../../utils/react/nullableValue.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { createContext, useContext } from "react";
3
3
 
4
4
  //#region src/components/fields/RadioGroup/context.ts
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
4
4
  import { usePopoverSync } from "../../../utils/react/usePopoverSync.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { chain } from "../../../utils/react/chain.js";
3
3
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
4
  import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";
@@ -21,7 +21,7 @@ import { AriaLabelingProps, CollectionBase, DOMRef, Key as Key$2 } from "@react-
21
21
  declare const ListBoxElement: _tenphi_tasty0.TastyPolymorphicComponent<"ul", readonly (keyof _tenphi_tasty0.StylesInterface)[], _tenphi_tasty0.VariantMap, readonly never[], readonly never[]> & {
22
22
  [x: string]: React.ForwardRefExoticComponent<Omit<_tenphi_tasty0.SubElementProps<never>, "ref"> & React.RefAttributes<never>>;
23
23
  };
24
- interface CubeSelectBaseProps<T> extends BasePropsWithoutChildren, AriaLabelingProps, BaseStyleProps, OuterStyleProps, ColorStyleProps, Omit<FieldBaseProps<Key$2 | null | undefined>, 'tooltip'>, CollectionBase<T>, Omit<AriaSelectProps<T>, 'errorMessage' | 'name' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> {
24
+ interface CubeSelectBaseProps<T> extends BasePropsWithoutChildren, AriaLabelingProps, BaseStyleProps, OuterStyleProps, ColorStyleProps, FieldBaseProps<Key$2 | null | undefined>, CollectionBase<T>, Omit<AriaSelectProps<T>, 'errorMessage' | 'name' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> {
25
25
  /** The currently selected key in the collection (controlled). */
26
26
  selectedKey?: Key$2 | null;
27
27
  /** The initial selected key in the collection (uncontrolled). */
@@ -38,7 +38,8 @@ interface CubeSelectBaseProps<T> extends BasePropsWithoutChildren, AriaLabelingP
38
38
  /** Keyboard shortcut that triggers the select when pressed */
39
39
  hotkeys?: string;
40
40
  /**
41
- * Tooltip content and configuration for the trigger:
41
+ * Tooltip content and configuration for the trigger. The info badge next to
42
+ * the field's label is `labelTooltip`.
42
43
  * - string: simple tooltip text
43
44
  * - true: auto tooltip on overflow (shows selected value as tooltip when truncated)
44
45
  * - object: advanced configuration with optional auto property
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { forwardRefWithGenerics } from "../../../utils/react/forwardRefWithGenerics.js";
4
4
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
@@ -297,7 +297,10 @@ function Select(props, ref) {
297
297
  isDisabled
298
298
  })
299
299
  ]
300
- }), ref, mergeProps$1({ ...props }, { labelProps }));
300
+ }), ref, mergeProps$1({
301
+ ...props,
302
+ tooltip: void 0
303
+ }, { labelProps }));
301
304
  }
302
305
  function ListBoxPopup(t0) {
303
306
  const $ = c(47);
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","names":["AriaLabelingProps","CollectionBase","DOMRef","Key","BASE_STYLES","BasePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","OUTER_STYLES","OuterStyleProps","Styles","tasty","React","cloneElement","ReactElement","ReactNode","RefObject","useEffect","useMemo","useRef","AriaSelectProps","DismissButton","FocusScope","HiddenSelect","useButton","useHover","useListBox","useListBoxSection","useOption","useOverlay","useOverlayPosition","useSelect","Section","BaseSection","useSelectState","CubeTooltipProviderProps","useEvent","useI18n","CloseIcon","DirectionIcon","LoadingIcon","FieldBaseProps","generateRandomId","forwardRefWithGenerics","mergeProps","useCombinedRefs","useFocus","focusProgrammatically","useOverlayEscapeGuard","usePopoverSync","extractStyles","ItemAction","isOwnActionsPress","ItemActionsWrapper","StyledDivider","ListDivider","StyledSectionHeading","ListSectionHeading","StyledSection","ListSectionWrapper","CollectionItem","filterCollectionItemProps","CubeItemProps","Item","Text","getValidationIcon","getValidationMods","useFieldProps","wrapWithField","DisplayTransition","Portal","TriggerActions","TriggerIcon","Placement","Props","SelectWrapperElement","qa","styles","display","position","radius","fill","disabled","color","focused","invalid","ListBoxElement","as","gap","flow","margin","padding","listStyle","scrollbar","outline","OptionItem","disableActionsFocus","SelectOverlayWrapper","zIndex","OverlayElement","width","gridRows","height","overflow","shadow","border","boxSizing","transition","translate","transformOrigin","scale","opacity","CubeSelectBaseProps","Omit","T","selectedKey","defaultSelectedKey","onSelectionChange","key","icon","rightIcon","prefix","suffix","triggerDescription","descriptionPlacement","hotkeys","tooltip","auto","triggerRef","HTMLButtonElement","isLoading","loadingIndicator","overlayOffset","hideTrigger","inputStyles","optionStyles","triggerStyles","listBoxStyles","overlayStyles","direction","targetRef","HTMLElement","placement","shouldFlip","containerPadding","inputProps","type","shape","suffixPosition","theme","isClearable","clearLabel","onClear","actions","onOpenChange","isOpen","CubeSelectProps","popoverRef","HTMLInputElement","listBoxRef","size","placeholder","PROP_STYLES","Select","props","ref","HTMLDivElement","defaultValidationTrigger","valuePropsMapper","value","onChange","label","extra","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","autoFocus","message","placementProp","labelSuffix","form","otherProps","t","state","selectId","menuId","onClose","close","containerRef","popover","current","active","document","activeElement","contains","preventScroll","labelProps","triggerProps","valueProps","menuProps","overlayProps","overlayRef","scrollRef","offset","isFocused","focusProps","hoverProps","isHovered","buttonProps","validationIcon","hasSelection","selectedItem","showClearButton","isReadOnly","clearValue","setSelectedKey","focus","triggerWidth","offsetWidth","showPlaceholder","trim","modifiers","loading","hovered","hasCustomRightIcon","undefined","triggerRightIcon","hasTriggerActions","triggerActions","pressed","selectField","name","showActions","rendered","ListBoxPopup","t0","$","_c","minWidth","parentOverlayProps","t1","t2","shouldUseVirtualFocus","listItemSize","t3","focusStrategy","t4","listBoxProps","t5","t6","el","menuTriggerEl","closest","setTimeout","t7","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","rawOverlayProps","t8","split","placementDirection","t9","t10","t11","phase","isShown","transitionRef","style","open","renderedItems","isFirstSection","item","collection","push","String","Option","disabledKeys","has","selectionManager","isSelected","isVirtualFocused","focusedKey","shouldSelectOnPressUp","shouldFocusOnHover","optionProps","isPressed","descriptionProps","T0","filteredItemProps","listboxitem","selected","SelectSectionProps","headingStyles","sectionStyles","SelectSection","heading","itemProps","headingProps","groupProps","Symbol","for","section","childNodes","filter","node","getItem","map","node_0","_Select","cubeInputType","SectionComponent","SelectSectionComponent","Object","assign","displayName","__Select","Action"],"sources":["../../../../src/components/fields/Select/Select.tsx"],"sourcesContent":["import {\n AriaLabelingProps,\n CollectionBase,\n DOMRef,\n Key,\n} from '@react-types/shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport React, {\n cloneElement,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport {\n AriaSelectProps,\n DismissButton,\n FocusScope,\n HiddenSelect,\n useButton,\n useHover,\n useListBox,\n useListBoxSection,\n useOption,\n useOverlay,\n useOverlayPosition,\n useSelect,\n} from 'react-aria';\nimport { Section as BaseSection, useSelectState } from 'react-stately';\nimport { CubeTooltipProviderProps } from 'src/components/overlays/Tooltip/TooltipProvider';\n\nimport { useEvent } from '../../../_internal';\nimport { useI18n } from '../../../i18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { FieldBaseProps } from '../../../shared/index';\nimport { generateRandomId } from '../../../utils/random';\nimport {\n forwardRefWithGenerics,\n mergeProps,\n useCombinedRefs,\n} from '../../../utils/react/index';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { focusProgrammatically } from '../../../utils/react/programmaticFocus';\nimport { useOverlayEscapeGuard } from '../../../utils/react/useOverlayEscapeGuard';\nimport { usePopoverSync } from '../../../utils/react/usePopoverSync';\nimport { extractStyles } from '../../../utils/styles';\nimport { ItemAction } from '../../actions';\nimport { isOwnActionsPress } from '../../actions/actions-run';\nimport { ItemActionsWrapper } from '../../actions/ItemActionsWrapper';\nimport {\n StyledDivider as ListDivider,\n StyledSectionHeading as ListSectionHeading,\n StyledSection as ListSectionWrapper,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n filterCollectionItemProps,\n} from '../../CollectionItem';\nimport { CubeItemProps, Item } from '../../content/Item';\nimport { Text } from '../../content/Text';\nimport {\n getValidationIcon,\n getValidationMods,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { DisplayTransition } from '../../helpers';\nimport { Portal } from '../../portal';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport type { Placement } from 'react-aria';\nimport type { Props } from '../../../props';\n\nconst SelectWrapperElement = tasty({\n qa: 'SelectWrapper',\n styles: {\n display: 'grid',\n position: 'relative',\n radius: true,\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n 'theme=special': '#clear',\n },\n color: {\n '': '#dark.85',\n focused: '#dark.85',\n invalid: '#danger-text',\n disabled: '#disabled-surface-text',\n },\n },\n});\n\nexport const ListBoxElement = tasty({\n qa: 'ListBox',\n as: 'ul',\n styles: {\n display: 'flex',\n gap: '1bw',\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n scrollbar: 'styled',\n // The listbox is programmatically focused when the popover opens\n // (so keyboard nav works immediately) but it should never display a\n // focus ring — only the focused option does. Without this, the\n // browser draws its native outline around the whole listbox when\n // it receives focus.\n outline: 0,\n },\n});\n\n// Use Item for options to unify item visuals and reduce custom styling\nconst OptionItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n qa: 'Option',\n styles: {\n '$inline-compensation': '0px',\n },\n});\n\nconst SelectOverlayWrapper = tasty({\n qa: 'SelectOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n },\n});\n\nconst OverlayElement = tasty({\n qa: 'SelectOverlay',\n styles: {\n width: 'min $overlay-min-width',\n display: 'grid',\n gridRows: '1sf',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '.5x',\n border: true,\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nexport interface CubeSelectBaseProps<T>\n extends BasePropsWithoutChildren,\n AriaLabelingProps,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n Omit<FieldBaseProps<Key | null | undefined>, 'tooltip'>,\n CollectionBase<T>,\n Omit<\n AriaSelectProps<T>,\n | 'errorMessage'\n | 'name'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n > {\n /** The currently selected key in the collection (controlled). */\n selectedKey?: Key | null;\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n icon?: ReactElement;\n rightIcon?: ReactNode;\n prefix?: ReactNode;\n suffix?: ReactNode;\n /** Description text for the trigger. Note: Different from field-level description. */\n triggerDescription?: ReactNode;\n descriptionPlacement?: 'inline' | 'block';\n /** Keyboard shortcut that triggers the select when pressed */\n hotkeys?: string;\n /**\n * Tooltip content and configuration for the trigger:\n * - string: simple tooltip text\n * - true: auto tooltip on overflow (shows selected value as tooltip when truncated)\n * - object: advanced configuration with optional auto property\n */\n tooltip?:\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n triggerRef?: RefObject<HTMLButtonElement>;\n isLoading?: boolean;\n loadingIndicator?: ReactNode;\n overlayOffset?: number;\n hideTrigger?: boolean;\n /**\n * @deprecated Use `triggerStyles` instead\n */\n inputStyles?: Styles;\n optionStyles?: Styles;\n triggerStyles?: Styles;\n listBoxStyles?: Styles;\n overlayStyles?: Styles;\n direction?: 'top' | 'bottom';\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Only the popover's POSITION follows this ref. The trigger keeps its own\n * ref for focus, outside-click and dismiss logic, so anchoring to a wider\n * container does not make clicks inside that container count as trigger\n * presses. The popover's `minWidth` also stays tied to the trigger, not to\n * this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /**\n * Placement of the popover relative to the anchor.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n *\n * Overrides `direction` when both are given.\n * @default `${direction} end`\n */\n placement?: Placement;\n shouldFlip?: boolean;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n inputProps?: Props;\n type?: 'outline' | 'outline-2' | 'clear' | 'primary' | (string & {});\n /**\n * Shape of the trigger's border radius.\n * - `card` - Card shape with larger border radius (`1cr`)\n * - `button` - Button shape with default border radius (default)\n * - `sharp` - Sharp corners with no border radius (`0`)\n * - `pill` - Pill shape with fully rounded ends (`round`)\n * @default \"button\"\n */\n shape?: 'card' | 'button' | 'sharp' | 'pill';\n suffixPosition?: 'before' | 'after';\n theme?: 'default' | 'special';\n /** Whether the select is clearable using a clear button in the rightIcon slot */\n isClearable?: boolean;\n /** Accessible name for the built-in clear button. Defaults to a localized \"Clear value\". */\n clearLabel?: string;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n /**\n * Custom actions rendered inside the trigger, to the left of the built-in\n * clear button and dropdown caret. Use `Select.Action` so they match the\n * trigger's size and theme.\n *\n * Pressing one runs its handler without opening or closing the popover —\n * including while the popover is open. Actions follow the trigger's disabled\n * state but NOT `isReadOnly`, since a read-only field can still host an\n * action that does not change the value; pass `isDisabled` yourself for one\n * that does.\n */\n actions?: ReactNode;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport interface CubeSelectProps<T> extends CubeSelectBaseProps<T> {\n popoverRef?: RefObject<HTMLInputElement>;\n /** The ref for the list box. */\n listBoxRef?: RefObject<HTMLElement>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n placeholder?: string;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nfunction Select<T extends object>(\n props: CubeSelectProps<T>,\n ref: DOMRef<HTMLDivElement>,\n) {\n props = useFieldProps(props, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n selectedKey: value ?? null,\n onSelectionChange: onChange,\n }),\n });\n\n let {\n qa,\n label,\n extra,\n icon,\n rightIcon,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n prefix,\n isDisabled = props.isLoading || false,\n autoFocus,\n inputProps,\n triggerRef,\n popoverRef,\n listBoxRef,\n isLoading,\n loadingIndicator,\n overlayOffset = 8,\n inputStyles,\n triggerStyles,\n optionStyles,\n listBoxStyles,\n overlayStyles,\n suffix,\n actions,\n message,\n triggerDescription,\n descriptionPlacement,\n hotkeys,\n direction = 'bottom',\n targetRef,\n placement: placementProp,\n shouldFlip = true,\n containerPadding = 8,\n placeholder,\n tooltip,\n size = 'medium',\n shape,\n styles,\n type = 'outline',\n theme = 'default',\n labelSuffix,\n suffixPosition = 'before',\n isClearable,\n clearLabel,\n onOpenChange,\n form,\n ...otherProps\n } = props;\n const { t } = useI18n();\n let state = useSelectState(props);\n\n // Generate a unique ID for this select instance\n const selectId = useMemo(() => generateRandomId(), []);\n\n // Call onOpenChange when open state changes\n useEffect(() => {\n onOpenChange?.(state.isOpen);\n }, [state.isOpen]);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n triggerRef = useCombinedRefs(triggerRef);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n usePopoverSync({\n menuId: selectId,\n isOpen: state.isOpen,\n onClose: () => state.close(),\n triggerRef: triggerRef as RefObject<HTMLElement | null>,\n containerRef: popoverRef as RefObject<HTMLElement | null>,\n });\n\n // Hand focus back to the trigger the moment the list closes, rather than\n // leaving it to the popup's `FocusScope`, which only restores when it\n // UNMOUNTS — at the end of the exit transition (CUB-4839).\n //\n // For the length of that transition focus would otherwise sit on an option\n // inside a popup that is going away, and the key a user presses next can\n // land nowhere at all: once the option is detached focus drops to `<body>`,\n // which takes the event out of the React tree entirely.\n //\n // `focusProgrammatically` so the trigger's tooltip does not read this as the\n // user arriving and pop up — it would then swallow that next `Escape`.\n //\n // Guarded on focus still being INSIDE the popup, so this only finishes a\n // hand-off the popup had already started: closing by clicking elsewhere\n // leaves focus wherever the user put it.\n useEffect(() => {\n if (state.isOpen) return;\n\n const popover = popoverRef.current;\n const active = document.activeElement;\n\n if (!popover || !active || !popover.contains(active)) return;\n\n focusProgrammatically(triggerRef.current, { preventScroll: true });\n // Both refs come from `useCombinedRefs`, so their identity never changes;\n // listing them satisfies the rule without re-running this.\n }, [state.isOpen, popoverRef, triggerRef]);\n\n let { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n props,\n state,\n triggerRef,\n );\n\n let { overlayProps, placement } = useOverlayPosition({\n // Position only. `triggerRef` stays the dismiss/focus anchor below, so a\n // consumer can line this popover up with a row without that row's clicks\n // reading as presses on the trigger.\n targetRef: (targetRef ?? triggerRef) as RefObject<HTMLElement>,\n overlayRef: popoverRef,\n scrollRef: listBoxRef,\n placement: placementProp ?? (`${direction} end` as Placement),\n shouldFlip: shouldFlip,\n isOpen: state.isOpen,\n onClose: state.close,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n let { isFocused, focusProps } = useFocus({ isDisabled }, true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n // Get props for the button based on the trigger props from useSelect\n let { buttonProps } = useButton(triggerProps, triggerRef);\n\n let validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // Clear button logic\n let hasSelection = state.selectedItem != null;\n let showClearButton =\n isClearable && hasSelection && !isDisabled && !props.isReadOnly;\n\n // Clear function\n let clearValue = useEvent(() => {\n props.onSelectionChange?.(null);\n state.setSelectedKey(null);\n // Close the popup if it's open\n if (state.isOpen) {\n state.close();\n }\n // Return focus to the trigger for better UX\n triggerRef.current?.focus?.();\n\n props.onClear?.();\n });\n\n let triggerWidth = triggerRef?.current?.offsetWidth;\n\n const showPlaceholder = !!placeholder?.trim() && !state.selectedItem;\n\n const modifiers = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n loading: isLoading,\n hovered: isHovered,\n focused: isFocused,\n placeholder: showPlaceholder,\n prefix: !!prefix,\n suffix: true,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isHovered,\n isFocused,\n showPlaceholder,\n prefix,\n ],\n );\n\n suffix = useMemo(() => {\n if (!suffix && !validationIcon) {\n return null;\n }\n\n return (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }, [suffix, validationIcon]);\n\n // A caller's `rightIcon` keeps the `rightIcon` slot: it accepts a render\n // function resolved against the trigger's mods, which only that slot does, and\n // it is also what a caller's `RightIcon` styles target. It replaces the\n // built-in control, exactly as before.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon ? (\n isLoading ? (\n <LoadingIcon />\n ) : (\n rightIcon\n )\n ) : undefined;\n\n // With a caller's own `rightIcon` the built-in control moves into that slot,\n // leaving the run with whatever the caller passed — possibly nothing. The run\n // is still rendered, so the trigger does not restructure if actions arrive\n // later, but the row stops counting it as end content — which is what keeps an\n // icon-only trigger with `rightIcon={null}` square.\n const hasTriggerActions = !hasCustomRightIcon || !!actions;\n\n // Everything trailing that is NOT the caller's own icon goes into the actions\n // run — a sibling of the `<button>`, so the clear button is no longer nested\n // inside one. See `TriggerActions`.\n const triggerActions = (\n <TriggerActions\n actions={actions}\n builtIn={\n hasCustomRightIcon ? null : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"SelectClearButton\"\n // `ItemAction` derives its accessible name from `aria-label` or a\n // string `tooltip` and warns for neither, so an icon-only clear\n // button without this reaches a screen reader unnamed.\n aria-label={clearLabel ?? t('select.clearValue', 'Clear value')}\n // No explicit `type`/`theme`: the default `current` type paints\n // from the trigger's own inherited text color, so the button\n // matches whatever the field is showing instead of one palette.\n //\n // NOTE: this trigger keeps NEUTRAL label text when invalid, so\n // the button reads neutral there too. `Picker` and `FilterPicker`\n // are also `Item`-based but do tint theirs, which is the actual\n // inconsistency to fix — in `Select`, not here.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : isLoading ? (\n <TriggerIcon>\n <LoadingIcon />\n </TriggerIcon>\n ) : (\n <TriggerIcon>\n <DirectionIcon to={state.isOpen ? 'up' : 'down'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n let selectField = (\n <SelectWrapperElement\n mods={modifiers}\n styles={styles}\n data-size={size}\n data-type={type}\n data-theme={theme}\n >\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n />\n {/*\n The trigger's trailing controls are rendered as a SIBLING of the\n `<button>` — the same layout `ItemButton` uses for its actions, shared\n through `ItemActionsWrapper`. `Select` builds its trigger from `Item`\n rather than `ItemButton` because `useSelect`/`useButton` already own the\n button props, so it reaches for the wrapper directly.\n\n The RAW theme, unlike `Picker` / `FilterPicker` which forward\n `getValidationTheme(...)`: this trigger is painted with the raw theme too\n and surfaces validation through `SelectWrapperElement` rather than by\n switching theme. What the wrapper hands its actions must always match\n what the trigger paints with.\n */}\n <ItemActionsWrapper\n type={type}\n theme={theme}\n size={size}\n isDisabled={isDisabled || isLoading}\n mods={modifiers}\n actions={triggerActions}\n >\n {({ showActions }) => (\n <Item\n actions={hasTriggerActions || undefined}\n insideWrapper\n as=\"button\"\n qa={qa || 'Select'}\n data-input-type=\"select\"\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={triggerRef}\n data-popover-trigger\n showActions={showActions}\n styles={{ ...inputStyles, ...triggerStyles }}\n theme={theme}\n size={size}\n shape={shape}\n // Ensure this button never submits a surrounding form in tests or runtime\n htmlType=\"button\"\n // Preserve visual variant via data attribute instead of conflicting with HTML attribute\n type={type}\n mods={modifiers}\n prefix={prefix}\n suffix={suffix}\n icon={icon}\n rightIcon={triggerRightIcon}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n hotkeys={hotkeys}\n tooltip={tooltip}\n labelProps={valueProps}\n >\n {state.selectedItem ? (\n state.selectedItem.rendered\n ) : placeholder ? (\n <Text.Placeholder>{placeholder}</Text.Placeholder>\n ) : null}\n </Item>\n )}\n </ItemActionsWrapper>\n <ListBoxPopup\n {...menuProps}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n overlayProps={overlayProps}\n placement={placement}\n state={state}\n listBoxStyles={listBoxStyles}\n overlayStyles={overlayStyles}\n optionStyles={optionStyles}\n minWidth={triggerWidth}\n triggerRef={triggerRef}\n isDisabled={isDisabled}\n />\n </SelectWrapperElement>\n );\n\n return wrapWithField<Omit<CubeSelectProps<T>, 'children'>>(\n selectField,\n ref,\n mergeProps(\n {\n ...props,\n },\n { labelProps },\n ),\n );\n}\n\nexport function ListBoxPopup({\n state,\n popoverRef,\n listBoxRef,\n listBoxStyles,\n overlayStyles,\n optionStyles,\n overlayProps: parentOverlayProps,\n shouldUseVirtualFocus = false,\n placement,\n minWidth,\n size = 'small',\n triggerRef,\n isDisabled,\n ...otherProps\n}) {\n // For trigger+popover components, map 'small' size to 'medium' for list items\n // while preserving 'medium' and 'large' sizes\n const listItemSize = size === 'small' ? 'medium' : size;\n\n // Get props for the listbox\n let { listBoxProps } = useListBox(\n {\n autoFocus: state.focusStrategy || true,\n shouldUseVirtualFocus,\n ...otherProps,\n },\n state,\n listBoxRef,\n );\n\n // Handle events that should cause the popup to close,\n // e.g. blur, clicking outside, or pressing the escape key.\n let { overlayProps: rawOverlayProps } = useOverlay(\n {\n onClose: () => state.close(),\n shouldCloseOnBlur: true,\n isOpen: state.isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n // The trigger owns interactive controls of its own — the clear button\n // and any custom `actions`. They sit in the actions run, a SIBLING of\n // the trigger, so the lookup below would read them as a press outside\n // and dismiss, swallowing the press: the first press on `Reset` while\n // the list was open only closed the list and the action never ran. Same\n // guard as `DialogTrigger`, which `Picker` / `FilterPicker` go through.\n if (isOwnActionsPress(el, triggerRef?.current)) return false;\n\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) {\n if (el.closest('[data-popover-keep]')) return false;\n // Plain interactive controls (Button, ItemButton) opt in via\n // `data-popover-dismiss` to dismiss us without losing their click\n // to useOverlay's stopPropagation. Schedule the close after the\n // click finishes so the button's onPress runs first.\n if (el.closest('[data-popover-dismiss]')) {\n setTimeout(() => state.close(), 0);\n return false;\n }\n return true;\n }\n // If the same trigger that opened this select was clicked, allow closing\n if (menuTriggerEl === triggerRef?.current) return true;\n // Otherwise, don't close (let event mechanism handle it)\n return false;\n },\n },\n popoverRef,\n );\n\n // A list that has already closed must not swallow the `Escape` meant for\n // whatever surrounds it — see `useOverlayEscapeGuard`.\n const overlayProps = useOverlayEscapeGuard(rawOverlayProps, state.isOpen);\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || 'bottom';\n\n // Wrap in <FocusScope> so that focus is restored back to the\n // trigger when the popup is closed. In addition, add hidden\n // <DismissButton> components at the start and end of the list\n // to allow screen reader users to dismiss the popup easily.\n //\n // `autoFocus` is required because `ListBoxPopup` is rendered\n // unconditionally (not gated on `state.isOpen`), so by the time the\n // popover actually opens, react-aria's `useSelectableCollection`\n // autoFocus has already been consumed (its useRef captures the\n // initial value on mount, when the listbox isn't in the DOM yet).\n // Setting `autoFocus` on the FocusScope itself runs each time the\n // FocusScope mounts (every time the popover opens, since the inner\n // tree is unmounted between opens) and explicitly focuses the\n // first tabbable element (the listbox). This also registers the\n // FocusScope as the active scope, so an outer contained Dialog\n // FocusScope (e.g. a popover Dialog wrapping the Select) correctly\n // recognises focus moving into the Select popover and doesn't yank\n // it back to the trigger.\n return (\n <Portal>\n <DisplayTransition isShown={state.isOpen && !isDisabled}>\n {({ phase, isShown, ref: transitionRef }) => (\n <SelectOverlayWrapper\n {...overlayProps}\n {...parentOverlayProps}\n ref={popoverRef}\n style={parentOverlayProps?.style}\n >\n <OverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n }}\n styles={overlayStyles}\n style={{\n '--overlay-min-width': minWidth ? `${minWidth}px` : 'initial',\n }}\n >\n <FocusScope autoFocus restoreFocus>\n <DismissButton onDismiss={() => state.close()} />\n {(() => {\n const renderedItems: React.ReactNode[] = [];\n let isFirstSection = true;\n\n for (const item of state.collection) {\n if (item.type === 'section') {\n if (!isFirstSection) {\n renderedItems.push(\n <ListDivider\n key={`divider-${String(item.key)}`}\n as=\"li\"\n role=\"separator\"\n aria-orientation=\"horizontal\"\n />,\n );\n }\n\n renderedItems.push(\n <SelectSection\n key={item.key}\n item={item}\n state={state}\n optionStyles={optionStyles}\n sectionStyles={undefined}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n\n isFirstSection = false;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n item={item}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n }\n }\n\n return (\n <ListBoxElement\n styles={listBoxStyles}\n {...listBoxProps}\n ref={listBoxRef}\n >\n {renderedItems}\n </ListBoxElement>\n );\n })()}\n <DismissButton onDismiss={() => state.close()} />\n </FocusScope>\n </OverlayElement>\n </SelectOverlayWrapper>\n )}\n </DisplayTransition>\n </Portal>\n );\n}\n\nfunction Option({ item, state, styles, shouldUseVirtualFocus, size }) {\n let ref = useRef<HTMLLIElement>(null);\n let isDisabled = state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let isVirtualFocused = state.selectionManager.focusedKey === item.key;\n\n let { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n shouldUseVirtualFocus,\n },\n state,\n ref,\n );\n\n // Handle focus events, so we can apply highlighted\n // style to the focused option\n let { isFocused, focusProps } = useFocus({ isDisabled });\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterCollectionItemProps(item.props);\n\n return (\n <OptionItem\n {...mergeProps(optionProps, focusProps, filteredItemProps)}\n ref={ref}\n mods={{\n listboxitem: true,\n selected: isSelected,\n focused: shouldUseVirtualFocus ? isVirtualFocused : isFocused,\n disabled: isDisabled,\n pressed: isPressed,\n }}\n data-size={size}\n styles={{\n ...(styles as Styles),\n ...(filteredItemProps.styles as Styles),\n }}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n defaultTooltipPlacement=\"right\"\n >\n {item.rendered}\n </OptionItem>\n );\n}\n\ninterface SelectSectionProps<T> {\n item: any; // react-stately Node<T>\n state: any; // TreeState<T>\n optionStyles?: Styles;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n shouldUseVirtualFocus?: boolean;\n size?: string;\n}\n\nfunction SelectSection<T>(props: SelectSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n headingStyles,\n sectionStyles,\n shouldUseVirtualFocus,\n size,\n } = props;\n\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <ListSectionWrapper {...itemProps} styles={sectionStyles}>\n {heading && (\n <ListSectionHeading\n {...headingProps}\n size={size}\n styles={{ ...headingStyles, '$inline-compensation': '0px' }}\n >\n {heading}\n </ListSectionHeading>\n )}\n <ListBoxElement {...groupProps} mods={{ section: true }}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n item={node}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n ))}\n </ListBoxElement>\n </ListSectionWrapper>\n );\n}\n\nconst _Select = forwardRefWithGenerics(Select);\n\n(_Select as any).cubeInputType = 'Select';\n\ntype SectionComponent = typeof BaseSection;\n\nconst SelectSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nconst __Select = Object.assign(\n _Select as typeof _Select & {\n Item: typeof CollectionItem;\n Section: typeof SelectSectionComponent;\n Action: typeof ItemAction;\n },\n {\n Item: CollectionItem,\n Section: SelectSectionComponent,\n Action: ItemAction,\n },\n);\n\n(__Select as any).displayName = 'Select';\n\nexport { __Select as Select };\n\nexport type { AriaSelectProps };\nexport { useSelectState };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAM4E,uBAAuBhE,MAAM;CACjCiE,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,MAAM;GACJ,IAAI;GACJC,UAAU;GACV,iBAAiB;GAClB;EACDC,OAAO;GACL,IAAI;GACJC,SAAS;GACTC,SAAS;GACTH,UAAU;GACZ;EACF;CACD,CAAC;AAEF,MAAaI,iBAAiB3E,MAAM;CAClCiE,IAAI;CACJW,IAAI;CACJV,QAAQ;EACNC,SAAS;EACTU,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,WAAW;EACXC,WAAW;EAMXC,SAAS;EACX;CACD,CAAC;AAGF,MAAMC,aAAapF,MAAMoD,OAAM;CAC7BwB,IAAI;CACJS,qBAAqB;CACrBpB,IAAI;CACJC,QAAQ,EACN,wBAAwB,OAC1B;CACD,CAAC;AAEF,MAAMoB,uBAAuBtF,MAAM;CACjCiE,IAAI;CACJC,QAAQ;EACNE,UAAU;EACVmB,QAAQ;EACV;CACD,CAAC;AAEF,MAAMC,iBAAiBxF,MAAM;CAC3BiE,IAAI;CACJC,QAAQ;EACNuB,OAAO;EACPtB,SAAS;EACTuB,UAAU;EACVC,QAAQ;EACRC,UAAU;EACVtB,MAAM;EACND,QAAQ;EACRwB,QAAQ;EACRb,SA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AAACqJ,QAAgBC,gBAAgB;AAIjC,MAAME,yBAAyBC,OAAOC,OAAO5R,SAAa,EACxD6R,aAAa,WACd,CAAC;AAEF,MAAMC,WAAWH,OAAOC,OACtBL,SAKA;CACEzP,MAAMH;CACN5B,SAAS2R;CACTK,QAAQ7Q;CAEZ,CAAC;AAED,AAAC4Q,SAAiBD,cAAc"}
1
+ {"version":3,"file":"Select.js","names":["AriaLabelingProps","CollectionBase","DOMRef","Key","BASE_STYLES","BasePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","OUTER_STYLES","OuterStyleProps","Styles","tasty","React","cloneElement","ReactElement","ReactNode","RefObject","useEffect","useMemo","useRef","AriaSelectProps","DismissButton","FocusScope","HiddenSelect","useButton","useHover","useListBox","useListBoxSection","useOption","useOverlay","useOverlayPosition","useSelect","Section","BaseSection","useSelectState","CubeTooltipProviderProps","useEvent","useI18n","CloseIcon","DirectionIcon","LoadingIcon","FieldBaseProps","generateRandomId","forwardRefWithGenerics","mergeProps","useCombinedRefs","useFocus","focusProgrammatically","useOverlayEscapeGuard","usePopoverSync","extractStyles","ItemAction","isOwnActionsPress","ItemActionsWrapper","StyledDivider","ListDivider","StyledSectionHeading","ListSectionHeading","StyledSection","ListSectionWrapper","CollectionItem","filterCollectionItemProps","CubeItemProps","Item","Text","getValidationIcon","getValidationMods","useFieldProps","wrapWithField","DisplayTransition","Portal","TriggerActions","TriggerIcon","Placement","Props","SelectWrapperElement","qa","styles","display","position","radius","fill","disabled","color","focused","invalid","ListBoxElement","as","gap","flow","margin","padding","listStyle","scrollbar","outline","OptionItem","disableActionsFocus","SelectOverlayWrapper","zIndex","OverlayElement","width","gridRows","height","overflow","shadow","border","boxSizing","transition","translate","transformOrigin","scale","opacity","CubeSelectBaseProps","T","Omit","selectedKey","defaultSelectedKey","onSelectionChange","key","icon","rightIcon","prefix","suffix","triggerDescription","descriptionPlacement","hotkeys","tooltip","auto","triggerRef","HTMLButtonElement","isLoading","loadingIndicator","overlayOffset","hideTrigger","inputStyles","optionStyles","triggerStyles","listBoxStyles","overlayStyles","direction","targetRef","HTMLElement","placement","shouldFlip","containerPadding","inputProps","type","shape","suffixPosition","theme","isClearable","clearLabel","onClear","actions","onOpenChange","isOpen","CubeSelectProps","popoverRef","HTMLInputElement","listBoxRef","size","placeholder","PROP_STYLES","Select","props","ref","HTMLDivElement","defaultValidationTrigger","valuePropsMapper","value","onChange","label","extra","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","autoFocus","message","placementProp","labelSuffix","form","otherProps","t","state","selectId","menuId","onClose","close","containerRef","popover","current","active","document","activeElement","contains","preventScroll","labelProps","triggerProps","valueProps","menuProps","overlayProps","overlayRef","scrollRef","offset","isFocused","focusProps","hoverProps","isHovered","buttonProps","validationIcon","hasSelection","selectedItem","showClearButton","isReadOnly","clearValue","setSelectedKey","focus","triggerWidth","offsetWidth","showPlaceholder","trim","modifiers","loading","hovered","hasCustomRightIcon","undefined","triggerRightIcon","hasTriggerActions","triggerActions","pressed","selectField","name","showActions","rendered","ListBoxPopup","t0","$","_c","minWidth","parentOverlayProps","t1","t2","shouldUseVirtualFocus","listItemSize","t3","focusStrategy","t4","listBoxProps","t5","t6","el","menuTriggerEl","closest","setTimeout","t7","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","rawOverlayProps","t8","split","placementDirection","t9","t10","t11","phase","isShown","transitionRef","style","open","renderedItems","isFirstSection","item","collection","push","String","Option","disabledKeys","has","selectionManager","isSelected","isVirtualFocused","focusedKey","shouldSelectOnPressUp","shouldFocusOnHover","optionProps","isPressed","descriptionProps","T0","filteredItemProps","listboxitem","selected","SelectSectionProps","headingStyles","sectionStyles","SelectSection","heading","itemProps","headingProps","groupProps","Symbol","for","section","childNodes","filter","node","getItem","map","node_0","_Select","cubeInputType","SectionComponent","SelectSectionComponent","Object","assign","displayName","__Select","Action"],"sources":["../../../../src/components/fields/Select/Select.tsx"],"sourcesContent":["import {\n AriaLabelingProps,\n CollectionBase,\n DOMRef,\n Key,\n} from '@react-types/shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport React, {\n cloneElement,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport {\n AriaSelectProps,\n DismissButton,\n FocusScope,\n HiddenSelect,\n useButton,\n useHover,\n useListBox,\n useListBoxSection,\n useOption,\n useOverlay,\n useOverlayPosition,\n useSelect,\n} from 'react-aria';\nimport { Section as BaseSection, useSelectState } from 'react-stately';\nimport { CubeTooltipProviderProps } from 'src/components/overlays/Tooltip/TooltipProvider';\n\nimport { useEvent } from '../../../_internal';\nimport { useI18n } from '../../../i18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { FieldBaseProps } from '../../../shared/index';\nimport { generateRandomId } from '../../../utils/random';\nimport {\n forwardRefWithGenerics,\n mergeProps,\n useCombinedRefs,\n} from '../../../utils/react/index';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { focusProgrammatically } from '../../../utils/react/programmaticFocus';\nimport { useOverlayEscapeGuard } from '../../../utils/react/useOverlayEscapeGuard';\nimport { usePopoverSync } from '../../../utils/react/usePopoverSync';\nimport { extractStyles } from '../../../utils/styles';\nimport { ItemAction } from '../../actions';\nimport { isOwnActionsPress } from '../../actions/actions-run';\nimport { ItemActionsWrapper } from '../../actions/ItemActionsWrapper';\nimport {\n StyledDivider as ListDivider,\n StyledSectionHeading as ListSectionHeading,\n StyledSection as ListSectionWrapper,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n filterCollectionItemProps,\n} from '../../CollectionItem';\nimport { CubeItemProps, Item } from '../../content/Item';\nimport { Text } from '../../content/Text';\nimport {\n getValidationIcon,\n getValidationMods,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { DisplayTransition } from '../../helpers';\nimport { Portal } from '../../portal';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport type { Placement } from 'react-aria';\nimport type { Props } from '../../../props';\n\nconst SelectWrapperElement = tasty({\n qa: 'SelectWrapper',\n styles: {\n display: 'grid',\n position: 'relative',\n radius: true,\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n 'theme=special': '#clear',\n },\n color: {\n '': '#dark.85',\n focused: '#dark.85',\n invalid: '#danger-text',\n disabled: '#disabled-surface-text',\n },\n },\n});\n\nexport const ListBoxElement = tasty({\n qa: 'ListBox',\n as: 'ul',\n styles: {\n display: 'flex',\n gap: '1bw',\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n scrollbar: 'styled',\n // The listbox is programmatically focused when the popover opens\n // (so keyboard nav works immediately) but it should never display a\n // focus ring — only the focused option does. Without this, the\n // browser draws its native outline around the whole listbox when\n // it receives focus.\n outline: 0,\n },\n});\n\n// Use Item for options to unify item visuals and reduce custom styling\nconst OptionItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n qa: 'Option',\n styles: {\n '$inline-compensation': '0px',\n },\n});\n\nconst SelectOverlayWrapper = tasty({\n qa: 'SelectOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n },\n});\n\nconst OverlayElement = tasty({\n qa: 'SelectOverlay',\n styles: {\n width: 'min $overlay-min-width',\n display: 'grid',\n gridRows: '1sf',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '.5x',\n border: true,\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nexport interface CubeSelectBaseProps<T>\n extends BasePropsWithoutChildren,\n AriaLabelingProps,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n FieldBaseProps<Key | null | undefined>,\n CollectionBase<T>,\n Omit<\n AriaSelectProps<T>,\n | 'errorMessage'\n | 'name'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n > {\n /** The currently selected key in the collection (controlled). */\n selectedKey?: Key | null;\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n icon?: ReactElement;\n rightIcon?: ReactNode;\n prefix?: ReactNode;\n suffix?: ReactNode;\n /** Description text for the trigger. Note: Different from field-level description. */\n triggerDescription?: ReactNode;\n descriptionPlacement?: 'inline' | 'block';\n /** Keyboard shortcut that triggers the select when pressed */\n hotkeys?: string;\n /**\n * Tooltip content and configuration for the trigger. The info badge next to\n * the field's label is `labelTooltip`.\n * - string: simple tooltip text\n * - true: auto tooltip on overflow (shows selected value as tooltip when truncated)\n * - object: advanced configuration with optional auto property\n */\n tooltip?:\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n triggerRef?: RefObject<HTMLButtonElement>;\n isLoading?: boolean;\n loadingIndicator?: ReactNode;\n overlayOffset?: number;\n hideTrigger?: boolean;\n /**\n * @deprecated Use `triggerStyles` instead\n */\n inputStyles?: Styles;\n optionStyles?: Styles;\n triggerStyles?: Styles;\n listBoxStyles?: Styles;\n overlayStyles?: Styles;\n direction?: 'top' | 'bottom';\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Only the popover's POSITION follows this ref. The trigger keeps its own\n * ref for focus, outside-click and dismiss logic, so anchoring to a wider\n * container does not make clicks inside that container count as trigger\n * presses. The popover's `minWidth` also stays tied to the trigger, not to\n * this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /**\n * Placement of the popover relative to the anchor.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n *\n * Overrides `direction` when both are given.\n * @default `${direction} end`\n */\n placement?: Placement;\n shouldFlip?: boolean;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n inputProps?: Props;\n type?: 'outline' | 'outline-2' | 'clear' | 'primary' | (string & {});\n /**\n * Shape of the trigger's border radius.\n * - `card` - Card shape with larger border radius (`1cr`)\n * - `button` - Button shape with default border radius (default)\n * - `sharp` - Sharp corners with no border radius (`0`)\n * - `pill` - Pill shape with fully rounded ends (`round`)\n * @default \"button\"\n */\n shape?: 'card' | 'button' | 'sharp' | 'pill';\n suffixPosition?: 'before' | 'after';\n theme?: 'default' | 'special';\n /** Whether the select is clearable using a clear button in the rightIcon slot */\n isClearable?: boolean;\n /** Accessible name for the built-in clear button. Defaults to a localized \"Clear value\". */\n clearLabel?: string;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n /**\n * Custom actions rendered inside the trigger, to the left of the built-in\n * clear button and dropdown caret. Use `Select.Action` so they match the\n * trigger's size and theme.\n *\n * Pressing one runs its handler without opening or closing the popover —\n * including while the popover is open. Actions follow the trigger's disabled\n * state but NOT `isReadOnly`, since a read-only field can still host an\n * action that does not change the value; pass `isDisabled` yourself for one\n * that does.\n */\n actions?: ReactNode;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport interface CubeSelectProps<T> extends CubeSelectBaseProps<T> {\n popoverRef?: RefObject<HTMLInputElement>;\n /** The ref for the list box. */\n listBoxRef?: RefObject<HTMLElement>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n placeholder?: string;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nfunction Select<T extends object>(\n props: CubeSelectProps<T>,\n ref: DOMRef<HTMLDivElement>,\n) {\n props = useFieldProps(props, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n selectedKey: value ?? null,\n onSelectionChange: onChange,\n }),\n });\n\n let {\n qa,\n label,\n extra,\n icon,\n rightIcon,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n prefix,\n isDisabled = props.isLoading || false,\n autoFocus,\n inputProps,\n triggerRef,\n popoverRef,\n listBoxRef,\n isLoading,\n loadingIndicator,\n overlayOffset = 8,\n inputStyles,\n triggerStyles,\n optionStyles,\n listBoxStyles,\n overlayStyles,\n suffix,\n actions,\n message,\n triggerDescription,\n descriptionPlacement,\n hotkeys,\n direction = 'bottom',\n targetRef,\n placement: placementProp,\n shouldFlip = true,\n containerPadding = 8,\n placeholder,\n tooltip,\n size = 'medium',\n shape,\n styles,\n type = 'outline',\n theme = 'default',\n labelSuffix,\n suffixPosition = 'before',\n isClearable,\n clearLabel,\n onOpenChange,\n form,\n ...otherProps\n } = props;\n const { t } = useI18n();\n let state = useSelectState(props);\n\n // Generate a unique ID for this select instance\n const selectId = useMemo(() => generateRandomId(), []);\n\n // Call onOpenChange when open state changes\n useEffect(() => {\n onOpenChange?.(state.isOpen);\n }, [state.isOpen]);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n triggerRef = useCombinedRefs(triggerRef);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n usePopoverSync({\n menuId: selectId,\n isOpen: state.isOpen,\n onClose: () => state.close(),\n triggerRef: triggerRef as RefObject<HTMLElement | null>,\n containerRef: popoverRef as RefObject<HTMLElement | null>,\n });\n\n // Hand focus back to the trigger the moment the list closes, rather than\n // leaving it to the popup's `FocusScope`, which only restores when it\n // UNMOUNTS — at the end of the exit transition (CUB-4839).\n //\n // For the length of that transition focus would otherwise sit on an option\n // inside a popup that is going away, and the key a user presses next can\n // land nowhere at all: once the option is detached focus drops to `<body>`,\n // which takes the event out of the React tree entirely.\n //\n // `focusProgrammatically` so the trigger's tooltip does not read this as the\n // user arriving and pop up — it would then swallow that next `Escape`.\n //\n // Guarded on focus still being INSIDE the popup, so this only finishes a\n // hand-off the popup had already started: closing by clicking elsewhere\n // leaves focus wherever the user put it.\n useEffect(() => {\n if (state.isOpen) return;\n\n const popover = popoverRef.current;\n const active = document.activeElement;\n\n if (!popover || !active || !popover.contains(active)) return;\n\n focusProgrammatically(triggerRef.current, { preventScroll: true });\n // Both refs come from `useCombinedRefs`, so their identity never changes;\n // listing them satisfies the rule without re-running this.\n }, [state.isOpen, popoverRef, triggerRef]);\n\n let { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n props,\n state,\n triggerRef,\n );\n\n let { overlayProps, placement } = useOverlayPosition({\n // Position only. `triggerRef` stays the dismiss/focus anchor below, so a\n // consumer can line this popover up with a row without that row's clicks\n // reading as presses on the trigger.\n targetRef: (targetRef ?? triggerRef) as RefObject<HTMLElement>,\n overlayRef: popoverRef,\n scrollRef: listBoxRef,\n placement: placementProp ?? (`${direction} end` as Placement),\n shouldFlip: shouldFlip,\n isOpen: state.isOpen,\n onClose: state.close,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n let { isFocused, focusProps } = useFocus({ isDisabled }, true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n // Get props for the button based on the trigger props from useSelect\n let { buttonProps } = useButton(triggerProps, triggerRef);\n\n let validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // Clear button logic\n let hasSelection = state.selectedItem != null;\n let showClearButton =\n isClearable && hasSelection && !isDisabled && !props.isReadOnly;\n\n // Clear function\n let clearValue = useEvent(() => {\n props.onSelectionChange?.(null);\n state.setSelectedKey(null);\n // Close the popup if it's open\n if (state.isOpen) {\n state.close();\n }\n // Return focus to the trigger for better UX\n triggerRef.current?.focus?.();\n\n props.onClear?.();\n });\n\n let triggerWidth = triggerRef?.current?.offsetWidth;\n\n const showPlaceholder = !!placeholder?.trim() && !state.selectedItem;\n\n const modifiers = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n loading: isLoading,\n hovered: isHovered,\n focused: isFocused,\n placeholder: showPlaceholder,\n prefix: !!prefix,\n suffix: true,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isHovered,\n isFocused,\n showPlaceholder,\n prefix,\n ],\n );\n\n suffix = useMemo(() => {\n if (!suffix && !validationIcon) {\n return null;\n }\n\n return (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }, [suffix, validationIcon]);\n\n // A caller's `rightIcon` keeps the `rightIcon` slot: it accepts a render\n // function resolved against the trigger's mods, which only that slot does, and\n // it is also what a caller's `RightIcon` styles target. It replaces the\n // built-in control, exactly as before.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon ? (\n isLoading ? (\n <LoadingIcon />\n ) : (\n rightIcon\n )\n ) : undefined;\n\n // With a caller's own `rightIcon` the built-in control moves into that slot,\n // leaving the run with whatever the caller passed — possibly nothing. The run\n // is still rendered, so the trigger does not restructure if actions arrive\n // later, but the row stops counting it as end content — which is what keeps an\n // icon-only trigger with `rightIcon={null}` square.\n const hasTriggerActions = !hasCustomRightIcon || !!actions;\n\n // Everything trailing that is NOT the caller's own icon goes into the actions\n // run — a sibling of the `<button>`, so the clear button is no longer nested\n // inside one. See `TriggerActions`.\n const triggerActions = (\n <TriggerActions\n actions={actions}\n builtIn={\n hasCustomRightIcon ? null : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"SelectClearButton\"\n // `ItemAction` derives its accessible name from `aria-label` or a\n // string `tooltip` and warns for neither, so an icon-only clear\n // button without this reaches a screen reader unnamed.\n aria-label={clearLabel ?? t('select.clearValue', 'Clear value')}\n // No explicit `type`/`theme`: the default `current` type paints\n // from the trigger's own inherited text color, so the button\n // matches whatever the field is showing instead of one palette.\n //\n // NOTE: this trigger keeps NEUTRAL label text when invalid, so\n // the button reads neutral there too. `Picker` and `FilterPicker`\n // are also `Item`-based but do tint theirs, which is the actual\n // inconsistency to fix — in `Select`, not here.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : isLoading ? (\n <TriggerIcon>\n <LoadingIcon />\n </TriggerIcon>\n ) : (\n <TriggerIcon>\n <DirectionIcon to={state.isOpen ? 'up' : 'down'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n let selectField = (\n <SelectWrapperElement\n mods={modifiers}\n styles={styles}\n data-size={size}\n data-type={type}\n data-theme={theme}\n >\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n />\n {/*\n The trigger's trailing controls are rendered as a SIBLING of the\n `<button>` — the same layout `ItemButton` uses for its actions, shared\n through `ItemActionsWrapper`. `Select` builds its trigger from `Item`\n rather than `ItemButton` because `useSelect`/`useButton` already own the\n button props, so it reaches for the wrapper directly.\n\n The RAW theme, unlike `Picker` / `FilterPicker` which forward\n `getValidationTheme(...)`: this trigger is painted with the raw theme too\n and surfaces validation through `SelectWrapperElement` rather than by\n switching theme. What the wrapper hands its actions must always match\n what the trigger paints with.\n */}\n <ItemActionsWrapper\n type={type}\n theme={theme}\n size={size}\n isDisabled={isDisabled || isLoading}\n mods={modifiers}\n actions={triggerActions}\n >\n {({ showActions }) => (\n <Item\n actions={hasTriggerActions || undefined}\n insideWrapper\n as=\"button\"\n qa={qa || 'Select'}\n data-input-type=\"select\"\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={triggerRef}\n data-popover-trigger\n showActions={showActions}\n styles={{ ...inputStyles, ...triggerStyles }}\n theme={theme}\n size={size}\n shape={shape}\n // Ensure this button never submits a surrounding form in tests or runtime\n htmlType=\"button\"\n // Preserve visual variant via data attribute instead of conflicting with HTML attribute\n type={type}\n mods={modifiers}\n prefix={prefix}\n suffix={suffix}\n icon={icon}\n rightIcon={triggerRightIcon}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n hotkeys={hotkeys}\n tooltip={tooltip}\n labelProps={valueProps}\n >\n {state.selectedItem ? (\n state.selectedItem.rendered\n ) : placeholder ? (\n <Text.Placeholder>{placeholder}</Text.Placeholder>\n ) : null}\n </Item>\n )}\n </ItemActionsWrapper>\n <ListBoxPopup\n {...menuProps}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n overlayProps={overlayProps}\n placement={placement}\n state={state}\n listBoxStyles={listBoxStyles}\n overlayStyles={overlayStyles}\n optionStyles={optionStyles}\n minWidth={triggerWidth}\n triggerRef={triggerRef}\n isDisabled={isDisabled}\n />\n </SelectWrapperElement>\n );\n\n return wrapWithField<Omit<CubeSelectProps<T>, 'children' | 'tooltip'>>(\n selectField,\n ref,\n mergeProps(\n {\n ...props,\n // The trigger's own. Handed on, it read as the legacy field `tooltip`.\n tooltip: undefined,\n },\n { labelProps },\n ),\n );\n}\n\nexport function ListBoxPopup({\n state,\n popoverRef,\n listBoxRef,\n listBoxStyles,\n overlayStyles,\n optionStyles,\n overlayProps: parentOverlayProps,\n shouldUseVirtualFocus = false,\n placement,\n minWidth,\n size = 'small',\n triggerRef,\n isDisabled,\n ...otherProps\n}) {\n // For trigger+popover components, map 'small' size to 'medium' for list items\n // while preserving 'medium' and 'large' sizes\n const listItemSize = size === 'small' ? 'medium' : size;\n\n // Get props for the listbox\n let { listBoxProps } = useListBox(\n {\n autoFocus: state.focusStrategy || true,\n shouldUseVirtualFocus,\n ...otherProps,\n },\n state,\n listBoxRef,\n );\n\n // Handle events that should cause the popup to close,\n // e.g. blur, clicking outside, or pressing the escape key.\n let { overlayProps: rawOverlayProps } = useOverlay(\n {\n onClose: () => state.close(),\n shouldCloseOnBlur: true,\n isOpen: state.isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n // The trigger owns interactive controls of its own — the clear button\n // and any custom `actions`. They sit in the actions run, a SIBLING of\n // the trigger, so the lookup below would read them as a press outside\n // and dismiss, swallowing the press: the first press on `Reset` while\n // the list was open only closed the list and the action never ran. Same\n // guard as `DialogTrigger`, which `Picker` / `FilterPicker` go through.\n if (isOwnActionsPress(el, triggerRef?.current)) return false;\n\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) {\n if (el.closest('[data-popover-keep]')) return false;\n // Plain interactive controls (Button, ItemButton) opt in via\n // `data-popover-dismiss` to dismiss us without losing their click\n // to useOverlay's stopPropagation. Schedule the close after the\n // click finishes so the button's onPress runs first.\n if (el.closest('[data-popover-dismiss]')) {\n setTimeout(() => state.close(), 0);\n return false;\n }\n return true;\n }\n // If the same trigger that opened this select was clicked, allow closing\n if (menuTriggerEl === triggerRef?.current) return true;\n // Otherwise, don't close (let event mechanism handle it)\n return false;\n },\n },\n popoverRef,\n );\n\n // A list that has already closed must not swallow the `Escape` meant for\n // whatever surrounds it — see `useOverlayEscapeGuard`.\n const overlayProps = useOverlayEscapeGuard(rawOverlayProps, state.isOpen);\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || 'bottom';\n\n // Wrap in <FocusScope> so that focus is restored back to the\n // trigger when the popup is closed. In addition, add hidden\n // <DismissButton> components at the start and end of the list\n // to allow screen reader users to dismiss the popup easily.\n //\n // `autoFocus` is required because `ListBoxPopup` is rendered\n // unconditionally (not gated on `state.isOpen`), so by the time the\n // popover actually opens, react-aria's `useSelectableCollection`\n // autoFocus has already been consumed (its useRef captures the\n // initial value on mount, when the listbox isn't in the DOM yet).\n // Setting `autoFocus` on the FocusScope itself runs each time the\n // FocusScope mounts (every time the popover opens, since the inner\n // tree is unmounted between opens) and explicitly focuses the\n // first tabbable element (the listbox). This also registers the\n // FocusScope as the active scope, so an outer contained Dialog\n // FocusScope (e.g. a popover Dialog wrapping the Select) correctly\n // recognises focus moving into the Select popover and doesn't yank\n // it back to the trigger.\n return (\n <Portal>\n <DisplayTransition isShown={state.isOpen && !isDisabled}>\n {({ phase, isShown, ref: transitionRef }) => (\n <SelectOverlayWrapper\n {...overlayProps}\n {...parentOverlayProps}\n ref={popoverRef}\n style={parentOverlayProps?.style}\n >\n <OverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n }}\n styles={overlayStyles}\n style={{\n '--overlay-min-width': minWidth ? `${minWidth}px` : 'initial',\n }}\n >\n <FocusScope autoFocus restoreFocus>\n <DismissButton onDismiss={() => state.close()} />\n {(() => {\n const renderedItems: React.ReactNode[] = [];\n let isFirstSection = true;\n\n for (const item of state.collection) {\n if (item.type === 'section') {\n if (!isFirstSection) {\n renderedItems.push(\n <ListDivider\n key={`divider-${String(item.key)}`}\n as=\"li\"\n role=\"separator\"\n aria-orientation=\"horizontal\"\n />,\n );\n }\n\n renderedItems.push(\n <SelectSection\n key={item.key}\n item={item}\n state={state}\n optionStyles={optionStyles}\n sectionStyles={undefined}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n\n isFirstSection = false;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n item={item}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n }\n }\n\n return (\n <ListBoxElement\n styles={listBoxStyles}\n {...listBoxProps}\n ref={listBoxRef}\n >\n {renderedItems}\n </ListBoxElement>\n );\n })()}\n <DismissButton onDismiss={() => state.close()} />\n </FocusScope>\n </OverlayElement>\n </SelectOverlayWrapper>\n )}\n </DisplayTransition>\n </Portal>\n );\n}\n\nfunction Option({ item, state, styles, shouldUseVirtualFocus, size }) {\n let ref = useRef<HTMLLIElement>(null);\n let isDisabled = state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let isVirtualFocused = state.selectionManager.focusedKey === item.key;\n\n let { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n shouldUseVirtualFocus,\n },\n state,\n ref,\n );\n\n // Handle focus events, so we can apply highlighted\n // style to the focused option\n let { isFocused, focusProps } = useFocus({ isDisabled });\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterCollectionItemProps(item.props);\n\n return (\n <OptionItem\n {...mergeProps(optionProps, focusProps, filteredItemProps)}\n ref={ref}\n mods={{\n listboxitem: true,\n selected: isSelected,\n focused: shouldUseVirtualFocus ? isVirtualFocused : isFocused,\n disabled: isDisabled,\n pressed: isPressed,\n }}\n data-size={size}\n styles={{\n ...(styles as Styles),\n ...(filteredItemProps.styles as Styles),\n }}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n defaultTooltipPlacement=\"right\"\n >\n {item.rendered}\n </OptionItem>\n );\n}\n\ninterface SelectSectionProps<T> {\n item: any; // react-stately Node<T>\n state: any; // TreeState<T>\n optionStyles?: Styles;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n shouldUseVirtualFocus?: boolean;\n size?: string;\n}\n\nfunction SelectSection<T>(props: SelectSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n headingStyles,\n sectionStyles,\n shouldUseVirtualFocus,\n size,\n } = props;\n\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <ListSectionWrapper {...itemProps} styles={sectionStyles}>\n {heading && (\n <ListSectionHeading\n {...headingProps}\n size={size}\n styles={{ ...headingStyles, '$inline-compensation': '0px' }}\n >\n {heading}\n </ListSectionHeading>\n )}\n <ListBoxElement {...groupProps} mods={{ section: true }}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n item={node}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n ))}\n </ListBoxElement>\n </ListSectionWrapper>\n );\n}\n\nconst _Select = forwardRefWithGenerics(Select);\n\n(_Select as any).cubeInputType = 'Select';\n\ntype SectionComponent = typeof BaseSection;\n\nconst SelectSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nconst __Select = Object.assign(\n _Select as typeof _Select & {\n Item: typeof CollectionItem;\n Section: typeof SelectSectionComponent;\n Action: typeof ItemAction;\n },\n {\n Item: CollectionItem,\n Section: SelectSectionComponent,\n Action: ItemAction,\n },\n);\n\n(__Select as any).displayName = 'Select';\n\nexport { __Select as Select };\n\nexport type { AriaSelectProps };\nexport { useSelectState };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAM4E,uBAAuBhE,MAAM;CACjCiE,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,MAAM;GACJ,IAAI;GACJC,UAAU;GACV,iBAAiB;GAClB;EACDC,OAAO;GACL,IAAI;GACJC,SAAS;GACTC,SAAS;GACTH,UAAU;GACZ;EACF;CACD,CAAC;AAEF,MAAaI,iBAAiB3E,MAAM;CAClCiE,IAAI;CACJW,IAAI;CACJV,QAAQ;EACNC,SAAS;EACTU,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,WAAW;EACXC,WAAW;EAMXC,SAAS;EACX;CACD,CAAC;AAGF,MAAMC,aAAapF,MAAMoD,OAAM;CAC7BwB,IAAI;CACJS,qBAAqB;CACrBpB,IAAI;CACJC,QAAQ,EACN,wBAAwB,OAC1B;CACD,CAAC;AAEF,MAAMoB,uBAAuBtF,MAAM;CACjCiE,IAAI;CACJC,QAAQ;EACNE,UAAU;EACVmB,QAAQ;EACV;CACD,CAAC;AAEF,MAAMC,iBAAiBxF,MAAM;CAC3BiE,IAAI;CACJC,QAAQ;EACNuB,OAAO;EACPtB,SAAS;EACTuB,UAAU;EACVC,QAAQ;EACRC,UAAU;EACVtB,MAAM;EACND,QAAQ;EACRwB,QAAQ;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BAAuBwH,OAAO;AAE9C,AAACqJ,QAAgBC,gBAAgB;AAIjC,MAAME,yBAAyBC,OAAOC,OAAO5R,SAAa,EACxD6R,aAAa,WACd,CAAC;AAEF,MAAMC,WAAWH,OAAOC,OACtBL,SAKA;CACEzP,MAAMH;CACN5B,SAAS2R;CACTK,QAAQ7Q;CAEZ,CAAC;AAED,AAAC4Q,SAAiBD,cAAc"}
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { SliderGradationElement, SliderGradeElement } from "./elements.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { __Slider } from "./Slider.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { forwardRef, useState } from "react";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { Gradation } from "./Gradation.js";
3
3
  import { _SliderBase } from "./SliderBase.js";
4
4
  import { SliderThumb } from "./SliderThumb.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { mergeProps } from "../../../utils/react/mergeProps.js";
4
4
  import { Gradation } from "./Gradation.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { forwardRefWithGenerics } from "../../../utils/react/forwardRefWithGenerics.js";
4
4
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
3
3
  import { getValidationMods } from "../../form/validation/resolve-validation-props.js";
4
4
  import { SliderThumbElement } from "./elements.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { getValidationMods } from "../../form/validation/resolve-validation-props.js";
3
3
  import { SliderTrackContainerElement } from "./elements.js";
4
4
  import { c } from "react-compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { tasty } from "@tenphi/tasty";
3
3
 
4
4
  //#region src/components/fields/Slider/elements.ts
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { __RangeSlider } from "./RangeSlider.js";
3
3
  import { __Slider } from "./Slider.js";
4
4
  import { __HueSlider } from "./HueSlider.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { useId as useId$2 } from "../../../utils/react/useId.js";
4
4
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { chain } from "../../../utils/react/chain.js";
3
3
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
4
  import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ac46c4b | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9bde021 | Cube Dev Team */
2
2
  import { chain } from "../../../utils/react/chain.js";
3
3
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
4
  import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";