@cube-dev/ui-kit 0.0.0-canary-ef6b29c → 0.0.0-canary-9a11fa8

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 (622) hide show
  1. package/dist/components/Action/Action.js +1 -1
  2. package/dist/components/ActiveZone/ActiveZone.js +1 -1
  3. package/dist/components/Alert/Alert.js +1 -1
  4. package/dist/components/Alert/use-alert.js +1 -1
  5. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  6. package/dist/components/AlertDialog/AlertDialogApiProvider.js +1 -1
  7. package/dist/components/AlertDialog/AlertDialogZone.js +1 -1
  8. package/dist/components/Avatar/Avatar.js +1 -1
  9. package/dist/components/Badge/Badge.js +1 -1
  10. package/dist/components/Banner/Banner.js +1 -1
  11. package/dist/components/Block/Block.js +1 -1
  12. package/dist/components/Button/AutoCollapseObserver.js +1 -1
  13. package/dist/components/Button/Button.js +1 -1
  14. package/dist/components/Button/index.js +1 -1
  15. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  16. package/dist/components/ButtonSplit/ButtonSplit.js +1 -1
  17. package/dist/components/ButtonSplit/ButtonSplitContext.js +1 -1
  18. package/dist/components/Calendar/Calendar.js +1 -1
  19. package/dist/components/Calendar/CalendarCell.js +1 -1
  20. package/dist/components/Calendar/CalendarGrid.js +1 -1
  21. package/dist/components/Calendar/CalendarHeader.js +1 -1
  22. package/dist/components/Calendar/CalendarPanel.js +1 -1
  23. package/dist/components/Calendar/PeriodCalendar.js +1 -1
  24. package/dist/components/Calendar/PeriodGrid.js +1 -1
  25. package/dist/components/Calendar/RangeCalendar.js +1 -1
  26. package/dist/components/Calendar/styled.js +1 -1
  27. package/dist/components/Card/Card.js +1 -1
  28. package/dist/components/Checkbox/Checkbox.js +1 -1
  29. package/dist/components/Checkbox/CheckboxGroup.js +1 -1
  30. package/dist/components/Checkbox/CheckboxGroupContext.js +1 -1
  31. package/dist/components/CollectionItem/CollectionItem.js +1 -1
  32. package/dist/components/ColorInput/ColorInput.js +1 -1
  33. package/dist/components/ColorPanel/ColorPanel.js +1 -1
  34. package/dist/components/ColorPicker/ColorPicker.js +1 -1
  35. package/dist/components/ColorSwatch/ColorSwatch.js +1 -1
  36. package/dist/components/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
  37. package/dist/components/ComboBox/ComboBox.js +1 -1
  38. package/dist/components/ComboBox/combo-box-options.js +1 -1
  39. package/dist/components/CommandMenu/CommandMenu.js +1 -1
  40. package/dist/components/CommandMenu/styled.js +1 -1
  41. package/dist/components/CommandTextArea/CommandTextArea.js +1 -1
  42. package/dist/components/CommandTextArea/caret-position.js +1 -1
  43. package/dist/components/CommandTextArea/use-caret-anchor.js +1 -1
  44. package/dist/components/Content/Content.js +1 -1
  45. package/dist/components/CopyPasteBlock/CopyPasteBlock.js +1 -1
  46. package/dist/components/CopySnippet/CopySnippet.js +1 -1
  47. package/dist/components/CubeLogo/CubeLogo.js +1 -1
  48. package/dist/components/DataTable/DataTable.js +1 -1
  49. package/dist/components/DatePicker/CalendarPopover.js +1 -1
  50. package/dist/components/DatePicker/DateInput.js +1 -1
  51. package/dist/components/DatePicker/DateInputBase.js +1 -1
  52. package/dist/components/DatePicker/DatePicker.js +1 -1
  53. package/dist/components/DatePicker/DatePickerButton.js +1 -1
  54. package/dist/components/DatePicker/DatePickerElement.js +1 -1
  55. package/dist/components/DatePicker/DatePickerInput.js +1 -1
  56. package/dist/components/DatePicker/DatePickerSegment.js +1 -1
  57. package/dist/components/DatePicker/DateRangePicker.js +1 -1
  58. package/dist/components/DatePicker/DateRangeSeparatedPicker.js +1 -1
  59. package/dist/components/DatePicker/MonthPicker.js +1 -1
  60. package/dist/components/DatePicker/PeriodPicker.js +1 -1
  61. package/dist/components/DatePicker/QuarterPicker.js +1 -1
  62. package/dist/components/DatePicker/TimeInput.js +1 -1
  63. package/dist/components/DatePicker/WeekPicker.js +1 -1
  64. package/dist/components/DatePicker/YearPicker.js +1 -1
  65. package/dist/components/DatePicker/parse-date.js +1 -1
  66. package/dist/components/DatePicker/period.js +1 -1
  67. package/dist/components/DatePicker/props.js +1 -1
  68. package/dist/components/DatePicker/utils.js +1 -1
  69. package/dist/components/Dialog/Dialog.js +1 -1
  70. package/dist/components/Dialog/DialogContainer.js +1 -1
  71. package/dist/components/Dialog/DialogContext.js +1 -1
  72. package/dist/components/Dialog/DialogForm.js +1 -1
  73. package/dist/components/Dialog/DialogTrigger.js +1 -1
  74. package/dist/components/Dialog/ModernDialogForm.js +1 -1
  75. package/dist/components/Dialog/default-button-text.js +1 -1
  76. package/dist/components/Dialog/use-content-overflow.js +1 -1
  77. package/dist/components/Dialog/use-dialog-container.js +1 -1
  78. package/dist/components/Dialog/use-dialog-open-sync.js +1 -1
  79. package/dist/components/Dialog/use-dismiss-confirmation.js +1 -1
  80. package/dist/components/Dialog/use-retained-dialog-focus.js +1 -1
  81. package/dist/components/Disclosure/Disclosure.js +1 -1
  82. package/dist/components/DisplayTransition/DisplayTransition.js +1 -1
  83. package/dist/components/Divider/Divider.js +1 -1
  84. package/dist/components/DraggableCollection/DraggableCollection.js +1 -1
  85. package/dist/components/FieldWrapper/FieldWrapper.js +1 -1
  86. package/dist/components/FieldWrapper/field-description.js +1 -1
  87. package/dist/components/FileInput/FileInput.js +1 -1
  88. package/dist/components/FilterListBox/FilterListBox.js +1 -1
  89. package/dist/components/FilterListBox/styled.js +1 -1
  90. package/dist/components/FilterPicker/FilterPicker.js +1 -1
  91. package/dist/components/FilterPicker/FilterTree.js +1 -1
  92. package/dist/components/Flex/Flex.js +1 -1
  93. package/dist/components/Flow/Flow.js +1 -1
  94. package/dist/components/Footer/Footer.js +1 -1
  95. package/dist/components/Form/Field.js +1 -1
  96. package/dist/components/Form/Form.js +1 -1
  97. package/dist/components/Form/FormContext.js +1 -1
  98. package/dist/components/Form/FormElement.js +1 -1
  99. package/dist/components/Form/ModernFormRoot.js +1 -1
  100. package/dist/components/Form/ResetButton.js +1 -1
  101. package/dist/components/Form/SubmitButton.js +1 -1
  102. package/dist/components/Form/SubmitError.js +1 -1
  103. package/dist/components/Form/backend.js +1 -1
  104. package/dist/components/Form/index.js +1 -1
  105. package/dist/components/Form/modern/ModernActions.js +1 -1
  106. package/dist/components/Form/modern/ModernControllerContext.js +1 -1
  107. package/dist/components/Form/modern/after-press.js +1 -1
  108. package/dist/components/Form/modern/controller.js +1 -1
  109. package/dist/components/Form/modern/field-binding.js +1 -1
  110. package/dist/components/Form/modern/field.js +1 -1
  111. package/dist/components/Form/modern/react.js +1 -1
  112. package/dist/components/Form/modern/store.js +1 -1
  113. package/dist/components/Form/modern/validation.js +1 -1
  114. package/dist/components/Form/modern/values.js +1 -1
  115. package/dist/components/Form/reset-unbound-controls.js +1 -1
  116. package/dist/components/Form/use-field/use-field-binding.js +1 -1
  117. package/dist/components/Form/use-field/use-field-props.js +1 -1
  118. package/dist/components/Form/use-field/use-field.js +1 -1
  119. package/dist/components/Form/use-form.js +1 -1
  120. package/dist/components/Form/validation.js +1 -1
  121. package/dist/components/GlobalStyles/GlobalStyles.js +1 -1
  122. package/dist/components/Grid/Grid.js +1 -1
  123. package/dist/components/GridProvider/GridProvider.js +1 -1
  124. package/dist/components/Header/Header.js +1 -1
  125. package/dist/components/HiddenInput/HiddenInput.js +1 -1
  126. package/dist/components/HotKeys/HotKeys.js +1 -1
  127. package/dist/components/IconSwitch/IconSwitch.js +1 -1
  128. package/dist/components/InfoBadge/InfoBadge.js +1 -1
  129. package/dist/components/InlineInput/InlineInput.js +1 -1
  130. package/dist/components/Input/Input.js +1 -1
  131. package/dist/components/Item/Item.js +1 -1
  132. package/dist/components/Item/ItemWithNativeLinks.js +1 -1
  133. package/dist/components/ItemAction/ItemAction.js +1 -1
  134. package/dist/components/ItemAction/ItemCloseAction.js +1 -1
  135. package/dist/components/ItemActionsWrapper/ItemActionsWrapper.js +1 -1
  136. package/dist/components/ItemBadge/ItemBadge.js +1 -1
  137. package/dist/components/ItemButton/ItemButton.js +1 -1
  138. package/dist/components/ItemCard/ItemCard.js +1 -1
  139. package/dist/components/ItemTable/ItemTable.js +1 -1
  140. package/dist/components/ItemTable/ItemTableBulkBar.js +1 -1
  141. package/dist/components/ItemTable/ItemTableDragPreview.js +1 -1
  142. package/dist/components/ItemTable/ItemTableFooter.js +1 -1
  143. package/dist/components/ItemTable/ItemTableToolbar.js +1 -1
  144. package/dist/components/ItemTable/item-table-sections.js +1 -1
  145. package/dist/components/ItemTable/use-item-table-column-widths.js +1 -1
  146. package/dist/components/ItemTable/use-item-table-drag-drop.js +1 -1
  147. package/dist/components/ItemTable/use-item-table-pagination.js +1 -1
  148. package/dist/components/ItemTable/use-item-table-selection.js +1 -1
  149. package/dist/components/ItemTable/use-item-table-sort.js +1 -1
  150. package/dist/components/ItemTable/use-item-table-tree-model.js +1 -1
  151. package/dist/components/Label/Label.js +1 -1
  152. package/dist/components/Layout/GridLayout.js +1 -1
  153. package/dist/components/Layout/Layout.js +1 -1
  154. package/dist/components/Layout/LayoutBlock.js +1 -1
  155. package/dist/components/Layout/LayoutCenter.js +1 -1
  156. package/dist/components/Layout/LayoutContainer.js +1 -1
  157. package/dist/components/Layout/LayoutContent.js +1 -1
  158. package/dist/components/Layout/LayoutContext.js +1 -1
  159. package/dist/components/Layout/LayoutFlex.js +1 -1
  160. package/dist/components/Layout/LayoutFooter.js +1 -1
  161. package/dist/components/Layout/LayoutGrid.js +1 -1
  162. package/dist/components/Layout/LayoutHeader.js +1 -1
  163. package/dist/components/Layout/LayoutPane.js +1 -1
  164. package/dist/components/Layout/LayoutPanel.d.ts +3 -3
  165. package/dist/components/Layout/LayoutPanel.js +16 -12
  166. package/dist/components/Layout/LayoutPanel.js.map +1 -1
  167. package/dist/components/Layout/LayoutPanelHeader.js +1 -1
  168. package/dist/components/Layout/LayoutPanelTransition.js +1 -1
  169. package/dist/components/Layout/LayoutResizeHandle.js +89 -77
  170. package/dist/components/Layout/LayoutResizeHandle.js.map +1 -1
  171. package/dist/components/Layout/LayoutToolbar.js +1 -1
  172. package/dist/components/Layout/index.js +1 -1
  173. package/dist/components/Layout/use-tiny-scrollbar.js +1 -1
  174. package/dist/components/Layout/utils.js +1 -1
  175. package/dist/components/Link/Link.js +1 -1
  176. package/dist/components/ListBox/DraggableListBox.js +1 -1
  177. package/dist/components/ListBox/ListBox.js +1 -1
  178. package/dist/components/ListBox/empty-row.js +1 -1
  179. package/dist/components/ListBox/option-id.js +1 -1
  180. package/dist/components/ListBox/use-disabled-focus-reset.js +1 -1
  181. package/dist/components/ListBoxPopover/EmptyLabelStatus.js +1 -1
  182. package/dist/components/ListBoxPopover/ListBoxPopover.js +1 -1
  183. package/dist/components/ListBoxPopover/list-navigation.js +1 -1
  184. package/dist/components/ListBoxPopover/use-composite-focus.js +1 -1
  185. package/dist/components/ListBoxPopover/use-delayed-loading.js +1 -1
  186. package/dist/components/LoadingAnimation/LoadingAnimation.js +1 -1
  187. package/dist/components/Menu/Menu.js +1 -1
  188. package/dist/components/Menu/MenuCollectionItem.js +1 -1
  189. package/dist/components/Menu/MenuContext.js +1 -1
  190. package/dist/components/Menu/MenuItem.js +1 -1
  191. package/dist/components/Menu/MenuSection.js +1 -1
  192. package/dist/components/Menu/MenuTrigger.js +1 -1
  193. package/dist/components/Menu/SubMenuTrigger.js +1 -1
  194. package/dist/components/Menu/SubmenuTriggerContext.js +1 -1
  195. package/dist/components/Menu/styled.js +1 -1
  196. package/dist/components/Menu/touch-context-menu.js +1 -1
  197. package/dist/components/Menu/use-anchored-menu.js +1 -1
  198. package/dist/components/Menu/use-context-menu.js +1 -1
  199. package/dist/components/Modal/Modal.js +1 -1
  200. package/dist/components/Modal/ModalContainmentProvider.js +1 -1
  201. package/dist/components/Modal/OpenTransitionContext.js +1 -1
  202. package/dist/components/Modal/Overlay.js +1 -1
  203. package/dist/components/Modal/Popover.js +1 -1
  204. package/dist/components/Modal/Tray.js +1 -1
  205. package/dist/components/Modal/Underlay.js +1 -1
  206. package/dist/components/NavTabs/NavTabs.js +1 -1
  207. package/dist/components/NoDataIcon/NoDataIcon.js +1 -1
  208. package/dist/components/Notifications/Notification.js +1 -1
  209. package/dist/components/Notifications/NotificationAction.js +1 -1
  210. package/dist/components/Notifications/NotificationCard.js +1 -1
  211. package/dist/components/Notifications/NotificationContext.js +1 -1
  212. package/dist/components/Notifications/NotificationItem.js +1 -1
  213. package/dist/components/Notifications/OverlayContainer.js +1 -1
  214. package/dist/components/Notifications/OverlayProvider.js +1 -1
  215. package/dist/components/Notifications/PersistentNotificationsList.js +1 -1
  216. package/dist/components/Notifications/dismissed-storage.js +1 -1
  217. package/dist/components/Notifications/format-relative-time.js +1 -1
  218. package/dist/components/Notifications/index.js +1 -1
  219. package/dist/components/Notifications/use-live-region.js +1 -1
  220. package/dist/components/Notifications/use-notification-state.js +1 -1
  221. package/dist/components/Notifications/use-notifications.js +1 -1
  222. package/dist/components/Notifications/use-overlay-timers.js +1 -1
  223. package/dist/components/Notifications/use-persistent-notifications.js +1 -1
  224. package/dist/components/Notifications/use-persistent-state.js +1 -1
  225. package/dist/components/Notifications/use-toast-state.js +1 -1
  226. package/dist/components/NumberInput/NumberInput.js +1 -1
  227. package/dist/components/NumberInput/StepButton.js +1 -1
  228. package/dist/components/Pagination/Pagination.js +1 -1
  229. package/dist/components/Pagination/use-pagination.js +1 -1
  230. package/dist/components/Panel/Panel.js +1 -1
  231. package/dist/components/Paragraph/Paragraph.js +1 -1
  232. package/dist/components/PasswordInput/PasswordInput.js +1 -1
  233. package/dist/components/Picker/Picker.js +1 -1
  234. package/dist/components/Placeholder/Placeholder.js +1 -1
  235. package/dist/components/Portal/Portal.js +1 -1
  236. package/dist/components/Portal/PortalProvider.js +1 -1
  237. package/dist/components/Portal/use-portal.js +1 -1
  238. package/dist/components/Prefix/Prefix.js +1 -1
  239. package/dist/components/PrismCode/PrismCode.js +1 -1
  240. package/dist/components/PrismCode/prism-setup.js +1 -1
  241. package/dist/components/PrismDiffCode/PrismDiffCode.js +1 -1
  242. package/dist/components/RadioGroup/Radio.js +1 -1
  243. package/dist/components/RadioGroup/RadioContext.js +1 -1
  244. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  245. package/dist/components/RadioGroup/joined-styles.js +1 -1
  246. package/dist/components/RenderCache/RenderCache.js +1 -1
  247. package/dist/components/ResizablePanel/ResizablePanel.js +1 -1
  248. package/dist/components/Result/Result.js +1 -1
  249. package/dist/components/Root/Root.js +1 -1
  250. package/dist/components/SearchComboBox/SearchComboBox.js +1 -1
  251. package/dist/components/SearchInput/SearchInput.js +1 -1
  252. package/dist/components/Select/Select.js +1 -1
  253. package/dist/components/Skeleton/Skeleton.js +1 -1
  254. package/dist/components/Slider/Gradation.js +1 -1
  255. package/dist/components/Slider/HueSlider.js +1 -1
  256. package/dist/components/Slider/RangeSlider.js +1 -1
  257. package/dist/components/Slider/Slider.js +1 -1
  258. package/dist/components/Slider/SliderBase.js +1 -1
  259. package/dist/components/Slider/SliderThumb.js +1 -1
  260. package/dist/components/Slider/SliderTrack.js +1 -1
  261. package/dist/components/Slider/elements.js +1 -1
  262. package/dist/components/Slider/index.js +1 -1
  263. package/dist/components/Space/Space.js +1 -1
  264. package/dist/components/Spin/Cube.js +1 -1
  265. package/dist/components/Spin/InternalSpinner.js +1 -1
  266. package/dist/components/Spin/Spin.js +1 -1
  267. package/dist/components/Spin/SpinsContainer.js +1 -1
  268. package/dist/components/StatsCard/StatsCard.js +1 -1
  269. package/dist/components/Suffix/Suffix.js +1 -1
  270. package/dist/components/Switch/Switch.js +1 -1
  271. package/dist/components/TableBase/ColumnResizer.js +1 -1
  272. package/dist/components/TableBase/RowCollection.js +1 -1
  273. package/dist/components/TableBase/TableHeaderCell.js +1 -1
  274. package/dist/components/TableBase/TableRow.js +1 -1
  275. package/dist/components/TableBase/TableRowLink.js +1 -1
  276. package/dist/components/TableBase/TableView.js +1 -1
  277. package/dist/components/TableBase/TreeGridTable.js +1 -1
  278. package/dist/components/TableBase/column-header.js +1 -1
  279. package/dist/components/TableBase/column-menu.js +1 -1
  280. package/dist/components/TableBase/column-styles.js +1 -1
  281. package/dist/components/TableBase/column-tint.js +1 -1
  282. package/dist/components/TableBase/row-menu.js +1 -1
  283. package/dist/components/TableBase/styled.js +1 -1
  284. package/dist/components/TableBase/table-body-sections.js +1 -1
  285. package/dist/components/TableBase/table-tree.js +1 -1
  286. package/dist/components/TableBase/types.js +1 -1
  287. package/dist/components/TableBase/use-cell-selection.js +0 -0
  288. package/dist/components/TableBase/use-column-menu.js +1 -1
  289. package/dist/components/TableBase/use-column-order.js +1 -1
  290. package/dist/components/TableBase/use-column-window.js +1 -1
  291. package/dist/components/TableBase/use-container-width.js +1 -1
  292. package/dist/components/TableBase/use-row-move-animation.js +1 -1
  293. package/dist/components/TableBase/use-scrollability.js +1 -1
  294. package/dist/components/TableBase/use-table-columns.js +1 -1
  295. package/dist/components/TableBase/use-table-search.js +1 -1
  296. package/dist/components/TableBase/use-table-selection.js +1 -1
  297. package/dist/components/TableBase/use-table-sort.js +1 -1
  298. package/dist/components/TableBase/use-table-sorts.js +1 -1
  299. package/dist/components/TableBase/use-table-storage.js +1 -1
  300. package/dist/components/TableBase/use-table-tooltip-refresh.js +1 -1
  301. package/dist/components/TableBase/use-table-tree-state.js +1 -1
  302. package/dist/components/Tabs/BoardDragActiveProvider.js +1 -1
  303. package/dist/components/Tabs/DraggableTabList.js +1 -1
  304. package/dist/components/Tabs/TabButton.js +1 -1
  305. package/dist/components/Tabs/TabDropIndicator.js +1 -1
  306. package/dist/components/Tabs/TabPanel.js +1 -1
  307. package/dist/components/Tabs/TabPicker.js +1 -1
  308. package/dist/components/Tabs/Tabs.js +1 -1
  309. package/dist/components/Tabs/TabsAction.js +1 -1
  310. package/dist/components/Tabs/TabsContext.js +1 -1
  311. package/dist/components/Tabs/popover-placement.js +1 -1
  312. package/dist/components/Tabs/scroll-tab-into-strip.js +1 -1
  313. package/dist/components/Tabs/segmented-styles.js +1 -1
  314. package/dist/components/Tabs/styled.js +1 -1
  315. package/dist/components/Tabs/types.js +1 -1
  316. package/dist/components/Tabs/use-tab-editing.js +1 -1
  317. package/dist/components/Tabs/use-tab-indicator.js +1 -1
  318. package/dist/components/Tag/Tag.js +1 -1
  319. package/dist/components/TagInput/TagInput.js +1 -1
  320. package/dist/components/TagInput/TagList.js +1 -1
  321. package/dist/components/TagInput/use-active-option.js +1 -1
  322. package/dist/components/TagInput/use-suffix-space.js +1 -1
  323. package/dist/components/TagInput/use-tag-error.js +1 -1
  324. package/dist/components/Text/Text.js +1 -1
  325. package/dist/components/TextArea/TextArea.js +1 -1
  326. package/dist/components/TextInput/TextInput.js +1 -1
  327. package/dist/components/TextInput/TextInputBase.js +1 -1
  328. package/dist/components/TextInput/displayed-validation.js +1 -1
  329. package/dist/components/TextInput/identifier-text-services.js +1 -1
  330. package/dist/components/TextInput/password-manager-ignore.js +1 -1
  331. package/dist/components/TextInput/use-auto-size-text-area.js +1 -1
  332. package/dist/components/TextInputMapper/TextInputMapper.js +1 -1
  333. package/dist/components/TextItem/TextItem.js +1 -1
  334. package/dist/components/Title/Title.js +1 -1
  335. package/dist/components/Toast/AnnouncedToastItem.js +1 -1
  336. package/dist/components/Toast/Toast.js +1 -1
  337. package/dist/components/Toast/ToastItem.js +1 -1
  338. package/dist/components/Toast/use-progress-toast.js +1 -1
  339. package/dist/components/Toast/use-toast.js +1 -1
  340. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  341. package/dist/components/ToggleGroup/ToggleGroupContext.js +1 -1
  342. package/dist/components/ToggleGroup/ToggleGroupItem.js +1 -1
  343. package/dist/components/Tooltip/Tooltip.js +1 -1
  344. package/dist/components/Tooltip/TooltipContext.js +1 -1
  345. package/dist/components/Tooltip/TooltipProvider.js +1 -1
  346. package/dist/components/Tooltip/TooltipTrigger.js +1 -1
  347. package/dist/components/Tooltip/last-press.js +1 -1
  348. package/dist/components/Tooltip/split-trigger-props.js +1 -1
  349. package/dist/components/Tree/Tree.js +1 -1
  350. package/dist/components/Tree/TreeNode.js +1 -1
  351. package/dist/components/Tree/checked-keys.js +1 -1
  352. package/dist/components/Tree/row-id.js +1 -1
  353. package/dist/components/Tree/styled.js +1 -1
  354. package/dist/components/Tree/tree-index.js +1 -1
  355. package/dist/components/Tree/use-checkbox-tree.js +1 -1
  356. package/dist/components/Tree/use-load-data.js +1 -1
  357. package/dist/components/TriggerActions/TriggerActions.js +1 -1
  358. package/dist/components/Typography/Typography.js +1 -1
  359. package/dist/components/ValidationIndicator/InvalidIcon.js +1 -1
  360. package/dist/components/ValidationIndicator/ValidIcon.js +1 -1
  361. package/dist/components/ValidationIndicator/ValidationIndicator.js +1 -1
  362. package/dist/eslint-plugin/defaults.generated.js +1 -1
  363. package/dist/eslint-plugin/index.js +1 -1
  364. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  365. package/dist/harness/colors-deps.js +1 -1
  366. package/dist/hooks/use-action.js +1 -1
  367. package/dist/hooks/use-auto-tooltip.js +1 -1
  368. package/dist/hooks/use-buffered-value.js +1 -1
  369. package/dist/hooks/use-combined-refs.js +1 -1
  370. package/dist/hooks/use-controlled-focus-visible.js +1 -1
  371. package/dist/hooks/use-debounced-value.js +1 -1
  372. package/dist/hooks/use-deprecation-warning.js +1 -1
  373. package/dist/hooks/use-event.js +1 -1
  374. package/dist/hooks/use-id.js +1 -1
  375. package/dist/hooks/use-is-darwin.js +1 -1
  376. package/dist/hooks/use-is-first-render.js +1 -1
  377. package/dist/hooks/use-key-symbols.js +1 -1
  378. package/dist/hooks/use-layout-effect.d.ts +1 -1
  379. package/dist/hooks/use-layout-effect.js +1 -1
  380. package/dist/hooks/use-local-storage.js +1 -1
  381. package/dist/hooks/use-merge-styles.js +1 -1
  382. package/dist/hooks/use-open-key.js +1 -1
  383. package/dist/hooks/use-overlay-escape-guard.js +1 -1
  384. package/dist/hooks/use-overlay-position.js +1 -1
  385. package/dist/hooks/use-popover-sync.js +1 -1
  386. package/dist/hooks/use-qa-props.js +1 -1
  387. package/dist/hooks/use-scheme.js +1 -1
  388. package/dist/hooks/use-sync-ref.js +1 -1
  389. package/dist/hooks/use-timer/Timer.js +1 -1
  390. package/dist/hooks/use-timer/use-timer.js +1 -1
  391. package/dist/hooks/use-validation-props.js +1 -1
  392. package/dist/hooks/use-viewport-size.js +1 -1
  393. package/dist/hooks/use-warn.js +1 -1
  394. package/dist/i18n/I18nProvider.js +1 -1
  395. package/dist/i18n/add-uikit-locale.js +1 -1
  396. package/dist/i18n/create-formatter.js +1 -1
  397. package/dist/i18n/instance.js +1 -1
  398. package/dist/i18n/locales/de-DE/uikit.js +1 -1
  399. package/dist/i18n/locales/en-US/uikit.js +1 -1
  400. package/dist/i18n/locales/es-ES/uikit.js +1 -1
  401. package/dist/i18n/locales/es-MX/uikit.js +1 -1
  402. package/dist/i18n/locales/fr-FR/uikit.js +1 -1
  403. package/dist/i18n/locales/it-IT/uikit.js +1 -1
  404. package/dist/i18n/locales/ja-JP/uikit.js +1 -1
  405. package/dist/i18n/locales/nb-NO/uikit.js +1 -1
  406. package/dist/i18n/locales/pt-BR/uikit.js +1 -1
  407. package/dist/i18n/locales/pt-PT/uikit.js +1 -1
  408. package/dist/i18n/locales/sv-SE/uikit.js +1 -1
  409. package/dist/i18n/locales/vi-VN/uikit.js +1 -1
  410. package/dist/i18n/locales.js +1 -1
  411. package/dist/i18n/namespace.js +1 -1
  412. package/dist/i18n/use-formatter.js +1 -1
  413. package/dist/i18n/use-i18n.js +1 -1
  414. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  415. package/dist/icons/AdjustmentsIcon.js +1 -1
  416. package/dist/icons/AiIcon.js +1 -1
  417. package/dist/icons/AreaChartIcon.js +1 -1
  418. package/dist/icons/ArrowNarrowDownIcon.js +1 -1
  419. package/dist/icons/ArrowNarrowUpIcon.js +1 -1
  420. package/dist/icons/BackwardIcon.js +1 -1
  421. package/dist/icons/BarChartIcon.js +1 -1
  422. package/dist/icons/BellFilledIcon.js +1 -1
  423. package/dist/icons/BellIcon.js +1 -1
  424. package/dist/icons/BooleanIcon.js +1 -1
  425. package/dist/icons/CalendarEditIcon.js +1 -1
  426. package/dist/icons/CalendarIcon.js +1 -1
  427. package/dist/icons/CaretDownIcon.js +1 -1
  428. package/dist/icons/CaretUpIcon.js +1 -1
  429. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  430. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  431. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  432. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  433. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  434. package/dist/icons/ChartBarLineIcon.js +1 -1
  435. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  436. package/dist/icons/ChartBarStackedIcon.js +1 -1
  437. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  438. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  439. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  440. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  441. package/dist/icons/ChartBubbleIcon.js +1 -1
  442. package/dist/icons/ChartDonut2Icon.js +1 -1
  443. package/dist/icons/ChartFunnelIcon.js +1 -1
  444. package/dist/icons/ChartHeatmapIcon.js +1 -1
  445. package/dist/icons/ChartKPIIcon.js +1 -1
  446. package/dist/icons/ChartPie2Icon.js +1 -1
  447. package/dist/icons/ChartScatterIcon.js +1 -1
  448. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  449. package/dist/icons/CheckCircleIcon.js +1 -1
  450. package/dist/icons/CheckIcon.js +1 -1
  451. package/dist/icons/CircleFilledIcon.js +1 -1
  452. package/dist/icons/ClearIcon.js +1 -1
  453. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  454. package/dist/icons/CloseCircleIcon.js +1 -1
  455. package/dist/icons/CloseIcon.js +1 -1
  456. package/dist/icons/CodeIcon.js +1 -1
  457. package/dist/icons/ColumnTotalIcon.js +1 -1
  458. package/dist/icons/CopyIcon.js +1 -1
  459. package/dist/icons/CountIcon.js +1 -1
  460. package/dist/icons/CubeIcon.js +1 -1
  461. package/dist/icons/CubePauseIcon.js +1 -1
  462. package/dist/icons/CubePlayIcon.js +1 -1
  463. package/dist/icons/CurrencyDollarIcon.js +1 -1
  464. package/dist/icons/DangerIcon.js +1 -1
  465. package/dist/icons/DashboardIcon.js +1 -1
  466. package/dist/icons/DatabaseIcon.js +1 -1
  467. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  468. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  469. package/dist/icons/DirectionIcon.js +1 -1
  470. package/dist/icons/DonutIcon.js +1 -1
  471. package/dist/icons/DownIcon.js +1 -1
  472. package/dist/icons/EditIcon.js +1 -1
  473. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  474. package/dist/icons/ExclamationCircleIcon.js +1 -1
  475. package/dist/icons/ExclamationIcon.js +1 -1
  476. package/dist/icons/EyeIcon.js +1 -1
  477. package/dist/icons/EyeInvisibleIcon.js +1 -1
  478. package/dist/icons/FilterIcon.js +1 -1
  479. package/dist/icons/FolderFilledIcon.js +1 -1
  480. package/dist/icons/FolderIcon.js +1 -1
  481. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  482. package/dist/icons/FolderOpenIcon.js +1 -1
  483. package/dist/icons/ForwardIcon.js +1 -1
  484. package/dist/icons/GripVerticalIcon.js +1 -1
  485. package/dist/icons/HierarchyIcon.js +1 -1
  486. package/dist/icons/HierarchyOpenIcon.js +1 -1
  487. package/dist/icons/Icon.js +1 -1
  488. package/dist/icons/InfoCircleIcon.js +1 -1
  489. package/dist/icons/InfoIcon.js +1 -1
  490. package/dist/icons/KeyIcon.js +1 -1
  491. package/dist/icons/LeftIcon.js +1 -1
  492. package/dist/icons/LineChartIcon.js +1 -1
  493. package/dist/icons/LoadingIcon.js +1 -1
  494. package/dist/icons/LockFilledIcon.js +1 -1
  495. package/dist/icons/LockIcon.js +1 -1
  496. package/dist/icons/MoreIcon.js +1 -1
  497. package/dist/icons/NotAllowedIcon.js +1 -1
  498. package/dist/icons/Number123Icon.js +1 -1
  499. package/dist/icons/NumberIcon.js +1 -1
  500. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  501. package/dist/icons/PauseCircleIcon.js +1 -1
  502. package/dist/icons/PauseIcon.js +1 -1
  503. package/dist/icons/PercentageIcon.js +1 -1
  504. package/dist/icons/PieChartIcon.js +1 -1
  505. package/dist/icons/PipetteIcon.js +1 -1
  506. package/dist/icons/PlayCircleIcon.js +1 -1
  507. package/dist/icons/PlayIcon.js +1 -1
  508. package/dist/icons/PlusIcon.js +1 -1
  509. package/dist/icons/ProgressBarIcon.js +1 -1
  510. package/dist/icons/ReloadIcon.js +1 -1
  511. package/dist/icons/ReportIcon.js +1 -1
  512. package/dist/icons/ReturnIcon.js +1 -1
  513. package/dist/icons/RightIcon.js +1 -1
  514. package/dist/icons/RowTotalsIcon.js +1 -1
  515. package/dist/icons/SchemeIcon.js +1 -1
  516. package/dist/icons/SearchIcon.js +1 -1
  517. package/dist/icons/SemanticQueryIcon.js +1 -1
  518. package/dist/icons/SettingsIcon.js +1 -1
  519. package/dist/icons/ShieldFilledIcon.js +1 -1
  520. package/dist/icons/ShieldIcon.js +1 -1
  521. package/dist/icons/SlashIcon.js +1 -1
  522. package/dist/icons/SparklesIcon.js +1 -1
  523. package/dist/icons/SqlIcon.js +1 -1
  524. package/dist/icons/StatsIcon.js +1 -1
  525. package/dist/icons/StopIcon.js +1 -1
  526. package/dist/icons/StringIcon.js +1 -1
  527. package/dist/icons/SubtotalsIcon.js +1 -1
  528. package/dist/icons/SwitchIcon.js +1 -1
  529. package/dist/icons/TableIcon.js +1 -1
  530. package/dist/icons/ThumbsDownIcon.js +1 -1
  531. package/dist/icons/ThumbsUpIcon.js +1 -1
  532. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  533. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  534. package/dist/icons/ThunderboltIcon.js +1 -1
  535. package/dist/icons/TimeIcon.js +1 -1
  536. package/dist/icons/TrashIcon.js +1 -1
  537. package/dist/icons/UnlockIcon.js +1 -1
  538. package/dist/icons/UpIcon.js +1 -1
  539. package/dist/icons/UserGroupIcon.js +1 -1
  540. package/dist/icons/UserIcon.js +1 -1
  541. package/dist/icons/UserLockIcon.js +1 -1
  542. package/dist/icons/ViewIcon.js +1 -1
  543. package/dist/icons/WarningFilledIcon.js +1 -1
  544. package/dist/icons/WarningIcon.js +1 -1
  545. package/dist/icons/wrap-icon.js +1 -1
  546. package/dist/index.js +1 -1
  547. package/dist/probe/canonicalize.js +1 -1
  548. package/dist/probe/css.js +1 -1
  549. package/dist/probe/index.js +1 -1
  550. package/dist/providers/ColorPopoverContext.js +1 -1
  551. package/dist/providers/EventBusProvider.js +1 -1
  552. package/dist/providers/ItemActionContext.js +1 -1
  553. package/dist/providers/Provider.js +1 -1
  554. package/dist/providers/SlotProvider.js +1 -1
  555. package/dist/providers/TrackingProvider.js +1 -1
  556. package/dist/providers/navigation-adapter.default.js +1 -1
  557. package/dist/providers/navigation-url.js +1 -1
  558. package/dist/providers/use-navigation.js +1 -1
  559. package/dist/themes/item-themes.js +1 -1
  560. package/dist/themes/themes.js +1 -1
  561. package/dist/tokens/all-tokens.js +1 -1
  562. package/dist/tokens/base.js +1 -1
  563. package/dist/tokens/color-seed.js +1 -1
  564. package/dist/tokens/color-theme.js +1 -1
  565. package/dist/tokens/colors.js +1 -1
  566. package/dist/tokens/layout.js +1 -1
  567. package/dist/tokens/lazy-styles.js +1 -1
  568. package/dist/tokens/legacy-color.js +1 -1
  569. package/dist/tokens/palette-config.js +1 -1
  570. package/dist/tokens/palette.js +1 -1
  571. package/dist/tokens/resolve.js +1 -1
  572. package/dist/tokens/shadows.js +1 -1
  573. package/dist/tokens/sizes.js +1 -1
  574. package/dist/tokens/spacing.js +1 -1
  575. package/dist/tokens/typography.js +1 -1
  576. package/dist/utils/ResizeSensor.js +1 -1
  577. package/dist/utils/actions-run.js +1 -1
  578. package/dist/utils/chain.js +1 -1
  579. package/dist/utils/color/channels.js +1 -1
  580. package/dist/utils/color/color.js +1 -1
  581. package/dist/utils/colors.js +1 -1
  582. package/dist/utils/component-base-props.js +1 -1
  583. package/dist/utils/disabled-behavior.js +1 -1
  584. package/dist/utils/disabled-props.js +1 -1
  585. package/dist/utils/dotize.js +1 -1
  586. package/dist/utils/field-chrome.js +1 -1
  587. package/dist/utils/field-layout.js +1 -1
  588. package/dist/utils/forward-ref-with-generics.js +1 -1
  589. package/dist/utils/highlight-text.js +1 -1
  590. package/dist/utils/index.js +1 -1
  591. package/dist/utils/interactions.js +1 -1
  592. package/dist/utils/is-dev-env.js +1 -1
  593. package/dist/utils/is-text-only.js +1 -1
  594. package/dist/utils/layout-scale.js +1 -1
  595. package/dist/utils/legacy-tooltip.js +1 -1
  596. package/dist/utils/map-props.js +1 -1
  597. package/dist/utils/merge-props.js +1 -1
  598. package/dist/utils/modules.js +1 -1
  599. package/dist/utils/nullable-value.js +1 -1
  600. package/dist/utils/option-origin-press.js +1 -1
  601. package/dist/utils/overlay-key-propagation.js +1 -1
  602. package/dist/utils/pick-base-customization-props.js +1 -1
  603. package/dist/utils/popover-width.js +1 -1
  604. package/dist/utils/programmatic-focus.js +1 -1
  605. package/dist/utils/promise.js +1 -1
  606. package/dist/utils/raf.js +1 -1
  607. package/dist/utils/random.js +1 -1
  608. package/dist/utils/range.js +1 -1
  609. package/dist/utils/resolve-icon.js +1 -1
  610. package/dist/utils/resolve-validation-props.js +1 -1
  611. package/dist/utils/search-text-services.js +1 -1
  612. package/dist/utils/selection.js +1 -1
  613. package/dist/utils/shared-store.js +1 -1
  614. package/dist/utils/styles.js +1 -1
  615. package/dist/utils/tree.js +1 -1
  616. package/dist/utils/virtual-width.js +1 -1
  617. package/dist/utils/warnings.js +1 -1
  618. package/dist/utils/wrap-node-if-plain.js +1 -1
  619. package/dist/utils/wrap-with-field.js +1 -1
  620. package/dist/version.js +2 -2
  621. package/docs/components/Layout.md +2 -2
  622. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | Cube Dev Team */
