@cube-dev/ui-kit 0.0.0-canary-619b8e3 → 0.0.0-canary-7bfcbc3

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 (649) hide show
  1. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  2. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  3. package/dist/_internal/hooks/use-event.js +1 -1
  4. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  5. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  6. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  7. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  8. package/dist/_internal/hooks/use-warn.js +1 -1
  9. package/dist/components/Block.js +1 -1
  10. package/dist/components/CollectionItem.js +1 -1
  11. package/dist/components/GlobalStyles.js +1 -1
  12. package/dist/components/GridProvider.js +1 -1
  13. package/dist/components/HiddenInput.js +1 -1
  14. package/dist/components/Root.js +1 -1
  15. package/dist/components/actions/Action/Action.js +1 -1
  16. package/dist/components/actions/Banner/Banner.js +1 -1
  17. package/dist/components/actions/Button/Button.js +1 -1
  18. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  19. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  20. package/dist/components/actions/ButtonSplit/context.js +1 -1
  21. package/dist/components/actions/CommandMenu/CommandMenu.js +201 -201
  22. package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
  23. package/dist/components/actions/CommandMenu/styled.js +1 -1
  24. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  25. package/dist/components/actions/ItemActionContext.js +1 -1
  26. package/dist/components/actions/ItemActionsWrapper.js +1 -1
  27. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  28. package/dist/components/actions/Link/Link.js +1 -1
  29. package/dist/components/actions/Menu/Menu.js +1 -1
  30. package/dist/components/actions/Menu/MenuItem.js +1 -1
  31. package/dist/components/actions/Menu/MenuSection.js +1 -1
  32. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  33. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  34. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  35. package/dist/components/actions/Menu/context.js +1 -1
  36. package/dist/components/actions/Menu/styled.js +1 -1
  37. package/dist/components/actions/actions-run.js +1 -1
  38. package/dist/components/actions/index.js +1 -1
  39. package/dist/components/actions/use-action.js +1 -1
  40. package/dist/components/actions/use-anchored-menu.js +1 -1
  41. package/dist/components/actions/use-context-menu.js +1 -1
  42. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  43. package/dist/components/content/Alert/Alert.js +1 -1
  44. package/dist/components/content/Alert/use-alert.js +1 -1
  45. package/dist/components/content/Avatar/Avatar.js +1 -1
  46. package/dist/components/content/Badge/Badge.js +1 -1
  47. package/dist/components/content/Card/Card.js +1 -1
  48. package/dist/components/content/Content.js +1 -1
  49. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  50. package/dist/components/content/CopySnippet/CopySnippet.d.ts +10 -10
  51. package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
  52. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  53. package/dist/components/content/Divider.js +1 -1
  54. package/dist/components/content/Footer.js +1 -1
  55. package/dist/components/content/Header.js +1 -1
  56. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  57. package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
  58. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  59. package/dist/components/content/Item/Item.d.ts +2 -4
  60. package/dist/components/content/Item/Item.js +2 -2
  61. package/dist/components/content/Item/Item.js.map +1 -1
  62. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  63. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  64. package/dist/components/content/Layout/GridLayout.js +1 -1
  65. package/dist/components/content/Layout/Layout.js +1 -1
  66. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  67. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  68. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  69. package/dist/components/content/Layout/LayoutContent.js +1 -1
  70. package/dist/components/content/Layout/LayoutContext.js +1 -1
  71. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  72. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  73. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  74. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  75. package/dist/components/content/Layout/LayoutPane.js +1 -1
  76. package/dist/components/content/Layout/LayoutPanel.js +15 -11
  77. package/dist/components/content/Layout/LayoutPanel.js.map +1 -1
  78. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  79. package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
  80. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  81. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  82. package/dist/components/content/Layout/index.js +1 -1
  83. package/dist/components/content/Layout/utils.js +1 -1
  84. package/dist/components/content/Paragraph.js +1 -1
  85. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  86. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  87. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  88. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  89. package/dist/components/content/Result/Result.js +1 -1
  90. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  91. package/dist/components/content/Tag/Tag.js +1 -1
  92. package/dist/components/content/Text.js +1 -1
  93. package/dist/components/content/TextItem/TextItem.js +1 -1
  94. package/dist/components/content/Title.js +1 -1
  95. package/dist/components/content/Tree/Tree.js +1 -1
  96. package/dist/components/content/Tree/TreeNode.js +3 -3
  97. package/dist/components/content/Tree/TreeNode.js.map +1 -1
  98. package/dist/components/content/Tree/styled.js +1 -1
  99. package/dist/components/content/Tree/tree-index.js +1 -1
  100. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  101. package/dist/components/content/Tree/use-load-data.js +1 -1
  102. package/dist/components/content/highlightText.js +1 -1
  103. package/dist/components/content/use-auto-tooltip.js +1 -1
  104. package/dist/components/data/DataTable/DataTable.js +1 -1
  105. package/dist/components/data/ItemTable/ItemTable.js +1 -1
  106. package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
  107. package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
  108. package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
  109. package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
  110. package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
  111. package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
  112. package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
  113. package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
  114. package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
  115. package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
  116. package/dist/components/data/TableBase/ColumnResizer.js +3 -3
  117. package/dist/components/data/TableBase/ColumnResizer.js.map +1 -1
  118. package/dist/components/data/TableBase/RowCollection.js +1 -1
  119. package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
  120. package/dist/components/data/TableBase/TableRow.js +1 -1
  121. package/dist/components/data/TableBase/TableView.js +1 -1
  122. package/dist/components/data/TableBase/TreeGridTable.js +1 -1
  123. package/dist/components/data/TableBase/column-header.js +1 -1
  124. package/dist/components/data/TableBase/column-menu.js +1 -1
  125. package/dist/components/data/TableBase/column-styles.js +1 -1
  126. package/dist/components/data/TableBase/column-tint.js +1 -1
  127. package/dist/components/data/TableBase/row-menu.js +1 -1
  128. package/dist/components/data/TableBase/styled.js +1 -1
  129. package/dist/components/data/TableBase/table-tree.js +1 -1
  130. package/dist/components/data/TableBase/types.js +1 -1
  131. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  132. package/dist/components/data/TableBase/use-column-menu.js +1 -1
  133. package/dist/components/data/TableBase/use-column-order.js +1 -1
  134. package/dist/components/data/TableBase/use-container-width.js +1 -1
  135. package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
  136. package/dist/components/data/TableBase/use-scrollability.js +1 -1
  137. package/dist/components/data/TableBase/use-table-columns.js +154 -166
  138. package/dist/components/data/TableBase/use-table-columns.js.map +1 -1
  139. package/dist/components/data/TableBase/use-table-search.js +1 -1
  140. package/dist/components/data/TableBase/use-table-selection.js +1 -1
  141. package/dist/components/data/TableBase/use-table-sort.js +1 -1
  142. package/dist/components/data/TableBase/use-table-sorts.js +1 -1
  143. package/dist/components/data/TableBase/use-table-storage.js +1 -1
  144. package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
  145. package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
  146. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  147. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  148. package/dist/components/fields/Checkbox/context.js +1 -1
  149. package/dist/components/fields/ColorInput/ColorInput.js +1 -1
  150. package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
  151. package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
  152. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
  153. package/dist/components/fields/ComboBox/ComboBox.js +194 -160
  154. package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
  155. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  156. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  157. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  158. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  159. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  160. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  161. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  162. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  163. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  164. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  165. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  166. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  167. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  168. package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
  169. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  170. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  171. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  172. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  173. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  174. package/dist/components/fields/DatePicker/period.js +1 -1
  175. package/dist/components/fields/DatePicker/props.js +1 -1
  176. package/dist/components/fields/DatePicker/utils.js +1 -1
  177. package/dist/components/fields/FileInput/FileInput.js +1 -1
  178. package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
  179. package/dist/components/fields/FilterPicker/FilterPicker.js +3 -3
  180. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  181. package/dist/components/fields/Input/Input.js +1 -1
  182. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  183. package/dist/components/fields/ListBox/ListBox.js +17 -10
  184. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  185. package/dist/components/fields/ListBox/optionId.js +1 -1
  186. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  187. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  188. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  189. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  190. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  191. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  192. package/dist/components/fields/Picker/Picker.js +3 -3
  193. package/dist/components/fields/Picker/Picker.js.map +1 -1
  194. package/dist/components/fields/RadioGroup/Radio.d.ts +16 -16
  195. package/dist/components/fields/RadioGroup/Radio.js +92 -160
  196. package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
  197. package/dist/components/fields/RadioGroup/RadioGroup.js +107 -145
  198. package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
  199. package/dist/components/fields/RadioGroup/context.js +1 -1
  200. package/dist/components/fields/SearchComboBox/SearchComboBox.js +71 -67
  201. package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
  202. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  203. package/dist/components/fields/Select/Select.js +1 -1
  204. package/dist/components/fields/Slider/Gradation.js +1 -1
  205. package/dist/components/fields/Slider/HueSlider.js +1 -1
  206. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  207. package/dist/components/fields/Slider/Slider.js +1 -1
  208. package/dist/components/fields/Slider/SliderBase.js +1 -1
  209. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  210. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  211. package/dist/components/fields/Slider/elements.js +1 -1
  212. package/dist/components/fields/Slider/index.js +1 -1
  213. package/dist/components/fields/Switch/Switch.js +1 -1
  214. package/dist/components/fields/TagInput/TagInput.js +1 -1
  215. package/dist/components/fields/TagInput/TagList.js +1 -1
  216. package/dist/components/fields/TagInput/useActiveOption.js +1 -1
  217. package/dist/components/fields/TagInput/useTagError.js +1 -1
  218. package/dist/components/fields/TextArea/TextArea.js +1 -1
  219. package/dist/components/fields/TextInput/TextInput.js +1 -1
  220. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  221. package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
  222. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  223. package/dist/components/fields/TriggerActions.js +1 -1
  224. package/dist/components/fields/color/ColorPanel.js +1 -1
  225. package/dist/components/fields/color/channels.js +1 -1
  226. package/dist/components/fields/color/color.js +1 -1
  227. package/dist/components/fields/color/context.js +1 -1
  228. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  229. package/dist/components/form/Form/Field.js +1 -1
  230. package/dist/components/form/Form/Form.js +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/reset-unbound-controls.js +1 -1
  247. package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
  248. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  249. package/dist/components/form/Form/use-field/use-field.js +1 -1
  250. package/dist/components/form/Form/use-form.js +1 -1
  251. package/dist/components/form/Form/validation.js +1 -1
  252. package/dist/components/form/Label.js +1 -1
  253. package/dist/components/form/legacy-tooltip.js +1 -1
  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 +1 -1
  258. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  259. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  260. package/dist/components/layout/Flex.js +1 -1
  261. package/dist/components/layout/Flow.js +1 -1
  262. package/dist/components/layout/Grid.js +1 -1
  263. package/dist/components/layout/Panel.js +1 -1
  264. package/dist/components/layout/Prefix.js +1 -1
  265. package/dist/components/layout/ResizablePanel.js +1 -1
  266. package/dist/components/layout/Space.js +1 -1
  267. package/dist/components/layout/Suffix.js +1 -1
  268. package/dist/components/navigation/Pagination/Pagination.js +1 -1
  269. package/dist/components/navigation/Pagination/use-pagination.js +1 -1
  270. package/dist/components/navigation/Tabs/BoardDragActiveProvider.d.ts +36 -0
  271. package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +57 -0
  272. package/dist/components/navigation/Tabs/BoardDragActiveProvider.js.map +1 -0
  273. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  274. package/dist/components/navigation/Tabs/TabButton.js +2 -2
  275. package/dist/components/navigation/Tabs/TabButton.js.map +1 -1
  276. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  277. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  278. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  279. package/dist/components/navigation/Tabs/Tabs.js +2 -2
  280. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  281. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  282. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  283. package/dist/components/navigation/Tabs/index.d.ts +2 -1
  284. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  285. package/dist/components/navigation/Tabs/styled.js +1 -1
  286. package/dist/components/navigation/Tabs/types.js +1 -1
  287. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  288. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  289. package/dist/components/navigation/index.d.ts +1 -0
  290. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  291. package/dist/components/other/Calendar/Calendar.js +1 -1
  292. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  293. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  294. package/dist/components/other/Calendar/CalendarHeader.js +1 -1
  295. package/dist/components/other/Calendar/CalendarPanel.js +1 -1
  296. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  297. package/dist/components/other/Calendar/PeriodGrid.js +1 -1
  298. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  299. package/dist/components/other/Calendar/styled.js +1 -1
  300. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  301. package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
  302. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  303. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  304. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  305. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  306. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  307. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  308. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  309. package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
  310. package/dist/components/overlays/Dialog/context.js +1 -1
  311. package/dist/components/overlays/Dialog/default-button-text.js +1 -1
  312. package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
  313. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  314. package/dist/components/overlays/Modal/Modal.js +1 -1
  315. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  316. package/dist/components/overlays/Modal/Overlay.js +1 -1
  317. package/dist/components/overlays/Modal/Popover.js +1 -1
  318. package/dist/components/overlays/Modal/Tray.js +1 -1
  319. package/dist/components/overlays/Modal/Underlay.js +1 -1
  320. package/dist/components/overlays/Notifications/Notification.js +1 -1
  321. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  322. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  323. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  324. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  325. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  326. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  327. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  328. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  329. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  330. package/dist/components/overlays/Notifications/index.js +1 -1
  331. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  332. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  333. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  334. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  335. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  336. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  337. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  338. package/dist/components/overlays/Toast/index.js +1 -1
  339. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  340. package/dist/components/overlays/Toast/useToast.js +1 -1
  341. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  342. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  343. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  344. package/dist/components/overlays/Tooltip/context.js +1 -1
  345. package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
  346. package/dist/components/portal/Portal.js +1 -1
  347. package/dist/components/portal/PortalProvider.js +1 -1
  348. package/dist/components/portal/usePortal.js +1 -1
  349. package/dist/components/shared/DraggableCollection.js +1 -1
  350. package/dist/components/shared/InvalidIcon.js +1 -1
  351. package/dist/components/shared/ValidIcon.js +1 -1
  352. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  353. package/dist/components/status/Spin/Cube.js +1 -1
  354. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  355. package/dist/components/status/Spin/Spin.js +1 -1
  356. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  357. package/dist/data/item-themes.js +1 -1
  358. package/dist/data/themes.js +1 -1
  359. package/dist/eslint-plugin/defaults.generated.js +1 -83
  360. package/dist/eslint-plugin/defaults.generated.js.map +1 -1
  361. package/dist/eslint-plugin/index.js +1 -1
  362. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  363. package/dist/i18n/I18nProvider.js +1 -1
  364. package/dist/i18n/createFormatter.js +1 -1
  365. package/dist/i18n/index.js +1 -1
  366. package/dist/i18n/instance.js +1 -1
  367. package/dist/i18n/locales/de-DE/uikit.js +1 -9
  368. package/dist/i18n/locales/en-US/uikit.js +1 -9
  369. package/dist/i18n/locales/en-US/uikit.json.d.ts +1 -9
  370. package/dist/i18n/locales/es-ES/uikit.js +1 -9
  371. package/dist/i18n/locales/es-MX/uikit.js +1 -9
  372. package/dist/i18n/locales/fr-FR/uikit.js +1 -9
  373. package/dist/i18n/locales/it-IT/uikit.js +1 -9
  374. package/dist/i18n/locales/ja-JP/uikit.js +1 -9
  375. package/dist/i18n/locales/nb-NO/uikit.js +1 -9
  376. package/dist/i18n/locales/pt-BR/uikit.js +1 -9
  377. package/dist/i18n/locales/pt-PT/uikit.js +1 -9
  378. package/dist/i18n/locales/sv-SE/uikit.js +1 -9
  379. package/dist/i18n/locales/vi-VN/uikit.js +1 -9
  380. package/dist/i18n/locales.js +1 -1
  381. package/dist/i18n/useFormatter.js +1 -1
  382. package/dist/i18n/useI18n.js +1 -1
  383. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  384. package/dist/icons/AdjustmentsIcon.js +1 -1
  385. package/dist/icons/AiIcon.js +1 -1
  386. package/dist/icons/AreaChartIcon.js +1 -1
  387. package/dist/icons/ArrowNarrowDownIcon.js +1 -1
  388. package/dist/icons/ArrowNarrowUpIcon.js +1 -1
  389. package/dist/icons/BackwardIcon.js +1 -1
  390. package/dist/icons/BarChartIcon.js +1 -1
  391. package/dist/icons/BellFilledIcon.js +1 -1
  392. package/dist/icons/BellIcon.js +1 -1
  393. package/dist/icons/BooleanIcon.js +1 -1
  394. package/dist/icons/CalendarEditIcon.js +1 -1
  395. package/dist/icons/CalendarIcon.js +1 -1
  396. package/dist/icons/CaretDownIcon.js +1 -1
  397. package/dist/icons/CaretUpIcon.js +1 -1
  398. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  399. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  400. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  401. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  402. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  403. package/dist/icons/ChartBarLineIcon.js +1 -1
  404. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  405. package/dist/icons/ChartBarStackedIcon.js +1 -1
  406. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  407. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  408. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  409. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  410. package/dist/icons/ChartBubbleIcon.js +1 -1
  411. package/dist/icons/ChartDonut2Icon.js +1 -1
  412. package/dist/icons/ChartFunnelIcon.js +1 -1
  413. package/dist/icons/ChartHeatmapIcon.js +1 -1
  414. package/dist/icons/ChartKPIIcon.js +1 -1
  415. package/dist/icons/ChartPie2Icon.js +1 -1
  416. package/dist/icons/ChartScatterIcon.js +1 -1
  417. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  418. package/dist/icons/CheckCircleIcon.js +1 -1
  419. package/dist/icons/CheckIcon.js +1 -1
  420. package/dist/icons/CircleFilledIcon.js +1 -1
  421. package/dist/icons/ClearIcon.js +1 -1
  422. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  423. package/dist/icons/CloseCircleIcon.js +1 -1
  424. package/dist/icons/CloseIcon.js +1 -1
  425. package/dist/icons/CodeIcon.js +1 -1
  426. package/dist/icons/ColumnTotalIcon.js +1 -1
  427. package/dist/icons/CopyIcon.js +1 -1
  428. package/dist/icons/CountIcon.js +1 -1
  429. package/dist/icons/CubeIcon.js +1 -1
  430. package/dist/icons/CubePauseIcon.js +1 -1
  431. package/dist/icons/CubePlayIcon.js +1 -1
  432. package/dist/icons/CurrencyDollarIcon.js +1 -1
  433. package/dist/icons/DangerIcon.js +1 -1
  434. package/dist/icons/DashboardIcon.js +1 -1
  435. package/dist/icons/DatabaseIcon.js +1 -1
  436. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  437. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  438. package/dist/icons/DirectionIcon.js +1 -1
  439. package/dist/icons/DonutIcon.js +1 -1
  440. package/dist/icons/DownIcon.js +1 -1
  441. package/dist/icons/EditIcon.js +1 -1
  442. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  443. package/dist/icons/ExclamationCircleIcon.js +1 -1
  444. package/dist/icons/ExclamationIcon.js +1 -1
  445. package/dist/icons/EyeIcon.js +1 -1
  446. package/dist/icons/EyeInvisibleIcon.js +1 -1
  447. package/dist/icons/FilterIcon.js +1 -1
  448. package/dist/icons/FolderFilledIcon.js +1 -1
  449. package/dist/icons/FolderIcon.js +1 -1
  450. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  451. package/dist/icons/FolderOpenIcon.js +1 -1
  452. package/dist/icons/ForwardIcon.js +1 -1
  453. package/dist/icons/GripVerticalIcon.js +1 -1
  454. package/dist/icons/HierarchyIcon.js +1 -1
  455. package/dist/icons/HierarchyOpenIcon.js +1 -1
  456. package/dist/icons/Icon.js +1 -1
  457. package/dist/icons/InfoCircleIcon.js +1 -1
  458. package/dist/icons/InfoIcon.js +1 -1
  459. package/dist/icons/KeyIcon.js +1 -1
  460. package/dist/icons/LeftIcon.js +1 -1
  461. package/dist/icons/LineChartIcon.js +1 -1
  462. package/dist/icons/LoadingIcon.js +1 -1
  463. package/dist/icons/LockFilledIcon.js +1 -1
  464. package/dist/icons/LockIcon.js +1 -1
  465. package/dist/icons/MoreIcon.js +1 -1
  466. package/dist/icons/NotAllowedIcon.js +1 -1
  467. package/dist/icons/Number123Icon.js +1 -1
  468. package/dist/icons/NumberIcon.js +1 -1
  469. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  470. package/dist/icons/PauseCircleIcon.js +1 -1
  471. package/dist/icons/PauseIcon.js +1 -1
  472. package/dist/icons/PercentageIcon.js +1 -1
  473. package/dist/icons/PieChartIcon.js +1 -1
  474. package/dist/icons/PipetteIcon.js +1 -1
  475. package/dist/icons/PlayCircleIcon.js +1 -1
  476. package/dist/icons/PlayIcon.js +1 -1
  477. package/dist/icons/PlusIcon.js +1 -1
  478. package/dist/icons/ProgressBarIcon.js +1 -1
  479. package/dist/icons/ReloadIcon.js +1 -1
  480. package/dist/icons/ReportIcon.js +1 -1
  481. package/dist/icons/ReturnIcon.js +1 -1
  482. package/dist/icons/RightIcon.js +1 -1
  483. package/dist/icons/RowTotalsIcon.js +1 -1
  484. package/dist/icons/SchemeIcon.js +1 -1
  485. package/dist/icons/SearchIcon.js +1 -1
  486. package/dist/icons/SemanticQueryIcon.js +1 -1
  487. package/dist/icons/SettingsIcon.js +1 -1
  488. package/dist/icons/ShieldFilledIcon.js +1 -1
  489. package/dist/icons/ShieldIcon.js +1 -1
  490. package/dist/icons/SlashIcon.js +1 -1
  491. package/dist/icons/SparklesIcon.js +1 -1
  492. package/dist/icons/SqlIcon.js +1 -1
  493. package/dist/icons/StatsIcon.js +1 -1
  494. package/dist/icons/StopIcon.js +1 -1
  495. package/dist/icons/StringIcon.js +1 -1
  496. package/dist/icons/SubtotalsIcon.js +1 -1
  497. package/dist/icons/SwitchIcon.js +1 -1
  498. package/dist/icons/TableIcon.js +1 -1
  499. package/dist/icons/ThumbsDownIcon.js +1 -1
  500. package/dist/icons/ThumbsUpIcon.js +1 -1
  501. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  502. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  503. package/dist/icons/ThunderboltIcon.js +1 -1
  504. package/dist/icons/TimeIcon.js +1 -1
  505. package/dist/icons/TrashIcon.js +1 -1
  506. package/dist/icons/UnlockIcon.js +1 -1
  507. package/dist/icons/UpIcon.js +1 -1
  508. package/dist/icons/UserGroupIcon.js +1 -1
  509. package/dist/icons/UserIcon.js +1 -1
  510. package/dist/icons/UserLockIcon.js +1 -1
  511. package/dist/icons/ViewIcon.js +1 -1
  512. package/dist/icons/WarningFilledIcon.js +1 -1
  513. package/dist/icons/WarningIcon.js +1 -1
  514. package/dist/icons/wrap-icon.js +1 -1
  515. package/dist/index.d.ts +3 -15
  516. package/dist/index.js +3 -11
  517. package/dist/index.js.map +1 -1
  518. package/dist/probe/canonicalize.js +1 -1
  519. package/dist/probe/css.js +1 -1
  520. package/dist/probe/index.js +1 -1
  521. package/dist/provider.js +1 -1
  522. package/dist/providers/TrackingProvider.js +1 -1
  523. package/dist/providers/navigationAdapter.default.js +1 -1
  524. package/dist/tokens/all-tokens.js +1 -1
  525. package/dist/tokens/base.js +1 -1
  526. package/dist/tokens/color-seed.js +1 -1
  527. package/dist/tokens/color-theme.js +1 -1
  528. package/dist/tokens/colors.js +1 -1
  529. package/dist/tokens/layout.js +1 -1
  530. package/dist/tokens/lazy-styles.js +1 -1
  531. package/dist/tokens/legacy-color.js +1 -1
  532. package/dist/tokens/palette-config.js +1 -1
  533. package/dist/tokens/palette.js +1 -1
  534. package/dist/tokens/resolve.js +1 -1
  535. package/dist/tokens/shadows.js +1 -1
  536. package/dist/tokens/sizes.js +1 -1
  537. package/dist/tokens/spacing.js +1 -1
  538. package/dist/tokens/typography.js +1 -1
  539. package/dist/utils/ResizeSensor.js +1 -1
  540. package/dist/utils/colors.js +1 -1
  541. package/dist/utils/dotize.js +1 -1
  542. package/dist/utils/is-dev-env.js +1 -1
  543. package/dist/utils/modules.js +1 -1
  544. package/dist/utils/promise.js +1 -1
  545. package/dist/utils/raf.js +1 -1
  546. package/dist/utils/random.js +1 -1
  547. package/dist/utils/range.js +1 -1
  548. package/dist/utils/react/RenderCache.js +1 -1
  549. package/dist/utils/react/Slots.js +1 -1
  550. package/dist/utils/react/chain.js +1 -1
  551. package/dist/utils/react/disabledProps.js +1 -1
  552. package/dist/utils/react/escapePropagation.js +39 -0
  553. package/dist/utils/react/escapePropagation.js.map +1 -0
  554. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  555. package/dist/utils/react/index.js +1 -1
  556. package/dist/utils/react/interactions.js +1 -1
  557. package/dist/utils/react/isTextOnly.js +1 -1
  558. package/dist/utils/react/mapProps.js +1 -1
  559. package/dist/utils/react/mergeProps.js +1 -1
  560. package/dist/utils/react/nullableValue.js +1 -1
  561. package/dist/utils/react/programmaticFocus.js +1 -1
  562. package/dist/utils/react/resolveIcon.js +1 -1
  563. package/dist/utils/react/sharedStore.js +1 -1
  564. package/dist/utils/react/useBufferedValue.js +1 -1
  565. package/dist/utils/react/useCombinedRefs.js +1 -1
  566. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  567. package/dist/utils/react/useEventBus.js +1 -1
  568. package/dist/utils/react/useId.js +1 -1
  569. package/dist/utils/react/useIsDarwin.js +1 -1
  570. package/dist/utils/react/useKeySymbols.js +1 -1
  571. package/dist/utils/react/useLayoutEffect.js +1 -1
  572. package/dist/utils/react/useLocalStorage.js +1 -1
  573. package/dist/utils/react/useMergeStyles.js +1 -1
  574. package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
  575. package/dist/utils/react/usePopoverSync.js +1 -1
  576. package/dist/utils/react/useQaProps.js +1 -1
  577. package/dist/utils/react/useScheme.js +1 -1
  578. package/dist/utils/react/useViewportSize.js +1 -1
  579. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  580. package/dist/utils/selection.js +1 -1
  581. package/dist/utils/styles.js +1 -1
  582. package/dist/utils/tree.js +1 -1
  583. package/dist/utils/warnings.js +1 -1
  584. package/dist/version.js +2 -2
  585. package/docs/components/data/ItemTable.md +1 -1
  586. package/docs/components/fields/RadioGroup.md +4 -21
  587. package/docs/components/navigation/Tabs.md +8 -2
  588. package/package.json +1 -1
  589. package/dist/components/layout/Board/Board.d.ts +0 -253
  590. package/dist/components/layout/Board/Board.js +0 -771
  591. package/dist/components/layout/Board/Board.js.map +0 -1
  592. package/dist/components/layout/Board/BoardProvider.d.ts +0 -28
  593. package/dist/components/layout/Board/BoardProvider.js +0 -47
  594. package/dist/components/layout/Board/BoardProvider.js.map +0 -1
  595. package/dist/components/layout/Board/BoardResponsive.d.ts +0 -55
  596. package/dist/components/layout/Board/BoardResponsive.js +0 -101
  597. package/dist/components/layout/Board/BoardResponsive.js.map +0 -1
  598. package/dist/components/layout/Board/Widget.d.ts +0 -152
  599. package/dist/components/layout/Board/Widget.js +0 -76
  600. package/dist/components/layout/Board/Widget.js.map +0 -1
  601. package/dist/components/layout/Board/WidgetHost.js +0 -1065
  602. package/dist/components/layout/Board/WidgetHost.js.map +0 -1
  603. package/dist/components/layout/Board/board-context.d.ts +0 -43
  604. package/dist/components/layout/Board/board-context.js +0 -79
  605. package/dist/components/layout/Board/board-context.js.map +0 -1
  606. package/dist/components/layout/Board/board-store.d.ts +0 -4
  607. package/dist/components/layout/Board/board-store.js +0 -49
  608. package/dist/components/layout/Board/board-store.js.map +0 -1
  609. package/dist/components/layout/Board/grid-core/calculate.js +0 -90
  610. package/dist/components/layout/Board/grid-core/calculate.js.map +0 -1
  611. package/dist/components/layout/Board/grid-core/collision-modes.js +0 -254
  612. package/dist/components/layout/Board/grid-core/collision-modes.js.map +0 -1
  613. package/dist/components/layout/Board/grid-core/collision.js +0 -35
  614. package/dist/components/layout/Board/grid-core/collision.js.map +0 -1
  615. package/dist/components/layout/Board/grid-core/compactors.d.ts +0 -23
  616. package/dist/components/layout/Board/grid-core/compactors.js +0 -166
  617. package/dist/components/layout/Board/grid-core/compactors.js.map +0 -1
  618. package/dist/components/layout/Board/grid-core/constraints.d.ts +0 -35
  619. package/dist/components/layout/Board/grid-core/constraints.js +0 -155
  620. package/dist/components/layout/Board/grid-core/constraints.js.map +0 -1
  621. package/dist/components/layout/Board/grid-core/group-move.js +0 -317
  622. package/dist/components/layout/Board/grid-core/group-move.js.map +0 -1
  623. package/dist/components/layout/Board/grid-core/layout.js +0 -186
  624. package/dist/components/layout/Board/grid-core/layout.js.map +0 -1
  625. package/dist/components/layout/Board/grid-core/placement.d.ts +0 -58
  626. package/dist/components/layout/Board/grid-core/placement.js +0 -153
  627. package/dist/components/layout/Board/grid-core/placement.js.map +0 -1
  628. package/dist/components/layout/Board/grid-core/sort.js +0 -37
  629. package/dist/components/layout/Board/grid-core/sort.js.map +0 -1
  630. package/dist/components/layout/Board/grid-core/types.d.ts +0 -186
  631. package/dist/components/layout/Board/index.d.ts +0 -24
  632. package/dist/components/layout/Board/index.js +0 -20
  633. package/dist/components/layout/Board/index.js.map +0 -1
  634. package/dist/components/layout/Board/responsive-utils.d.ts +0 -13
  635. package/dist/components/layout/Board/responsive-utils.js +0 -55
  636. package/dist/components/layout/Board/responsive-utils.js.map +0 -1
  637. package/dist/components/layout/Board/use-board-layout.d.ts +0 -26
  638. package/dist/components/layout/Board/use-board-layout.js +0 -57
  639. package/dist/components/layout/Board/use-board-layout.js.map +0 -1
  640. package/dist/components/layout/Board/use-board-registry.js +0 -700
  641. package/dist/components/layout/Board/use-board-registry.js.map +0 -1
  642. package/dist/components/layout/Board/use-board-select-modifier-key.js +0 -24
  643. package/dist/components/layout/Board/use-board-select-modifier-key.js.map +0 -1
  644. package/dist/components/layout/Board/use-board-selection.d.ts +0 -8
  645. package/dist/components/layout/Board/use-board-selection.js +0 -113
  646. package/dist/components/layout/Board/use-board-selection.js.map +0 -1
  647. package/dist/utils/react/overlayKeyPropagation.js +0 -46
  648. package/dist/utils/react/overlayKeyPropagation.js.map +0 -1
  649. package/docs/components/layout/Board.md +0 -473
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutPanel.js","names":["BaseProps","CONTAINER_STYLES","ContainerStyleProps","filterBaseProps","mergeStyles","Styles","tasty","ForwardedRef","forwardRef","HTMLAttributes","ReactNode","RefCallback","useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","useFocusRing","useHover","useMove","createPortal","useDebouncedValue","mergeProps","useCombinedRefs","useLocalStorage","extractStyles","DisplayTransition","Dialog","CubeDialogContainerProps","DialogContainer","LayoutContextReset","LayoutPanelContext","Side","useLayoutActionsContext","useLayoutRefsContext","useLayoutStateContext","LayoutPanelTransition","clampSize","getOppositeSide","resolveCssSize","HANDLER_WIDTH","HANDLER_OFFSET","RESIZABLE_INSET_OFFSET","PanelElement","as","qa","styles","container","position","display","flow","overflow","boxSizing","top","right","bottom","left","width","height","border","fill","transform","transition","ResizeHandlerElement","horizontal","cursor","disabled","touchAction","padding","outline","Track","inset","outlineOffset","Drag","gap","gridColumns","gridRows","DragPart","radius","OverlayBackdrop","backdropFilter","opacity","visible","pointerEvents","ResizeHandlerProps","side","isDisabled","mods","Record","moveProps","ReturnType","style","onDoubleClick","ResizeHandler","props","$","_c","t0","Symbol","for","hoverProps","isHovered","focusProps","isFocusVisible","isHorizontal","localIsHovered","t1","hovered","focused","tabIndex","undefined","role","t2","t3","t4","LayoutPanelMode","CubeLayoutPanelProps","mode","size","defaultSize","minSize","maxSize","isResizable","onSizeChange","isOpen","defaultIsOpen","onOpenChange","hasTransition","isDismissable","overlayStyles","isDialog","isDialogOpen","defaultIsDialogOpen","onDialogOpenChange","dialogProps","Omit","contentPadding","sizeStorageKey","children","matchesContainerSize","HTMLElement","dimension","offsetWidth","offsetHeight","LayoutPanel","ref","HTMLDivElement","layoutActions","layoutState","layoutRefs","Error","modeProp","providedSize","providedIsOpen","hasTransitionProp","providedIsDialogOpen","otherProps","isDialogMode","isOverlayMode","isStickyMode","combinedRef","prevProvidedSizeRef","containerWidth","containerHeight","minContentSize","containerDimension","oppositeSide","oppositePanelSize","panelSizes","ownInsetOffset","naturalMax","Math","max","Infinity","internalIsOpen","setInternalIsOpen","isTransitionActive","isPanelContainerReady","visualState","setVisualState","isShown","isPanelShown","internalIsDialogOpen","setInternalIsDialogOpen","dialogOpen","storedSize","setStoredSize","isDragging","setIsDragging","setSize","initialSize","extractedStyles","finalStyles","resolvedMax","trim","endsWith","effectiveMax","values","push","Number","isFinite","length","min","clampValue","value","setContextDragging","setDragging","onMoveStart","onMove","e","delta","pointerType","step","shiftKey","rawDelta","deltaX","deltaY","direction","currentSize","onMoveEnd","finalSize","round","current","panelContainerRef","parentElement","prev","clamped","effectivePanelSize","effectiveInsetSize","registerPanel","unregisterPanel","updatePanelSize","isReady","lastSizeRef","handleOpenChange","newIsOpen","handleDismiss","registerOverlayPanel","unregister","handleDialogOpenChange","panelContextValue","dialogPanelContextValue","panelMods","drag","maxSizeCss","parts","join","panelStyle","panelRefCallback","node","transitionRef","handleResetSize","resetSize","parseInt","clampedSize","renderPanelContent","offscreen","showOverlay","eventProps","portalContainer","isExiting","_LayoutPanel","displayName"],"sources":["../../../../src/components/content/Layout/LayoutPanel.tsx"],"sourcesContent":["import {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n filterBaseProps,\n mergeStyles,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n ReactNode,\n RefCallback,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFocusRing, useHover, useMove } from 'react-aria';\nimport { createPortal } from 'react-dom';\n\nimport { useDebouncedValue } from '../../../_internal/hooks';\nimport {\n mergeProps,\n useCombinedRefs,\n useLocalStorage,\n} from '../../../utils/react';\nimport { extractStyles } from '../../../utils/styles';\nimport { DisplayTransition } from '../../helpers/DisplayTransition/DisplayTransition';\nimport { Dialog } from '../../overlays/Dialog';\nimport {\n CubeDialogContainerProps,\n DialogContainer,\n} from '../../overlays/Dialog/DialogContainer';\n\nimport {\n LayoutContextReset,\n LayoutPanelContext,\n Side,\n useLayoutActionsContext,\n useLayoutRefsContext,\n useLayoutStateContext,\n} from './LayoutContext';\nimport { LayoutPanelTransition } from './LayoutPanelTransition';\nimport { clampSize, getOppositeSide, resolveCssSize } from './utils';\n\n// Resize handler dimensions\nconst HANDLER_WIDTH = 9;\n// How far from panel edge to position handler's inner edge (centers the 3px track on the edge)\nconst HANDLER_OFFSET = 4;\n// Extra inset added for resizable panels (to accommodate handler grab area)\nconst RESIZABLE_INSET_OFFSET = 2;\n\nconst PanelElement = tasty({\n as: 'div',\n qa: 'LayoutPanel',\n styles: {\n container: 'panel / inline-size',\n position: 'absolute',\n display: 'flex',\n flow: 'column',\n overflow: 'hidden',\n boxSizing: 'border-box',\n\n '$content-padding': '1x',\n // Auto-border size for sub-components (panels are always vertical)\n '$layout-border-size': '1bw',\n\n // Position based on side prop\n top: {\n '': 0,\n 'side=bottom': 'initial',\n },\n right: {\n '': 0,\n 'side=left': 'initial',\n },\n bottom: {\n '': 0,\n 'side=top': 'initial',\n },\n left: {\n '': 0,\n 'side=right': 'initial',\n },\n\n // Size handling with CSS-level min/max clamping\n width: {\n '': '$min-size $panel-size $max-size',\n 'side=top | side=bottom': '100%',\n },\n height: {\n '': '100%',\n 'side=top | side=bottom': '$min-size $panel-size $max-size',\n },\n\n // Visual styling\n border: {\n '': false,\n 'side=left': 'right',\n 'side=right': 'left',\n 'side=top': 'bottom',\n 'side=bottom': 'top',\n },\n fill: '#surface',\n\n // Transition styles - offscreen mod controls slide animation\n transform: {\n '': 'translateX(0) translateY(0)',\n 'offscreen & side=left': 'translateX(-100%)',\n 'offscreen & side=right': 'translateX(100%)',\n 'offscreen & side=top': 'translateY(-100%)',\n 'offscreen & side=bottom': 'translateY(100%)',\n },\n transition: {\n '': 'none',\n 'has-transition': 'transform $transition ease-out',\n },\n },\n});\n\n// Handler is positioned as sibling to panel (in Fragment), relative to Layout\nconst ResizeHandlerElement = tasty({\n qa: 'PanelResizeHandler',\n styles: {\n position: 'absolute',\n\n // Handler size\n width: {\n '': '100%',\n horizontal: `${HANDLER_WIDTH}px`,\n 'disabled & horizontal': '1bw',\n },\n height: {\n '': `${HANDLER_WIDTH}px`,\n horizontal: '100%',\n 'disabled & !horizontal': '1bw',\n },\n\n // Position handler with direct offset (no centering needed)\n top: {\n '': 0,\n 'side=top': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=bottom': 'initial',\n },\n bottom: {\n '': 0,\n 'side=bottom': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=top': 'initial',\n },\n left: {\n '': 0,\n 'side=left': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=right': 'initial',\n },\n right: {\n '': 0,\n 'side=right': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=left': 'initial',\n },\n\n // Offscreen transforms only (no centering needed with direct offset positioning)\n transform: {\n '': 'translateX(0)',\n 'offscreen & side=left': `translateX(calc(-1 * $panel-size - ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n 'offscreen & side=right': `translateX(calc($panel-size + ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n 'offscreen & side=top': `translateY(calc(-1 * $panel-size - ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n 'offscreen & side=bottom': `translateY(calc($panel-size + ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n },\n\n cursor: {\n '': 'row-resize',\n horizontal: 'col-resize',\n disabled: 'not-allowed',\n },\n touchAction: {\n '': 'none',\n disabled: 'auto',\n },\n padding: 0,\n outline: 0,\n boxSizing: 'border-box',\n\n // Transition must match panel for synchronized animation\n transition: {\n '': 'theme',\n 'has-transition': 'transform $transition ease-out, theme',\n },\n\n Track: {\n width: {\n '': 'initial',\n horizontal: '3px',\n 'disabled & horizontal': '1px',\n },\n height: {\n '': '3px',\n horizontal: 'initial',\n 'disabled & !horizontal': '1px',\n },\n position: 'absolute',\n inset: {\n '': '3px 0',\n horizontal: '0 3px',\n disabled: '0 0',\n },\n fill: {\n '': '#border',\n '(hovered | drag | focused) & !disabled': '#purple-03',\n },\n border: 0,\n transition: 'theme',\n outline: {\n '': '1bw #primary-text.0',\n 'drag | focused': '1bw #primary-text',\n },\n outlineOffset: 1,\n },\n\n Drag: {\n display: 'grid',\n gap: '2bw',\n border: 0,\n flow: {\n '': 'row',\n horizontal: 'column',\n },\n gridColumns: {\n '': '3px 3px 3px 3px 3px',\n horizontal: 'auto',\n },\n gridRows: {\n '': 'auto',\n horizontal: '3px 3px 3px 3px 3px',\n },\n width: {\n '': 'auto',\n horizontal: '1px',\n },\n height: {\n '': '1px',\n horizontal: 'auto',\n },\n inset: {\n '': '4px 50% auto auto',\n horizontal: '50% 4px auto auto',\n },\n transform: {\n '': 'translate(-50%, 0)',\n horizontal: 'translate(0, -50%)',\n },\n position: 'absolute',\n transition: 'theme',\n },\n\n DragPart: {\n radius: true,\n fill: {\n '': '#dark-03',\n 'hovered | drag | focused': '#primary-text',\n disabled: '#disabled-surface-text',\n },\n },\n },\n});\n\n// Overlay backdrop for overlay mode - covers the content area behind the panel\nconst OverlayBackdrop = tasty({\n qa: 'PanelOverlay',\n styles: {\n position: 'absolute',\n inset: 0,\n // fill: '#white.2',\n backdropFilter: 'invert(.15)',\n cursor: 'pointer',\n opacity: {\n '': 0,\n visible: 1,\n },\n pointerEvents: {\n '': 'none',\n visible: 'auto',\n },\n transition: 'opacity .15s ease-out',\n },\n});\n\ninterface ResizeHandlerProps {\n side: Side;\n isDisabled?: boolean;\n mods?: Record<string, boolean>;\n moveProps: ReturnType<typeof useMove>['moveProps'];\n style?: Record<string, string | number | null | undefined>;\n onDoubleClick?: () => void;\n}\n\nfunction ResizeHandler(props: ResizeHandlerProps) {\n const { side, isDisabled, mods, moveProps, style, onDoubleClick } = props;\n const { hoverProps, isHovered } = useHover({});\n const { focusProps, isFocusVisible } = useFocusRing();\n const isHorizontal = side === 'left' || side === 'right';\n const localIsHovered = useDebouncedValue(isHovered, 150);\n\n return (\n <ResizeHandlerElement\n {...mergeProps(hoverProps, focusProps, moveProps, {\n mods: {\n hovered: localIsHovered,\n horizontal: isHorizontal,\n disabled: isDisabled,\n focused: isFocusVisible,\n side,\n ...mods,\n },\n style,\n tabIndex: isDisabled ? undefined : 0,\n role: 'separator',\n 'aria-orientation': isHorizontal ? 'vertical' : 'horizontal',\n 'aria-label': `Resize ${side} panel`,\n onDoubleClick: isDisabled ? undefined : onDoubleClick,\n })}\n >\n <div data-element=\"Track\" />\n {!isDisabled && (\n <div data-element=\"Drag\">\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n </div>\n )}\n </ResizeHandlerElement>\n );\n}\n\n/** Panel rendering mode */\nexport type LayoutPanelMode = 'default' | 'sticky' | 'overlay' | 'dialog';\n\nexport interface CubeLayoutPanelProps extends BaseProps, ContainerStyleProps {\n /** Side of the layout where panel is positioned */\n side: Side;\n /**\n * Panel rendering mode:\n * - `default`: Standard panel that pushes content aside\n * - `sticky`: Panel floats over content without pushing it\n * - `overlay`: Panel with dismissable backdrop overlay\n * - `dialog`: Panel renders as a modal dialog\n */\n mode?: LayoutPanelMode;\n /** Panel size (width for left/right, height for top/bottom) - controlled */\n size?: number | string;\n /** Default panel size for uncontrolled state */\n defaultSize?: number | string;\n /** Minimum panel size */\n minSize?: number | string;\n /** Maximum panel size */\n maxSize?: number | string;\n /** Enable resize functionality */\n isResizable?: boolean;\n /** Size change callback */\n onSizeChange?: (size: number) => void;\n /** Controlled open state */\n isOpen?: boolean;\n /** Default open state */\n defaultIsOpen?: boolean;\n /** Open state change callback */\n onOpenChange?: (isOpen: boolean) => void;\n /** Enable slide transition on open/close */\n hasTransition?: boolean;\n /**\n * Whether the panel can be dismissed by clicking the overlay (overlay mode) or pressing Escape.\n * Only applies to `overlay` and `dialog` modes. Default: true\n */\n isDismissable?: boolean;\n /** Styles for the overlay backdrop in overlay mode */\n overlayStyles?: Styles;\n /**\n * @deprecated Use `mode=\"dialog\"` instead. Switch to dialog mode (renders panel inside Dialog)\n */\n isDialog?: boolean;\n /** Controlled dialog open state (used with mode=\"dialog\") */\n isDialogOpen?: boolean;\n /** Default dialog open state */\n defaultIsDialogOpen?: boolean;\n /** Dialog open state change callback */\n onDialogOpenChange?: (isOpen: boolean) => void;\n /** Props passed to Dialog component when in dialog mode */\n dialogProps?: Omit<\n CubeDialogContainerProps,\n 'isDismissable' | 'onDismiss' | 'isOpen'\n >;\n /** Padding for content areas inside the panel. Default: '1x' */\n contentPadding?: Styles['padding'];\n /** localStorage key for persisting panel size. When provided, size is stored and restored across instances. */\n sizeStorageKey?: string;\n /** Styles for the panel */\n styles?: Styles;\n children?: ReactNode;\n}\n\nfunction matchesContainerSize(\n container: HTMLElement | null | undefined,\n isHorizontal: boolean,\n dimension: number,\n) {\n return (\n (isHorizontal ? container?.offsetWidth : container?.offsetHeight) ===\n dimension\n );\n}\n\nfunction LayoutPanel(\n props: CubeLayoutPanelProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const layoutActions = useLayoutActionsContext();\n const layoutState = useLayoutStateContext();\n const layoutRefs = useLayoutRefsContext();\n\n if (!layoutActions || !layoutState || !layoutRefs) {\n throw new Error(\n 'Layout.Panel must be used within a Layout component. ' +\n 'Ensure your panel is rendered inside a <Layout> parent.',\n );\n }\n\n const {\n side = 'left',\n mode: modeProp,\n size: providedSize,\n defaultSize = 280,\n minSize = 200,\n maxSize,\n isResizable = false,\n onSizeChange,\n isOpen: providedIsOpen,\n defaultIsOpen = true,\n onOpenChange,\n hasTransition: hasTransitionProp,\n isDismissable = true,\n overlayStyles,\n // Deprecated prop - use mode=\"dialog\" instead\n isDialog = false,\n isDialogOpen: providedIsDialogOpen,\n defaultIsDialogOpen = false,\n onDialogOpenChange,\n dialogProps,\n contentPadding,\n sizeStorageKey,\n children,\n styles,\n mods,\n ...otherProps\n } = props;\n\n // Resolve mode from prop or deprecated isDialog\n const mode: LayoutPanelMode = modeProp ?? (isDialog ? 'dialog' : 'default');\n const isDialogMode = mode === 'dialog';\n const isOverlayMode = mode === 'overlay';\n const isStickyMode = mode === 'sticky';\n\n // Use prop value if provided, otherwise fall back to context value\n const hasTransition = hasTransitionProp ?? layoutActions.hasTransition;\n\n const combinedRef = useCombinedRefs(ref);\n const prevProvidedSizeRef = useRef(providedSize);\n const isHorizontal = side === 'left' || side === 'right';\n\n // Natural boundary computation\n const { containerWidth, containerHeight } = layoutState;\n const { minContentSize } = layoutActions;\n const containerDimension = isHorizontal ? containerWidth : containerHeight;\n const oppositeSide = getOppositeSide(side);\n const oppositePanelSize = layoutState.panelSizes[oppositeSide];\n const ownInsetOffset = isResizable ? RESIZABLE_INSET_OFFSET : 0;\n const naturalMax = useMemo(\n () =>\n !isDialogMode && containerDimension > 0\n ? Math.max(\n 0,\n containerDimension -\n oppositePanelSize -\n minContentSize -\n ownInsetOffset,\n )\n : Infinity,\n [\n isDialogMode,\n containerDimension,\n oppositePanelSize,\n minContentSize,\n ownInsetOffset,\n ],\n );\n\n // Panel open state\n const [internalIsOpen, setInternalIsOpen] = useState(defaultIsOpen);\n const isOpen = providedIsOpen ?? internalIsOpen;\n const isTransitionActive =\n hasTransition && !isDialogMode && layoutRefs.isPanelContainerReady;\n const [visualState, setVisualState] = useState({\n isShown: isOpen,\n isTransitionActive,\n });\n\n // A newly mounted DisplayTransition starts at the requested visibility.\n if (visualState.isTransitionActive !== isTransitionActive) {\n setVisualState({ isShown: isOpen, isTransitionActive });\n }\n const isPanelShown = isTransitionActive ? visualState.isShown : isOpen;\n\n // Dialog open state\n const [internalIsDialogOpen, setInternalIsDialogOpen] =\n useState(defaultIsDialogOpen);\n const dialogOpen = providedIsDialogOpen ?? internalIsDialogOpen;\n\n // Persistent size storage\n const [storedSize, setStoredSize] = useLocalStorage<number | null>(\n sizeStorageKey ?? null,\n null,\n );\n\n // Resize state\n const [isDragging, setIsDragging] = useState(false);\n const [size, setSize] = useState<number>(() => {\n const initialSize =\n typeof providedSize === 'number'\n ? providedSize\n : storedSize != null\n ? storedSize\n : typeof defaultSize === 'number'\n ? defaultSize\n : 280;\n\n return clampSize(initialSize, minSize, maxSize);\n });\n\n const extractedStyles = extractStyles(otherProps, CONTAINER_STYLES);\n\n // Merge styles with contentPadding support\n const finalStyles = useMemo(\n () =>\n mergeStyles(\n styles,\n contentPadding != null ? { '$content-padding': contentPadding } : null,\n extractedStyles,\n ),\n [extractedStyles, contentPadding, styles],\n );\n\n // Resolve user's maxSize to pixels for JS-level clamping.\n // Percentage bounds belong to the inline host, not the dialog's host.\n const resolvedMax = useMemo(() => {\n if (typeof maxSize === 'number') return maxSize;\n if (\n typeof maxSize === 'string' &&\n containerDimension > 0 &&\n (!isDialogMode || !maxSize.trim().endsWith('%'))\n ) {\n return resolveCssSize(maxSize, containerDimension);\n }\n return undefined;\n }, [maxSize, containerDimension, isDialogMode]);\n\n // Effective max combines user's maxSize with natural boundary\n const effectiveMax = useMemo(() => {\n const values: number[] = [];\n if (resolvedMax != null) values.push(resolvedMax);\n if (Number.isFinite(naturalMax)) values.push(naturalMax);\n return values.length > 0 ? Math.min(...values) : undefined;\n }, [resolvedMax, naturalMax]);\n\n // Clamp size to min/max constraints (including natural boundaries)\n const clampValue = useCallback(\n (value: number) => clampSize(value, minSize, undefined, effectiveMax),\n [minSize, effectiveMax],\n );\n\n const setContextDragging = layoutActions.setDragging;\n\n const { moveProps } = useMove({\n onMoveStart() {\n if (!isResizable || isDialogMode) return;\n setIsDragging(true);\n setContextDragging(true);\n },\n onMove(e) {\n if (!isResizable || isDialogMode) return;\n\n let delta: number;\n\n if (e.pointerType === 'keyboard') {\n // Keyboard resize: 10px per step, 50px with Shift\n const step = e.shiftKey ? 50 : 10;\n // For keyboard, deltaX/deltaY are direction indicators (-1, 0, 1)\n const rawDelta = isHorizontal ? e.deltaX : e.deltaY;\n const direction = side === 'right' || side === 'bottom' ? -1 : 1;\n delta = rawDelta * step * direction;\n } else {\n // Pointer resize: use exact delta values\n delta = isHorizontal\n ? e.deltaX * (side === 'right' ? -1 : 1)\n : e.deltaY * (side === 'bottom' ? -1 : 1);\n }\n\n setSize((currentSize) => clampValue(currentSize + delta));\n },\n onMoveEnd() {\n setIsDragging(false);\n setContextDragging(false);\n if (isDialogMode && !isDragging) return;\n // Round to integer on release and notify parent\n setSize((currentSize) => {\n const finalSize = Math.round(clampValue(currentSize));\n // Call onSizeChange synchronously to ensure parent state is updated\n onSizeChange?.(finalSize);\n // Persist to localStorage if key is provided\n setStoredSize(finalSize);\n return finalSize;\n });\n },\n });\n\n // Sync provided size with internal state (only when providedSize actually changes)\n // This prevents resetting size when only isDragging changes (which would cause a flash)\n useEffect(() => {\n if (prevProvidedSizeRef.current !== providedSize) {\n if (\n !isDialogMode &&\n !matchesContainerSize(\n layoutRefs.panelContainerRef.current?.parentElement,\n isHorizontal,\n containerDimension,\n )\n ) {\n return;\n }\n\n prevProvidedSizeRef.current = providedSize;\n if (typeof providedSize === 'number' && !isDragging) {\n setSize(clampValue(providedSize));\n }\n }\n }, [\n providedSize,\n isDragging,\n clampValue,\n isDialogMode,\n isHorizontal,\n containerDimension,\n layoutRefs.panelContainerRef,\n ]);\n\n // Dialogs retain inline size; only inline panels follow the host's bounds.\n useEffect(() => {\n if (!isDialogMode && !isDragging && containerDimension > 0) {\n // A responsive mode switch can precede ResizeObserver's new measurement.\n // Wait for matching host bounds before shrinking and persisting size.\n if (\n !matchesContainerSize(\n layoutRefs.panelContainerRef.current?.parentElement,\n isHorizontal,\n containerDimension,\n )\n ) {\n return;\n }\n\n setSize((prev) => {\n const clamped = clampValue(prev);\n\n if (clamped !== prev) {\n onSizeChange?.(Math.round(clamped));\n setStoredSize(Math.round(clamped));\n }\n\n return clamped;\n });\n }\n }, [\n isDialogMode,\n isDragging,\n clampValue,\n containerDimension,\n isHorizontal,\n layoutRefs.panelContainerRef,\n ]);\n\n // Register panel with layout context\n // Include handler outside portion (minus border overlap) for proper content inset\n // In sticky, overlay, and dialog modes, panel doesn't push content, so size is 0\n // NOTE: We intentionally use `size` (not `clampValue(size)`) here to avoid a feedback\n // loop. `clampValue` depends on the opposite panel's context size, so clamping here\n // would create a period-2 oscillation through shared context. CSS --max-size handles\n // visual clamping immediately; the auto-shrink effect converges `size` state.\n const effectivePanelSize = isPanelShown && mode === 'default' ? size : 0;\n const effectiveInsetSize = Math.round(\n effectivePanelSize +\n (isResizable && effectivePanelSize > 0 ? RESIZABLE_INSET_OFFSET : 0),\n );\n\n const { registerPanel, unregisterPanel, updatePanelSize } = layoutActions;\n const { isReady } = layoutState;\n\n // Track the last reported size to prevent unnecessary updates\n const lastSizeRef = useRef<number>(effectiveInsetSize);\n\n // Register on mount, unregister on unmount\n // Using useLayoutEffect ensures registration happens before browser paint\n useLayoutEffect(() => {\n registerPanel(side, lastSizeRef.current);\n\n return () => {\n unregisterPanel(side);\n };\n }, [side, registerPanel, unregisterPanel]);\n\n // Update size when it changes (after initial mount)\n // Using useLayoutEffect ensures size updates happen before browser paint\n useLayoutEffect(() => {\n if (lastSizeRef.current !== effectiveInsetSize) {\n lastSizeRef.current = effectiveInsetSize;\n updatePanelSize(side, effectiveInsetSize);\n }\n }, [side, effectiveInsetSize, updatePanelSize]);\n\n const handleOpenChange = useCallback(\n (newIsOpen: boolean) => {\n setInternalIsOpen(newIsOpen);\n onOpenChange?.(newIsOpen);\n },\n [onOpenChange],\n );\n\n // Dismiss handler for overlay mode (click on overlay)\n const handleDismiss = useCallback(() => {\n if (isDismissable) {\n handleOpenChange(false);\n }\n }, [isDismissable, handleOpenChange]);\n\n // Register overlay panel with Layout context for coordinated dismissal\n const { registerOverlayPanel } = layoutActions;\n\n useEffect(() => {\n // Only register if in overlay mode, open, and dismissable\n if (isOverlayMode && isOpen && isDismissable) {\n const unregister = registerOverlayPanel(() => handleOpenChange(false));\n return unregister;\n }\n }, [\n isOverlayMode,\n isOpen,\n isDismissable,\n registerOverlayPanel,\n handleOpenChange,\n ]);\n\n const handleDialogOpenChange = useCallback(\n (newIsOpen: boolean) => {\n setInternalIsDialogOpen(newIsOpen);\n onDialogOpenChange?.(newIsOpen);\n },\n [onDialogOpenChange],\n );\n\n // Panel context value for child components (like LayoutPanelHeader)\n const panelContextValue = useMemo(\n () => ({\n onOpenChange: handleOpenChange,\n isOpen,\n }),\n [handleOpenChange, isOpen],\n );\n\n // Dialog mode context value - uses dialog state instead of panel state\n const dialogPanelContextValue = useMemo(\n () => ({\n onOpenChange: handleDialogOpenChange,\n isOpen: dialogOpen,\n }),\n [handleDialogOpenChange, dialogOpen],\n );\n\n const panelMods = useMemo(\n () => ({\n side,\n drag: isDragging,\n horizontal: isHorizontal,\n // Only enable transition after layout is ready to prevent initial animation\n 'has-transition': hasTransition && isReady,\n ...mods,\n }),\n [side, isDragging, isHorizontal, hasTransition, isReady, mods],\n );\n\n // Build --max-size CSS variable combining user maxSize and natural boundary\n const maxSizeCss = useMemo(() => {\n const parts: string[] = [];\n\n if (maxSize != null) {\n parts.push(typeof maxSize === 'number' ? `${maxSize}px` : maxSize);\n }\n\n if (containerDimension > 0 && Number.isFinite(naturalMax)) {\n parts.push(`${naturalMax}px`);\n }\n\n if (parts.length === 0) return undefined;\n return parts.length === 1 ? parts[0] : `min(${parts.join(', ')})`;\n }, [maxSize, naturalMax, containerDimension]);\n\n const panelStyle = useMemo(\n () => ({\n '--panel-size': `${size}px`,\n '--min-size': typeof minSize === 'number' ? `${minSize}px` : minSize,\n '--max-size': maxSizeCss,\n }),\n [size, minSize, maxSizeCss],\n );\n\n // Combine refs for panel element\n const panelRefCallback = useCallback(\n (node: HTMLDivElement | null, transitionRef?: RefCallback<HTMLElement>) => {\n // Update the combined ref\n (combinedRef as { current: HTMLDivElement | null }).current = node;\n // Call transition ref if provided\n transitionRef?.(node);\n },\n [combinedRef],\n );\n\n // Reset to default size on double-click\n const handleResetSize = useCallback(() => {\n const resetSize =\n typeof defaultSize === 'number' ? defaultSize : parseInt(defaultSize, 10);\n const clampedSize = clampValue(resetSize || 280);\n setSize(clampedSize);\n onSizeChange?.(clampedSize);\n setStoredSize(clampedSize);\n }, [defaultSize, clampValue, onSizeChange, setStoredSize]);\n\n const renderPanelContent = (\n offscreen = false,\n transitionRef?: RefCallback<HTMLElement>,\n ) => {\n const showOverlay = isOverlayMode && !offscreen;\n\n return (\n <>\n {/* Overlay backdrop for overlay mode */}\n {isOverlayMode && (\n <OverlayBackdrop\n mods={{ visible: showOverlay }}\n styles={overlayStyles}\n aria-hidden=\"true\"\n onClick={handleDismiss}\n />\n )}\n <PanelElement\n ref={(node: HTMLDivElement | null) =>\n panelRefCallback(node, transitionRef)\n }\n {...filterBaseProps(otherProps, { eventProps: true })}\n mods={{ ...panelMods, offscreen }}\n styles={finalStyles}\n style={panelStyle}\n data-side={side}\n >\n <LayoutPanelContext.Provider value={panelContextValue}>\n <LayoutContextReset>{children}</LayoutContextReset>\n </LayoutPanelContext.Provider>\n </PanelElement>\n {isResizable && (\n <ResizeHandler\n side={side}\n isDisabled={!isResizable}\n mods={{\n drag: isDragging,\n offscreen,\n 'has-transition': hasTransition && isReady,\n }}\n moveProps={moveProps}\n style={panelStyle}\n onDoubleClick={handleResetSize}\n />\n )}\n </>\n );\n };\n\n // Dialog mode - uses its own portal via DialogContainer\n if (isDialogMode) {\n return (\n <DialogContainer\n isOpen={dialogOpen}\n isDismissable={isDismissable}\n onDismiss={() => handleDialogOpenChange(false)}\n {...dialogProps}\n >\n <Dialog isDismissable={false}>\n <LayoutPanelContext.Provider value={dialogPanelContextValue}>\n <LayoutContextReset>{children}</LayoutContextReset>\n </LayoutPanelContext.Provider>\n </Dialog>\n </DialogContainer>\n );\n }\n\n // Wait for portal container to be ready before rendering\n if (!layoutRefs.isPanelContainerReady) {\n return null;\n }\n\n const portalContainer = layoutRefs.panelContainerRef.current!;\n\n // Panel with transition - portal to panel container\n if (hasTransition) {\n return createPortal(\n <DisplayTransition\n isShown={isOpen}\n animateOnMount={false}\n onToggle={(isShown) => setVisualState({ isShown, isTransitionActive })}\n >\n {({ isShown, isExiting, ref: transitionRef }) => (\n <LayoutPanelTransition isShown={isShown} isExiting={isExiting}>\n {renderPanelContent(!isShown, transitionRef)}\n </LayoutPanelTransition>\n )}\n </DisplayTransition>,\n portalContainer,\n );\n }\n\n // Simple panel (no transition) - portal to panel container\n if (!isOpen) return null;\n\n return createPortal(renderPanelContent(false), portalContainer);\n}\n\nconst _LayoutPanel = forwardRef(LayoutPanel);\n\n_LayoutPanel.displayName = 'Layout.Panel';\n\nexport { _LayoutPanel as LayoutPanel };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmDA,M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W0E,kBAAkBD;AAGrD,KAAI/F,cACF,QAAO3G,aACL,oBAAC;EACC,SAASwG;EACT,gBAAgB;EAChB,WAAWwD,YAAYD,eAAe;GAAEC;GAASJ;GAAoB,CAAC;aAEpE,EAAEI,SAAAA,WAASgF,WAAWnH,KAAKyG,sBAC3B,oBAAC;GAAsB,SAAStE;GAAoBgF;aACjDL,mBAAmB,CAAC3E,WAASsE,gBAAc;IAE/C;GACiB,EACpBS,gBACD;AAIH,KAAI,CAACvI,OAAQ,QAAO;AAEpB,QAAOxG,aAAa2O,mBAAmB,MAAM,EAAEI,gBAAgB;;AAGjE,MAAME,eAAe9P,WAAWyI,YAAY;AAE5CqH,aAAaC,cAAc"}
1
+ {"version":3,"file":"LayoutPanel.js","names":["BaseProps","CONTAINER_STYLES","ContainerStyleProps","filterBaseProps","mergeStyles","Styles","tasty","ForwardedRef","forwardRef","HTMLAttributes","ReactNode","RefCallback","useCallback","useEffect","useEffectEvent","useLayoutEffect","useMemo","useRef","useState","useFocusRing","useHover","useMove","createPortal","useDebouncedValue","mergeProps","useCombinedRefs","useLocalStorage","extractStyles","DisplayTransition","Dialog","CubeDialogContainerProps","DialogContainer","LayoutContextReset","LayoutPanelContext","Side","useLayoutActionsContext","useLayoutRefsContext","useLayoutStateContext","LayoutPanelTransition","clampSize","getOppositeSide","resolveCssSize","HANDLER_WIDTH","HANDLER_OFFSET","RESIZABLE_INSET_OFFSET","PanelElement","as","qa","styles","container","position","display","flow","overflow","boxSizing","top","right","bottom","left","width","height","border","fill","transform","transition","ResizeHandlerElement","horizontal","cursor","disabled","touchAction","padding","outline","Track","inset","outlineOffset","Drag","gap","gridColumns","gridRows","DragPart","radius","OverlayBackdrop","backdropFilter","opacity","visible","pointerEvents","ResizeHandlerProps","side","isDisabled","mods","Record","moveProps","ReturnType","style","onDoubleClick","ResizeHandler","props","$","_c","t0","Symbol","for","hoverProps","isHovered","focusProps","isFocusVisible","isHorizontal","localIsHovered","t1","hovered","focused","tabIndex","undefined","role","t2","t3","t4","LayoutPanelMode","CubeLayoutPanelProps","mode","size","defaultSize","minSize","maxSize","isResizable","onSizeChange","isOpen","defaultIsOpen","onOpenChange","hasTransition","isDismissable","overlayStyles","isDialog","isDialogOpen","defaultIsDialogOpen","onDialogOpenChange","dialogProps","Omit","contentPadding","sizeStorageKey","children","matchesContainerSize","HTMLElement","dimension","offsetWidth","offsetHeight","LayoutPanel","ref","HTMLDivElement","layoutActions","layoutState","layoutRefs","Error","modeProp","providedSize","providedIsOpen","hasTransitionProp","providedIsDialogOpen","otherProps","isDialogMode","isOverlayMode","isStickyMode","combinedRef","prevProvidedSizeRef","containerWidth","containerHeight","minContentSize","containerDimension","oppositeSide","oppositePanelSize","panelSizes","ownInsetOffset","naturalMax","Math","max","Infinity","internalIsOpen","setInternalIsOpen","isTransitionActive","isPanelContainerReady","visualState","setVisualState","isShown","isPanelShown","internalIsDialogOpen","setInternalIsDialogOpen","dialogOpen","storedSize","setStoredSize","isDragging","setIsDragging","setSize","initialSize","extractedStyles","finalStyles","resolvedMax","trim","endsWith","effectiveMax","values","push","Number","isFinite","length","min","clampValue","value","setContextDragging","setDragging","onMoveStart","onMove","e","delta","pointerType","step","shiftKey","rawDelta","deltaX","deltaY","direction","currentSize","onMoveEnd","finalSize","round","current","panelContainerRef","parentElement","applyInlineBounds","prev","clamped","frame","requestAnimationFrame","cancelAnimationFrame","effectivePanelSize","effectiveInsetSize","registerPanel","unregisterPanel","updatePanelSize","isReady","lastSizeRef","handleOpenChange","newIsOpen","handleDismiss","registerOverlayPanel","unregister","handleDialogOpenChange","panelContextValue","dialogPanelContextValue","panelMods","drag","maxSizeCss","parts","join","panelStyle","panelRefCallback","node","transitionRef","handleResetSize","resetSize","parseInt","clampedSize","renderPanelContent","offscreen","showOverlay","eventProps","portalContainer","isExiting","_LayoutPanel","displayName"],"sources":["../../../../src/components/content/Layout/LayoutPanel.tsx"],"sourcesContent":["import {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n filterBaseProps,\n mergeStyles,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n ReactNode,\n RefCallback,\n useCallback,\n useEffect,\n useEffectEvent,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFocusRing, useHover, useMove } from 'react-aria';\nimport { createPortal } from 'react-dom';\n\nimport { useDebouncedValue } from '../../../_internal/hooks';\nimport {\n mergeProps,\n useCombinedRefs,\n useLocalStorage,\n} from '../../../utils/react';\nimport { extractStyles } from '../../../utils/styles';\nimport { DisplayTransition } from '../../helpers/DisplayTransition/DisplayTransition';\nimport { Dialog } from '../../overlays/Dialog';\nimport {\n CubeDialogContainerProps,\n DialogContainer,\n} from '../../overlays/Dialog/DialogContainer';\n\nimport {\n LayoutContextReset,\n LayoutPanelContext,\n Side,\n useLayoutActionsContext,\n useLayoutRefsContext,\n useLayoutStateContext,\n} from './LayoutContext';\nimport { LayoutPanelTransition } from './LayoutPanelTransition';\nimport { clampSize, getOppositeSide, resolveCssSize } from './utils';\n\n// Resize handler dimensions\nconst HANDLER_WIDTH = 9;\n// How far from panel edge to position handler's inner edge (centers the 3px track on the edge)\nconst HANDLER_OFFSET = 4;\n// Extra inset added for resizable panels (to accommodate handler grab area)\nconst RESIZABLE_INSET_OFFSET = 2;\n\nconst PanelElement = tasty({\n as: 'div',\n qa: 'LayoutPanel',\n styles: {\n container: 'panel / inline-size',\n position: 'absolute',\n display: 'flex',\n flow: 'column',\n overflow: 'hidden',\n boxSizing: 'border-box',\n\n '$content-padding': '1x',\n // Auto-border size for sub-components (panels are always vertical)\n '$layout-border-size': '1bw',\n\n // Position based on side prop\n top: {\n '': 0,\n 'side=bottom': 'initial',\n },\n right: {\n '': 0,\n 'side=left': 'initial',\n },\n bottom: {\n '': 0,\n 'side=top': 'initial',\n },\n left: {\n '': 0,\n 'side=right': 'initial',\n },\n\n // Size handling with CSS-level min/max clamping\n width: {\n '': '$min-size $panel-size $max-size',\n 'side=top | side=bottom': '100%',\n },\n height: {\n '': '100%',\n 'side=top | side=bottom': '$min-size $panel-size $max-size',\n },\n\n // Visual styling\n border: {\n '': false,\n 'side=left': 'right',\n 'side=right': 'left',\n 'side=top': 'bottom',\n 'side=bottom': 'top',\n },\n fill: '#surface',\n\n // Transition styles - offscreen mod controls slide animation\n transform: {\n '': 'translateX(0) translateY(0)',\n 'offscreen & side=left': 'translateX(-100%)',\n 'offscreen & side=right': 'translateX(100%)',\n 'offscreen & side=top': 'translateY(-100%)',\n 'offscreen & side=bottom': 'translateY(100%)',\n },\n transition: {\n '': 'none',\n 'has-transition': 'transform $transition ease-out',\n },\n },\n});\n\n// Handler is positioned as sibling to panel (in Fragment), relative to Layout\nconst ResizeHandlerElement = tasty({\n qa: 'PanelResizeHandler',\n styles: {\n position: 'absolute',\n\n // Handler size\n width: {\n '': '100%',\n horizontal: `${HANDLER_WIDTH}px`,\n 'disabled & horizontal': '1bw',\n },\n height: {\n '': `${HANDLER_WIDTH}px`,\n horizontal: '100%',\n 'disabled & !horizontal': '1bw',\n },\n\n // Position handler with direct offset (no centering needed)\n top: {\n '': 0,\n 'side=top': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=bottom': 'initial',\n },\n bottom: {\n '': 0,\n 'side=bottom': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=top': 'initial',\n },\n left: {\n '': 0,\n 'side=left': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=right': 'initial',\n },\n right: {\n '': 0,\n 'side=right': `calc($panel-size - ${HANDLER_OFFSET}px)`,\n 'side=left': 'initial',\n },\n\n // Offscreen transforms only (no centering needed with direct offset positioning)\n transform: {\n '': 'translateX(0)',\n 'offscreen & side=left': `translateX(calc(-1 * $panel-size - ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n 'offscreen & side=right': `translateX(calc($panel-size + ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n 'offscreen & side=top': `translateY(calc(-1 * $panel-size - ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n 'offscreen & side=bottom': `translateY(calc($panel-size + ${HANDLER_WIDTH - HANDLER_OFFSET}px))`,\n },\n\n cursor: {\n '': 'row-resize',\n horizontal: 'col-resize',\n disabled: 'not-allowed',\n },\n touchAction: {\n '': 'none',\n disabled: 'auto',\n },\n padding: 0,\n outline: 0,\n boxSizing: 'border-box',\n\n // Transition must match panel for synchronized animation\n transition: {\n '': 'theme',\n 'has-transition': 'transform $transition ease-out, theme',\n },\n\n Track: {\n width: {\n '': 'initial',\n horizontal: '3px',\n 'disabled & horizontal': '1px',\n },\n height: {\n '': '3px',\n horizontal: 'initial',\n 'disabled & !horizontal': '1px',\n },\n position: 'absolute',\n inset: {\n '': '3px 0',\n horizontal: '0 3px',\n disabled: '0 0',\n },\n fill: {\n '': '#border',\n '(hovered | drag | focused) & !disabled': '#purple-03',\n },\n border: 0,\n transition: 'theme',\n outline: {\n '': '1bw #primary-text.0',\n 'drag | focused': '1bw #primary-text',\n },\n outlineOffset: 1,\n },\n\n Drag: {\n display: 'grid',\n gap: '2bw',\n border: 0,\n flow: {\n '': 'row',\n horizontal: 'column',\n },\n gridColumns: {\n '': '3px 3px 3px 3px 3px',\n horizontal: 'auto',\n },\n gridRows: {\n '': 'auto',\n horizontal: '3px 3px 3px 3px 3px',\n },\n width: {\n '': 'auto',\n horizontal: '1px',\n },\n height: {\n '': '1px',\n horizontal: 'auto',\n },\n inset: {\n '': '4px 50% auto auto',\n horizontal: '50% 4px auto auto',\n },\n transform: {\n '': 'translate(-50%, 0)',\n horizontal: 'translate(0, -50%)',\n },\n position: 'absolute',\n transition: 'theme',\n },\n\n DragPart: {\n radius: true,\n fill: {\n '': '#dark-03',\n 'hovered | drag | focused': '#primary-text',\n disabled: '#disabled-surface-text',\n },\n },\n },\n});\n\n// Overlay backdrop for overlay mode - covers the content area behind the panel\nconst OverlayBackdrop = tasty({\n qa: 'PanelOverlay',\n styles: {\n position: 'absolute',\n inset: 0,\n // fill: '#white.2',\n backdropFilter: 'invert(.15)',\n cursor: 'pointer',\n opacity: {\n '': 0,\n visible: 1,\n },\n pointerEvents: {\n '': 'none',\n visible: 'auto',\n },\n transition: 'opacity .15s ease-out',\n },\n});\n\ninterface ResizeHandlerProps {\n side: Side;\n isDisabled?: boolean;\n mods?: Record<string, boolean>;\n moveProps: ReturnType<typeof useMove>['moveProps'];\n style?: Record<string, string | number | null | undefined>;\n onDoubleClick?: () => void;\n}\n\nfunction ResizeHandler(props: ResizeHandlerProps) {\n const { side, isDisabled, mods, moveProps, style, onDoubleClick } = props;\n const { hoverProps, isHovered } = useHover({});\n const { focusProps, isFocusVisible } = useFocusRing();\n const isHorizontal = side === 'left' || side === 'right';\n const localIsHovered = useDebouncedValue(isHovered, 150);\n\n return (\n <ResizeHandlerElement\n {...mergeProps(hoverProps, focusProps, moveProps, {\n mods: {\n hovered: localIsHovered,\n horizontal: isHorizontal,\n disabled: isDisabled,\n focused: isFocusVisible,\n side,\n ...mods,\n },\n style,\n tabIndex: isDisabled ? undefined : 0,\n role: 'separator',\n 'aria-orientation': isHorizontal ? 'vertical' : 'horizontal',\n 'aria-label': `Resize ${side} panel`,\n onDoubleClick: isDisabled ? undefined : onDoubleClick,\n })}\n >\n <div data-element=\"Track\" />\n {!isDisabled && (\n <div data-element=\"Drag\">\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n <div data-element=\"DragPart\" />\n </div>\n )}\n </ResizeHandlerElement>\n );\n}\n\n/** Panel rendering mode */\nexport type LayoutPanelMode = 'default' | 'sticky' | 'overlay' | 'dialog';\n\nexport interface CubeLayoutPanelProps extends BaseProps, ContainerStyleProps {\n /** Side of the layout where panel is positioned */\n side: Side;\n /**\n * Panel rendering mode:\n * - `default`: Standard panel that pushes content aside\n * - `sticky`: Panel floats over content without pushing it\n * - `overlay`: Panel with dismissable backdrop overlay\n * - `dialog`: Panel renders as a modal dialog\n */\n mode?: LayoutPanelMode;\n /** Panel size (width for left/right, height for top/bottom) - controlled */\n size?: number | string;\n /** Default panel size for uncontrolled state */\n defaultSize?: number | string;\n /** Minimum panel size */\n minSize?: number | string;\n /** Maximum panel size */\n maxSize?: number | string;\n /** Enable resize functionality */\n isResizable?: boolean;\n /** Size change callback */\n onSizeChange?: (size: number) => void;\n /** Controlled open state */\n isOpen?: boolean;\n /** Default open state */\n defaultIsOpen?: boolean;\n /** Open state change callback */\n onOpenChange?: (isOpen: boolean) => void;\n /** Enable slide transition on open/close */\n hasTransition?: boolean;\n /**\n * Whether the panel can be dismissed by clicking the overlay (overlay mode) or pressing Escape.\n * Only applies to `overlay` and `dialog` modes. Default: true\n */\n isDismissable?: boolean;\n /** Styles for the overlay backdrop in overlay mode */\n overlayStyles?: Styles;\n /**\n * @deprecated Use `mode=\"dialog\"` instead. Switch to dialog mode (renders panel inside Dialog)\n */\n isDialog?: boolean;\n /** Controlled dialog open state (used with mode=\"dialog\") */\n isDialogOpen?: boolean;\n /** Default dialog open state */\n defaultIsDialogOpen?: boolean;\n /** Dialog open state change callback */\n onDialogOpenChange?: (isOpen: boolean) => void;\n /** Props passed to Dialog component when in dialog mode */\n dialogProps?: Omit<\n CubeDialogContainerProps,\n 'isDismissable' | 'onDismiss' | 'isOpen'\n >;\n /** Padding for content areas inside the panel. Default: '1x' */\n contentPadding?: Styles['padding'];\n /** localStorage key for persisting panel size. When provided, size is stored and restored across instances. */\n sizeStorageKey?: string;\n /** Styles for the panel */\n styles?: Styles;\n children?: ReactNode;\n}\n\nfunction matchesContainerSize(\n container: HTMLElement | null | undefined,\n isHorizontal: boolean,\n dimension: number,\n) {\n return (\n (isHorizontal ? container?.offsetWidth : container?.offsetHeight) ===\n dimension\n );\n}\n\nfunction LayoutPanel(\n props: CubeLayoutPanelProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const layoutActions = useLayoutActionsContext();\n const layoutState = useLayoutStateContext();\n const layoutRefs = useLayoutRefsContext();\n\n if (!layoutActions || !layoutState || !layoutRefs) {\n throw new Error(\n 'Layout.Panel must be used within a Layout component. ' +\n 'Ensure your panel is rendered inside a <Layout> parent.',\n );\n }\n\n const {\n side = 'left',\n mode: modeProp,\n size: providedSize,\n defaultSize = 280,\n minSize = 200,\n maxSize,\n isResizable = false,\n onSizeChange,\n isOpen: providedIsOpen,\n defaultIsOpen = true,\n onOpenChange,\n hasTransition: hasTransitionProp,\n isDismissable = true,\n overlayStyles,\n // Deprecated prop - use mode=\"dialog\" instead\n isDialog = false,\n isDialogOpen: providedIsDialogOpen,\n defaultIsDialogOpen = false,\n onDialogOpenChange,\n dialogProps,\n contentPadding,\n sizeStorageKey,\n children,\n styles,\n mods,\n ...otherProps\n } = props;\n\n // Resolve mode from prop or deprecated isDialog\n const mode: LayoutPanelMode = modeProp ?? (isDialog ? 'dialog' : 'default');\n const isDialogMode = mode === 'dialog';\n const isOverlayMode = mode === 'overlay';\n const isStickyMode = mode === 'sticky';\n\n // Use prop value if provided, otherwise fall back to context value\n const hasTransition = hasTransitionProp ?? layoutActions.hasTransition;\n\n const combinedRef = useCombinedRefs(ref);\n const prevProvidedSizeRef = useRef(providedSize);\n const isHorizontal = side === 'left' || side === 'right';\n\n // Natural boundary computation\n const { containerWidth, containerHeight } = layoutState;\n const { minContentSize } = layoutActions;\n const containerDimension = isHorizontal ? containerWidth : containerHeight;\n const oppositeSide = getOppositeSide(side);\n const oppositePanelSize = layoutState.panelSizes[oppositeSide];\n const ownInsetOffset = isResizable ? RESIZABLE_INSET_OFFSET : 0;\n const naturalMax = useMemo(\n () =>\n !isDialogMode && containerDimension > 0\n ? Math.max(\n 0,\n containerDimension -\n oppositePanelSize -\n minContentSize -\n ownInsetOffset,\n )\n : Infinity,\n [\n isDialogMode,\n containerDimension,\n oppositePanelSize,\n minContentSize,\n ownInsetOffset,\n ],\n );\n\n // Panel open state\n const [internalIsOpen, setInternalIsOpen] = useState(defaultIsOpen);\n const isOpen = providedIsOpen ?? internalIsOpen;\n const isTransitionActive =\n hasTransition && !isDialogMode && layoutRefs.isPanelContainerReady;\n const [visualState, setVisualState] = useState({\n isShown: isOpen,\n isTransitionActive,\n });\n\n // A newly mounted DisplayTransition starts at the requested visibility.\n if (visualState.isTransitionActive !== isTransitionActive) {\n setVisualState({ isShown: isOpen, isTransitionActive });\n }\n const isPanelShown = isTransitionActive ? visualState.isShown : isOpen;\n\n // Dialog open state\n const [internalIsDialogOpen, setInternalIsDialogOpen] =\n useState(defaultIsDialogOpen);\n const dialogOpen = providedIsDialogOpen ?? internalIsDialogOpen;\n\n // Persistent size storage\n const [storedSize, setStoredSize] = useLocalStorage<number | null>(\n sizeStorageKey ?? null,\n null,\n );\n\n // Resize state\n const [isDragging, setIsDragging] = useState(false);\n const [size, setSize] = useState<number>(() => {\n const initialSize =\n typeof providedSize === 'number'\n ? providedSize\n : storedSize != null\n ? storedSize\n : typeof defaultSize === 'number'\n ? defaultSize\n : 280;\n\n return clampSize(initialSize, minSize, maxSize);\n });\n\n const extractedStyles = extractStyles(otherProps, CONTAINER_STYLES);\n\n // Merge styles with contentPadding support\n const finalStyles = useMemo(\n () =>\n mergeStyles(\n styles,\n contentPadding != null ? { '$content-padding': contentPadding } : null,\n extractedStyles,\n ),\n [extractedStyles, contentPadding, styles],\n );\n\n // Resolve user's maxSize to pixels for JS-level clamping.\n // Percentage bounds belong to the inline host, not the dialog's host.\n const resolvedMax = useMemo(() => {\n if (typeof maxSize === 'number') return maxSize;\n if (\n typeof maxSize === 'string' &&\n containerDimension > 0 &&\n (!isDialogMode || !maxSize.trim().endsWith('%'))\n ) {\n return resolveCssSize(maxSize, containerDimension);\n }\n return undefined;\n }, [maxSize, containerDimension, isDialogMode]);\n\n // Effective max combines user's maxSize with natural boundary\n const effectiveMax = useMemo(() => {\n const values: number[] = [];\n if (resolvedMax != null) values.push(resolvedMax);\n if (Number.isFinite(naturalMax)) values.push(naturalMax);\n return values.length > 0 ? Math.min(...values) : undefined;\n }, [resolvedMax, naturalMax]);\n\n // Clamp size to min/max constraints (including natural boundaries)\n const clampValue = useCallback(\n (value: number) => clampSize(value, minSize, undefined, effectiveMax),\n [minSize, effectiveMax],\n );\n\n const setContextDragging = layoutActions.setDragging;\n\n const { moveProps } = useMove({\n onMoveStart() {\n if (!isResizable || isDialogMode) return;\n setIsDragging(true);\n setContextDragging(true);\n },\n onMove(e) {\n if (!isResizable || isDialogMode) return;\n\n let delta: number;\n\n if (e.pointerType === 'keyboard') {\n // Keyboard resize: 10px per step, 50px with Shift\n const step = e.shiftKey ? 50 : 10;\n // For keyboard, deltaX/deltaY are direction indicators (-1, 0, 1)\n const rawDelta = isHorizontal ? e.deltaX : e.deltaY;\n const direction = side === 'right' || side === 'bottom' ? -1 : 1;\n delta = rawDelta * step * direction;\n } else {\n // Pointer resize: use exact delta values\n delta = isHorizontal\n ? e.deltaX * (side === 'right' ? -1 : 1)\n : e.deltaY * (side === 'bottom' ? -1 : 1);\n }\n\n setSize((currentSize) => clampValue(currentSize + delta));\n },\n onMoveEnd() {\n setIsDragging(false);\n setContextDragging(false);\n if (isDialogMode && !isDragging) return;\n // Round to integer on release and notify parent\n setSize((currentSize) => {\n const finalSize = Math.round(clampValue(currentSize));\n // Call onSizeChange synchronously to ensure parent state is updated\n onSizeChange?.(finalSize);\n // Persist to localStorage if key is provided\n setStoredSize(finalSize);\n return finalSize;\n });\n },\n });\n\n // Sync provided size with internal state (only when providedSize actually changes)\n // This prevents resetting size when only isDragging changes (which would cause a flash)\n useEffect(() => {\n if (prevProvidedSizeRef.current !== providedSize) {\n if (\n !isDialogMode &&\n !matchesContainerSize(\n layoutRefs.panelContainerRef.current?.parentElement,\n isHorizontal,\n containerDimension,\n )\n ) {\n return;\n }\n\n prevProvidedSizeRef.current = providedSize;\n if (typeof providedSize === 'number' && !isDragging) {\n setSize(clampValue(providedSize));\n }\n }\n }, [\n providedSize,\n isDragging,\n clampValue,\n isDialogMode,\n isHorizontal,\n containerDimension,\n layoutRefs.panelContainerRef,\n ]);\n\n // Dialogs retain inline size; only inline panels follow the host's bounds.\n const applyInlineBounds = useEffectEvent(() => {\n if (\n !matchesContainerSize(\n layoutRefs.panelContainerRef.current?.parentElement,\n isHorizontal,\n containerDimension,\n )\n ) {\n return;\n }\n\n setSize((prev) => {\n const clamped = clampValue(prev);\n\n if (clamped !== prev) {\n onSizeChange?.(Math.round(clamped));\n setStoredSize(Math.round(clamped));\n }\n\n return clamped;\n });\n });\n\n useEffect(() => {\n if (!isDialogMode && !isDragging && containerDimension > 0) {\n // In an iframe ResizeObserver can precede responsive mode delivery.\n // Let that mode settle before shrinking and persisting the inline size.\n const frame = requestAnimationFrame(() => applyInlineBounds());\n return () => cancelAnimationFrame(frame);\n }\n }, [\n isDialogMode,\n isDragging,\n clampValue,\n containerDimension,\n isHorizontal,\n layoutRefs.panelContainerRef,\n ]);\n\n // Register panel with layout context\n // Include handler outside portion (minus border overlap) for proper content inset\n // In sticky, overlay, and dialog modes, panel doesn't push content, so size is 0\n // NOTE: We intentionally use `size` (not `clampValue(size)`) here to avoid a feedback\n // loop. `clampValue` depends on the opposite panel's context size, so clamping here\n // would create a period-2 oscillation through shared context. CSS --max-size handles\n // visual clamping immediately; the auto-shrink effect converges `size` state.\n const effectivePanelSize = isPanelShown && mode === 'default' ? size : 0;\n const effectiveInsetSize = Math.round(\n effectivePanelSize +\n (isResizable && effectivePanelSize > 0 ? RESIZABLE_INSET_OFFSET : 0),\n );\n\n const { registerPanel, unregisterPanel, updatePanelSize } = layoutActions;\n const { isReady } = layoutState;\n\n // Track the last reported size to prevent unnecessary updates\n const lastSizeRef = useRef<number>(effectiveInsetSize);\n\n // Register on mount, unregister on unmount\n // Using useLayoutEffect ensures registration happens before browser paint\n useLayoutEffect(() => {\n registerPanel(side, lastSizeRef.current);\n\n return () => {\n unregisterPanel(side);\n };\n }, [side, registerPanel, unregisterPanel]);\n\n // Update size when it changes (after initial mount)\n // Using useLayoutEffect ensures size updates happen before browser paint\n useLayoutEffect(() => {\n if (lastSizeRef.current !== effectiveInsetSize) {\n lastSizeRef.current = effectiveInsetSize;\n updatePanelSize(side, effectiveInsetSize);\n }\n }, [side, effectiveInsetSize, updatePanelSize]);\n\n const handleOpenChange = useCallback(\n (newIsOpen: boolean) => {\n setInternalIsOpen(newIsOpen);\n onOpenChange?.(newIsOpen);\n },\n [onOpenChange],\n );\n\n // Dismiss handler for overlay mode (click on overlay)\n const handleDismiss = useCallback(() => {\n if (isDismissable) {\n handleOpenChange(false);\n }\n }, [isDismissable, handleOpenChange]);\n\n // Register overlay panel with Layout context for coordinated dismissal\n const { registerOverlayPanel } = layoutActions;\n\n useEffect(() => {\n // Only register if in overlay mode, open, and dismissable\n if (isOverlayMode && isOpen && isDismissable) {\n const unregister = registerOverlayPanel(() => handleOpenChange(false));\n return unregister;\n }\n }, [\n isOverlayMode,\n isOpen,\n isDismissable,\n registerOverlayPanel,\n handleOpenChange,\n ]);\n\n const handleDialogOpenChange = useCallback(\n (newIsOpen: boolean) => {\n setInternalIsDialogOpen(newIsOpen);\n onDialogOpenChange?.(newIsOpen);\n },\n [onDialogOpenChange],\n );\n\n // Panel context value for child components (like LayoutPanelHeader)\n const panelContextValue = useMemo(\n () => ({\n onOpenChange: handleOpenChange,\n isOpen,\n }),\n [handleOpenChange, isOpen],\n );\n\n // Dialog mode context value - uses dialog state instead of panel state\n const dialogPanelContextValue = useMemo(\n () => ({\n onOpenChange: handleDialogOpenChange,\n isOpen: dialogOpen,\n }),\n [handleDialogOpenChange, dialogOpen],\n );\n\n const panelMods = useMemo(\n () => ({\n side,\n drag: isDragging,\n horizontal: isHorizontal,\n // Only enable transition after layout is ready to prevent initial animation\n 'has-transition': hasTransition && isReady,\n ...mods,\n }),\n [side, isDragging, isHorizontal, hasTransition, isReady, mods],\n );\n\n // Build --max-size CSS variable combining user maxSize and natural boundary\n const maxSizeCss = useMemo(() => {\n const parts: string[] = [];\n\n if (maxSize != null) {\n parts.push(typeof maxSize === 'number' ? `${maxSize}px` : maxSize);\n }\n\n if (containerDimension > 0 && Number.isFinite(naturalMax)) {\n parts.push(`${naturalMax}px`);\n }\n\n if (parts.length === 0) return undefined;\n return parts.length === 1 ? parts[0] : `min(${parts.join(', ')})`;\n }, [maxSize, naturalMax, containerDimension]);\n\n const panelStyle = useMemo(\n () => ({\n '--panel-size': `${size}px`,\n '--min-size': typeof minSize === 'number' ? `${minSize}px` : minSize,\n '--max-size': maxSizeCss,\n }),\n [size, minSize, maxSizeCss],\n );\n\n // Combine refs for panel element\n const panelRefCallback = useCallback(\n (node: HTMLDivElement | null, transitionRef?: RefCallback<HTMLElement>) => {\n // Update the combined ref\n (combinedRef as { current: HTMLDivElement | null }).current = node;\n // Call transition ref if provided\n transitionRef?.(node);\n },\n [combinedRef],\n );\n\n // Reset to default size on double-click\n const handleResetSize = useCallback(() => {\n const resetSize =\n typeof defaultSize === 'number' ? defaultSize : parseInt(defaultSize, 10);\n const clampedSize = clampValue(resetSize || 280);\n setSize(clampedSize);\n onSizeChange?.(clampedSize);\n setStoredSize(clampedSize);\n }, [defaultSize, clampValue, onSizeChange, setStoredSize]);\n\n const renderPanelContent = (\n offscreen = false,\n transitionRef?: RefCallback<HTMLElement>,\n ) => {\n const showOverlay = isOverlayMode && !offscreen;\n\n return (\n <>\n {/* Overlay backdrop for overlay mode */}\n {isOverlayMode && (\n <OverlayBackdrop\n mods={{ visible: showOverlay }}\n styles={overlayStyles}\n aria-hidden=\"true\"\n onClick={handleDismiss}\n />\n )}\n <PanelElement\n ref={(node: HTMLDivElement | null) =>\n panelRefCallback(node, transitionRef)\n }\n {...filterBaseProps(otherProps, { eventProps: true })}\n mods={{ ...panelMods, offscreen }}\n styles={finalStyles}\n style={panelStyle}\n data-side={side}\n >\n <LayoutPanelContext.Provider value={panelContextValue}>\n <LayoutContextReset>{children}</LayoutContextReset>\n </LayoutPanelContext.Provider>\n </PanelElement>\n {isResizable && (\n <ResizeHandler\n side={side}\n isDisabled={!isResizable}\n mods={{\n drag: isDragging,\n offscreen,\n 'has-transition': hasTransition && isReady,\n }}\n moveProps={moveProps}\n style={panelStyle}\n onDoubleClick={handleResetSize}\n />\n )}\n </>\n );\n };\n\n // Dialog mode - uses its own portal via DialogContainer\n if (isDialogMode) {\n return (\n <DialogContainer\n isOpen={dialogOpen}\n isDismissable={isDismissable}\n onDismiss={() => handleDialogOpenChange(false)}\n {...dialogProps}\n >\n <Dialog isDismissable={false}>\n <LayoutPanelContext.Provider value={dialogPanelContextValue}>\n <LayoutContextReset>{children}</LayoutContextReset>\n </LayoutPanelContext.Provider>\n </Dialog>\n </DialogContainer>\n );\n }\n\n // Wait for portal container to be ready before rendering\n if (!layoutRefs.isPanelContainerReady) {\n return null;\n }\n\n const portalContainer = layoutRefs.panelContainerRef.current!;\n\n // Panel with transition - portal to panel container\n if (hasTransition) {\n return createPortal(\n <DisplayTransition\n isShown={isOpen}\n animateOnMount={false}\n onToggle={(isShown) => setVisualState({ isShown, isTransitionActive })}\n >\n {({ isShown, isExiting, ref: transitionRef }) => (\n <LayoutPanelTransition isShown={isShown} isExiting={isExiting}>\n {renderPanelContent(!isShown, transitionRef)}\n </LayoutPanelTransition>\n )}\n </DisplayTransition>,\n portalContainer,\n );\n }\n\n // Simple panel (no transition) - portal to panel container\n if (!isOpen) return null;\n\n return createPortal(renderPanelContent(false), portalContainer);\n}\n\nconst _LayoutPanel = forwardRef(LayoutPanel);\n\n_LayoutPanel.displayName = 'Layout.Panel';\n\nexport { _LayoutPanel as LayoutPanel };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoDA,MAAM0C,gBAAgB;AAEtB,MAAMC,iBAAiB;AAEvB,MAAMC,yBAAyB;AAE/B,MAAMC,eAAevC,MAAM;CACzBwC,IAAI;CACJC,IAAI;CACJC,QAAQ;EACNC,WAAW;EACXC,UAAU;EACVC,SAAS;EACTC,MAAM;EACNC,UAAU;EACVC,WAAW;EAEX,oBAAoB;EAEpB,uBAAuB;EAGvBC,KAAK;GACH,IAAI;GACJ,eAAe;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pE,EAAEI,SAAAA,WAASoF,WAAWvH,KAAK6G,sBAC3B,oBAAC;GAAsB,SAAS1E;GAAoBoF;aACjDL,mBAAmB,CAAC/E,WAAS0E,gBAAc;IAE/C;GACiB,EACpBS,gBACD;AAIH,KAAI,CAAC3I,OAAQ,QAAO;AAEpB,QAAOxG,aAAa+O,mBAAmB,MAAM,EAAEI,gBAAgB;;AAGjE,MAAME,eAAenQ,WAAW0I,YAAY;AAE5CyH,aAAaC,cAAc"}
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
4
4
  import { _Item } from "../Item/Item.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { LayoutPanelTransitionContext, useLayoutRefsContext } from "./LayoutContext.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { useContext, useLayoutEffect, useState } from "react";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { _LayoutContent } from "./LayoutContent.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { tasty } from "@tenphi/tasty";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
 
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { LayoutActionsContext, LayoutContextReset, LayoutPanelContext, LayoutRefsContext, LayoutStateContext, useLayoutActionsContext, useLayoutPanelContext, useLayoutRefsContext, useLayoutStateContext } from "./LayoutContext.js";
3
3
  import { _Layout } from "./Layout.js";
4
4
  import { _LayoutContent } from "./LayoutContent.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  //#region src/components/content/Layout/utils.ts
3
3
  /**
4
4
  * Clamps a size value within min/max constraints.
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../utils/styles.js";
3
3
  import { _Text } from "./Text.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
3
3
  import { useI18n } from "../../../i18n/useI18n.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { RendererPrism, ensureYamlSqlExtensions } from "./prismSetup.js";
3
3
  import { CONTAINER_STYLES, tasty } from "@tenphi/tasty";
4
4
  import { forwardRef } from "react";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { Prism as RendererPrism } from "prism-react-renderer";
3
3
 
4
4
  //#region src/components/content/PrismCode/prismSetup.tsx
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { _PrismCode } from "../PrismCode/PrismCode.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-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { mergeProps } from "../../../utils/react/mergeProps.js";
4
4
  import { wrapNodeIfPlain } from "../../../utils/react/wrapNodeIfPlain.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { Space } from "../../layout/Space.js";
3
3
  import { Grid } from "../../layout/Grid.js";
4
4
  import { Flow } from "../../layout/Flow.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { mergeStyleLayers } from "../../../utils/styles.js";
3
3
  import { _Item } from "../Item/Item.js";
4
4
  import { useI18n } from "../../../i18n/useI18n.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../utils/styles.js";
3
3
  import { useSlotProps } from "../../utils/react/Slots.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { TEXT_PROP_MAP, _Text } from "../Text.js";
4
4
  import { highlightText } from "../highlightText.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../utils/styles.js";
3
3
  import { useSlotProps } from "../../utils/react/Slots.js";
4
4
  import { TEXT_PROP_MAP } from "./Text.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { mergeRefs } from "../../../utils/react/useCombinedRefs.js";
4
4
  import { useEvent } from "../../../_internal/hooks/use-event.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
3
3
  import { mergeRefs } from "../../../utils/react/useCombinedRefs.js";
4
4
  import { useEvent } from "../../../_internal/hooks/use-event.js";
@@ -11,7 +11,7 @@ import { __Menu } from "../../actions/Menu/Menu.js";
11
11
  import { useContextMenu } from "../../actions/use-context-menu.js";
12
12
  import { TreeNodeCheckboxWrapper, TreeNodeRow, TreeNodeToggle, TreeNodeTogglePlaceholder, TreeRowItem } from "./styled.js";
13
13
  import { MoreIcon } from "../../../icons/MoreIcon.js";
14
- import { allowOverlayKeysToPropagate } from "../../../utils/react/overlayKeyPropagation.js";
14
+ import { allowEscapeToPropagate } from "../../../utils/react/escapePropagation.js";
15
15
  import { __Checkbox } from "../../fields/Checkbox/Checkbox.js";
16
16
  import { Children, memo, useMemo, useRef, useState } from "react";
17
17
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -145,7 +145,7 @@ function TreeNodeInner(props) {
145
145
  "data-element": "Checkbox",
146
146
  role: "presentation",
147
147
  onClick: handleWrapperClick,
148
- onKeyDown: allowOverlayKeysToPropagate,
148
+ onKeyDown: allowEscapeToPropagate,
149
149
  children: /* @__PURE__ */ jsx(__Checkbox, {
150
150
  isSelected: isChecked,
151
151
  isIndeterminate,
@@ -1 +1 @@
1
- {"version":3,"file":"TreeNode.js","names":["Children","memo","useMemo","useRef","useState","useHover","useTreeItem","useEvent","useI18n","DirectionIcon","LoadingIcon","MoreIcon","mergeProps","mergeRefs","allowOverlayKeysToPropagate","CubeItemActionProps","ItemAction","CubeMenuProps","Menu","MenuTrigger","useContextMenu","Checkbox","TreeNodeCheckboxWrapper","TreeNodeRow","TreeNodeToggle","TreeNodeTogglePlaceholder","TreeRowItem","Key","Node","Styles","CSSProperties","KeyboardEvent","MouseEvent","ReactNode","Ref","TreeState","CubeTreeNodeData","TreeContextMenu","TreeItemProps","TreeNodeState","isMenuEmpty","menu","undefined","toArray","length","TreeNodeProps","node","data","state","isCheckable","isExpanded","isIndeterminate","isChecked","isLoading","onToggleChecked","key","size","itemProps","rowStyles","virtualStyle","virtualRef","element","HTMLElement","virtualIndex","contextMenu","onAction","action","menuTriggerProps","Partial","menuProps","TreeNodeInner","props","t","treeMenu","treeContextMenu","treeOnAction","rowRef","HTMLDivElement","isLeaf","hasChildNodes","rowProps","gridCellProps","expandButtonProps","isPressed","hasChildItems","isDisabled","disabledKeys","has","isSelected","selectionManager","hoverProps","isHovered","isFocused","focusedKey","isRowCheckable","nodeState","effectiveMenuChildren","hasMenu","effectiveContextMenu","menuExposed","contextMenuOnly","isMenuOpen","setIsMenuOpen","handleMenuAction","actionStr","String","normalizedAction","startsWith","slice","rowContextMenu","placement","children","handleCheckboxChange","handleWrapperClick","e","stopPropagation","isCheckboxDisabled","target","closest","handleKeyDown","preventDefault","shiftKey","open","composedKeyDown","onKeyDown","sharedMods","checked","indeterminate","expanded","loading","leaf","rowMods","disabled","itemMods","focused","hovered","pressed","rowStyle","level","ariaChecked","finalRowProps","toggleNode","checkboxNode","title","resolvedItemProps","prefix","userPrefix","actions","userActions","restUserProps","composedPrefix","menuAction","composedActions","refs","list","push","targetRef","rendered","TreeNode"],"sources":["../../../../src/components/content/Tree/TreeNode.tsx"],"sourcesContent":["import { Children, memo, useMemo, useRef, useState } from 'react';\nimport { useHover, useTreeItem } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks';\nimport { useI18n } from '../../../i18n';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { MoreIcon } from '../../../icons/MoreIcon';\nimport { mergeProps, mergeRefs } from '../../../utils/react';\nimport { allowOverlayKeysToPropagate } from '../../../utils/react/overlayKeyPropagation';\nimport { CubeItemActionProps, ItemAction } from '../../actions/ItemAction';\nimport { CubeMenuProps, Menu, MenuTrigger } from '../../actions/Menu';\nimport { useContextMenu } from '../../actions/use-context-menu';\nimport { Checkbox } from '../../fields/Checkbox/Checkbox';\n\nimport {\n TreeNodeCheckboxWrapper,\n TreeNodeRow,\n TreeNodeToggle,\n TreeNodeTogglePlaceholder,\n TreeRowItem,\n} from './styled';\n\nimport type { Key, Node } from '@react-types/shared';\nimport type { Styles } from '@tenphi/tasty';\nimport type {\n CSSProperties,\n KeyboardEvent,\n MouseEvent,\n ReactNode,\n Ref,\n} from 'react';\nimport type { TreeState } from 'react-stately';\nimport type {\n CubeTreeNodeData,\n TreeContextMenu,\n TreeItemProps,\n TreeNodeState,\n} from './types';\n\n/** Check whether a `menu` ReactNode actually contains anything. */\nfunction isMenuEmpty(menu: ReactNode): boolean {\n if (menu === null || menu === undefined || menu === false) return true;\n return Children.toArray(menu).length === 0;\n}\n\nexport interface TreeNodeProps {\n node: Node<CubeTreeNodeData>;\n /** The original `CubeTreeNodeData` for this row, looked up by key. */\n data: CubeTreeNodeData;\n state: TreeState<CubeTreeNodeData>;\n\n /** Whether the tree as a whole renders checkboxes. */\n isCheckable: boolean;\n /** Whether this row is currently expanded. */\n isExpanded: boolean;\n /** Whether the row is in an indeterminate (half-checked) state. */\n isIndeterminate: boolean;\n /** Whether the row is fully checked. */\n isChecked: boolean;\n /** Whether `loadData` is currently fetching this row's children. */\n isLoading: boolean;\n\n /** Toggle this row's checkbox (cascades). */\n onToggleChecked: (key: string) => void;\n\n /** Row size passed to the underlying Item. */\n size?: string;\n\n /** Per-node Item customization (static object or callback). */\n itemProps?:\n | TreeItemProps\n | ((data: CubeTreeNodeData, state: TreeNodeState) => TreeItemProps);\n\n /** Styles applied to the visible row (`TreeRowItem`). */\n rowStyles?: Styles;\n\n /** Inline style for virtualizer absolute positioning. */\n virtualStyle?: CSSProperties;\n /** Ref callback from `@tanstack/react-virtual` to measure row height. */\n virtualRef?: (element: HTMLElement | null) => void;\n /** Virtual index for `data-index` attribute. */\n virtualIndex?: number;\n\n /** Tree-wide menu default (resolved against `data.menu`). */\n menu?:\n | ReactNode\n | ((data: CubeTreeNodeData, state: TreeNodeState) => ReactNode | null);\n /** Tree-wide `contextMenu` default. */\n contextMenu?: TreeContextMenu;\n /** Tree-wide `onAction` callback. */\n onAction?: (action: string, key: Key) => void;\n /** Forwarded to every per-row `MenuTrigger`. */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /** Forwarded to every per-row `Menu`. */\n menuProps?: Partial<CubeMenuProps<object>>;\n}\n\nfunction TreeNodeInner(props: TreeNodeProps) {\n const { t } = useI18n();\n const {\n node,\n data,\n state,\n isCheckable,\n isExpanded,\n isIndeterminate,\n isChecked,\n isLoading,\n onToggleChecked,\n size,\n itemProps,\n rowStyles,\n virtualStyle,\n virtualRef,\n virtualIndex,\n menu: treeMenu,\n contextMenu: treeContextMenu,\n onAction: treeOnAction,\n menuTriggerProps,\n menuProps,\n } = props;\n\n const rowRef = useRef<HTMLDivElement>(null);\n\n // For lazy rows with no children yet, still render a toggle unless\n // explicitly marked as leaf.\n const isLeaf =\n data.isLeaf === true || (data.isLeaf !== false && !node.hasChildNodes);\n\n // React Aria counts a row as a parent only with more than one child (it\n // expects the row's content first). `hasChildItems` makes single-child and\n // lazy rows expandable: `aria-expanded` and arrow-key expansion.\n const { rowProps, gridCellProps, expandButtonProps, isPressed } = useTreeItem(\n { node, hasChildItems: !isLeaf },\n state,\n rowRef,\n );\n\n const isDisabled = state.disabledKeys.has(node.key);\n const isSelected = state.selectionManager.isSelected(node.key);\n\n // `useTreeItem` doesn't track hover; we need it for the `hovered` mod.\n const { hoverProps, isHovered } = useHover({ isDisabled });\n // React Aria's treegrid uses roving tabindex, so no `data-focused`\n // attribute lands on the row — mirror it as a mod manually.\n const isFocused =\n state.selectionManager.isFocused &&\n state.selectionManager.focusedKey === node.key;\n const isRowCheckable = isCheckable && data.isCheckable !== false;\n\n const nodeState: TreeNodeState = {\n isExpanded,\n isSelected,\n isChecked,\n isIndeterminate,\n isLeaf,\n };\n\n // ---- Menu resolution (per-node override > tree-level) --------------------\n\n const effectiveMenuChildren: ReactNode =\n data.menu === null\n ? null\n : data.menu !== undefined\n ? data.menu\n : typeof treeMenu === 'function'\n ? treeMenu(data, nodeState)\n : treeMenu ?? null;\n const hasMenu = !isMenuEmpty(effectiveMenuChildren);\n\n const effectiveContextMenu: TreeContextMenu =\n data.contextMenu ?? treeContextMenu ?? false;\n // The menu is exposed only when the consumer opts in via\n // `contextMenu`. When `contextMenu` is `false` (default) we render\n // nothing, even if `menu` is provided — this matches the plan and\n // keeps default rows visually clean.\n const menuExposed =\n hasMenu &&\n (effectiveContextMenu === true || effectiveContextMenu === 'context-only');\n const contextMenuOnly = effectiveContextMenu === 'context-only';\n\n // Controlled state for menu trigger (enables keyboard opening with Shift+F10)\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const handleMenuAction = useEvent((action: Key) => {\n // Strip the \".$\" prefix that React adds via Children.toArray/map.\n const actionStr = String(action);\n const normalizedAction = actionStr.startsWith('.$')\n ? actionStr.slice(2)\n : actionStr;\n data.onAction?.(normalizedAction);\n treeOnAction?.(normalizedAction, node.key);\n // Forward to the consumer-supplied `menuProps.onAction` so users\n // who pass extra `Menu` props through `menuProps` still receive\n // the action stream alongside the tree-level callback.\n menuProps?.onAction?.(normalizedAction);\n });\n\n const rowContextMenu = useContextMenu<HTMLDivElement, CubeMenuProps<object>>(\n Menu,\n { placement: 'bottom start' },\n {\n ...menuProps,\n onAction: handleMenuAction,\n children: effectiveMenuChildren,\n },\n );\n\n // ---- Checkbox ------------------------------------------------------------\n\n const handleCheckboxChange = useEvent(() => {\n onToggleChecked(String(node.key));\n });\n\n const handleWrapperClick = useEvent((e: MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n if (isDisabled || data.isCheckboxDisabled) return;\n // The inner <Checkbox> label toggles on direct click; skip to avoid a double toggle.\n if ((e.target as HTMLElement).closest('[data-qa=\"CheckboxWrapper\"]'))\n return;\n onToggleChecked(String(node.key));\n });\n\n // ---- Keyboard ------------------------------------------------------------\n\n // Composed keydown handler. Runs BEFORE `rowProps.onKeyDown` from\n // `useTreeItem` so we can short-circuit the default react-aria\n // behavior for our own shortcuts (Shift+F10 menu open, Space\n // checkbox toggle). Returns `true` when the event was handled and\n // react-aria's keydown must NOT run; returns `false` to chain to\n // react-aria's handler.\n const handleKeyDown = useEvent((e: KeyboardEvent) => {\n // Space toggles the checkbox first when checkable. We DON'T claim\n // the event (return `false`) so react-aria's onKeyDown still runs\n // afterwards and the focused row also selects — matching the\n // pre-refactor behavior when handlers were chained via\n // `mergeProps`. `preventDefault` is kept to suppress page scroll.\n if (\n e.key === ' ' &&\n isRowCheckable &&\n !isDisabled &&\n !data.isCheckboxDisabled\n ) {\n e.preventDefault();\n onToggleChecked(String(node.key));\n return false;\n }\n\n // Shift+F10 opens the row menu (standard accessibility shortcut).\n if (e.key === 'F10' && e.shiftKey && menuExposed) {\n e.preventDefault();\n e.stopPropagation();\n if (contextMenuOnly) {\n rowContextMenu.open();\n } else {\n setIsMenuOpen(true);\n }\n return true;\n }\n\n return false;\n });\n\n // Wrapper that delegates to react-aria's default keydown only when\n // our handler did not claim the event. Replaces (rather than\n // chains with) `rowProps.onKeyDown` so the order of handlers is\n // strictly: our shortcuts → react-aria default.\n const composedKeyDown = useEvent((e: KeyboardEvent<HTMLDivElement>) => {\n if (handleKeyDown(e)) return;\n rowProps.onKeyDown?.(e);\n });\n\n // ---- Mods ----------------------------------------------------------------\n\n const sharedMods = useMemo(\n () => ({\n checked: isChecked,\n indeterminate: isIndeterminate,\n expanded: isExpanded,\n loading: isLoading,\n leaf: isLeaf,\n 'has-checkbox': isRowCheckable,\n 'has-menu': menuExposed,\n }),\n [\n isChecked,\n isIndeterminate,\n isExpanded,\n isLoading,\n isLeaf,\n isRowCheckable,\n menuExposed,\n ],\n );\n\n const rowMods = useMemo(\n () => ({ ...sharedMods, disabled: isDisabled }),\n [sharedMods, isDisabled],\n );\n\n const itemMods = useMemo(\n () => ({\n ...sharedMods,\n focused: isFocused,\n hovered: isHovered,\n pressed: isPressed,\n }),\n [sharedMods, isFocused, isHovered, isPressed],\n );\n\n const rowStyle = useMemo<CSSProperties>(\n () => ({\n ['--tree-level' as keyof CSSProperties]: String(node.level ?? 0),\n ...virtualStyle,\n }),\n [node.level, virtualStyle],\n );\n\n // Only emit `aria-checked` when the tree is in checkable mode.\n const ariaChecked: 'mixed' | 'true' | 'false' | undefined = isRowCheckable\n ? isIndeterminate\n ? 'mixed'\n : isChecked\n ? 'true'\n : 'false'\n : undefined;\n\n // ---- Compose row props ---------------------------------------------------\n\n // Merge react-aria + hover props but EXCLUDE `onKeyDown` from the\n // chain — `composedKeyDown` already wraps `rowProps.onKeyDown` and\n // must run first so our Shift+F10 / Space-checkbox shortcuts can\n // short-circuit the default react-aria behavior.\n const finalRowProps = {\n ...mergeProps(rowProps, hoverProps),\n 'aria-checked': ariaChecked,\n onKeyDown: composedKeyDown,\n };\n\n // ---- Toggle (chevron) and checkbox slots --------------------------------\n\n // Leaf rows get a placeholder so sibling indents align.\n const toggleNode = isLeaf ? (\n <TreeNodeTogglePlaceholder aria-hidden data-element=\"Toggle\" />\n ) : (\n <TreeNodeToggle {...expandButtonProps} tabIndex={-1} data-element=\"Toggle\">\n {isLoading ? (\n <LoadingIcon />\n ) : (\n <DirectionIcon to={isExpanded ? 'bottom' : 'right'} />\n )}\n </TreeNodeToggle>\n );\n\n const checkboxNode = isRowCheckable ? (\n <TreeNodeCheckboxWrapper\n data-element=\"Checkbox\"\n role=\"presentation\"\n onClick={handleWrapperClick}\n // Hold the checkbox's keys here, but let Escape and Tab reach the tree and\n // a surrounding overlay.\n onKeyDown={allowOverlayKeysToPropagate}\n >\n <Checkbox\n isSelected={isChecked}\n isIndeterminate={isIndeterminate}\n isDisabled={isDisabled || data.isCheckboxDisabled}\n aria-label={\n typeof data.title === 'string' ? data.title : String(node.key)\n }\n onChange={handleCheckboxChange}\n />\n </TreeNodeCheckboxWrapper>\n ) : null;\n\n // ---- Resolve user-supplied per-node Item props --------------------------\n\n const resolvedItemProps =\n typeof itemProps === 'function' ? itemProps(data, nodeState) : itemProps;\n const {\n prefix: userPrefix,\n actions: userActions,\n ...restUserProps\n } = resolvedItemProps ?? {};\n\n const composedPrefix =\n checkboxNode || userPrefix ? (\n <>\n {checkboxNode}\n {userPrefix}\n </>\n ) : null;\n\n // ---- Built-in overflow `⋮` action ---------------------------------------\n\n const menuAction =\n menuExposed && !contextMenuOnly ? (\n <MenuTrigger isOpen={isMenuOpen} onOpenChange={setIsMenuOpen}>\n <ItemAction\n tabIndex={-1}\n icon={<MoreIcon />}\n aria-label={t('tree.actions', 'Actions')}\n {...menuTriggerProps}\n />\n <Menu {...menuProps} onAction={handleMenuAction}>\n {effectiveMenuChildren}\n </Menu>\n </MenuTrigger>\n ) : null;\n\n // Compose with user-supplied actions (user actions render first).\n const composedActions =\n userActions || menuAction ? (\n <>\n {userActions}\n {menuAction}\n </>\n ) : undefined;\n\n // ---- Refs / context-menu wiring -----------------------------------------\n\n // When the context menu is enabled for this row, attach the hook's\n // `targetRef` to the row so right-clicks land on the correct anchor.\n const refs = useMemo(() => {\n const list: Ref<HTMLDivElement>[] = [rowRef];\n if (virtualRef) list.push(virtualRef);\n if (menuExposed) list.push(rowContextMenu.targetRef);\n return mergeRefs(...list);\n }, [virtualRef, menuExposed, rowContextMenu.targetRef]);\n\n return (\n <TreeNodeRow\n {...finalRowProps}\n ref={refs}\n mods={rowMods}\n style={rowStyle}\n data-element=\"Row\"\n data-qa-key={String(node.key)}\n data-index={virtualIndex}\n >\n <TreeRowItem\n {...gridCellProps}\n {...restUserProps}\n size={size}\n isSelected={isSelected}\n isDisabled={isDisabled}\n mods={itemMods}\n icon={toggleNode}\n prefix={composedPrefix}\n actions={composedActions}\n styles={rowStyles}\n >\n {data.title}\n </TreeRowItem>\n {menuExposed && rowContextMenu.rendered}\n </TreeNodeRow>\n );\n}\n\nexport const TreeNode = memo(TreeNodeInner);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyCA,SAASwC,YAAYC,MAA0B;AAC7C,KAAIA,SAAS,QAAQA,SAASC,UAAaD,SAAS,MAAO,QAAO;AAClE,QAAOzC,SAAS2C,QAAQF,KAAK,CAACG,WAAW;;AAuD3C,SAAS0B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JR,gBAAgBI,aACd,8CACGJ,cACAI,cACA,GACD;CAIN,MAAMK,aACJpD,eAAe,CAACC,kBACd,qBAAC;EAAY,QAAQC;EAAY,cAAcC;aAC7C,oBAAC;GACC,UAAU;GACV,MAAM,oBAAC,aAAW;GAClB,cAAY9B,EAAE,gBAAgB,UAAU;GACxC,GAAIL;IAAiB,EAEvB,oBAAC;GAAK,GAAIE;GAAW,UAAUkC;aAC5BP;IACG;GACM,GACZ;CAGN,MAAMwD,kBACJJ,eAAeG,aACb,8CACGH,aACAG,cACA,GACD7G;CAMN,MAAM+G,OAAOvJ,cAAc;EACzB,MAAMwJ,OAA8B,CAAC9E,OAAO;AAC5C,MAAIhB,WAAY8F,MAAKC,KAAK/F,WAAW;AACrC,MAAIuC,YAAauD,MAAKC,KAAK9C,eAAe+C,UAAU;AACpD,SAAO/I,UAAU,GAAG6I,KAAK;IACxB;EAAC9F;EAAYuC;EAAaU,eAAe+C;EAAU,CAAC;AAEvD,QACE,qBAAC;EACC,GAAIhB;EACJ,KAAKa;EACL,MAAMtB;EACN,OAAOM;EACP,gBAAa;EACb,eAAahC,OAAO3D,KAAKS,IAAI;EAC7B,cAAYQ;aAEZ,oBAAC;GACC,GAAIkB;GACJ,GAAIoE;GACE7F;GACMgC;GACAH;GACZ,MAAMgD;GACN,MAAMQ;GACN,QAAQS;GACR,SAASE;GACT,QAAQ9F;aAEPX,KAAKgG;IACK,EACZ5C,eAAeU,eAAegD;GACnB;;AAIlB,MAAaC,WAAW7J,KAAKqE,cAAc"}
1
+ {"version":3,"file":"TreeNode.js","names":["Children","memo","useMemo","useRef","useState","useHover","useTreeItem","useEvent","useI18n","DirectionIcon","LoadingIcon","MoreIcon","mergeProps","mergeRefs","allowEscapeToPropagate","CubeItemActionProps","ItemAction","CubeMenuProps","Menu","MenuTrigger","useContextMenu","Checkbox","TreeNodeCheckboxWrapper","TreeNodeRow","TreeNodeToggle","TreeNodeTogglePlaceholder","TreeRowItem","Key","Node","Styles","CSSProperties","KeyboardEvent","MouseEvent","ReactNode","Ref","TreeState","CubeTreeNodeData","TreeContextMenu","TreeItemProps","TreeNodeState","isMenuEmpty","menu","undefined","toArray","length","TreeNodeProps","node","data","state","isCheckable","isExpanded","isIndeterminate","isChecked","isLoading","onToggleChecked","key","size","itemProps","rowStyles","virtualStyle","virtualRef","element","HTMLElement","virtualIndex","contextMenu","onAction","action","menuTriggerProps","Partial","menuProps","TreeNodeInner","props","t","treeMenu","treeContextMenu","treeOnAction","rowRef","HTMLDivElement","isLeaf","hasChildNodes","rowProps","gridCellProps","expandButtonProps","isPressed","hasChildItems","isDisabled","disabledKeys","has","isSelected","selectionManager","hoverProps","isHovered","isFocused","focusedKey","isRowCheckable","nodeState","effectiveMenuChildren","hasMenu","effectiveContextMenu","menuExposed","contextMenuOnly","isMenuOpen","setIsMenuOpen","handleMenuAction","actionStr","String","normalizedAction","startsWith","slice","rowContextMenu","placement","children","handleCheckboxChange","handleWrapperClick","e","stopPropagation","isCheckboxDisabled","target","closest","handleKeyDown","preventDefault","shiftKey","open","composedKeyDown","onKeyDown","sharedMods","checked","indeterminate","expanded","loading","leaf","rowMods","disabled","itemMods","focused","hovered","pressed","rowStyle","level","ariaChecked","finalRowProps","toggleNode","checkboxNode","title","resolvedItemProps","prefix","userPrefix","actions","userActions","restUserProps","composedPrefix","menuAction","composedActions","refs","list","push","targetRef","rendered","TreeNode"],"sources":["../../../../src/components/content/Tree/TreeNode.tsx"],"sourcesContent":["import { Children, memo, useMemo, useRef, useState } from 'react';\nimport { useHover, useTreeItem } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks';\nimport { useI18n } from '../../../i18n';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { MoreIcon } from '../../../icons/MoreIcon';\nimport { mergeProps, mergeRefs } from '../../../utils/react';\nimport { allowEscapeToPropagate } from '../../../utils/react/escapePropagation';\nimport { CubeItemActionProps, ItemAction } from '../../actions/ItemAction';\nimport { CubeMenuProps, Menu, MenuTrigger } from '../../actions/Menu';\nimport { useContextMenu } from '../../actions/use-context-menu';\nimport { Checkbox } from '../../fields/Checkbox/Checkbox';\n\nimport {\n TreeNodeCheckboxWrapper,\n TreeNodeRow,\n TreeNodeToggle,\n TreeNodeTogglePlaceholder,\n TreeRowItem,\n} from './styled';\n\nimport type { Key, Node } from '@react-types/shared';\nimport type { Styles } from '@tenphi/tasty';\nimport type {\n CSSProperties,\n KeyboardEvent,\n MouseEvent,\n ReactNode,\n Ref,\n} from 'react';\nimport type { TreeState } from 'react-stately';\nimport type {\n CubeTreeNodeData,\n TreeContextMenu,\n TreeItemProps,\n TreeNodeState,\n} from './types';\n\n/** Check whether a `menu` ReactNode actually contains anything. */\nfunction isMenuEmpty(menu: ReactNode): boolean {\n if (menu === null || menu === undefined || menu === false) return true;\n return Children.toArray(menu).length === 0;\n}\n\nexport interface TreeNodeProps {\n node: Node<CubeTreeNodeData>;\n /** The original `CubeTreeNodeData` for this row, looked up by key. */\n data: CubeTreeNodeData;\n state: TreeState<CubeTreeNodeData>;\n\n /** Whether the tree as a whole renders checkboxes. */\n isCheckable: boolean;\n /** Whether this row is currently expanded. */\n isExpanded: boolean;\n /** Whether the row is in an indeterminate (half-checked) state. */\n isIndeterminate: boolean;\n /** Whether the row is fully checked. */\n isChecked: boolean;\n /** Whether `loadData` is currently fetching this row's children. */\n isLoading: boolean;\n\n /** Toggle this row's checkbox (cascades). */\n onToggleChecked: (key: string) => void;\n\n /** Row size passed to the underlying Item. */\n size?: string;\n\n /** Per-node Item customization (static object or callback). */\n itemProps?:\n | TreeItemProps\n | ((data: CubeTreeNodeData, state: TreeNodeState) => TreeItemProps);\n\n /** Styles applied to the visible row (`TreeRowItem`). */\n rowStyles?: Styles;\n\n /** Inline style for virtualizer absolute positioning. */\n virtualStyle?: CSSProperties;\n /** Ref callback from `@tanstack/react-virtual` to measure row height. */\n virtualRef?: (element: HTMLElement | null) => void;\n /** Virtual index for `data-index` attribute. */\n virtualIndex?: number;\n\n /** Tree-wide menu default (resolved against `data.menu`). */\n menu?:\n | ReactNode\n | ((data: CubeTreeNodeData, state: TreeNodeState) => ReactNode | null);\n /** Tree-wide `contextMenu` default. */\n contextMenu?: TreeContextMenu;\n /** Tree-wide `onAction` callback. */\n onAction?: (action: string, key: Key) => void;\n /** Forwarded to every per-row `MenuTrigger`. */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /** Forwarded to every per-row `Menu`. */\n menuProps?: Partial<CubeMenuProps<object>>;\n}\n\nfunction TreeNodeInner(props: TreeNodeProps) {\n const { t } = useI18n();\n const {\n node,\n data,\n state,\n isCheckable,\n isExpanded,\n isIndeterminate,\n isChecked,\n isLoading,\n onToggleChecked,\n size,\n itemProps,\n rowStyles,\n virtualStyle,\n virtualRef,\n virtualIndex,\n menu: treeMenu,\n contextMenu: treeContextMenu,\n onAction: treeOnAction,\n menuTriggerProps,\n menuProps,\n } = props;\n\n const rowRef = useRef<HTMLDivElement>(null);\n\n // For lazy rows with no children yet, still render a toggle unless\n // explicitly marked as leaf.\n const isLeaf =\n data.isLeaf === true || (data.isLeaf !== false && !node.hasChildNodes);\n\n // React Aria counts a row as a parent only with more than one child (it\n // expects the row's content first). `hasChildItems` makes single-child and\n // lazy rows expandable: `aria-expanded` and arrow-key expansion.\n const { rowProps, gridCellProps, expandButtonProps, isPressed } = useTreeItem(\n { node, hasChildItems: !isLeaf },\n state,\n rowRef,\n );\n\n const isDisabled = state.disabledKeys.has(node.key);\n const isSelected = state.selectionManager.isSelected(node.key);\n\n // `useTreeItem` doesn't track hover; we need it for the `hovered` mod.\n const { hoverProps, isHovered } = useHover({ isDisabled });\n // React Aria's treegrid uses roving tabindex, so no `data-focused`\n // attribute lands on the row — mirror it as a mod manually.\n const isFocused =\n state.selectionManager.isFocused &&\n state.selectionManager.focusedKey === node.key;\n const isRowCheckable = isCheckable && data.isCheckable !== false;\n\n const nodeState: TreeNodeState = {\n isExpanded,\n isSelected,\n isChecked,\n isIndeterminate,\n isLeaf,\n };\n\n // ---- Menu resolution (per-node override > tree-level) --------------------\n\n const effectiveMenuChildren: ReactNode =\n data.menu === null\n ? null\n : data.menu !== undefined\n ? data.menu\n : typeof treeMenu === 'function'\n ? treeMenu(data, nodeState)\n : treeMenu ?? null;\n const hasMenu = !isMenuEmpty(effectiveMenuChildren);\n\n const effectiveContextMenu: TreeContextMenu =\n data.contextMenu ?? treeContextMenu ?? false;\n // The menu is exposed only when the consumer opts in via\n // `contextMenu`. When `contextMenu` is `false` (default) we render\n // nothing, even if `menu` is provided — this matches the plan and\n // keeps default rows visually clean.\n const menuExposed =\n hasMenu &&\n (effectiveContextMenu === true || effectiveContextMenu === 'context-only');\n const contextMenuOnly = effectiveContextMenu === 'context-only';\n\n // Controlled state for menu trigger (enables keyboard opening with Shift+F10)\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const handleMenuAction = useEvent((action: Key) => {\n // Strip the \".$\" prefix that React adds via Children.toArray/map.\n const actionStr = String(action);\n const normalizedAction = actionStr.startsWith('.$')\n ? actionStr.slice(2)\n : actionStr;\n data.onAction?.(normalizedAction);\n treeOnAction?.(normalizedAction, node.key);\n // Forward to the consumer-supplied `menuProps.onAction` so users\n // who pass extra `Menu` props through `menuProps` still receive\n // the action stream alongside the tree-level callback.\n menuProps?.onAction?.(normalizedAction);\n });\n\n const rowContextMenu = useContextMenu<HTMLDivElement, CubeMenuProps<object>>(\n Menu,\n { placement: 'bottom start' },\n {\n ...menuProps,\n onAction: handleMenuAction,\n children: effectiveMenuChildren,\n },\n );\n\n // ---- Checkbox ------------------------------------------------------------\n\n const handleCheckboxChange = useEvent(() => {\n onToggleChecked(String(node.key));\n });\n\n const handleWrapperClick = useEvent((e: MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n if (isDisabled || data.isCheckboxDisabled) return;\n // The inner <Checkbox> label toggles on direct click; skip to avoid a double toggle.\n if ((e.target as HTMLElement).closest('[data-qa=\"CheckboxWrapper\"]'))\n return;\n onToggleChecked(String(node.key));\n });\n\n // ---- Keyboard ------------------------------------------------------------\n\n // Composed keydown handler. Runs BEFORE `rowProps.onKeyDown` from\n // `useTreeItem` so we can short-circuit the default react-aria\n // behavior for our own shortcuts (Shift+F10 menu open, Space\n // checkbox toggle). Returns `true` when the event was handled and\n // react-aria's keydown must NOT run; returns `false` to chain to\n // react-aria's handler.\n const handleKeyDown = useEvent((e: KeyboardEvent) => {\n // Space toggles the checkbox first when checkable. We DON'T claim\n // the event (return `false`) so react-aria's onKeyDown still runs\n // afterwards and the focused row also selects — matching the\n // pre-refactor behavior when handlers were chained via\n // `mergeProps`. `preventDefault` is kept to suppress page scroll.\n if (\n e.key === ' ' &&\n isRowCheckable &&\n !isDisabled &&\n !data.isCheckboxDisabled\n ) {\n e.preventDefault();\n onToggleChecked(String(node.key));\n return false;\n }\n\n // Shift+F10 opens the row menu (standard accessibility shortcut).\n if (e.key === 'F10' && e.shiftKey && menuExposed) {\n e.preventDefault();\n e.stopPropagation();\n if (contextMenuOnly) {\n rowContextMenu.open();\n } else {\n setIsMenuOpen(true);\n }\n return true;\n }\n\n return false;\n });\n\n // Wrapper that delegates to react-aria's default keydown only when\n // our handler did not claim the event. Replaces (rather than\n // chains with) `rowProps.onKeyDown` so the order of handlers is\n // strictly: our shortcuts → react-aria default.\n const composedKeyDown = useEvent((e: KeyboardEvent<HTMLDivElement>) => {\n if (handleKeyDown(e)) return;\n rowProps.onKeyDown?.(e);\n });\n\n // ---- Mods ----------------------------------------------------------------\n\n const sharedMods = useMemo(\n () => ({\n checked: isChecked,\n indeterminate: isIndeterminate,\n expanded: isExpanded,\n loading: isLoading,\n leaf: isLeaf,\n 'has-checkbox': isRowCheckable,\n 'has-menu': menuExposed,\n }),\n [\n isChecked,\n isIndeterminate,\n isExpanded,\n isLoading,\n isLeaf,\n isRowCheckable,\n menuExposed,\n ],\n );\n\n const rowMods = useMemo(\n () => ({ ...sharedMods, disabled: isDisabled }),\n [sharedMods, isDisabled],\n );\n\n const itemMods = useMemo(\n () => ({\n ...sharedMods,\n focused: isFocused,\n hovered: isHovered,\n pressed: isPressed,\n }),\n [sharedMods, isFocused, isHovered, isPressed],\n );\n\n const rowStyle = useMemo<CSSProperties>(\n () => ({\n ['--tree-level' as keyof CSSProperties]: String(node.level ?? 0),\n ...virtualStyle,\n }),\n [node.level, virtualStyle],\n );\n\n // Only emit `aria-checked` when the tree is in checkable mode.\n const ariaChecked: 'mixed' | 'true' | 'false' | undefined = isRowCheckable\n ? isIndeterminate\n ? 'mixed'\n : isChecked\n ? 'true'\n : 'false'\n : undefined;\n\n // ---- Compose row props ---------------------------------------------------\n\n // Merge react-aria + hover props but EXCLUDE `onKeyDown` from the\n // chain — `composedKeyDown` already wraps `rowProps.onKeyDown` and\n // must run first so our Shift+F10 / Space-checkbox shortcuts can\n // short-circuit the default react-aria behavior.\n const finalRowProps = {\n ...mergeProps(rowProps, hoverProps),\n 'aria-checked': ariaChecked,\n onKeyDown: composedKeyDown,\n };\n\n // ---- Toggle (chevron) and checkbox slots --------------------------------\n\n // Leaf rows get a placeholder so sibling indents align.\n const toggleNode = isLeaf ? (\n <TreeNodeTogglePlaceholder aria-hidden data-element=\"Toggle\" />\n ) : (\n <TreeNodeToggle {...expandButtonProps} tabIndex={-1} data-element=\"Toggle\">\n {isLoading ? (\n <LoadingIcon />\n ) : (\n <DirectionIcon to={isExpanded ? 'bottom' : 'right'} />\n )}\n </TreeNodeToggle>\n );\n\n const checkboxNode = isRowCheckable ? (\n <TreeNodeCheckboxWrapper\n data-element=\"Checkbox\"\n role=\"presentation\"\n onClick={handleWrapperClick}\n // Hold the checkbox's keys here, but let Escape reach a surrounding overlay.\n onKeyDown={allowEscapeToPropagate}\n >\n <Checkbox\n isSelected={isChecked}\n isIndeterminate={isIndeterminate}\n isDisabled={isDisabled || data.isCheckboxDisabled}\n aria-label={\n typeof data.title === 'string' ? data.title : String(node.key)\n }\n onChange={handleCheckboxChange}\n />\n </TreeNodeCheckboxWrapper>\n ) : null;\n\n // ---- Resolve user-supplied per-node Item props --------------------------\n\n const resolvedItemProps =\n typeof itemProps === 'function' ? itemProps(data, nodeState) : itemProps;\n const {\n prefix: userPrefix,\n actions: userActions,\n ...restUserProps\n } = resolvedItemProps ?? {};\n\n const composedPrefix =\n checkboxNode || userPrefix ? (\n <>\n {checkboxNode}\n {userPrefix}\n </>\n ) : null;\n\n // ---- Built-in overflow `⋮` action ---------------------------------------\n\n const menuAction =\n menuExposed && !contextMenuOnly ? (\n <MenuTrigger isOpen={isMenuOpen} onOpenChange={setIsMenuOpen}>\n <ItemAction\n tabIndex={-1}\n icon={<MoreIcon />}\n aria-label={t('tree.actions', 'Actions')}\n {...menuTriggerProps}\n />\n <Menu {...menuProps} onAction={handleMenuAction}>\n {effectiveMenuChildren}\n </Menu>\n </MenuTrigger>\n ) : null;\n\n // Compose with user-supplied actions (user actions render first).\n const composedActions =\n userActions || menuAction ? (\n <>\n {userActions}\n {menuAction}\n </>\n ) : undefined;\n\n // ---- Refs / context-menu wiring -----------------------------------------\n\n // When the context menu is enabled for this row, attach the hook's\n // `targetRef` to the row so right-clicks land on the correct anchor.\n const refs = useMemo(() => {\n const list: Ref<HTMLDivElement>[] = [rowRef];\n if (virtualRef) list.push(virtualRef);\n if (menuExposed) list.push(rowContextMenu.targetRef);\n return mergeRefs(...list);\n }, [virtualRef, menuExposed, rowContextMenu.targetRef]);\n\n return (\n <TreeNodeRow\n {...finalRowProps}\n ref={refs}\n mods={rowMods}\n style={rowStyle}\n data-element=\"Row\"\n data-qa-key={String(node.key)}\n data-index={virtualIndex}\n >\n <TreeRowItem\n {...gridCellProps}\n {...restUserProps}\n size={size}\n isSelected={isSelected}\n isDisabled={isDisabled}\n mods={itemMods}\n icon={toggleNode}\n prefix={composedPrefix}\n actions={composedActions}\n styles={rowStyles}\n >\n {data.title}\n </TreeRowItem>\n {menuExposed && rowContextMenu.rendered}\n </TreeNodeRow>\n );\n}\n\nexport const TreeNode = memo(TreeNodeInner);\n"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ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { _Item } from "../Item/Item.js";
3
3
  import { Action } from "../../actions/Action/Action.js";
4
4
  import { tasty } from "@tenphi/tasty";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  //#region src/components/content/Tree/tree-index.ts
3
3
  function buildTreeIndex(treeData) {
4
4
  const byKey = /* @__PURE__ */ new Map();
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { useEvent } from "../../../_internal/hooks/use-event.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { useState } from "react";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { useEvent } from "../../../_internal/hooks/use-event.js";
3
3
  import { isDevEnvOrTest } from "../../../utils/is-dev-env.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { _Text } from "./Text.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
 
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { TooltipProvider } from "../overlays/Tooltip/TooltipProvider.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { useEffect, useRef, useState } from "react";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
3
3
  import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
4
4
  import { useEvent } from "../../../_internal/hooks/use-event.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
3
3
  import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
4
4
  import { useI18n } from "../../../i18n/useI18n.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { useEvent } from "../../../_internal/hooks/use-event.js";
3
3
  import { _Text } from "../../content/Text.js";
4
4
  import { useI18n } from "../../../i18n/useI18n.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { _Text } from "../../content/Text.js";
3
3
  import { useI18n } from "../../../i18n/useI18n.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-619b8e3 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7bfcbc3 | Cube Dev Team */
2
2
  import { _Pagination } from "../../navigation/Pagination/Pagination.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { tasty } from "@tenphi/tasty";