@cube-dev/ui-kit 0.0.0-canary-6467610 → 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.
- package/dist/components/Action/Action.js +1 -1
- package/dist/components/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/use-alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Block/Block.js +1 -1
- package/dist/components/Button/AutoCollapseObserver.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/ButtonSplit/ButtonSplitContext.js +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Calendar/CalendarCell.js +1 -1
- package/dist/components/Calendar/CalendarGrid.js +1 -1
- package/dist/components/Calendar/CalendarHeader.js +1 -1
- package/dist/components/Calendar/CalendarPanel.js +1 -1
- package/dist/components/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/Calendar/PeriodGrid.js +1 -1
- package/dist/components/Calendar/RangeCalendar.js +1 -1
- package/dist/components/Calendar/styled.js +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/Checkbox/CheckboxGroupContext.js +1 -1
- package/dist/components/CollectionItem/CollectionItem.js +1 -1
- package/dist/components/ColorInput/ColorInput.js +1 -1
- package/dist/components/ColorPanel/ColorPanel.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/ComboBox/ComboBox.js +1 -1
- package/dist/components/ComboBox/combo-box-options.js +1 -1
- package/dist/components/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/CommandMenu/styled.js +1 -1
- package/dist/components/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/CommandTextArea/caret-position.js +1 -1
- package/dist/components/CommandTextArea/use-caret-anchor.js +1 -1
- package/dist/components/Content/Content.js +1 -1
- package/dist/components/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DatePicker/CalendarPopover.js +1 -1
- package/dist/components/DatePicker/DateInput.js +1 -1
- package/dist/components/DatePicker/DateInputBase.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/DatePicker/MonthPicker.js +1 -1
- package/dist/components/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/DatePicker/TimeInput.js +1 -1
- package/dist/components/DatePicker/WeekPicker.js +1 -1
- package/dist/components/DatePicker/YearPicker.js +1 -1
- package/dist/components/DatePicker/parse-date.js +1 -1
- package/dist/components/DatePicker/period.js +1 -1
- package/dist/components/DatePicker/props.js +1 -1
- package/dist/components/DatePicker/utils.js +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/DialogContainer.js +1 -1
- package/dist/components/Dialog/DialogContext.js +1 -1
- package/dist/components/Dialog/DialogForm.js +1 -1
- package/dist/components/Dialog/DialogTrigger.js +1 -1
- package/dist/components/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/Dialog/default-button-text.js +1 -1
- package/dist/components/Dialog/use-content-overflow.js +1 -1
- package/dist/components/Dialog/use-dialog-container.js +1 -1
- package/dist/components/Dialog/use-dialog-open-sync.js +1 -1
- package/dist/components/Dialog/use-dismiss-confirmation.js +1 -1
- package/dist/components/Dialog/use-retained-dialog-focus.js +1 -1
- package/dist/components/Disclosure/Disclosure.js +1 -1
- package/dist/components/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/DraggableCollection/DraggableCollection.js +1 -1
- package/dist/components/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/FieldWrapper/field-description.js +1 -1
- package/dist/components/FileInput/FileInput.js +1 -1
- package/dist/components/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/FilterListBox/styled.js +1 -1
- package/dist/components/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/FilterPicker/FilterTree.js +1 -1
- package/dist/components/Flex/Flex.js +1 -1
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Form/Field.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormContext.js +1 -1
- package/dist/components/Form/FormElement.js +1 -1
- package/dist/components/Form/ModernFormRoot.js +1 -1
- package/dist/components/Form/ResetButton.js +1 -1
- package/dist/components/Form/SubmitButton.js +1 -1
- package/dist/components/Form/SubmitError.js +1 -1
- package/dist/components/Form/backend.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Form/modern/ModernActions.js +1 -1
- package/dist/components/Form/modern/ModernControllerContext.js +1 -1
- package/dist/components/Form/modern/after-press.js +1 -1
- package/dist/components/Form/modern/controller.js +1 -1
- package/dist/components/Form/modern/field-binding.js +1 -1
- package/dist/components/Form/modern/field.js +1 -1
- package/dist/components/Form/modern/react.js +1 -1
- package/dist/components/Form/modern/store.js +1 -1
- package/dist/components/Form/modern/validation.js +1 -1
- package/dist/components/Form/modern/values.js +1 -1
- package/dist/components/Form/reset-unbound-controls.js +1 -1
- package/dist/components/Form/use-field/use-field-binding.js +1 -1
- package/dist/components/Form/use-field/use-field-props.js +1 -1
- package/dist/components/Form/use-field/use-field.js +1 -1
- package/dist/components/Form/use-form.js +1 -1
- package/dist/components/Form/validation.js +1 -1
- package/dist/components/GlobalStyles/GlobalStyles.js +1 -1
- package/dist/components/Grid/Grid.js +1 -1
- package/dist/components/GridProvider/GridProvider.js +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/HiddenInput/HiddenInput.js +1 -1
- package/dist/components/HotKeys/HotKeys.js +1 -1
- package/dist/components/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/InlineInput/InlineInput.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Item/Item.js +1 -1
- package/dist/components/Item/ItemWithNativeLinks.js +1 -1
- package/dist/components/ItemAction/ItemAction.js +1 -1
- package/dist/components/ItemAction/ItemCloseAction.js +1 -1
- package/dist/components/ItemActionsWrapper/ItemActionsWrapper.js +1 -1
- package/dist/components/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/ItemButton/ItemButton.js +1 -1
- package/dist/components/ItemCard/ItemCard.js +1 -1
- package/dist/components/ItemTable/ItemTable.js +1 -1
- package/dist/components/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/ItemTable/item-table-sections.js +1 -1
- package/dist/components/ItemTable/use-item-table-column-widths.js +1 -1
- package/dist/components/ItemTable/use-item-table-drag-drop.js +1 -1
- package/dist/components/ItemTable/use-item-table-pagination.js +1 -1
- package/dist/components/ItemTable/use-item-table-selection.js +1 -1
- package/dist/components/ItemTable/use-item-table-sort.js +1 -1
- package/dist/components/ItemTable/use-item-table-tree-model.js +1 -1
- package/dist/components/Label/Label.js +1 -1
- package/dist/components/Layout/GridLayout.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/Layout/LayoutBlock.js +1 -1
- package/dist/components/Layout/LayoutCenter.js +1 -1
- package/dist/components/Layout/LayoutContainer.js +1 -1
- package/dist/components/Layout/LayoutContent.js +1 -1
- package/dist/components/Layout/LayoutContext.js +1 -1
- package/dist/components/Layout/LayoutFlex.js +1 -1
- package/dist/components/Layout/LayoutFooter.js +1 -1
- package/dist/components/Layout/LayoutGrid.js +1 -1
- package/dist/components/Layout/LayoutHeader.js +1 -1
- package/dist/components/Layout/LayoutPane.js +2 -2
- package/dist/components/Layout/LayoutPanel.d.ts +14 -0
- package/dist/components/Layout/LayoutPanel.js +123 -27
- package/dist/components/Layout/LayoutPanel.js.map +1 -1
- package/dist/components/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/Layout/LayoutPanelTransition.js +1 -1
- package/dist/components/Layout/LayoutResizeHandle.js +258 -152
- package/dist/components/Layout/LayoutResizeHandle.js.map +1 -1
- package/dist/components/Layout/LayoutToolbar.js +1 -1
- package/dist/components/Layout/index.js +1 -1
- package/dist/components/Layout/use-tiny-scrollbar.js +1 -1
- package/dist/components/Layout/utils.js +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/ListBox/DraggableListBox.js +1 -1
- package/dist/components/ListBox/ListBox.js +1 -1
- package/dist/components/ListBox/empty-row.js +1 -1
- package/dist/components/ListBox/option-id.js +1 -1
- package/dist/components/ListBox/use-disabled-focus-reset.js +1 -1
- package/dist/components/ListBoxPopover/EmptyLabelStatus.js +1 -1
- package/dist/components/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/ListBoxPopover/list-navigation.js +1 -1
- package/dist/components/ListBoxPopover/use-composite-focus.js +1 -1
- package/dist/components/ListBoxPopover/use-delayed-loading.js +1 -1
- package/dist/components/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuCollectionItem.js +1 -1
- package/dist/components/Menu/MenuContext.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuSection.js +1 -1
- package/dist/components/Menu/MenuTrigger.js +1 -1
- package/dist/components/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/Menu/styled.js +1 -1
- package/dist/components/Menu/touch-context-menu.js +1 -1
- package/dist/components/Menu/use-anchored-menu.js +1 -1
- package/dist/components/Menu/use-context-menu.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalContainmentProvider.js +1 -1
- package/dist/components/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/Modal/Overlay.js +1 -1
- package/dist/components/Modal/Popover.js +1 -1
- package/dist/components/Modal/Tray.js +1 -1
- package/dist/components/Modal/Underlay.js +1 -1
- package/dist/components/NavTabs/NavTabs.js +1 -1
- package/dist/components/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/Notifications/Notification.js +1 -1
- package/dist/components/Notifications/NotificationAction.js +1 -1
- package/dist/components/Notifications/NotificationCard.js +1 -1
- package/dist/components/Notifications/NotificationContext.js +1 -1
- package/dist/components/Notifications/NotificationItem.js +1 -1
- package/dist/components/Notifications/OverlayContainer.js +1 -1
- package/dist/components/Notifications/OverlayProvider.js +1 -1
- package/dist/components/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/Notifications/dismissed-storage.js +1 -1
- package/dist/components/Notifications/format-relative-time.js +1 -1
- package/dist/components/Notifications/index.js +1 -1
- package/dist/components/Notifications/use-live-region.js +1 -1
- package/dist/components/Notifications/use-notification-state.js +1 -1
- package/dist/components/Notifications/use-notifications.js +1 -1
- package/dist/components/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/Notifications/use-persistent-state.js +1 -1
- package/dist/components/Notifications/use-toast-state.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/NumberInput/StepButton.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/use-pagination.js +1 -1
- package/dist/components/Panel/Panel.js +1 -1
- package/dist/components/Paragraph/Paragraph.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/Picker/Picker.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +1 -1
- package/dist/components/Portal/Portal.js +1 -1
- package/dist/components/Portal/PortalProvider.js +1 -1
- package/dist/components/Portal/use-portal.js +1 -1
- package/dist/components/Prefix/Prefix.js +1 -1
- package/dist/components/PrismCode/PrismCode.js +1 -1
- package/dist/components/PrismCode/prism-setup.js +1 -1
- package/dist/components/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/RadioGroup/Radio.js +1 -1
- package/dist/components/RadioGroup/RadioContext.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/joined-styles.js +1 -1
- package/dist/components/RenderCache/RenderCache.js +1 -1
- package/dist/components/ResizablePanel/ResizablePanel.js +1 -1
- package/dist/components/Result/Result.js +1 -1
- package/dist/components/Root/Root.js +1 -1
- package/dist/components/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Slider/Gradation.js +1 -1
- package/dist/components/Slider/HueSlider.js +1 -1
- package/dist/components/Slider/RangeSlider.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/SliderBase.js +1 -1
- package/dist/components/Slider/SliderThumb.js +1 -1
- package/dist/components/Slider/SliderTrack.js +1 -1
- package/dist/components/Slider/elements.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Space/Space.js +1 -1
- package/dist/components/Spin/Cube.js +1 -1
- package/dist/components/Spin/InternalSpinner.js +1 -1
- package/dist/components/Spin/Spin.js +1 -1
- package/dist/components/Spin/SpinsContainer.js +1 -1
- package/dist/components/StatsCard/StatsCard.js +1 -1
- package/dist/components/Suffix/Suffix.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/TableBase/ColumnResizer.js +1 -1
- package/dist/components/TableBase/RowCollection.js +1 -1
- package/dist/components/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/TableBase/TableRow.js +1 -1
- package/dist/components/TableBase/TableRowLink.js +1 -1
- package/dist/components/TableBase/TableView.js +1 -1
- package/dist/components/TableBase/TreeGridTable.js +1 -1
- package/dist/components/TableBase/column-header.js +1 -1
- package/dist/components/TableBase/column-menu.js +1 -1
- package/dist/components/TableBase/column-styles.js +1 -1
- package/dist/components/TableBase/column-tint.js +1 -1
- package/dist/components/TableBase/row-menu.js +1 -1
- package/dist/components/TableBase/styled.js +1 -1
- package/dist/components/TableBase/table-body-sections.js +1 -1
- package/dist/components/TableBase/table-tree.js +1 -1
- package/dist/components/TableBase/types.js +1 -1
- package/dist/components/TableBase/use-cell-selection.js +0 -0
- package/dist/components/TableBase/use-column-menu.js +1 -1
- package/dist/components/TableBase/use-column-order.js +1 -1
- package/dist/components/TableBase/use-column-window.js +1 -1
- package/dist/components/TableBase/use-container-width.js +1 -1
- package/dist/components/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/TableBase/use-scrollability.js +1 -1
- package/dist/components/TableBase/use-table-columns.js +1 -1
- package/dist/components/TableBase/use-table-search.js +1 -1
- package/dist/components/TableBase/use-table-selection.js +1 -1
- package/dist/components/TableBase/use-table-sort.js +1 -1
- package/dist/components/TableBase/use-table-sorts.js +1 -1
- package/dist/components/TableBase/use-table-storage.js +1 -1
- package/dist/components/TableBase/use-table-tooltip-refresh.js +1 -1
- package/dist/components/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/Tabs/BoardDragActiveProvider.js +1 -1
- package/dist/components/Tabs/DraggableTabList.js +1 -1
- package/dist/components/Tabs/TabButton.js +1 -1
- package/dist/components/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/Tabs/TabPanel.js +1 -1
- package/dist/components/Tabs/TabPicker.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/TabsAction.js +1 -1
- package/dist/components/Tabs/TabsContext.js +1 -1
- package/dist/components/Tabs/popover-placement.js +1 -1
- package/dist/components/Tabs/scroll-tab-into-strip.js +1 -1
- package/dist/components/Tabs/segmented-styles.js +1 -1
- package/dist/components/Tabs/styled.js +1 -1
- package/dist/components/Tabs/types.js +1 -1
- package/dist/components/Tabs/use-tab-editing.js +1 -1
- package/dist/components/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagInput/TagInput.js +1 -1
- package/dist/components/TagInput/TagList.js +1 -1
- package/dist/components/TagInput/use-active-option.js +1 -1
- package/dist/components/TagInput/use-suffix-space.js +1 -1
- package/dist/components/TagInput/use-tag-error.js +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/components/TextInput/TextInputBase.js +1 -1
- package/dist/components/TextInput/displayed-validation.js +1 -1
- package/dist/components/TextInput/identifier-text-services.js +1 -1
- package/dist/components/TextInput/password-manager-ignore.js +1 -1
- package/dist/components/TextInput/use-auto-size-text-area.js +1 -1
- package/dist/components/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/TextItem/TextItem.js +1 -1
- package/dist/components/Title/Title.js +1 -1
- package/dist/components/Toast/AnnouncedToastItem.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/ToastItem.js +1 -1
- package/dist/components/Toast/use-progress-toast.js +1 -1
- package/dist/components/Toast/use-toast.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupContext.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/TooltipContext.js +1 -1
- package/dist/components/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/Tooltip/last-press.js +1 -1
- package/dist/components/Tooltip/split-trigger-props.js +1 -1
- package/dist/components/Tree/Tree.js +1 -1
- package/dist/components/Tree/TreeNode.js +1 -1
- package/dist/components/Tree/checked-keys.js +1 -1
- package/dist/components/Tree/row-id.js +1 -1
- package/dist/components/Tree/styled.js +1 -1
- package/dist/components/Tree/tree-index.js +1 -1
- package/dist/components/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/Tree/use-load-data.js +1 -1
- package/dist/components/TriggerActions/TriggerActions.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/ValidationIndicator/InvalidIcon.js +1 -1
- package/dist/components/ValidationIndicator/ValidIcon.js +1 -1
- package/dist/components/ValidationIndicator/ValidationIndicator.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/harness/colors-deps.js +1 -1
- package/dist/hooks/use-action.js +1 -1
- package/dist/hooks/use-auto-tooltip.js +1 -1
- package/dist/hooks/use-buffered-value.js +1 -1
- package/dist/hooks/use-combined-refs.js +1 -1
- package/dist/hooks/use-controlled-focus-visible.js +1 -1
- package/dist/hooks/use-debounced-value.js +1 -1
- package/dist/hooks/use-deprecation-warning.js +1 -1
- package/dist/hooks/use-event.js +1 -1
- package/dist/hooks/use-id.js +1 -1
- package/dist/hooks/use-is-darwin.js +1 -1
- package/dist/hooks/use-is-first-render.js +1 -1
- package/dist/hooks/use-key-symbols.js +1 -1
- package/dist/hooks/use-layout-effect.d.ts +1 -1
- package/dist/hooks/use-layout-effect.js +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/hooks/use-merge-styles.js +1 -1
- package/dist/hooks/use-open-key.js +1 -1
- package/dist/hooks/use-overlay-escape-guard.js +1 -1
- package/dist/hooks/use-overlay-position.js +1 -1
- package/dist/hooks/use-popover-sync.js +1 -1
- package/dist/hooks/use-qa-props.js +1 -1
- package/dist/hooks/use-scheme.js +1 -1
- package/dist/hooks/use-sync-ref.js +1 -1
- package/dist/hooks/use-timer/Timer.js +1 -1
- package/dist/hooks/use-timer/use-timer.js +1 -1
- package/dist/hooks/use-validation-props.js +1 -1
- package/dist/hooks/use-viewport-size.js +1 -1
- package/dist/hooks/use-warn.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/add-uikit-locale.js +1 -1
- package/dist/i18n/create-formatter.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +5 -2
- package/dist/i18n/locales/en-US/uikit.js +5 -2
- package/dist/i18n/locales/en-US/uikit.json.d.ts +3 -0
- package/dist/i18n/locales/es-ES/uikit.js +5 -2
- package/dist/i18n/locales/es-MX/uikit.js +5 -2
- package/dist/i18n/locales/fr-FR/uikit.js +5 -2
- package/dist/i18n/locales/it-IT/uikit.js +5 -2
- package/dist/i18n/locales/ja-JP/uikit.js +5 -2
- package/dist/i18n/locales/nb-NO/uikit.js +5 -2
- package/dist/i18n/locales/pt-BR/uikit.js +5 -2
- package/dist/i18n/locales/pt-PT/uikit.js +5 -2
- package/dist/i18n/locales/sv-SE/uikit.js +5 -2
- package/dist/i18n/locales/vi-VN/uikit.js +5 -2
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/namespace.js +1 -1
- package/dist/i18n/use-formatter.js +1 -1
- package/dist/i18n/use-i18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.js +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/providers/ColorPopoverContext.js +1 -1
- package/dist/providers/EventBusProvider.js +1 -1
- package/dist/providers/ItemActionContext.js +1 -1
- package/dist/providers/Provider.js +1 -1
- package/dist/providers/SlotProvider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigation-adapter.default.js +1 -1
- package/dist/providers/navigation-url.js +1 -1
- package/dist/providers/use-navigation.js +1 -1
- package/dist/themes/item-themes.js +1 -1
- package/dist/themes/themes.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/actions-run.js +1 -1
- package/dist/utils/chain.js +1 -1
- package/dist/utils/color/channels.js +1 -1
- package/dist/utils/color/color.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/component-base-props.js +1 -1
- package/dist/utils/disabled-behavior.js +1 -1
- package/dist/utils/disabled-props.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/field-chrome.js +1 -1
- package/dist/utils/field-layout.js +1 -1
- package/dist/utils/forward-ref-with-generics.js +1 -1
- package/dist/utils/highlight-text.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/interactions.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/is-text-only.js +1 -1
- package/dist/utils/layout-scale.js +1 -1
- package/dist/utils/legacy-tooltip.js +1 -1
- package/dist/utils/map-props.js +1 -1
- package/dist/utils/merge-props.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/nullable-value.js +1 -1
- package/dist/utils/option-origin-press.js +1 -1
- package/dist/utils/overlay-key-propagation.js +1 -1
- package/dist/utils/pick-base-customization-props.js +1 -1
- package/dist/utils/popover-width.js +1 -1
- package/dist/utils/programmatic-focus.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/resolve-icon.js +1 -1
- package/dist/utils/resolve-validation-props.js +1 -1
- package/dist/utils/search-text-services.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/shared-store.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/virtual-width.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/utils/wrap-node-if-plain.js +1 -1
- package/dist/utils/wrap-with-field.js +1 -1
- package/dist/version.js +2 -2
- package/docs/components/Layout.md +41 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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";
|
|
@@ -6,8 +6,8 @@ import { useDebouncedValue } from "../../hooks/use-debounced-value.js";
|
|
|
6
6
|
import { filterComponentBaseProps } from "../../utils/component-base-props.js";
|
|
7
7
|
import { LayoutContextReset } from "./LayoutContext.js";
|
|
8
8
|
import { useTinyScrollbar } from "./use-tiny-scrollbar.js";
|
|
9
|
-
import { LayoutResizeHandle } from "./LayoutResizeHandle.js";
|
|
10
9
|
import { clampSize } from "./utils.js";
|
|
10
|
+
import { LayoutResizeHandle } from "./LayoutResizeHandle.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
12
12
|
import { INNER_STYLES, OUTER_STYLES, mergeStyles, tasty } from "@tenphi/tasty";
|
|
13
13
|
import { forwardRef, useEffect, useEffectEvent, useId, useRef, useState } from "react";
|
|
@@ -29,6 +29,20 @@ export interface CubeLayoutPanelProps extends ComponentBaseProps, ContainerStyle
|
|
|
29
29
|
maxSize?: number | string;
|
|
30
30
|
/** Enable resize functionality */
|
|
31
31
|
isResizable?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Let the user collapse a resizable panel from its resize handle: with a
|
|
34
|
+
* click on it, or with a drag that holds the panel at its minimum size and
|
|
35
|
+
* collapses it once the pointer comes within 24px of the Layout's edge.
|
|
36
|
+
* The panel closes through `onOpenChange(false)`. A click keeps its size;
|
|
37
|
+
* a drag reports the size it was dragged to through `onSizeChange`, and
|
|
38
|
+
* the panel opens again at its `defaultSize`, or without one at that size.
|
|
39
|
+
* A second click within 300ms resets the size instead of collapsing, and a
|
|
40
|
+
* mouse resting on the handle shows a hint with these gestures. Needs
|
|
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
|
+
*/
|
|
45
|
+
isCollapsible?: boolean;
|
|
32
46
|
/** Size change callback */
|
|
33
47
|
onSizeChange?: (size: number) => void;
|
|
34
48
|
/** Controlled open state */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
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";
|
|
@@ -9,8 +9,8 @@ import { Dialog } from "../Dialog/Dialog.js";
|
|
|
9
9
|
import { DialogContainer } from "../Dialog/DialogContainer.js";
|
|
10
10
|
import { filterComponentBaseProps } from "../../utils/component-base-props.js";
|
|
11
11
|
import { LayoutContextReset, LayoutPanelContext, useLayoutActionsContext, useLayoutRefsContext, useLayoutStateContext } from "./LayoutContext.js";
|
|
12
|
-
import { LayoutResizeHandle } from "./LayoutResizeHandle.js";
|
|
13
12
|
import { clampSize, getOppositeSide, resolveCssSize } from "./utils.js";
|
|
13
|
+
import { LayoutResizeHandle } from "./LayoutResizeHandle.js";
|
|
14
14
|
import { useLocalStorage } from "../../hooks/use-local-storage.js";
|
|
15
15
|
import { LayoutPanelTransition } from "./LayoutPanelTransition.js";
|
|
16
16
|
import { c } from "react/compiler-runtime";
|
|
@@ -20,9 +20,13 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
import { useMove } from "react-aria";
|
|
21
21
|
import { createPortal } from "react-dom";
|
|
22
22
|
import { getFocusableTreeWalker } from "@react-aria/focus";
|
|
23
|
+
import { isVirtualClick } from "@react-aria/utils";
|
|
23
24
|
//#region src/components/Layout/LayoutPanel.tsx
|
|
24
25
|
const HANDLER_WIDTH = 9;
|
|
25
26
|
const HANDLER_OFFSET = 4;
|
|
27
|
+
const COLLAPSE_DISTANCE = 24;
|
|
28
|
+
const CLICK_TOLERANCE = 3;
|
|
29
|
+
const DOUBLE_CLICK_DELAY = 300;
|
|
26
30
|
const PanelElement = tasty({
|
|
27
31
|
as: "div",
|
|
28
32
|
qa: "LayoutPanel",
|
|
@@ -146,6 +150,10 @@ const OverlayBackdrop = tasty({
|
|
|
146
150
|
transition: "opacity .15s ease-out"
|
|
147
151
|
}
|
|
148
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
|
+
}
|
|
149
157
|
function matchesContainerSize(container, isHorizontal, dimension) {
|
|
150
158
|
return (isHorizontal ? container?.offsetWidth : container?.offsetHeight) === dimension;
|
|
151
159
|
}
|
|
@@ -154,7 +162,7 @@ function LayoutPanel(props, ref) {
|
|
|
154
162
|
const layoutState = useLayoutStateContext();
|
|
155
163
|
const layoutRefs = useLayoutRefsContext();
|
|
156
164
|
if (!layoutActions || !layoutState || !layoutRefs) throw new Error("Layout.Panel must be used within a Layout component. Ensure your panel is rendered inside a <Layout> parent.");
|
|
157
|
-
const { side = "left", mode: modeProp, size: providedSize, defaultSize = 280, minSize = 200, maxSize, isResizable = false, onSizeChange, isOpen: providedIsOpen, defaultIsOpen = true, onOpenChange, hasTransition: hasTransitionProp, hideOnClose = false, isDismissable = true, overlayStyles, isDialog = false, isDialogOpen: providedIsDialogOpen, defaultIsDialogOpen = false, onDialogOpenChange, dialogProps, dialogStyles, contentPadding, sizeStorageKey, children, styles, mods, ...otherProps } = props;
|
|
165
|
+
const { side = "left", mode: modeProp, size: providedSize, defaultSize = 280, minSize = 200, maxSize, isResizable = false, isCollapsible = false, onSizeChange, isOpen: providedIsOpen, defaultIsOpen = true, onOpenChange, hasTransition: hasTransitionProp, hideOnClose = false, isDismissable = true, overlayStyles, isDialog = false, isDialogOpen: providedIsDialogOpen, defaultIsDialogOpen = false, onDialogOpenChange, dialogProps, dialogStyles, contentPadding, sizeStorageKey, children, styles, mods, ...otherProps } = props;
|
|
158
166
|
const mode = modeProp ?? (isDialog ? "dialog" : "default");
|
|
159
167
|
const isDialogMode = mode === "dialog";
|
|
160
168
|
const isOverlayMode = mode === "overlay";
|
|
@@ -201,6 +209,9 @@ function LayoutPanel(props, ref) {
|
|
|
201
209
|
const [size, setSize] = useState(() => {
|
|
202
210
|
return clampSize(typeof providedSize === "number" ? providedSize : storedSize != null ? storedSize : typeof defaultSize === "number" ? defaultSize : 280, minSize, maxSize);
|
|
203
211
|
});
|
|
212
|
+
const pressRef = useRef(null);
|
|
213
|
+
const [isCollapsePending, setIsCollapsePending] = useState(false);
|
|
214
|
+
const reopenSizeRef = useRef(null);
|
|
204
215
|
const extractedStyles = extractStyles(otherProps, CONTAINER_STYLES);
|
|
205
216
|
const finalStyles = useMemo(() => mergeStyles(styles, contentPadding != null ? { "$content-padding": contentPadding } : null, extractedStyles), [
|
|
206
217
|
extractedStyles,
|
|
@@ -223,6 +234,18 @@ function LayoutPanel(props, ref) {
|
|
|
223
234
|
return values.length > 0 ? Math.min(...values) : void 0;
|
|
224
235
|
}, [resolvedMax, naturalMax]);
|
|
225
236
|
const clampValue = useCallback((value) => clampSize(value, minSize, void 0, effectiveMax), [minSize, effectiveMax]);
|
|
237
|
+
const closeRequestedRef = useRef(false);
|
|
238
|
+
const handleOpenChange = useCallback((newIsOpen) => {
|
|
239
|
+
if (!newIsOpen) {
|
|
240
|
+
if (closeRequestedRef.current) return;
|
|
241
|
+
closeRequestedRef.current = true;
|
|
242
|
+
queueMicrotask(() => {
|
|
243
|
+
closeRequestedRef.current = false;
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
setInternalIsOpen(newIsOpen);
|
|
247
|
+
onOpenChange?.(newIsOpen);
|
|
248
|
+
}, [onOpenChange]);
|
|
226
249
|
const setContextDragging = layoutActions.setDragging;
|
|
227
250
|
const { moveProps } = useMove({
|
|
228
251
|
onMoveStart() {
|
|
@@ -232,24 +255,61 @@ function LayoutPanel(props, ref) {
|
|
|
232
255
|
},
|
|
233
256
|
onMove(e) {
|
|
234
257
|
if (!isResizable || isDialogMode) return;
|
|
235
|
-
let delta;
|
|
236
258
|
if (e.pointerType === "keyboard") {
|
|
237
259
|
const step = e.shiftKey ? 50 : 10;
|
|
238
260
|
const rawDelta = isHorizontal ? e.deltaX : e.deltaY;
|
|
239
261
|
const direction = side === "right" || side === "bottom" ? -1 : 1;
|
|
240
|
-
delta = rawDelta * step * direction;
|
|
241
|
-
|
|
242
|
-
|
|
262
|
+
const delta = rawDelta * step * direction;
|
|
263
|
+
setSize((currentSize) => clampValue(currentSize + delta));
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const delta_0 = isHorizontal ? e.deltaX * (side === "right" ? -1 : 1) : e.deltaY * (side === "bottom" ? -1 : 1);
|
|
267
|
+
const press = pressRef.current;
|
|
268
|
+
if (!press) {
|
|
269
|
+
setSize((currentSize_0) => clampValue(currentSize_0 + delta_0));
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (press.phase === "collapsed") return;
|
|
273
|
+
press.offset += delta_0;
|
|
274
|
+
press.across += isHorizontal ? e.deltaY : e.deltaX;
|
|
275
|
+
if (press.phase === "press" && Math.hypot(press.offset, press.across) > CLICK_TOLERANCE) press.phase = "drag";
|
|
276
|
+
const pointerSize = press.startSize + press.offset;
|
|
277
|
+
if (isCollapsible && press.phase === "drag" && press.offset < 0 && pointerSize <= COLLAPSE_DISTANCE) {
|
|
278
|
+
press.phase = "collapsed";
|
|
279
|
+
setSize(clampValue(pointerSize));
|
|
280
|
+
setIsDragging(false);
|
|
281
|
+
setContextDragging(false);
|
|
282
|
+
handleOpenChange(false);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
setSize(clampValue(pointerSize));
|
|
243
286
|
},
|
|
244
|
-
onMoveEnd() {
|
|
287
|
+
onMoveEnd(e_0) {
|
|
245
288
|
setIsDragging(false);
|
|
246
289
|
setContextDragging(false);
|
|
247
290
|
if (isDialogMode && !isDragging) return;
|
|
248
|
-
|
|
249
|
-
|
|
291
|
+
const press_0 = e_0.pointerType === "keyboard" ? null : pressRef.current;
|
|
292
|
+
if (isCollapsible && press_0?.phase === "press") {
|
|
293
|
+
setSize(press_0.startSize);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
if (press_0) {
|
|
297
|
+
pressRef.current = null;
|
|
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;
|
|
303
|
+
setSize(finalSize);
|
|
250
304
|
onSizeChange?.(finalSize);
|
|
251
|
-
setStoredSize(finalSize);
|
|
252
|
-
return
|
|
305
|
+
setStoredSize(reopenSizeRef.current?.size ?? finalSize);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
setSize((currentSize_1) => {
|
|
309
|
+
const finalSize_0 = Math.round(clampValue(currentSize_1));
|
|
310
|
+
onSizeChange?.(finalSize_0);
|
|
311
|
+
setStoredSize(finalSize_0);
|
|
312
|
+
return finalSize_0;
|
|
253
313
|
});
|
|
254
314
|
}
|
|
255
315
|
});
|
|
@@ -316,18 +376,6 @@ function LayoutPanel(props, ref) {
|
|
|
316
376
|
effectiveInsetSize,
|
|
317
377
|
updatePanelSize
|
|
318
378
|
]);
|
|
319
|
-
const closeRequestedRef = useRef(false);
|
|
320
|
-
const handleOpenChange = useCallback((newIsOpen) => {
|
|
321
|
-
if (!newIsOpen) {
|
|
322
|
-
if (closeRequestedRef.current) return;
|
|
323
|
-
closeRequestedRef.current = true;
|
|
324
|
-
queueMicrotask(() => {
|
|
325
|
-
closeRequestedRef.current = false;
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
setInternalIsOpen(newIsOpen);
|
|
329
|
-
onOpenChange?.(newIsOpen);
|
|
330
|
-
}, [onOpenChange]);
|
|
331
379
|
const handleDismiss = useCallback(() => {
|
|
332
380
|
if (isDismissable) handleOpenChange(false);
|
|
333
381
|
}, [isDismissable, handleOpenChange]);
|
|
@@ -370,8 +418,18 @@ function LayoutPanel(props, ref) {
|
|
|
370
418
|
lastReturnedFocus = null;
|
|
371
419
|
});
|
|
372
420
|
});
|
|
421
|
+
const openAtReopenSize = useEffectEvent(() => {
|
|
422
|
+
const reopen = reopenSizeRef.current;
|
|
423
|
+
reopenSizeRef.current = null;
|
|
424
|
+
if (reopen == null || Math.round(size) !== reopen.from) return;
|
|
425
|
+
setSize(reopen.size);
|
|
426
|
+
onSizeChange?.(reopen.size);
|
|
427
|
+
setStoredSize(reopen.size);
|
|
428
|
+
});
|
|
373
429
|
useLayoutEffect(() => {
|
|
374
|
-
if (isOpen)
|
|
430
|
+
if (!isOpen) return;
|
|
431
|
+
recordOpener();
|
|
432
|
+
openAtReopenSize();
|
|
375
433
|
}, [isOpen]);
|
|
376
434
|
useEffect(() => {
|
|
377
435
|
if (!isOpen) return;
|
|
@@ -435,7 +493,7 @@ function LayoutPanel(props, ref) {
|
|
|
435
493
|
setStoredSize(nextSize);
|
|
436
494
|
};
|
|
437
495
|
const handleResetSize = useCallback(() => {
|
|
438
|
-
const clampedSize = clampValue((
|
|
496
|
+
const clampedSize = clampValue(parseDefaultSize(defaultSize));
|
|
439
497
|
setSize(clampedSize);
|
|
440
498
|
onSizeChange?.(clampedSize);
|
|
441
499
|
setStoredSize(clampedSize);
|
|
@@ -445,6 +503,40 @@ function LayoutPanel(props, ref) {
|
|
|
445
503
|
onSizeChange,
|
|
446
504
|
setStoredSize
|
|
447
505
|
]);
|
|
506
|
+
const collapseOnClick = useEffectEvent(() => {
|
|
507
|
+
setIsCollapsePending(false);
|
|
508
|
+
if (isOpen) handleOpenChange(false);
|
|
509
|
+
});
|
|
510
|
+
useEffect(() => {
|
|
511
|
+
if (!isCollapsePending) return;
|
|
512
|
+
const timer = setTimeout(() => collapseOnClick(), DOUBLE_CLICK_DELAY);
|
|
513
|
+
return () => clearTimeout(timer);
|
|
514
|
+
}, [isCollapsePending]);
|
|
515
|
+
const onHandlePointerDown = (e_1) => {
|
|
516
|
+
if (e_1.button !== 0 || isDragging) return;
|
|
517
|
+
pressRef.current = {
|
|
518
|
+
startSize: clampValue(size),
|
|
519
|
+
offset: 0,
|
|
520
|
+
across: 0,
|
|
521
|
+
isSecondClick: isCollapsePending,
|
|
522
|
+
phase: "press"
|
|
523
|
+
};
|
|
524
|
+
reopenSizeRef.current = null;
|
|
525
|
+
if (!isCollapsible) return;
|
|
526
|
+
setIsCollapsePending(false);
|
|
527
|
+
};
|
|
528
|
+
const onHandleClick = (e_2) => {
|
|
529
|
+
const press_1 = pressRef.current;
|
|
530
|
+
pressRef.current = null;
|
|
531
|
+
if (isVirtualClick(e_2.nativeEvent) || !isCollapsible || press_1?.phase !== "press") return;
|
|
532
|
+
if (press_1.isSecondClick) handleResetSize();
|
|
533
|
+
else setIsCollapsePending(true);
|
|
534
|
+
};
|
|
535
|
+
const handleHint = isCollapsible ? [
|
|
536
|
+
t("layout.handleHintDrag", "Drag to resize"),
|
|
537
|
+
t("layout.handleHintClick", "Click to collapse"),
|
|
538
|
+
t("layout.handleHintDoubleClick", "Double-click to reset size")
|
|
539
|
+
].join("\n") : void 0;
|
|
448
540
|
const renderPanelContent = (offscreen = false, transitionRef_0, isHidden = !isOpen) => {
|
|
449
541
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
450
542
|
isOverlayMode && !isHidden && /* @__PURE__ */ jsx(OpenerProbe, { focusRef: mountFocusRef }),
|
|
@@ -488,6 +580,7 @@ function LayoutPanel(props, ref) {
|
|
|
488
580
|
isDragging,
|
|
489
581
|
minSize: resolvedMin,
|
|
490
582
|
maxSize: effectiveMax,
|
|
583
|
+
isCollapsible,
|
|
491
584
|
styles: PANEL_HANDLE_STYLES,
|
|
492
585
|
mods: {
|
|
493
586
|
offscreen,
|
|
@@ -495,8 +588,11 @@ function LayoutPanel(props, ref) {
|
|
|
495
588
|
},
|
|
496
589
|
tokens: panelTokens,
|
|
497
590
|
moveProps,
|
|
591
|
+
onPointerDown: onHandlePointerDown,
|
|
592
|
+
hint: handleHint,
|
|
498
593
|
onJump: handleJump,
|
|
499
|
-
|
|
594
|
+
onClick: onHandleClick,
|
|
595
|
+
onDoubleClick: isCollapsible ? void 0 : handleResetSize
|
|
500
596
|
})
|
|
501
597
|
] });
|
|
502
598
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutPanel.js","names":["getFocusableTreeWalker","CONTAINER_STYLES","ContainerStyleProps","mergeStyles","Styles","tasty","ForwardedRef","forwardRef","HTMLAttributes","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","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","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","extractedStyles","finalStyles","resolvedMax","trim","endsWith","undefined","resolvedMin","effectiveMax","values","push","Number","isFinite","length","min","clampValue","value","setContextDragging","setDragging","moveProps","onMoveStart","onMove","e","delta","pointerType","step","shiftKey","rawDelta","deltaX","deltaY","direction","currentSize","onMoveEnd","finalSize","round","current","panelContainerRef","parentElement","applyInlineBounds","prev","clamped","frame","requestAnimationFrame","cancelAnimationFrame","effectivePanelSize","effectiveInsetSize","registerPanel","unregisterPanel","updatePanelSize","isReady","lastSizeRef","closeRequestedRef","handleOpenChange","newIsOpen","queueMicrotask","handleDismiss","registerOverlayPanel","unregister","openerRef","Element","panelNodeRef","mountFocusRef","recordOpener","active","ownerDocument","activeElement","contains","moveFocusIn","panel","opener","lastReturnedFocus","target","tabbable","nextNode","preventScroll","returnFocus","isConnected","body","handleDialogOpenChange","panelContextValue","dialogPanelContextValue","panelMods","drag","maxSizeCss","parts","join","panelTokens","panelRefCallback","node","transitionRef","handleJump","limit","nextSize","handleResetSize","resetSize","parseInt","clampedSize","renderPanelContent","offscreen","isHidden","showOverlay","eventProps","tokens","portalContainer","phase","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 {\n CONTAINER_STYLES,\n ContainerStyleProps,\n mergeStyles,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n ReactNode,\n RefCallback,\n useCallback,\n useEffect,\n useEffectEvent,\n 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\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 /** 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 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 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 const setContextDragging = layoutActions.setDragging;\n\n const { moveProps } = useMove({\n onMoveStart() {\n if (!isResizable || isDialogMode) return;\n setIsDragging(true);\n setContextDragging(true);\n },\n onMove(e) {\n if (!isResizable || isDialogMode) return;\n\n let delta: number;\n\n if (e.pointerType === 'keyboard') {\n // Keyboard resize: 10px per step, 50px with Shift\n const step = e.shiftKey ? 50 : 10;\n // For keyboard, deltaX/deltaY are direction indicators (-1, 0, 1)\n const rawDelta = isHorizontal ? e.deltaX : e.deltaY;\n const direction = side === 'right' || side === 'bottom' ? -1 : 1;\n delta = rawDelta * step * direction;\n } else {\n // Pointer resize: use exact delta values\n delta = isHorizontal\n ? e.deltaX * (side === 'right' ? -1 : 1)\n : e.deltaY * (side === 'bottom' ? -1 : 1);\n }\n\n setSize((currentSize) => clampValue(currentSize + delta));\n },\n onMoveEnd() {\n setIsDragging(false);\n setContextDragging(false);\n if (isDialogMode && !isDragging) return;\n // Round to integer on release and notify parent\n setSize((currentSize) => {\n const finalSize = Math.round(clampValue(currentSize));\n // Call onSizeChange synchronously to ensure parent state is updated\n onSizeChange?.(finalSize);\n // Persist to localStorage if key is provided\n setStoredSize(finalSize);\n return finalSize;\n });\n },\n });\n\n // Sync provided size with internal state (only when providedSize actually changes)\n // This prevents resetting size when only isDragging changes (which would cause a flash)\n useEffect(() => {\n if (prevProvidedSizeRef.current !== providedSize) {\n if (\n !isDialogMode &&\n !matchesContainerSize(\n layoutRefs.panelContainerRef.current?.parentElement,\n isHorizontal,\n containerDimension,\n )\n ) {\n return;\n }\n\n prevProvidedSizeRef.current = providedSize;\n if (typeof providedSize === 'number' && !isDragging) {\n setSize(clampValue(providedSize));\n }\n }\n }, [\n providedSize,\n isDragging,\n clampValue,\n isDialogMode,\n isHorizontal,\n containerDimension,\n layoutRefs.panelContainerRef,\n ]);\n\n // Dialogs retain inline size; only inline panels follow the host's bounds.\n const applyInlineBounds = useEffectEvent(() => {\n if (\n !matchesContainerSize(\n layoutRefs.panelContainerRef.current?.parentElement,\n isHorizontal,\n containerDimension,\n )\n ) {\n return;\n }\n\n setSize((prev) => {\n const clamped = clampValue(prev);\n\n if (clamped !== prev) {\n onSizeChange?.(Math.round(clamped));\n setStoredSize(Math.round(clamped));\n }\n\n return clamped;\n });\n });\n\n useEffect(() => {\n if (!isDialogMode && !isDragging && containerDimension > 0) {\n // In an iframe ResizeObserver can precede responsive mode delivery.\n // Let that mode settle before shrinking and persisting the inline size.\n const frame = requestAnimationFrame(() => applyInlineBounds());\n return () => cancelAnimationFrame(frame);\n }\n }, [\n isDialogMode,\n isDragging,\n clampValue,\n containerDimension,\n isHorizontal,\n layoutRefs.panelContainerRef,\n ]);\n\n // Register panel with layout context\n // 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 // 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 // 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 useLayoutEffect(() => {\n if (isOpen) recordOpener();\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 // `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 styles={PANEL_HANDLE_STYLES}\n mods={{\n offscreen,\n 'has-transition': hasTransition && isReady,\n }}\n tokens={panelTokens}\n moveProps={moveProps}\n onJump={handleJump}\n onDoubleClick={handleResetSize}\n />\n )}\n </>\n );\n };\n\n // Dialog mode - uses its own portal via DialogContainer\n if (isDialogMode) {\n return (\n <DialogContainer\n isOpen={dialogOpen}\n isDismissable={isDismissable}\n 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":";;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAM4C,gBAAgB;AAGtB,MAAMC,iBAAiB;AAEvB,MAAMC,eAAezC,MAAM;CACzB0C,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,Q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,MAAAC,IAAAC,EAAA,CAAA;CAAqB,MAAA,EAAAC,aAAAH;CAAuD,IAAAI;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAE,UAAA;EAC1DC,WAAA;GACdD,SAAQ3E,UAAW8E,SAAQhD;EAAX;EACf+C,KAAA,CAACF,QAAQ;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAD,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAFbhQ,gBAAgBmQ,IAEbC,EAAU;CAAC,OAEP;AAAI;AAGb,MAAME,eAAe9Q,WAAWwG,WAAW;AAE3CsK,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,IAAI;GACJ,yBAAyB;GACzB,0BAA0B;GAC1B,wBAAwB;GACxB,2BAA2B;EAC7B;EACAC,YAAY;GACV,IAAI;GACJ,kBAAkB;EACpB;CACF;AACF,CAAC;AAID,MAAMC,sBAA8B;CAElC,gBAAgB,GAAG5B,cAAa;CAGhC,sBAAsB,IAAIC,eAAc;CAGxCoB,OAAO;EACL,IAAI;EACJQ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,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-
|
|
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";
|