2
2
  import { LayoutContent as _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-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | Cube Dev Team */
2
2
  import { LayoutNestedContext } from "./LayoutContext.js";
3
3
  import { LayoutContent as _LayoutContent } from "./LayoutContent.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | Cube Dev Team */
2
2
  import { LayoutContent as _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-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | Cube Dev Team */
2
2
  import { useAutoTooltip } from "../../hooks/use-auto-tooltip.js";
3
3
  import { useI18n } from "../../i18n/use-i18n.js";
4
4
  import { Button } from "../Button/Button.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | Cube Dev Team */
2
2
  import { extractStyles, mergeStyleLayers } from "../../utils/styles.js";
3
3
  import { useCombinedRefs } from "../../hooks/use-combined-refs.js";
4
4
  import { useI18n } from "../../i18n/use-i18n.js";
@@ -38,9 +38,9 @@ export interface CubeLayoutPanelProps extends ComponentBaseProps, ContainerStyle
38
38
  * the panel opens again at its `defaultSize`, or without one at that size.
39
39
  * A second click within 300ms resets the size instead of collapsing, and a
40
40
  * mouse resting on the handle shows a hint with these gestures. Needs
41
- * `isResizable`, and a controlled panel
42
- * (`isOpen` with `onOpenChange`) with a control that opens it again:
43
- * nothing opens an uncontrolled panel once it closes. Default: false
41
+ * `isResizable`, and a controlled panel (`isOpen` with `onOpenChange`)
42
+ * with a control that opens it again: nothing opens an uncontrolled panel
43
+ * once it closes. Default: false
44
44
  */
45
45
  isCollapsible?: boolean;
46
46
  /** Size change callback */
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | Cube Dev Team */
2
2
  import { extractStyles } from "../../utils/styles.js";
3
3
  import { useCombinedRefs } from "../../hooks/use-combined-refs.js";
4
4
  import { pickBaseCustomizationProps } from "../../utils/pick-base-customization-props.js";
@@ -150,6 +150,10 @@ const OverlayBackdrop = tasty({
150
150
  transition: "opacity .15s ease-out"
151
151
  }
152
152
  });
153
+ /** `defaultSize` in pixels, as the double-click reset and a reopen read it. */
154
+ function parseDefaultSize(defaultSize) {
155
+ return (typeof defaultSize === "number" ? defaultSize : parseInt(defaultSize, 10)) || 280;
156
+ }
153
157
  function matchesContainerSize(container, isHorizontal, dimension) {
154
158
  return (isHorizontal ? container?.offsetWidth : container?.offsetHeight) === dimension;
155
159
  }
@@ -291,14 +295,14 @@ function LayoutPanel(props, ref) {
291
295
  }
292
296
  if (press_0) {
293
297
  pressRef.current = null;
294
- if (press_0.phase === "collapsed" && props.defaultSize != null) {
295
- const reopenSize = typeof defaultSize === "number" ? defaultSize : parseInt(defaultSize, 10);
296
- if (Number.isFinite(reopenSize)) reopenSizeRef.current = Math.round(clampValue(reopenSize));
297
- }
298
298
  const finalSize = Math.round(clampValue(press_0.startSize + press_0.offset));
299
+ reopenSizeRef.current = press_0.phase === "collapsed" && props.defaultSize != null ? {
300
+ size: Math.round(clampValue(parseDefaultSize(defaultSize))),
301
+ from: finalSize
302
+ } : null;
299
303
  setSize(finalSize);
300
304
  onSizeChange?.(finalSize);
301
- setStoredSize(finalSize);
305
+ setStoredSize(reopenSizeRef.current?.size ?? finalSize);
302
306
  return;
303
307
  }
304
308
  setSize((currentSize_1) => {
@@ -415,12 +419,12 @@ function LayoutPanel(props, ref) {
415
419
  });
416
420
  });
417
421
  const openAtReopenSize = useEffectEvent(() => {
418
- const reopenSize_0 = reopenSizeRef.current;
419
- if (reopenSize_0 == null) return;
422
+ const reopen = reopenSizeRef.current;
420
423
  reopenSizeRef.current = null;
421
- setSize(reopenSize_0);
422
- onSizeChange?.(reopenSize_0);
423
- setStoredSize(reopenSize_0);
424
+ if (reopen == null || Math.round(size) !== reopen.from) return;
425
+ setSize(reopen.size);
426
+ onSizeChange?.(reopen.size);
427
+ setStoredSize(reopen.size);
424
428
  });
425
429
  useLayoutEffect(() => {
426
430
  if (!isOpen) return;
@@ -489,7 +493,7 @@ function LayoutPanel(props, ref) {
489
493
  setStoredSize(nextSize);
490
494
  };
491
495
  const handleResetSize = useCallback(() => {
492
- const clampedSize = clampValue((typeof defaultSize === "number" ? defaultSize : parseInt(defaultSize, 10)) || 280);
496
+ const clampedSize = clampValue(parseDefaultSize(defaultSize));
493
497
  setSize(clampedSize);
494
498
  onSizeChange?.(clampedSize);
495
499
  setStoredSize(clampedSize);
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutPanel.js","names":["getFocusableTreeWalker","isVirtualClick","CONTAINER_STYLES","ContainerStyleProps","mergeStyles","Styles","tasty","ForwardedRef","forwardRef","HTMLAttributes","MouseEvent","PointerEvent","ReactNode","RefCallback","useCallback","useEffect","useEffectEvent","useId","useLayoutEffect","useMemo","useRef","useState","useMove","createPortal","useCombinedRefs","useLocalStorage","useI18n","filterComponentBaseProps","pickBaseCustomizationProps","focusProgrammatically","extractStyles","Dialog","CubeDialogContainerProps","DialogContainer","DisplayTransition","LayoutContextReset","LayoutPanelContext","Side","useLayoutActionsContext","useLayoutRefsContext","useLayoutStateContext","LayoutPanelTransition","LayoutResizeHandle","clampSize","getOppositeSide","resolveCssSize","ComponentBaseProps","HANDLER_WIDTH","HANDLER_OFFSET","COLLAPSE_DISTANCE","CLICK_TOLERANCE","DOUBLE_CLICK_DELAY","PanelElement","as","qa","styles","container","position","display","hide","hidden","flow","overflow","boxSizing","top","right","bottom","left","width","height","border","fill","isolation","transform","transition","PANEL_HANDLE_STYLES","horizontal","OverlayBackdrop","inset","backdropFilter","cursor","opacity","visible","pointerEvents","LayoutPanelMode","CubeLayoutPanelProps","side","mode","size","defaultSize","minSize","maxSize","isResizable","isCollapsible","onSizeChange","isOpen","defaultIsOpen","onOpenChange","hasTransition","hideOnClose","isDismissable","overlayStyles","isDialog","isDialogOpen","defaultIsDialogOpen","onDialogOpenChange","dialogProps","Omit","dialogStyles","contentPadding","sizeStorageKey","children","matchesContainerSize","HTMLElement","isHorizontal","dimension","offsetWidth","offsetHeight","LayoutPanel","props","ref","HTMLDivElement","layoutActions","layoutState","layoutRefs","Error","modeProp","providedSize","providedIsOpen","hasTransitionProp","providedIsDialogOpen","mods","otherProps","isDialogMode","isOverlayMode","isStickyMode","combinedRef","prevProvidedSizeRef","t","generatedId","panelId","id","resizeLabel","containerWidth","containerHeight","minContentSize","containerDimension","oppositeSide","oppositePanelSize","panelSizes","naturalMax","Math","max","Infinity","internalIsOpen","setInternalIsOpen","isTransitionActive","isPanelContainerReady","visualState","setVisualState","isShown","isPanelShown","internalIsDialogOpen","setInternalIsDialogOpen","dialogOpen","storedSize","setStoredSize","isDragging","setIsDragging","setSize","initialSize","pressRef","startSize","offset","across","isSecondClick","phase","isCollapsePending","setIsCollapsePending","reopenSizeRef","extractedStyles","finalStyles","resolvedMax","trim","endsWith","undefined","resolvedMin","effectiveMax","values","push","Number","isFinite","length","min","clampValue","value","closeRequestedRef","handleOpenChange","newIsOpen","current","queueMicrotask","setContextDragging","setDragging","moveProps","onMoveStart","onMove","e","pointerType","step","shiftKey","rawDelta","deltaX","deltaY","direction","delta","currentSize","press","hypot","pointerSize","onMoveEnd","reopenSize","parseInt","round","finalSize","panelContainerRef","parentElement","applyInlineBounds","prev","clamped","frame","requestAnimationFrame","cancelAnimationFrame","effectivePanelSize","effectiveInsetSize","registerPanel","unregisterPanel","updatePanelSize","isReady","lastSizeRef","handleDismiss","registerOverlayPanel","unregister","openerRef","Element","panelNodeRef","mountFocusRef","recordOpener","active","ownerDocument","activeElement","contains","moveFocusIn","panel","opener","lastReturnedFocus","target","tabbable","nextNode","preventScroll","returnFocus","isConnected","body","openAtReopenSize","handleDialogOpenChange","panelContextValue","dialogPanelContextValue","panelMods","drag","maxSizeCss","parts","join","panelTokens","panelRefCallback","node","transitionRef","handleJump","limit","nextSize","handleResetSize","resetSize","clampedSize","collapseOnClick","timer","setTimeout","clearTimeout","onHandlePointerDown","button","onHandleClick","nativeEvent","handleHint","renderPanelContent","offscreen","isHidden","showOverlay","eventProps","tokens","portalContainer","isExiting","OpenerProbe","t0","$","_c","focusRef","t1","t2","document","_LayoutPanel","displayName","_c"],"sources":["../../../src/components/Layout/LayoutPanel.tsx"],"sourcesContent":["import { getFocusableTreeWalker } from '@react-aria/focus';\nimport { isVirtualClick } from '@react-aria/utils';\nimport {\n CONTAINER_STYLES,\n ContainerStyleProps,\n mergeStyles,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n MouseEvent,\n PointerEvent,\n ReactNode,\n RefCallback,\n useCallback,\n useEffect,\n useEffectEvent,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useMove } from 'react-aria';\nimport { createPortal } from 'react-dom';\n\nimport { useCombinedRefs } from '../../hooks/use-combined-refs';\nimport { useLocalStorage } from '../../hooks/use-local-storage';\nimport { useI18n } from '../../i18n/use-i18n';\nimport { filterComponentBaseProps } from '../../utils/component-base-props';\nimport { pickBaseCustomizationProps } from '../../utils/pick-base-customization-props';\nimport { focusProgrammatically } from '../../utils/programmatic-focus';\nimport { extractStyles } from '../../utils/styles';\nimport { Dialog } from '../Dialog/Dialog';\nimport {\n CubeDialogContainerProps,\n DialogContainer,\n} from '../Dialog/DialogContainer';\nimport { DisplayTransition } from '../DisplayTransition/DisplayTransition';\n\nimport {\n LayoutContextReset,\n LayoutPanelContext,\n Side,\n useLayoutActionsContext,\n useLayoutRefsContext,\n useLayoutStateContext,\n} from './LayoutContext';\nimport { LayoutPanelTransition } from './LayoutPanelTransition';\nimport { LayoutResizeHandle } from './LayoutResizeHandle';\nimport { clampSize, getOppositeSide, resolveCssSize } from './utils';\n\nimport type { ComponentBaseProps } from '../../utils/component-base-props';\n\n// Resize handler dimensions\nconst HANDLER_WIDTH = 9;\n// Where the panel's edge is inside the handle, from the panel's side: the\n// handle overlaps the panel's border and the content beside it\nconst HANDLER_OFFSET = 4;\n// A collapsible panel closes when a drag brings the pointer this close to the\n// Layout's edge on the panel's side.\nconst COLLAPSE_DISTANCE = 24;\n// A press that moves the pointer no further than this, in any direction, is\n// a click, not a resize.\nconst CLICK_TOLERANCE = 3;\n// How long a click on a collapsible panel's handle waits for a second one,\n// which resets the size instead of collapsing the panel.\nconst DOUBLE_CLICK_DELAY = 300;\n\nconst PanelElement = tasty({\n as: 'div',\n qa: 'LayoutPanel',\n styles: {\n container: 'panel / inline-size',\n position: 'absolute',\n display: 'flex',\n // A closed `hideOnClose` panel keeps its content mounted out of the layout.\n hide: {\n '': false,\n hidden: true,\n },\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 // The stacking context the transform used to create: z-indexed content\n // stays inside the panel, below its resize handle and an overlay backdrop.\n isolation: 'isolate',\n\n // Transition styles - offscreen mod controls slide animation.\n // `none` at rest, not a zero translate: any transform makes the panel the\n // containing block of its fixed descendants (drag previews, popups), which\n // then position against the panel and are clipped by its overflow. `none`\n // still animates to and from the offscreen translate.\n transform: {\n '': 'none',\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// The handle's box. It is a sibling of the panel (in a Fragment), positioned\n// relative to the Layout; LayoutResizeHandle draws the edge inside it.\nconst PANEL_HANDLE_STYLES: Styles = {\n // Device pixels: the handle's thickness, so its offsets stay whole pixels.\n '$handle-size': `${HANDLER_WIDTH}px`,\n // The edge line lies on the panel's own border. In use it widens to both\n // sides of it: half a pixel into the panel, half over the content beside it.\n '$handle-edge-inset': `(${HANDLER_OFFSET}px - 1bw)`,\n\n // Handler size\n width: {\n '': '100%',\n horizontal: '$handle-size',\n },\n height: {\n '': '$handle-size',\n horizontal: '100%',\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 // Transition must match panel for synchronized animation\n transition: {\n '': 'theme',\n 'has-transition': 'transform $transition ease-out, theme',\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 // oxlint-disable-next-line tasty/no-raw-transition-duration -- a one-off 150ms backdrop fade: $scrollbar-transition has the value but times scrollbar fades, and $overlay-transition would slow it to 250ms\n transition: 'opacity .15s ease-out',\n },\n});\n\n/** Panel rendering mode */\nexport type LayoutPanelMode = 'default' | 'sticky' | 'overlay' | 'dialog';\n\nexport interface CubeLayoutPanelProps\n extends ComponentBaseProps, 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; focus moves into it\n * when it opens and back to the opener when it closes\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 /**\n * Let the user collapse a resizable panel from its resize handle: with a\n * click on it, or with a drag that holds the panel at its minimum size and\n * collapses it once the pointer comes within 24px of the Layout's edge.\n * The panel closes through `onOpenChange(false)`. A click keeps its size;\n * a drag reports the size it was dragged to through `onSizeChange`, and\n * the panel opens again at its `defaultSize`, or without one at that size.\n * A second click within 300ms resets the size instead of collapsing, and a\n * mouse resting on the handle shows a hint with these gestures. Needs\n * `isResizable`, and a controlled panel\n * (`isOpen` with `onOpenChange`) with a control that opens it again:\n * nothing opens an uncontrolled panel once it closes. Default: false\n */\n isCollapsible?: 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 * Hide the closed panel instead of unmounting its content, so the content\n * keeps its state (an unsent draft, scroll position, a request in flight)\n * until the panel reopens. A hidden panel takes no space and no focus.\n * The content mounts once, even while the panel starts closed, so mount\n * effects and a native `autoFocus` do not run again on reopen. Content that\n * mounts while closed is hidden: `autoFocus` does nothing and measurements\n * read zero until the panel opens. In dialog mode the dialog is kept the\n * same way, and moves focus itself as a dialog that mounts on open does: to\n * an autofocused kit control on every open, and on close back to its\n * opener, or to the trigger of the menu or popover it sat in once that has\n * closed\n * (DialogContainer's docs list what still differs);\n * `dialogProps.hideOnClose` takes precedence. Default: false\n */\n hideOnClose?: boolean;\n /**\n * Whether the panel can be dismissed by clicking the overlay (overlay mode), pressing Escape,\n * or, in overlay mode, moving focus into the main content.\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 DialogContainer when in dialog mode */\n dialogProps?: Omit<\n CubeDialogContainerProps,\n 'isDismissable' | 'onDismiss' | 'isOpen'\n >;\n /** Styles for the Dialog root in dialog mode, separate from inline panel styles. */\n dialogStyles?: Styles;\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 isCollapsible = false,\n onSizeChange,\n isOpen: providedIsOpen,\n defaultIsOpen = true,\n onOpenChange,\n hasTransition: hasTransitionProp,\n hideOnClose = false,\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 dialogStyles,\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 const { t } = useI18n();\n // The resize handle controls the panel, so a resizable panel needs an id.\n const generatedId = useId();\n const panelId = otherProps.id ?? generatedId;\n // One key per side: a translated sentence can't take the side as a word.\n const resizeLabel = {\n left: t('layout.resizeLeftPanel', 'Resize left panel'),\n top: t('layout.resizeTopPanel', 'Resize top panel'),\n right: t('layout.resizeRightPanel', 'Resize right panel'),\n bottom: t('layout.resizeBottomPanel', 'Resize bottom panel'),\n }[side];\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 naturalMax = useMemo(\n () =>\n !isDialogMode && containerDimension > 0\n ? Math.max(0, containerDimension - oppositePanelSize - minContentSize)\n : Infinity,\n [isDialogMode, containerDimension, oppositePanelSize, minContentSize],\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 // The pointer press on the resize handle, from its pointerdown until its\n // click, which arrives after its drag has ended, or until a drag ends with\n // no click to come: the size it started from, where the pointer is from\n // there along the resize axis (unclamped) and across it, and what the press\n // is: still a click (`press`), a drag, or a drag that collapsed the panel.\n const pressRef = useRef<{\n startSize: number;\n offset: number;\n across: number;\n isSecondClick: boolean;\n phase: 'press' | 'drag' | 'collapsed';\n } | null>(null);\n // A click on a collapsible panel's handle, waiting to see whether a second\n // one follows.\n const [isCollapsePending, setIsCollapsePending] = useState(false);\n // The size a panel a drag collapsed opens again at: its `defaultSize`.\n // Applied as it opens, never while it is still shown, so its width does not\n // change as it closes.\n const reopenSizeRef = useRef<number | null>(null);\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 // oxlint-disable-next-line tasty/no-runtime-styles-mutation -- forwards the consumer's `contentPadding` prop\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 // The minimum in pixels, for the resize handle's value and Home key. CSS\n // applies a string minimum; JS clamping applies only a number.\n const resolvedMin =\n containerDimension > 0 || typeof minSize === 'number'\n ? resolveCssSize(minSize, containerDimension)\n : undefined;\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 // One close per task: a consumer that moves focus into the main content in\n // `onOpenChange(false)` would otherwise dismiss the still-registered panel\n // a second time.\n const closeRequestedRef = useRef(false);\n\n const handleOpenChange = useCallback(\n (newIsOpen: boolean) => {\n if (!newIsOpen) {\n if (closeRequestedRef.current) return;\n\n closeRequestedRef.current = true;\n queueMicrotask(() => {\n closeRequestedRef.current = false;\n });\n }\n\n setInternalIsOpen(newIsOpen);\n onOpenChange?.(newIsOpen);\n },\n [onOpenChange],\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 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 const delta = rawDelta * step * direction;\n\n setSize((currentSize) => clampValue(currentSize + delta));\n return;\n }\n\n // Pointer resize: use exact delta values\n const delta = isHorizontal\n ? e.deltaX * (side === 'right' ? -1 : 1)\n : e.deltaY * (side === 'bottom' ? -1 : 1);\n const press = pressRef.current;\n\n // No press seen: `useMove` handles mouse and touch events instead of\n // pointer events where there are none, as in jsdom under test, and a\n // test may send no `pointerdown` at all. Such a drag moves by steps.\n if (!press) {\n setSize((currentSize) => clampValue(currentSize + delta));\n return;\n }\n\n if (press.phase === 'collapsed') return;\n\n press.offset += delta;\n press.across += isHorizontal ? e.deltaY : e.deltaX;\n\n // A press that moves, either way (sliding along the edge too), is a\n // drag.\n if (\n press.phase === 'press' &&\n Math.hypot(press.offset, press.across) > CLICK_TOLERANCE\n ) {\n press.phase = 'drag';\n }\n\n // The size the pointer asks for. The edge follows it within the limits,\n // so it stays under the pointer when the pointer comes back from past\n // one.\n const pointerSize = press.startSize + press.offset;\n\n // Only a drag toward the edge collapses: a panel resting near the edge\n // still opens by a drag away from it.\n if (\n isCollapsible &&\n press.phase === 'drag' &&\n press.offset < 0 &&\n pointerSize <= COLLAPSE_DISTANCE\n ) {\n // A drag to the minimum, then a close, however fast the pointer got\n // here: the release reports that size. The rest of the press moves\n // nothing.\n press.phase = 'collapsed';\n setSize(clampValue(pointerSize));\n setIsDragging(false);\n setContextDragging(false);\n handleOpenChange(false);\n return;\n }\n\n setSize(clampValue(pointerSize));\n },\n onMoveEnd(e) {\n setIsDragging(false);\n setContextDragging(false);\n if (isDialogMode && !isDragging) return;\n\n const press = e.pointerType === 'keyboard' ? null : pressRef.current;\n\n // A press that barely moved is a click on a collapsible panel's handle,\n // and leaves the size as it was. Its record waits for the click.\n if (isCollapsible && press?.phase === 'press') {\n setSize(press.startSize);\n return;\n }\n\n // A drag is no click: its press is over. It ends where the pointer is,\n // or, for one that collapsed the panel, where it was as it collapsed.\n // Reported here, not from a state updater, which React may run twice\n // when the release lands before the last move has rendered.\n if (press) {\n pressRef.current = null;\n\n // A panel a drag collapsed opens again at its `defaultSize`, when it\n // has one, or else at the size it was dragged to.\n if (press.phase === 'collapsed' && props.defaultSize != null) {\n const reopenSize =\n typeof defaultSize === 'number'\n ? defaultSize\n : parseInt(defaultSize, 10);\n\n if (Number.isFinite(reopenSize)) {\n reopenSizeRef.current = Math.round(clampValue(reopenSize));\n }\n }\n\n const finalSize = Math.round(\n clampValue(press.startSize + press.offset),\n );\n\n setSize(finalSize);\n onSizeChange?.(finalSize);\n setStoredSize(finalSize);\n return;\n }\n\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 // The content sits against the panel's border, resizable or not; the resize\n // handle overlaps both and paints over the content.\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(effectivePanelSize);\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 // 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 // Overlay focus: move into the panel on open, back to the opener on close.\n // Declared after the registration effect on purpose: its cleanup then runs\n // after the panel unregisters, so a restore into the main content dismisses\n // nothing.\n const openerRef = useRef<Element | null>(null);\n const panelNodeRef = useRef<HTMLDivElement | null>(null);\n // Focus as the panel shows (its contents may mount now), before a native\n // `autoFocus` inside them moves it (see OpenerProbe).\n const mountFocusRef = useRef<Element | null>(null);\n\n // A panel open on the Layout's first render leaves page focus alone.\n const recordOpener = useEffectEvent(() => {\n const active =\n mountFocusRef.current ??\n panelNodeRef.current?.ownerDocument.activeElement ??\n null;\n\n mountFocusRef.current = null;\n\n openerRef.current =\n isOverlayMode && isReady && !panelNodeRef.current?.contains(active)\n ? active\n : null;\n });\n\n const moveFocusIn = useEffectEvent(() => {\n const panel = panelNodeRef.current;\n const opener = openerRef.current;\n\n const active = panel?.ownerDocument.activeElement;\n\n // Focus already moved elsewhere as the panel opened, such as to a field\n // with `autoFocus` inside it: leave it there. Focus another overlay panel just\n // returned, as it closed in the same commit, does not count.\n if (\n !panel ||\n !opener ||\n (active !== opener && active !== lastReturnedFocus)\n ) {\n return;\n }\n\n const target =\n getFocusableTreeWalker(panel, { tabbable: true }).nextNode() ??\n getFocusableTreeWalker(panel).nextNode();\n\n // The panel enters translated offscreen, so focus must not scroll.\n focusProgrammatically(target as HTMLElement | null, {\n preventScroll: true,\n });\n });\n\n // Return focus only if it is still in the panel or was lost with it; focus\n // the user or the consumer moved elsewhere stays there.\n const returnFocus = useEffectEvent(() => {\n const opener = openerRef.current;\n const panel = panelNodeRef.current;\n\n openerRef.current = null;\n\n if (\n !isOverlayMode ||\n !(opener instanceof HTMLElement) ||\n !opener.isConnected ||\n opener === opener.ownerDocument.body\n ) {\n return;\n }\n\n const active = opener.ownerDocument.activeElement;\n\n if (\n active != null &&\n active !== opener.ownerDocument.body &&\n !panel?.contains(active)\n ) {\n return;\n }\n\n focusProgrammatically(opener, { preventScroll: true });\n lastReturnedFocus = opener;\n queueMicrotask(() => {\n lastReturnedFocus = null;\n });\n });\n\n // Opening a panel a drag collapsed: at the size it opens again at, from\n // the first frame it is drawn in.\n const openAtReopenSize = useEffectEvent(() => {\n const reopenSize = reopenSizeRef.current;\n\n if (reopenSize == null) return;\n\n reopenSizeRef.current = null;\n setSize(reopenSize);\n onSizeChange?.(reopenSize);\n setStoredSize(reopenSize);\n });\n\n useLayoutEffect(() => {\n if (!isOpen) return;\n\n recordOpener();\n openAtReopenSize();\n }, [isOpen]);\n\n // Passive, so a menu item that refocuses itself while closing its menu has\n // done so before focus moves in.\n useEffect(() => {\n if (!isOpen) return;\n\n moveFocusIn();\n\n return () => returnFocus();\n }, [isOpen]);\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 }),\n [side, isDragging, isHorizontal, hasTransition, isReady],\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 panelTokens = 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 // Home and End: the smallest size, or the largest the Layout leaves room for.\n const handleJump = (limit: 'min' | 'max') => {\n const target = limit === 'min' ? resolvedMin : effectiveMax;\n\n if (target == null) return;\n\n const nextSize = Math.round(clampValue(target));\n\n setSize(nextSize);\n onSizeChange?.(nextSize);\n setStoredSize(nextSize);\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 // A click collapses the panel once no second click can make it a double\n // one, which resets the size instead.\n const collapseOnClick = useEffectEvent(() => {\n setIsCollapsePending(false);\n\n if (isOpen) handleOpenChange(false);\n });\n\n useEffect(() => {\n if (!isCollapsePending) return;\n\n const timer = setTimeout(() => collapseOnClick(), DOUBLE_CLICK_DELAY);\n\n return () => clearTimeout(timer);\n }, [isCollapsePending]);\n\n const onHandlePointerDown = (e: PointerEvent<HTMLElement>) => {\n // A finger pressed while another drags is no press of its own: `useMove`\n // follows the pointer that pressed first.\n if (e.button !== 0 || isDragging) return;\n\n pressRef.current = {\n // Where the handle is drawn: `$panel-size`, within the limits JS knows.\n startSize: clampValue(size),\n offset: 0,\n across: 0,\n isSecondClick: isCollapsePending,\n phase: 'press',\n };\n // A panel its consumer kept open after a drag collapse: a new press\n // starts from what is drawn, and so does its next opening.\n reopenSizeRef.current = null;\n\n if (!isCollapsible) return;\n\n setIsCollapsePending(false);\n };\n\n // On a collapsible panel's handle a click collapses the panel, and a second\n // one within the delay resets its size: a double-click, or a double tap,\n // which not every touch browser reports as one.\n const onHandleClick = (e: MouseEvent<HTMLElement>) => {\n const press = pressRef.current;\n\n pressRef.current = null;\n\n // Pointer gestures only: not a click no press made, such as a screen\n // reader's default action or `click()`.\n if (\n isVirtualClick(e.nativeEvent) ||\n !isCollapsible ||\n press?.phase !== 'press'\n ) {\n return;\n }\n\n if (press.isSecondClick) {\n handleResetSize();\n } else {\n setIsCollapsePending(true);\n }\n };\n\n const handleHint = isCollapsible\n ? [\n t('layout.handleHintDrag', 'Drag to resize'),\n t('layout.handleHintClick', 'Click to collapse'),\n t('layout.handleHintDoubleClick', 'Double-click to reset size'),\n ].join('\\n')\n : undefined;\n\n // `isHidden` keeps the element tree of an open panel, so content never remounts.\n // Without a transition, a rendered closed panel is a hidden one.\n const renderPanelContent = (\n offscreen = false,\n transitionRef?: RefCallback<HTMLElement>,\n isHidden = !isOpen,\n ) => {\n const showOverlay = isOverlayMode && !offscreen;\n\n return (\n <>\n {/* Mounted only while shown, so an open from hidden reads live focus. */}\n {isOverlayMode && !isHidden && <OpenerProbe focusRef={mountFocusRef} />}\n {/* Overlay backdrop for overlay mode */}\n {isOverlayMode && !isHidden && (\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 // Kept after detach: StrictMode detaches refs before it replays\n // the effects that still need the panel.\n if (node) panelNodeRef.current = node;\n panelRefCallback(node, transitionRef);\n }}\n {...filterComponentBaseProps(otherProps, { eventProps: true })}\n id={isResizable ? panelId : otherProps.id}\n mods={{ ...panelMods, ...mods, offscreen, hidden: isHidden }}\n styles={finalStyles}\n tokens={{ ...panelTokens, ...otherProps.tokens }}\n data-side={side}\n >\n <LayoutPanelContext.Provider value={panelContextValue}>\n <LayoutContextReset>{children}</LayoutContextReset>\n </LayoutPanelContext.Provider>\n </PanelElement>\n {isResizable && !isHidden && (\n <LayoutResizeHandle\n qa=\"PanelResizeHandler\"\n side={side}\n anchor={side}\n label={resizeLabel}\n controls={panelId}\n size={size}\n isDragging={isDragging}\n minSize={resolvedMin}\n maxSize={effectiveMax}\n isCollapsible={isCollapsible}\n styles={PANEL_HANDLE_STYLES}\n mods={{\n offscreen,\n 'has-transition': hasTransition && isReady,\n }}\n tokens={panelTokens}\n moveProps={moveProps}\n onPointerDown={onHandlePointerDown}\n hint={handleHint}\n onJump={handleJump}\n onClick={onHandleClick}\n // A collapsible panel counts its own double click: see\n // `onHandleClick`.\n onDoubleClick={isCollapsible ? undefined : 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 hideOnClose={hideOnClose}\n onDismiss={() => handleDialogOpenChange(false)}\n {...dialogProps}\n >\n <Dialog\n {...pickBaseCustomizationProps(otherProps)}\n qa={otherProps.qa}\n // The panel's name names its dialog, as it names the inline panel.\n aria-label={otherProps['aria-label']}\n aria-labelledby={otherProps['aria-labelledby']}\n mods={mods}\n isDismissable={false}\n styles={dialogStyles}\n >\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 exposeUnmounted={hideOnClose}\n onToggle={(isShown) => setVisualState({ isShown, isTransitionActive })}\n >\n {({ phase, isShown, isExiting, ref: transitionRef }) => {\n const isHidden = phase === 'unmounted';\n\n return (\n <LayoutPanelTransition\n isShown={isShown}\n isExiting={isExiting}\n isHidden={isHidden}\n >\n {renderPanelContent(!isShown, transitionRef, isHidden)}\n </LayoutPanelTransition>\n );\n }}\n </DisplayTransition>,\n portalContainer,\n );\n }\n\n // Simple panel (no transition) - portal to panel container\n if (!isOpen && !hideOnClose) return null;\n\n return createPortal(renderPanelContent(false), portalContainer);\n}\n\n// Focus another overlay panel returned in the current task.\nlet lastReturnedFocus: Element | null = null;\n\n// Rendered before the panel's contents, so its layout effect reads focus\n// before React applies a native `autoFocus` inside them.\nfunction OpenerProbe({ focusRef }: { focusRef: { current: Element | null } }) {\n useLayoutEffect(() => {\n focusRef.current = document.activeElement;\n }, [focusRef]);\n\n return null;\n}\n\nconst _LayoutPanel = forwardRef(LayoutPanel);\n\n_LayoutPanel.displayName = 'Layout.Panel';\n\nexport { _LayoutPanel as LayoutPanel };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0DA,MAAM+C,gBAAgB;AAGtB,MAAMC,iBAAiB;AAGvB,MAAMC,oBAAoB;AAG1B,MAAMC,kBAAkB;AAGxB,MAAMC,qBAAqB;AAE3B,MAAMC,eAAe9C,MAAM;CACzB+C,IAAI;CACJC,IAAI;CACJC,QAAQ;EACNC,WAAW;EACXC,UAAU;EACVC,SAAS;EAETC,MAAM;GACJ,IAAI;GACJC,QAAQ;EACV;EACAC,MAAM;EACNC,UAAU;EACVC,WAAW;EAEX,oBAAoB;EAEpB,uBAAuB;EAGvBC,KAAK;GACH,IAAI;GACJ,eAAe;EACjB;EACAC,OAAO;GACL,IAAI;GACJ,aAAa;EACf;EACAC,QAAQ;GACN,IAAI;GACJ,YAAY;EACd;EACAC,MAAM;GACJ,IAAI;GACJ,cAAc;EAChB;EAGAC,OAAO;GACL,IAAI;GACJ,0BAA0B;EAC5B;EACAC,QAAQ;GACN,IAAI;GACJ,0BAA0B;EAC5B;EAGAC,QAAQ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,UAAAA,mBAAmB,CAAClI,WAASkH,iBAAekB,UAAQ;GAChC,CAAA;EAE3B;CACiB,CAAA,GACnBI,eACF;CAIF,IAAI,CAACzM,UAAU,CAACI,aAAa,OAAO;CAEpC,OAAO5E,aAAa2Q,mBAAmB,KAAK,GAAGM,eAAe;AAChE;AAGA,IAAI1C,oBAAoC;AAIxC,SAAA4C,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAqB,MAAA,EAAAC,aAAAH;CAAuD,IAAAI;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAE,UAAA;EAC1DC,WAAA;GACdD,SAAQvG,UAAW0G,SAAQxD;EAAX;EACfuD,KAAA,CAACF,QAAQ;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAD,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAFb1R,gBAAgB6R,IAEbC,EAAU;CAAC,OAEP;AAAI;AAGb,MAAME,eAAe1S,WAAW8G,WAAW;AAE3C4L,aAAaC,cAAc"}
1
+ {"version":3,"file":"LayoutPanel.js","names":["getFocusableTreeWalker","isVirtualClick","CONTAINER_STYLES","ContainerStyleProps","mergeStyles","Styles","tasty","ForwardedRef","forwardRef","HTMLAttributes","MouseEvent","PointerEvent","ReactNode","RefCallback","useCallback","useEffect","useEffectEvent","useId","useLayoutEffect","useMemo","useRef","useState","useMove","createPortal","useCombinedRefs","useLocalStorage","useI18n","filterComponentBaseProps","pickBaseCustomizationProps","focusProgrammatically","extractStyles","Dialog","CubeDialogContainerProps","DialogContainer","DisplayTransition","LayoutContextReset","LayoutPanelContext","Side","useLayoutActionsContext","useLayoutRefsContext","useLayoutStateContext","LayoutPanelTransition","LayoutResizeHandle","clampSize","getOppositeSide","resolveCssSize","ComponentBaseProps","HANDLER_WIDTH","HANDLER_OFFSET","COLLAPSE_DISTANCE","CLICK_TOLERANCE","DOUBLE_CLICK_DELAY","PanelElement","as","qa","styles","container","position","display","hide","hidden","flow","overflow","boxSizing","top","right","bottom","left","width","height","border","fill","isolation","transform","transition","PANEL_HANDLE_STYLES","horizontal","OverlayBackdrop","inset","backdropFilter","cursor","opacity","visible","pointerEvents","LayoutPanelMode","CubeLayoutPanelProps","side","mode","size","defaultSize","minSize","maxSize","isResizable","isCollapsible","onSizeChange","isOpen","defaultIsOpen","onOpenChange","hasTransition","hideOnClose","isDismissable","overlayStyles","isDialog","isDialogOpen","defaultIsDialogOpen","onDialogOpenChange","dialogProps","Omit","dialogStyles","contentPadding","sizeStorageKey","children","parseDefaultSize","parseInt","matchesContainerSize","HTMLElement","isHorizontal","dimension","offsetWidth","offsetHeight","LayoutPanel","props","ref","HTMLDivElement","layoutActions","layoutState","layoutRefs","Error","modeProp","providedSize","providedIsOpen","hasTransitionProp","providedIsDialogOpen","mods","otherProps","isDialogMode","isOverlayMode","isStickyMode","combinedRef","prevProvidedSizeRef","t","generatedId","panelId","id","resizeLabel","containerWidth","containerHeight","minContentSize","containerDimension","oppositeSide","oppositePanelSize","panelSizes","naturalMax","Math","max","Infinity","internalIsOpen","setInternalIsOpen","isTransitionActive","isPanelContainerReady","visualState","setVisualState","isShown","isPanelShown","internalIsDialogOpen","setInternalIsDialogOpen","dialogOpen","storedSize","setStoredSize","isDragging","setIsDragging","setSize","initialSize","pressRef","startSize","offset","across","isSecondClick","phase","isCollapsePending","setIsCollapsePending","reopenSizeRef","from","extractedStyles","finalStyles","resolvedMax","trim","endsWith","undefined","resolvedMin","effectiveMax","values","push","Number","isFinite","length","min","clampValue","value","closeRequestedRef","handleOpenChange","newIsOpen","current","queueMicrotask","setContextDragging","setDragging","moveProps","onMoveStart","onMove","e","pointerType","step","shiftKey","rawDelta","deltaX","deltaY","direction","delta","currentSize","press","hypot","pointerSize","onMoveEnd","finalSize","round","panelContainerRef","parentElement","applyInlineBounds","prev","clamped","frame","requestAnimationFrame","cancelAnimationFrame","effectivePanelSize","effectiveInsetSize","registerPanel","unregisterPanel","updatePanelSize","isReady","lastSizeRef","handleDismiss","registerOverlayPanel","unregister","openerRef","Element","panelNodeRef","mountFocusRef","recordOpener","active","ownerDocument","activeElement","contains","moveFocusIn","panel","opener","lastReturnedFocus","target","tabbable","nextNode","preventScroll","returnFocus","isConnected","body","openAtReopenSize","reopen","handleDialogOpenChange","panelContextValue","dialogPanelContextValue","panelMods","drag","maxSizeCss","parts","join","panelTokens","panelRefCallback","node","transitionRef","handleJump","limit","nextSize","handleResetSize","clampedSize","collapseOnClick","timer","setTimeout","clearTimeout","onHandlePointerDown","button","onHandleClick","nativeEvent","handleHint","renderPanelContent","offscreen","isHidden","showOverlay","eventProps","tokens","portalContainer","isExiting","OpenerProbe","t0","$","_c","focusRef","t1","t2","document","_LayoutPanel","displayName","_c"],"sources":["../../../src/components/Layout/LayoutPanel.tsx"],"sourcesContent":["import { getFocusableTreeWalker } from '@react-aria/focus';\nimport { isVirtualClick } from '@react-aria/utils';\nimport {\n CONTAINER_STYLES,\n ContainerStyleProps,\n mergeStyles,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n MouseEvent,\n PointerEvent,\n ReactNode,\n RefCallback,\n useCallback,\n useEffect,\n useEffectEvent,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useMove } from 'react-aria';\nimport { createPortal } from 'react-dom';\n\nimport { useCombinedRefs } from '../../hooks/use-combined-refs';\nimport { useLocalStorage } from '../../hooks/use-local-storage';\nimport { useI18n } from '../../i18n/use-i18n';\nimport { filterComponentBaseProps } from '../../utils/component-base-props';\nimport { pickBaseCustomizationProps } from '../../utils/pick-base-customization-props';\nimport { focusProgrammatically } from '../../utils/programmatic-focus';\nimport { extractStyles } from '../../utils/styles';\nimport { Dialog } from '../Dialog/Dialog';\nimport {\n CubeDialogContainerProps,\n DialogContainer,\n} from '../Dialog/DialogContainer';\nimport { DisplayTransition } from '../DisplayTransition/DisplayTransition';\n\nimport {\n LayoutContextReset,\n LayoutPanelContext,\n Side,\n useLayoutActionsContext,\n useLayoutRefsContext,\n useLayoutStateContext,\n} from './LayoutContext';\nimport { LayoutPanelTransition } from './LayoutPanelTransition';\nimport { LayoutResizeHandle } from './LayoutResizeHandle';\nimport { clampSize, getOppositeSide, resolveCssSize } from './utils';\n\nimport type { ComponentBaseProps } from '../../utils/component-base-props';\n\n// Resize handler dimensions\nconst HANDLER_WIDTH = 9;\n// Where the panel's edge is inside the handle, from the panel's side: the\n// handle overlaps the panel's border and the content beside it\nconst HANDLER_OFFSET = 4;\n// A collapsible panel closes when a drag brings the pointer this close to the\n// Layout's edge on the panel's side.\nconst COLLAPSE_DISTANCE = 24;\n// A press that moves the pointer no further than this, in any direction, is\n// a click, not a resize.\nconst CLICK_TOLERANCE = 3;\n// How long a click on a collapsible panel's handle waits for a second one,\n// which resets the size instead of collapsing the panel.\nconst DOUBLE_CLICK_DELAY = 300;\n\nconst PanelElement = tasty({\n as: 'div',\n qa: 'LayoutPanel',\n styles: {\n container: 'panel / inline-size',\n position: 'absolute',\n display: 'flex',\n // A closed `hideOnClose` panel keeps its content mounted out of the layout.\n hide: {\n '': false,\n hidden: true,\n },\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 // The stacking context the transform used to create: z-indexed content\n // stays inside the panel, below its resize handle and an overlay backdrop.\n isolation: 'isolate',\n\n // Transition styles - offscreen mod controls slide animation.\n // `none` at rest, not a zero translate: any transform makes the panel the\n // containing block of its fixed descendants (drag previews, popups), which\n // then position against the panel and are clipped by its overflow. `none`\n // still animates to and from the offscreen translate.\n transform: {\n '': 'none',\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// The handle's box. It is a sibling of the panel (in a Fragment), positioned\n// relative to the Layout; LayoutResizeHandle draws the edge inside it.\nconst PANEL_HANDLE_STYLES: Styles = {\n // Device pixels: the handle's thickness, so its offsets stay whole pixels.\n '$handle-size': `${HANDLER_WIDTH}px`,\n // The edge line lies on the panel's own border. In use it widens to both\n // sides of it: half a pixel into the panel, half over the content beside it.\n '$handle-edge-inset': `(${HANDLER_OFFSET}px - 1bw)`,\n\n // Handler size\n width: {\n '': '100%',\n horizontal: '$handle-size',\n },\n height: {\n '': '$handle-size',\n horizontal: '100%',\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 // Transition must match panel for synchronized animation\n transition: {\n '': 'theme',\n 'has-transition': 'transform $transition ease-out, theme',\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 // oxlint-disable-next-line tasty/no-raw-transition-duration -- a one-off 150ms backdrop fade: $scrollbar-transition has the value but times scrollbar fades, and $overlay-transition would slow it to 250ms\n transition: 'opacity .15s ease-out',\n },\n});\n\n/** Panel rendering mode */\nexport type LayoutPanelMode = 'default' | 'sticky' | 'overlay' | 'dialog';\n\nexport interface CubeLayoutPanelProps\n extends ComponentBaseProps, 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; focus moves into it\n * when it opens and back to the opener when it closes\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 /**\n * Let the user collapse a resizable panel from its resize handle: with a\n * click on it, or with a drag that holds the panel at its minimum size and\n * collapses it once the pointer comes within 24px of the Layout's edge.\n * The panel closes through `onOpenChange(false)`. A click keeps its size;\n * a drag reports the size it was dragged to through `onSizeChange`, and\n * the panel opens again at its `defaultSize`, or without one at that size.\n * A second click within 300ms resets the size instead of collapsing, and a\n * mouse resting on the handle shows a hint with these gestures. Needs\n * `isResizable`, and a controlled panel (`isOpen` with `onOpenChange`)\n * with a control that opens it again: nothing opens an uncontrolled panel\n * once it closes. Default: false\n */\n isCollapsible?: 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 * Hide the closed panel instead of unmounting its content, so the content\n * keeps its state (an unsent draft, scroll position, a request in flight)\n * until the panel reopens. A hidden panel takes no space and no focus.\n * The content mounts once, even while the panel starts closed, so mount\n * effects and a native `autoFocus` do not run again on reopen. Content that\n * mounts while closed is hidden: `autoFocus` does nothing and measurements\n * read zero until the panel opens. In dialog mode the dialog is kept the\n * same way, and moves focus itself as a dialog that mounts on open does: to\n * an autofocused kit control on every open, and on close back to its\n * opener, or to the trigger of the menu or popover it sat in once that has\n * closed\n * (DialogContainer's docs list what still differs);\n * `dialogProps.hideOnClose` takes precedence. Default: false\n */\n hideOnClose?: boolean;\n /**\n * Whether the panel can be dismissed by clicking the overlay (overlay mode), pressing Escape,\n * or, in overlay mode, moving focus into the main content.\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 DialogContainer when in dialog mode */\n dialogProps?: Omit<\n CubeDialogContainerProps,\n 'isDismissable' | 'onDismiss' | 'isOpen'\n >;\n /** Styles for the Dialog root in dialog mode, separate from inline panel styles. */\n dialogStyles?: Styles;\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\n/** `defaultSize` in pixels, as the double-click reset and a reopen read it. */\nfunction parseDefaultSize(defaultSize: number | string) {\n return (\n (typeof defaultSize === 'number'\n ? defaultSize\n : parseInt(defaultSize, 10)) || 280\n );\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 isCollapsible = false,\n onSizeChange,\n isOpen: providedIsOpen,\n defaultIsOpen = true,\n onOpenChange,\n hasTransition: hasTransitionProp,\n hideOnClose = false,\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 dialogStyles,\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 const { t } = useI18n();\n // The resize handle controls the panel, so a resizable panel needs an id.\n const generatedId = useId();\n const panelId = otherProps.id ?? generatedId;\n // One key per side: a translated sentence can't take the side as a word.\n const resizeLabel = {\n left: t('layout.resizeLeftPanel', 'Resize left panel'),\n top: t('layout.resizeTopPanel', 'Resize top panel'),\n right: t('layout.resizeRightPanel', 'Resize right panel'),\n bottom: t('layout.resizeBottomPanel', 'Resize bottom panel'),\n }[side];\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 naturalMax = useMemo(\n () =>\n !isDialogMode && containerDimension > 0\n ? Math.max(0, containerDimension - oppositePanelSize - minContentSize)\n : Infinity,\n [isDialogMode, containerDimension, oppositePanelSize, minContentSize],\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 // The pointer press on the resize handle, from its pointerdown until its\n // click, which arrives after its drag has ended, or until a drag ends with\n // no click to come: the size it started from, where the pointer is from\n // there along the resize axis (unclamped) and across it, and what the press\n // is: still a click (`press`), a drag, or a drag that collapsed the panel.\n const pressRef = useRef<{\n startSize: number;\n offset: number;\n across: number;\n isSecondClick: boolean;\n phase: 'press' | 'drag' | 'collapsed';\n } | null>(null);\n // A click on a collapsible panel's handle, waiting to see whether a second\n // one follows.\n const [isCollapsePending, setIsCollapsePending] = useState(false);\n // The size a panel a drag collapsed opens again at, its `defaultSize`, and\n // the size the drag left it at. Applied as it opens, never while it is\n // still shown, so its width does not change as it closes.\n const reopenSizeRef = useRef<{ size: number; from: number } | null>(null);\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 // oxlint-disable-next-line tasty/no-runtime-styles-mutation -- forwards the consumer's `contentPadding` prop\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 // The minimum in pixels, for the resize handle's value and Home key. CSS\n // applies a string minimum; JS clamping applies only a number.\n const resolvedMin =\n containerDimension > 0 || typeof minSize === 'number'\n ? resolveCssSize(minSize, containerDimension)\n : undefined;\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 // One close per task: a consumer that moves focus into the main content in\n // `onOpenChange(false)` would otherwise dismiss the still-registered panel\n // a second time.\n const closeRequestedRef = useRef(false);\n\n const handleOpenChange = useCallback(\n (newIsOpen: boolean) => {\n if (!newIsOpen) {\n if (closeRequestedRef.current) return;\n\n closeRequestedRef.current = true;\n queueMicrotask(() => {\n closeRequestedRef.current = false;\n });\n }\n\n setInternalIsOpen(newIsOpen);\n onOpenChange?.(newIsOpen);\n },\n [onOpenChange],\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 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 const delta = rawDelta * step * direction;\n\n setSize((currentSize) => clampValue(currentSize + delta));\n return;\n }\n\n // Pointer resize: use exact delta values\n const delta = isHorizontal\n ? e.deltaX * (side === 'right' ? -1 : 1)\n : e.deltaY * (side === 'bottom' ? -1 : 1);\n const press = pressRef.current;\n\n // No press seen: `useMove` handles mouse and touch events instead of\n // pointer events where there are none, as in jsdom under test, and a\n // test may send no `pointerdown` at all. Such a drag moves by steps.\n if (!press) {\n setSize((currentSize) => clampValue(currentSize + delta));\n return;\n }\n\n if (press.phase === 'collapsed') return;\n\n press.offset += delta;\n press.across += isHorizontal ? e.deltaY : e.deltaX;\n\n // A press that moves, either way (sliding along the edge too), is a\n // drag.\n if (\n press.phase === 'press' &&\n Math.hypot(press.offset, press.across) > CLICK_TOLERANCE\n ) {\n press.phase = 'drag';\n }\n\n // The size the pointer asks for. The edge follows it within the limits,\n // so it stays under the pointer when the pointer comes back from past\n // one.\n const pointerSize = press.startSize + press.offset;\n\n // Only a drag toward the edge collapses: a panel resting near the edge\n // still opens by a drag away from it.\n if (\n isCollapsible &&\n press.phase === 'drag' &&\n press.offset < 0 &&\n pointerSize <= COLLAPSE_DISTANCE\n ) {\n // A drag to the minimum, then a close, however fast the pointer got\n // here: the release reports that size. The rest of the press moves\n // nothing.\n press.phase = 'collapsed';\n setSize(clampValue(pointerSize));\n setIsDragging(false);\n setContextDragging(false);\n handleOpenChange(false);\n return;\n }\n\n setSize(clampValue(pointerSize));\n },\n onMoveEnd(e) {\n setIsDragging(false);\n setContextDragging(false);\n if (isDialogMode && !isDragging) return;\n\n const press = e.pointerType === 'keyboard' ? null : pressRef.current;\n\n // A press that barely moved is a click on a collapsible panel's handle,\n // and leaves the size as it was. Its record waits for the click.\n if (isCollapsible && press?.phase === 'press') {\n setSize(press.startSize);\n return;\n }\n\n // A drag is no click: its press is over. It ends where the pointer is,\n // or, for one that collapsed the panel, where it was as it collapsed.\n // Reported here, not from a state updater, which React may run twice\n // when the release lands before the last move has rendered.\n if (press) {\n pressRef.current = null;\n\n const finalSize = Math.round(\n clampValue(press.startSize + press.offset),\n );\n\n // A panel a drag collapsed opens again at its `defaultSize`, when it\n // has one, or else at the size it was dragged to. Stored at once, as\n // storage is read only as the panel mounts, so a panel mounted again\n // while closed opens at it too.\n reopenSizeRef.current =\n press.phase === 'collapsed' && props.defaultSize != null\n ? {\n size: Math.round(clampValue(parseDefaultSize(defaultSize))),\n from: finalSize,\n }\n : null;\n\n setSize(finalSize);\n onSizeChange?.(finalSize);\n setStoredSize(reopenSizeRef.current?.size ?? finalSize);\n return;\n }\n\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 // The content sits against the panel's border, resizable or not; the resize\n // handle overlaps both and paints over the content.\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(effectivePanelSize);\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 // 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 // Overlay focus: move into the panel on open, back to the opener on close.\n // Declared after the registration effect on purpose: its cleanup then runs\n // after the panel unregisters, so a restore into the main content dismisses\n // nothing.\n const openerRef = useRef<Element | null>(null);\n const panelNodeRef = useRef<HTMLDivElement | null>(null);\n // Focus as the panel shows (its contents may mount now), before a native\n // `autoFocus` inside them moves it (see OpenerProbe).\n const mountFocusRef = useRef<Element | null>(null);\n\n // A panel open on the Layout's first render leaves page focus alone.\n const recordOpener = useEffectEvent(() => {\n const active =\n mountFocusRef.current ??\n panelNodeRef.current?.ownerDocument.activeElement ??\n null;\n\n mountFocusRef.current = null;\n\n openerRef.current =\n isOverlayMode && isReady && !panelNodeRef.current?.contains(active)\n ? active\n : null;\n });\n\n const moveFocusIn = useEffectEvent(() => {\n const panel = panelNodeRef.current;\n const opener = openerRef.current;\n\n const active = panel?.ownerDocument.activeElement;\n\n // Focus already moved elsewhere as the panel opened, such as to a field\n // with `autoFocus` inside it: leave it there. Focus another overlay panel just\n // returned, as it closed in the same commit, does not count.\n if (\n !panel ||\n !opener ||\n (active !== opener && active !== lastReturnedFocus)\n ) {\n return;\n }\n\n const target =\n getFocusableTreeWalker(panel, { tabbable: true }).nextNode() ??\n getFocusableTreeWalker(panel).nextNode();\n\n // The panel enters translated offscreen, so focus must not scroll.\n focusProgrammatically(target as HTMLElement | null, {\n preventScroll: true,\n });\n });\n\n // Return focus only if it is still in the panel or was lost with it; focus\n // the user or the consumer moved elsewhere stays there.\n const returnFocus = useEffectEvent(() => {\n const opener = openerRef.current;\n const panel = panelNodeRef.current;\n\n openerRef.current = null;\n\n if (\n !isOverlayMode ||\n !(opener instanceof HTMLElement) ||\n !opener.isConnected ||\n opener === opener.ownerDocument.body\n ) {\n return;\n }\n\n const active = opener.ownerDocument.activeElement;\n\n if (\n active != null &&\n active !== opener.ownerDocument.body &&\n !panel?.contains(active)\n ) {\n return;\n }\n\n focusProgrammatically(opener, { preventScroll: true });\n lastReturnedFocus = opener;\n queueMicrotask(() => {\n lastReturnedFocus = null;\n });\n });\n\n // Opening a panel a drag collapsed: at the size it opens again at, from\n // the first frame it is drawn in.\n const openAtReopenSize = useEffectEvent(() => {\n const reopen = reopenSizeRef.current;\n\n reopenSizeRef.current = null;\n\n // Not once something else, such as the keyboard, has resized it since.\n if (reopen == null || Math.round(size) !== reopen.from) return;\n\n setSize(reopen.size);\n onSizeChange?.(reopen.size);\n setStoredSize(reopen.size);\n });\n\n useLayoutEffect(() => {\n if (!isOpen) return;\n\n recordOpener();\n openAtReopenSize();\n }, [isOpen]);\n\n // Passive, so a menu item that refocuses itself while closing its menu has\n // done so before focus moves in.\n useEffect(() => {\n if (!isOpen) return;\n\n moveFocusIn();\n\n return () => returnFocus();\n }, [isOpen]);\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 }),\n [side, isDragging, isHorizontal, hasTransition, isReady],\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 panelTokens = 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 // Home and End: the smallest size, or the largest the Layout leaves room for.\n const handleJump = (limit: 'min' | 'max') => {\n const target = limit === 'min' ? resolvedMin : effectiveMax;\n\n if (target == null) return;\n\n const nextSize = Math.round(clampValue(target));\n\n setSize(nextSize);\n onSizeChange?.(nextSize);\n setStoredSize(nextSize);\n };\n\n // Reset to default size on double-click\n const handleResetSize = useCallback(() => {\n const clampedSize = clampValue(parseDefaultSize(defaultSize));\n setSize(clampedSize);\n onSizeChange?.(clampedSize);\n setStoredSize(clampedSize);\n }, [defaultSize, clampValue, onSizeChange, setStoredSize]);\n\n // A click collapses the panel once no second click can make it a double\n // one, which resets the size instead.\n const collapseOnClick = useEffectEvent(() => {\n setIsCollapsePending(false);\n\n if (isOpen) handleOpenChange(false);\n });\n\n useEffect(() => {\n if (!isCollapsePending) return;\n\n const timer = setTimeout(() => collapseOnClick(), DOUBLE_CLICK_DELAY);\n\n return () => clearTimeout(timer);\n }, [isCollapsePending]);\n\n const onHandlePointerDown = (e: PointerEvent<HTMLElement>) => {\n // A finger pressed while another drags is no press of its own: `useMove`\n // follows the pointer that pressed first.\n if (e.button !== 0 || isDragging) return;\n\n pressRef.current = {\n // Where the handle is drawn: `$panel-size`, within the limits JS knows.\n startSize: clampValue(size),\n offset: 0,\n across: 0,\n isSecondClick: isCollapsePending,\n phase: 'press',\n };\n // A panel its consumer kept open after a drag collapse: a new press\n // starts from what is drawn, and so does its next opening.\n reopenSizeRef.current = null;\n\n if (!isCollapsible) return;\n\n setIsCollapsePending(false);\n };\n\n // On a collapsible panel's handle a click collapses the panel, and a second\n // one within the delay resets its size: a double-click, or a double tap,\n // which not every touch browser reports as one.\n const onHandleClick = (e: MouseEvent<HTMLElement>) => {\n const press = pressRef.current;\n\n pressRef.current = null;\n\n // Pointer gestures only: not a click no press made, such as a screen\n // reader's default action or `click()`.\n if (\n isVirtualClick(e.nativeEvent) ||\n !isCollapsible ||\n press?.phase !== 'press'\n ) {\n return;\n }\n\n if (press.isSecondClick) {\n handleResetSize();\n } else {\n setIsCollapsePending(true);\n }\n };\n\n const handleHint = isCollapsible\n ? [\n t('layout.handleHintDrag', 'Drag to resize'),\n t('layout.handleHintClick', 'Click to collapse'),\n t('layout.handleHintDoubleClick', 'Double-click to reset size'),\n ].join('\\n')\n : undefined;\n\n // `isHidden` keeps the element tree of an open panel, so content never remounts.\n // Without a transition, a rendered closed panel is a hidden one.\n const renderPanelContent = (\n offscreen = false,\n transitionRef?: RefCallback<HTMLElement>,\n isHidden = !isOpen,\n ) => {\n const showOverlay = isOverlayMode && !offscreen;\n\n return (\n <>\n {/* Mounted only while shown, so an open from hidden reads live focus. */}\n {isOverlayMode && !isHidden && <OpenerProbe focusRef={mountFocusRef} />}\n {/* Overlay backdrop for overlay mode */}\n {isOverlayMode && !isHidden && (\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 // Kept after detach: StrictMode detaches refs before it replays\n // the effects that still need the panel.\n if (node) panelNodeRef.current = node;\n panelRefCallback(node, transitionRef);\n }}\n {...filterComponentBaseProps(otherProps, { eventProps: true })}\n id={isResizable ? panelId : otherProps.id}\n mods={{ ...panelMods, ...mods, offscreen, hidden: isHidden }}\n styles={finalStyles}\n tokens={{ ...panelTokens, ...otherProps.tokens }}\n data-side={side}\n >\n <LayoutPanelContext.Provider value={panelContextValue}>\n <LayoutContextReset>{children}</LayoutContextReset>\n </LayoutPanelContext.Provider>\n </PanelElement>\n {isResizable && !isHidden && (\n <LayoutResizeHandle\n qa=\"PanelResizeHandler\"\n side={side}\n anchor={side}\n label={resizeLabel}\n controls={panelId}\n size={size}\n isDragging={isDragging}\n minSize={resolvedMin}\n maxSize={effectiveMax}\n isCollapsible={isCollapsible}\n styles={PANEL_HANDLE_STYLES}\n mods={{\n offscreen,\n 'has-transition': hasTransition && isReady,\n }}\n tokens={panelTokens}\n moveProps={moveProps}\n onPointerDown={onHandlePointerDown}\n hint={handleHint}\n onJump={handleJump}\n onClick={onHandleClick}\n // A collapsible panel counts its own double click: see\n // `onHandleClick`.\n onDoubleClick={isCollapsible ? undefined : 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 hideOnClose={hideOnClose}\n onDismiss={() => handleDialogOpenChange(false)}\n {...dialogProps}\n >\n <Dialog\n {...pickBaseCustomizationProps(otherProps)}\n qa={otherProps.qa}\n // The panel's name names its dialog, as it names the inline panel.\n aria-label={otherProps['aria-label']}\n aria-labelledby={otherProps['aria-labelledby']}\n mods={mods}\n isDismissable={false}\n styles={dialogStyles}\n >\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 exposeUnmounted={hideOnClose}\n onToggle={(isShown) => setVisualState({ isShown, isTransitionActive })}\n >\n {({ phase, isShown, isExiting, ref: transitionRef }) => {\n const isHidden = phase === 'unmounted';\n\n return (\n <LayoutPanelTransition\n isShown={isShown}\n isExiting={isExiting}\n isHidden={isHidden}\n >\n {renderPanelContent(!isShown, transitionRef, isHidden)}\n </LayoutPanelTransition>\n );\n }}\n </DisplayTransition>,\n portalContainer,\n );\n }\n\n // Simple panel (no transition) - portal to panel container\n if (!isOpen && !hideOnClose) return null;\n\n return createPortal(renderPanelContent(false), portalContainer);\n}\n\n// Focus another overlay panel returned in the current task.\nlet lastReturnedFocus: Element | null = null;\n\n// Rendered before the panel's contents, so its layout effect reads focus\n// before React applies a native `autoFocus` inside them.\nfunction OpenerProbe({ focusRef }: { focusRef: { current: Element | null } }) {\n useLayoutEffect(() => {\n focusRef.current = document.activeElement;\n }, [focusRef]);\n\n return null;\n}\n\nconst _LayoutPanel = forwardRef(LayoutPanel);\n\n_LayoutPanel.displayName = 'Layout.Panel';\n\nexport { _LayoutPanel as LayoutPanel };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0DA,MAAM+C,gBAAgB;AAGtB,MAAMC,iBAAiB;AAGvB,MAAMC,oBAAoB;AAG1B,MAAMC,kBAAkB;AAGxB,MAAMC,qBAAqB;AAE3B,MAAMC,eAAe9C,MAAM;CACzB+C,IAAI;CACJC,IAAI;CACJC,QAAQ;EACNC,WAAW;EACXC,UAAU;EACVC,SAAS;EAETC,MAAM;GACJ,IAAI;GACJC,QAAQ;EACV;EACAC,MAAM;EACNC,UAAU;EACVC,WAAW;EAEX,oBAAoB;EAEpB,uBAAuB;EAGvBC,KAAK;GACH,IAAI;GACJ,eAAe;EACjB;EACAC,OAAO;GACL,IAAI;GACJ,aAAa;EACf;EACAC,QAAQ;GACN,IAAI;GACJ,YAAY;EACd;EACAC,MAAM;GACJ,IAAI;GACJ,cAAc;EAChB;EAGAC,OAAO;GACL,IAAI;GACJ,0BAA0B;EAC5B;EACAC,QAAQ;GACN,IAAI;GACJ,0BAA0B;EAC5B;EAGAC,QAAQ;GACN,IAAI;GACJ,aAAa;GACb,cAAc;GACd,YAAY;GACZ,eAAe;EACjB;EACAC,MAAM;EAGNC,WAAW;EAOXC,WAAW;GACT,IAA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AeiB,UAAQ;GAChC,CAAA;EAE3B;CACiB,CAAA,GACnBI,eACF;CAIF,IAAI,CAAC1M,UAAU,CAACI,aAAa,OAAO;CAEpC,OAAO5E,aAAa4Q,mBAAmB,KAAK,GAAGM,eAAe;AAChE;AAGA,IAAI1C,oBAAoC;AAIxC,SAAA4C,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAqB,MAAA,EAAAC,aAAAH;CAAuD,IAAAI;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAE,UAAA;EAC1DC,WAAA;GACdD,SAAQrG,UAAWwG,SAAQxD;EAAX;EACfuD,KAAA,CAACF,QAAQ;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAD,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAFb3R,gBAAgB8R,IAEbC,EAAU;CAAC,OAEP;AAAI;AAGb,MAAME,eAAe3S,WAAWgH,WAAW;AAE3C2L,aAAaC,cAAc"}
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | Cube Dev Team */
2
2
  import { extractStyles } from "../../utils/styles.js";
3
3
  import { ItemAction } from "../ItemAction/ItemAction.js";
4
4
  import { useI18n } from "../../i18n/use-i18n.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef6b29c | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-9a11fa8 | 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";