@cube-dev/ui-kit 0.121.0 → 0.121.2
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/CHANGELOG.md +12 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/intl.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.d.ts +8 -2
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Select/Select.js.map +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/EditableTitle.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/FileTabs/FileTabs.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/CloudLogo/CloudLogo.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransition.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.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/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/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/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/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/layout.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/utils/ResizeSensor.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.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/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/BaseProperties.md +78 -0
- package/docs/ComplexLayout.md +459 -0
- package/docs/CreateComponent.md +410 -0
- package/docs/FieldProperties.md +117 -0
- package/docs/Introduction.md +122 -0
- package/docs/RenderCache.md +177 -0
- package/docs/Result.md +42 -0
- package/docs/SimpleLayout.md +26 -0
- package/docs/Typography.md +38 -0
- package/docs/components/Block.md +33 -0
- package/docs/components/CollectionItem.md +293 -0
- package/docs/components/GridProvider.md +38 -0
- package/docs/components/Root.md +50 -0
- package/docs/components/actions/Action.md +47 -0
- package/docs/components/actions/Banner.md +195 -0
- package/docs/components/actions/Button.md +209 -0
- package/docs/components/actions/ButtonGroup.md +46 -0
- package/docs/components/actions/ButtonSplit.md +199 -0
- package/docs/components/actions/CommandMenu.md +422 -0
- package/docs/components/actions/ItemAction.md +60 -0
- package/docs/components/actions/ItemButton.md +316 -0
- package/docs/components/actions/Link.md +325 -0
- package/docs/components/actions/Menu.md +485 -0
- package/docs/components/actions/MenuTrigger.md +47 -0
- package/docs/components/actions/SubMenuTrigger.md +38 -0
- package/docs/components/actions/use-anchored-menu.md +209 -0
- package/docs/components/actions/use-context-menu.md +218 -0
- package/docs/components/content/ActiveZone.md +37 -0
- package/docs/components/content/Alert.md +40 -0
- package/docs/components/content/Avatar.md +37 -0
- package/docs/components/content/Badge.md +194 -0
- package/docs/components/content/Card.md +40 -0
- package/docs/components/content/Content.md +44 -0
- package/docs/components/content/CopyPasteBlock.md +36 -0
- package/docs/components/content/CopySnippet.md +43 -0
- package/docs/components/content/Disclosure.md +181 -0
- package/docs/components/content/Divider.md +39 -0
- package/docs/components/content/Footer.md +35 -0
- package/docs/components/content/Header.md +35 -0
- package/docs/components/content/HotKeys.md +352 -0
- package/docs/components/content/Item.md +499 -0
- package/docs/components/content/ItemBadge.md +31 -0
- package/docs/components/content/ItemCard.md +131 -0
- package/docs/components/content/Layout.md +843 -0
- package/docs/components/content/Paragraph.md +32 -0
- package/docs/components/content/Placeholder.md +37 -0
- package/docs/components/content/PrismCode.md +36 -0
- package/docs/components/content/PrismDiffCode.md +29 -0
- package/docs/components/content/Result.md +46 -0
- package/docs/components/content/Skeleton.md +35 -0
- package/docs/components/content/Tag.md +165 -0
- package/docs/components/content/Text.md +54 -0
- package/docs/components/content/TextItem.md +217 -0
- package/docs/components/content/Title.md +45 -0
- package/docs/components/fields/Checkbox.md +176 -0
- package/docs/components/fields/ComboBox.md +651 -0
- package/docs/components/fields/DatePicker.md +227 -0
- package/docs/components/fields/FileInput.md +194 -0
- package/docs/components/fields/FilterListBox.md +726 -0
- package/docs/components/fields/FilterPicker.md +776 -0
- package/docs/components/fields/HueSlider.md +175 -0
- package/docs/components/fields/ListBox.md +714 -0
- package/docs/components/fields/NumberInput.md +180 -0
- package/docs/components/fields/PasswordInput.md +214 -0
- package/docs/components/fields/Picker.md +906 -0
- package/docs/components/fields/RadioGroup.md +310 -0
- package/docs/components/fields/SearchInput.md +224 -0
- package/docs/components/fields/Select.md +576 -0
- package/docs/components/fields/Slider.md +53 -0
- package/docs/components/fields/Switch.md +169 -0
- package/docs/components/fields/TextArea.md +61 -0
- package/docs/components/fields/TextInput.md +205 -0
- package/docs/components/fields/TextInputMapper.md +34 -0
- package/docs/components/form/Field.md +333 -0
- package/docs/components/form/Form.md +644 -0
- package/docs/components/form/FormInstance.md +307 -0
- package/docs/components/helpers/DisplayTransition.md +268 -0
- package/docs/components/helpers/IconSwitch.md +160 -0
- package/docs/components/layout/Flex.md +51 -0
- package/docs/components/layout/Flow.md +32 -0
- package/docs/components/layout/Grid.md +46 -0
- package/docs/components/layout/Panel.md +65 -0
- package/docs/components/layout/Prefix.md +37 -0
- package/docs/components/layout/ResizablePanel.md +69 -0
- package/docs/components/layout/Space.md +44 -0
- package/docs/components/layout/Suffix.md +39 -0
- package/docs/components/navigation/Tabs.md +726 -0
- package/docs/components/organisms/FileTabs.md +39 -0
- package/docs/components/organisms/StatsCard.md +40 -0
- package/docs/components/other/CloudLogo.md +33 -0
- package/docs/components/overlays/AlertDialog.md +51 -0
- package/docs/components/overlays/Dialog.md +200 -0
- package/docs/components/overlays/DialogContainer.md +201 -0
- package/docs/components/overlays/DialogForm.md +295 -0
- package/docs/components/overlays/DialogTrigger.md +191 -0
- package/docs/components/overlays/Notifications.md +402 -0
- package/docs/components/overlays/Toast.md +289 -0
- package/docs/components/overlays/Tooltip.md +400 -0
- package/docs/components/overlays/TooltipProvider.md +42 -0
- package/docs/components/overlays/TooltipTrigger.md +42 -0
- package/docs/components/overlays/UseDialogContainer.md +597 -0
- package/docs/components/portal/Portal.md +29 -0
- package/docs/components/status/LoadingAnimation.md +27 -0
- package/docs/components/status/Spin.md +35 -0
- package/docs/tasty/configuration.md +211 -0
- package/docs/tasty/debug.md +505 -0
- package/docs/tasty/injector.md +528 -0
- package/docs/tasty/styles.md +567 -0
- package/docs/tasty/tasty-static.md +376 -0
- package/docs/tasty/usage.md +695 -0
- package/package.json +4 -8
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
# Layout
|
|
2
|
+
|
|
3
|
+
A compound component system for building application shells with headers, footers, sidebars, and scrollable content areas. The Layout system handles overflow management, panel resizing, and smooth transitions automatically.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Building application shells with sidebars and navigation panels
|
|
8
|
+
- Creating pages with headers, footers, and scrollable content
|
|
9
|
+
- Implementing resizable side panels for tools or details views
|
|
10
|
+
- Managing complex layouts with nested content areas
|
|
11
|
+
|
|
12
|
+
## Component
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### Properties
|
|
17
|
+
|
|
18
|
+
- **`doNotOverflow`** `boolean` (default: `false`) — When true, applies `overflow: hidden` to the root element. By default, overflow is visible.
|
|
19
|
+
- **`innerRef`** `ForwardedRef<HTMLDivElement>` — Ref for the inner content element
|
|
20
|
+
- **`innerProps`** `HTMLAttributes<HTMLDivElement>` — Props to spread on the Inner sub-element
|
|
21
|
+
- **`isGrid`** `boolean` — Enable grid display mode
|
|
22
|
+
- **`columns`** `string` — Grid template columns (when `isGrid` is enabled)
|
|
23
|
+
- **`rows`** `string` — Grid template rows (when `isGrid` is enabled)
|
|
24
|
+
- **`template`** `string` — Grid template shorthand (when `isGrid` is enabled)
|
|
25
|
+
|
|
26
|
+
### Base Properties
|
|
27
|
+
|
|
28
|
+
Supports [Base properties](../../BaseProperties.md).
|
|
29
|
+
|
|
30
|
+
### Styling Properties
|
|
31
|
+
|
|
32
|
+
#### styles
|
|
33
|
+
|
|
34
|
+
Customizes the root Layout element.
|
|
35
|
+
|
|
36
|
+
**Sub-elements:**
|
|
37
|
+
- `Inner` - The inner content wrapper that adjusts based on panel sizes
|
|
38
|
+
|
|
39
|
+
### Style Properties
|
|
40
|
+
|
|
41
|
+
These properties allow direct style application: `width`, `height`, `padding`, `gap`, `fill`, `border`, `flow`.
|
|
42
|
+
|
|
43
|
+
### Style Defaults
|
|
44
|
+
|
|
45
|
+
- `position` — `relative`
|
|
46
|
+
- `display` — `block`
|
|
47
|
+
- `overflow` — `visible` (switches to `hidden` when `doNotOverflow`)
|
|
48
|
+
- `flexGrow` — `1`
|
|
49
|
+
- `placeSelf` — `stretch`
|
|
50
|
+
- `$content-padding` — `1x` (inherited by all sub-components for consistent inner padding)
|
|
51
|
+
|
|
52
|
+
**Inner element:**
|
|
53
|
+
- `position` — `absolute`
|
|
54
|
+
- `inset` — Adjusts based on registered panel sizes
|
|
55
|
+
- `display` — `flex`
|
|
56
|
+
- `flow` — `column`
|
|
57
|
+
- `transition` — `inset` (only when `hasTransition` is enabled on panels)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Sub-Components
|
|
62
|
+
|
|
63
|
+
### Layout.Toolbar
|
|
64
|
+
|
|
65
|
+
A horizontal bar typically placed at the top for navigation and actions.
|
|
66
|
+
|
|
67
|
+
```jsx
|
|
68
|
+
<Layout.Toolbar>
|
|
69
|
+
<Title level={4}>App Name</Title>
|
|
70
|
+
<Space>
|
|
71
|
+
<Button>Settings</Button>
|
|
72
|
+
<Button type="primary">Profile</Button>
|
|
73
|
+
</Space>
|
|
74
|
+
</Layout.Toolbar>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
- **`children`** `ReactNode` — Content split between left and right
|
|
78
|
+
|
|
79
|
+
**Sub-elements:**
|
|
80
|
+
- No sub-elements, styles apply to container
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### Layout.Header
|
|
85
|
+
|
|
86
|
+
A semantic page header with title, breadcrumbs, subtitle, and action areas.
|
|
87
|
+
|
|
88
|
+
```jsx
|
|
89
|
+
<Layout.Header
|
|
90
|
+
title="Dashboard"
|
|
91
|
+
level={2}
|
|
92
|
+
breadcrumbs={[
|
|
93
|
+
['Home', '/'],
|
|
94
|
+
['Reports', '/reports'],
|
|
95
|
+
]}
|
|
96
|
+
subtitle="Overview of your metrics"
|
|
97
|
+
extra={<Button type="primary">Create</Button>}
|
|
98
|
+
/>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- **`title`** `ReactNode` — Page/section title
|
|
102
|
+
- **`level`** `1-6` (default: `3`) — Heading level for accessibility
|
|
103
|
+
- **`breadcrumbs`** `[label, href][]` — Navigation breadcrumbs
|
|
104
|
+
- **`subtitle`** `ReactNode` — Text below the title
|
|
105
|
+
- **`suffix`** `ReactNode` — Content next to the title
|
|
106
|
+
- **`extra`** `ReactNode` — Content on the right side
|
|
107
|
+
- **`onBack`** `() => void` — Callback for the back button. When provided, a back arrow button appears to the left of the title.
|
|
108
|
+
|
|
109
|
+
**Sub-elements:**
|
|
110
|
+
- `Back` - Back button container (visible when `onBack` is provided)
|
|
111
|
+
- `Breadcrumbs` - Navigation path container
|
|
112
|
+
- `Title` - Main heading element
|
|
113
|
+
- `Suffix` - Content adjacent to title
|
|
114
|
+
- `Extra` - Right-aligned actions
|
|
115
|
+
- `Subtitle` - Secondary text below title
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### Layout.Content
|
|
120
|
+
|
|
121
|
+
Scrollable content area with automatic overflow handling and custom scrollbar styles.
|
|
122
|
+
|
|
123
|
+
```jsx
|
|
124
|
+
<Layout.Content scrollbar="tiny">
|
|
125
|
+
{/* Scrollable content */}
|
|
126
|
+
</Layout.Content>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- **`scrollbar`** `'default' | 'thin' | 'tiny' | 'none'` (default: `'thin'`) — Scrollbar style
|
|
130
|
+
- **`children`** `ReactNode` — Content to display
|
|
131
|
+
- **`innerRef`** `ForwardedRef<HTMLDivElement>` — Ref for the inner content element
|
|
132
|
+
- **`innerProps`** `HTMLAttributes<HTMLDivElement>` — Props to spread on the Inner sub-element
|
|
133
|
+
|
|
134
|
+
**Scrollbar types:**
|
|
135
|
+
- `default` - Browser default scrollbar
|
|
136
|
+
- `thin` - Thin scrollbar (CSS native)
|
|
137
|
+
- `tiny` - Custom hover-visible indicator (3px)
|
|
138
|
+
- `none` - Hidden scrollbar (still scrollable)
|
|
139
|
+
|
|
140
|
+
**Sub-elements:**
|
|
141
|
+
- `Inner` - Scrollable inner container
|
|
142
|
+
- `ScrollbarV` - Vertical scroll indicator (tiny mode)
|
|
143
|
+
- `ScrollbarH` - Horizontal scroll indicator (tiny mode)
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### Layout.Container
|
|
148
|
+
|
|
149
|
+
Horizontally centered content area with constrained width. Ideal for forms, articles, and focused content that shouldn't span the full width.
|
|
150
|
+
|
|
151
|
+
```jsx
|
|
152
|
+
<Layout.Container>
|
|
153
|
+
<Title>Article Title</Title>
|
|
154
|
+
<Text>Content is centered horizontally with a max-width constraint.</Text>
|
|
155
|
+
</Layout.Container>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
- **`children`** `ReactNode` — Content to display
|
|
159
|
+
- **`innerRef`** `ForwardedRef<HTMLDivElement>` — Ref for the inner content element
|
|
160
|
+
- **`innerProps`** `HTMLAttributes<HTMLDivElement>` — Props to spread on the Inner sub-element
|
|
161
|
+
|
|
162
|
+
**Width constraints:**
|
|
163
|
+
- Minimum: `40x` (320px at default gap)
|
|
164
|
+
- Default: `100%`
|
|
165
|
+
- Maximum: `120x` (960px at default gap)
|
|
166
|
+
|
|
167
|
+
**Sub-elements:**
|
|
168
|
+
- `Inner` - Constrained width inner container
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### Layout.Center
|
|
173
|
+
|
|
174
|
+
Centered content area for both horizontal and vertical alignment. Extends `Layout.Container` with vertical centering and text alignment. Ideal for empty states, loading screens, and hero sections.
|
|
175
|
+
|
|
176
|
+
```jsx
|
|
177
|
+
<Layout.Center>
|
|
178
|
+
<Title>No Results</Title>
|
|
179
|
+
<Text>Try adjusting your search criteria.</Text>
|
|
180
|
+
<Button type="primary">Clear Filters</Button>
|
|
181
|
+
</Layout.Center>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
- **`children`** `ReactNode` — Content to display
|
|
185
|
+
|
|
186
|
+
**Styling differences from Container:**
|
|
187
|
+
- Content is centered both horizontally and vertically
|
|
188
|
+
- Text is center-aligned by default
|
|
189
|
+
|
|
190
|
+
**Sub-elements:**
|
|
191
|
+
- `Inner` - Constrained width inner container with `text-align: center`
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### Layout.Footer
|
|
196
|
+
|
|
197
|
+
Footer area with support for inverted content order (primary actions on right).
|
|
198
|
+
|
|
199
|
+
```jsx
|
|
200
|
+
<Layout.Footer invertOrder>
|
|
201
|
+
<Button.Group>
|
|
202
|
+
<Button type="primary">Save</Button>
|
|
203
|
+
<Button>Cancel</Button>
|
|
204
|
+
</Button.Group>
|
|
205
|
+
<Text color="#dark-03">Draft saved</Text>
|
|
206
|
+
</Layout.Footer>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
- **`invertOrder`** `boolean` (default: `false`) — Reverse child order (primary on right)
|
|
210
|
+
- **`children`** `ReactNode` — Footer content
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Layout.Panel
|
|
215
|
+
|
|
216
|
+
Collapsible side panel with resizing, transitions, and multiple rendering modes.
|
|
217
|
+
|
|
218
|
+
```jsx
|
|
219
|
+
<Layout.Panel
|
|
220
|
+
side="left"
|
|
221
|
+
size={250}
|
|
222
|
+
isResizable
|
|
223
|
+
minSize={150}
|
|
224
|
+
maxSize={400}
|
|
225
|
+
hasTransition
|
|
226
|
+
isOpen={isPanelOpen}
|
|
227
|
+
onOpenChange={setIsPanelOpen}
|
|
228
|
+
onSizeChange={setSize}
|
|
229
|
+
>
|
|
230
|
+
<Layout.PanelHeader isClosable title="Navigation" onClose={() => setIsPanelOpen(false)} />
|
|
231
|
+
<Layout.Content>
|
|
232
|
+
{/* Panel content */}
|
|
233
|
+
</Layout.Content>
|
|
234
|
+
</Layout.Panel>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
- **`side`** `'left' | 'right' | 'top' | 'bottom'` (default: `'left'`) — Panel position
|
|
238
|
+
- **`mode`** `'default' | 'sticky' | 'overlay' | 'dialog'` (default: `'default'`) — Panel rendering mode
|
|
239
|
+
- **`size`** `number` — Controlled panel size (px)
|
|
240
|
+
- **`defaultSize`** `number` (default: `280`) — Initial uncontrolled size
|
|
241
|
+
- **`minSize`** `number` (default: `200`) — Minimum size constraint
|
|
242
|
+
- **`maxSize`** `number` — Maximum size constraint
|
|
243
|
+
- **`isResizable`** `boolean` (default: `false`) — Enable drag-to-resize
|
|
244
|
+
- **`isOpen`** `boolean` — Controlled open state
|
|
245
|
+
- **`defaultIsOpen`** `boolean` (default: `true`) — Initial open state
|
|
246
|
+
- **`onOpenChange`** `(isOpen: boolean) => void` — Open state callback
|
|
247
|
+
- **`onSizeChange`** `(size: number) => void` — Size change callback
|
|
248
|
+
- **`sizeStorageKey`** `string` — localStorage key for persisting size
|
|
249
|
+
- **`hasTransition`** `boolean` (default: `false`) — Enable slide animation
|
|
250
|
+
- **`isDismissable`** `boolean` (default: `true`) — Allow dismissing overlay/dialog by click or Escape
|
|
251
|
+
- **`overlayStyles`** `Styles` — Styles for the overlay backdrop in overlay mode
|
|
252
|
+
- **`isDialogOpen`** `boolean` — Controlled dialog state (mode="dialog")
|
|
253
|
+
- **`defaultIsDialogOpen`** `boolean` (default: `false`) — Initial dialog state
|
|
254
|
+
- **`onDialogOpenChange`** `(isOpen: boolean) => void` — Dialog state callback
|
|
255
|
+
- **`dialogProps`** `CubeDialogContainerProps` — Props for dialog mode
|
|
256
|
+
- **`innerRef`** `ForwardedRef<HTMLDivElement>` — Ref for the inner content element
|
|
257
|
+
- **`innerProps`** `HTMLAttributes<HTMLDivElement>` — Props to spread on the Inner sub-element
|
|
258
|
+
|
|
259
|
+
**Panel Modes:**
|
|
260
|
+
|
|
261
|
+
- `default` — Standard panel that pushes content aside (propagates size, no overlay)
|
|
262
|
+
- `sticky` — Panel floats over content without affecting layout (no size propagation, no overlay)
|
|
263
|
+
- `overlay` — Panel with dismissable backdrop overlay (propagates size, with overlay)
|
|
264
|
+
- `dialog` — Panel renders as a modal dialog (no size propagation, overlay via Dialog)
|
|
265
|
+
|
|
266
|
+
**Modifiers:**
|
|
267
|
+
|
|
268
|
+
- `side` `'left' | 'right' | 'top' | 'bottom'` — Panel position
|
|
269
|
+
- `drag` `boolean` — Currently being resized
|
|
270
|
+
- `horizontal` `boolean` — Left or right panel
|
|
271
|
+
- `has-transition` `boolean` — Transition enabled
|
|
272
|
+
- `offscreen` `boolean` — Panel is collapsed
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
### Layout.Pane
|
|
277
|
+
|
|
278
|
+
Resizable inline section within a layout. Unlike Layout.Panel (which is absolutely positioned), Pane participates in the normal flex/grid flow and can be resized via drag handles.
|
|
279
|
+
|
|
280
|
+
```jsx
|
|
281
|
+
<Layout.Pane
|
|
282
|
+
isResizable
|
|
283
|
+
resizeEdge="right"
|
|
284
|
+
size={250}
|
|
285
|
+
minSize={150}
|
|
286
|
+
maxSize={400}
|
|
287
|
+
onSizeChange={setSize}
|
|
288
|
+
>
|
|
289
|
+
<Title level={5}>Pane Content</Title>
|
|
290
|
+
<Text>This pane can be resized by dragging the edge.</Text>
|
|
291
|
+
</Layout.Pane>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
- **`resizeEdge`** `'right' | 'bottom'` (default: `'right'`) — Edge where resize handler appears
|
|
295
|
+
- **`isResizable`** `boolean` (default: `false`) — Enable resize functionality
|
|
296
|
+
- **`size`** `number | string` — Controlled size (width for right edge, height for bottom edge)
|
|
297
|
+
- **`defaultSize`** `number | string` (default: `200`) — Default size for uncontrolled state
|
|
298
|
+
- **`minSize`** `number | string` — Minimum size constraint
|
|
299
|
+
- **`maxSize`** `number | string` — Maximum size constraint
|
|
300
|
+
- **`onSizeChange`** `(size: number) => void` — Size change callback
|
|
301
|
+
- **`scrollbar`** `ScrollbarType` (default: `'thin'`) — Scrollbar style
|
|
302
|
+
- **`children`** `ReactNode` — Content to display
|
|
303
|
+
- **`innerRef`** `ForwardedRef<HTMLDivElement>` — Ref for the inner content element
|
|
304
|
+
- **`innerProps`** `HTMLAttributes<HTMLDivElement>` — Props to spread on the Inner sub-element
|
|
305
|
+
|
|
306
|
+
**Sub-elements:**
|
|
307
|
+
- `Inner` - Scrollable inner container
|
|
308
|
+
- `ScrollbarV` - Vertical scroll indicator (tiny mode)
|
|
309
|
+
- `ScrollbarH` - Horizontal scroll indicator (tiny mode)
|
|
310
|
+
- `ResizeHandler` - Drag handle for resizing
|
|
311
|
+
- `Drag` - Visual drag indicator
|
|
312
|
+
- `DragPart` - Individual dots in the drag indicator
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
### Layout.PanelHeader
|
|
317
|
+
|
|
318
|
+
Header for panels with optional close button.
|
|
319
|
+
|
|
320
|
+
```jsx
|
|
321
|
+
<Layout.PanelHeader
|
|
322
|
+
title="Details"
|
|
323
|
+
isClosable
|
|
324
|
+
onClose={() => setOpen(false)}
|
|
325
|
+
/>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
- **`title`** `ReactNode` — Panel title
|
|
329
|
+
- **`level`** `1-6` (default: `2`) — Heading level
|
|
330
|
+
- **`isClosable`** `boolean` (default: `false`) — Show close button
|
|
331
|
+
- **`onClose`** `() => void` — Close button handler
|
|
332
|
+
- **`actions`** `ReactNode` — Custom actions (replaces close)
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## GridLayout
|
|
337
|
+
|
|
338
|
+
A variant of Layout that enables CSS Grid for the content area.
|
|
339
|
+
|
|
340
|
+
```jsx
|
|
341
|
+
<GridLayout
|
|
342
|
+
height="100dvh"
|
|
343
|
+
columns="repeat(2, 1fr)"
|
|
344
|
+
rows="auto 1fr"
|
|
345
|
+
gap="2x"
|
|
346
|
+
padding="2x"
|
|
347
|
+
>
|
|
348
|
+
<Layout.Header title="Grid Dashboard" />
|
|
349
|
+
<div style={{ gridColumn: '1 / -1' }}>Full-width card</div>
|
|
350
|
+
<div>Left card</div>
|
|
351
|
+
<div>Right card</div>
|
|
352
|
+
</GridLayout>
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
- **`columns`** `string` — Grid template columns
|
|
356
|
+
- **`rows`** `string` — Grid template rows
|
|
357
|
+
- **`template`** `string` — Grid template shorthand
|
|
358
|
+
- **`gap`** `string` — Grid gap
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Examples
|
|
363
|
+
|
|
364
|
+
### Basic Layout with Header and Content
|
|
365
|
+
|
|
366
|
+
```jsx
|
|
367
|
+
<Layout height="100dvh">
|
|
368
|
+
<Layout.Header title="Dashboard" subtitle="Overview of your data" />
|
|
369
|
+
<Layout.Content>
|
|
370
|
+
<Text>Main content area</Text>
|
|
371
|
+
</Layout.Content>
|
|
372
|
+
<Layout.Footer>
|
|
373
|
+
<Text preset="t4" color="#dark-03">© 2024 Company</Text>
|
|
374
|
+
</Layout.Footer>
|
|
375
|
+
</Layout>
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### With Breadcrumb Navigation
|
|
379
|
+
|
|
380
|
+
```jsx
|
|
381
|
+
<Layout height="100dvh">
|
|
382
|
+
<Layout.Header
|
|
383
|
+
title="Analytics"
|
|
384
|
+
breadcrumbs={[
|
|
385
|
+
['Home', '/'],
|
|
386
|
+
['Reports', '/reports'],
|
|
387
|
+
]}
|
|
388
|
+
extra={
|
|
389
|
+
<Button.Group>
|
|
390
|
+
<Button>Export</Button>
|
|
391
|
+
<Button type="primary">New Report</Button>
|
|
392
|
+
</Button.Group>
|
|
393
|
+
}
|
|
394
|
+
/>
|
|
395
|
+
<Layout.Content>
|
|
396
|
+
<Text>Analytics content</Text>
|
|
397
|
+
</Layout.Content>
|
|
398
|
+
</Layout>
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### With Back Button
|
|
402
|
+
|
|
403
|
+
```jsx
|
|
404
|
+
<Layout height="100dvh">
|
|
405
|
+
<Layout.Header
|
|
406
|
+
title="Report Details"
|
|
407
|
+
onBack={() => navigate(-1)}
|
|
408
|
+
extra={
|
|
409
|
+
<Space>
|
|
410
|
+
<Button>Export</Button>
|
|
411
|
+
<Button type="primary">Edit</Button>
|
|
412
|
+
</Space>
|
|
413
|
+
}
|
|
414
|
+
/>
|
|
415
|
+
<Layout.Content>
|
|
416
|
+
<Text>Page content with a back button in the header</Text>
|
|
417
|
+
</Layout.Content>
|
|
418
|
+
</Layout>
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Resizable Side Panel
|
|
422
|
+
|
|
423
|
+
```jsx
|
|
424
|
+
function ResizablePanelExample() {
|
|
425
|
+
const [size, setSize] = useState(250);
|
|
426
|
+
|
|
427
|
+
return (
|
|
428
|
+
<Layout height="100dvh">
|
|
429
|
+
<Layout.Panel
|
|
430
|
+
isResizable
|
|
431
|
+
side="left"
|
|
432
|
+
size={size}
|
|
433
|
+
minSize={150}
|
|
434
|
+
maxSize={400}
|
|
435
|
+
onSizeChange={setSize}
|
|
436
|
+
>
|
|
437
|
+
<Layout.PanelHeader title="Resizable" />
|
|
438
|
+
<Layout.Content>
|
|
439
|
+
<Text>Drag the edge to resize (current: {size}px)</Text>
|
|
440
|
+
</Layout.Content>
|
|
441
|
+
</Layout.Panel>
|
|
442
|
+
<Layout.Content>
|
|
443
|
+
<Text>Main content area</Text>
|
|
444
|
+
</Layout.Content>
|
|
445
|
+
</Layout>
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Persistent Panel Size
|
|
451
|
+
|
|
452
|
+
Use `sizeStorageKey` to persist panel size to localStorage. The size is automatically restored on mount.
|
|
453
|
+
|
|
454
|
+
```jsx
|
|
455
|
+
<Layout height="100dvh">
|
|
456
|
+
<Layout.Panel
|
|
457
|
+
isResizable
|
|
458
|
+
side="left"
|
|
459
|
+
sizeStorageKey="app-sidebar-size"
|
|
460
|
+
defaultSize={250}
|
|
461
|
+
minSize={150}
|
|
462
|
+
maxSize={400}
|
|
463
|
+
>
|
|
464
|
+
<Layout.PanelHeader title="Persistent" />
|
|
465
|
+
<Layout.Content>
|
|
466
|
+
<Text>This panel remembers its size</Text>
|
|
467
|
+
</Layout.Content>
|
|
468
|
+
</Layout.Panel>
|
|
469
|
+
<Layout.Content>
|
|
470
|
+
<Text>Main content area</Text>
|
|
471
|
+
</Layout.Content>
|
|
472
|
+
</Layout>
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### Panel with Slide Transition
|
|
476
|
+
|
|
477
|
+
```jsx
|
|
478
|
+
function PanelWithTransitionExample() {
|
|
479
|
+
const [isPanelOpen, setIsPanelOpen] = useState(true);
|
|
480
|
+
|
|
481
|
+
return (
|
|
482
|
+
<Layout height="100dvh">
|
|
483
|
+
<Layout.Panel
|
|
484
|
+
hasTransition
|
|
485
|
+
side="right"
|
|
486
|
+
size={250}
|
|
487
|
+
isOpen={isPanelOpen}
|
|
488
|
+
onOpenChange={setIsPanelOpen}
|
|
489
|
+
>
|
|
490
|
+
<Layout.PanelHeader
|
|
491
|
+
isClosable
|
|
492
|
+
title="Details"
|
|
493
|
+
onClose={() => setIsPanelOpen(false)}
|
|
494
|
+
/>
|
|
495
|
+
<Layout.Content>
|
|
496
|
+
<Text>Panel content with slide transition</Text>
|
|
497
|
+
</Layout.Content>
|
|
498
|
+
</Layout.Panel>
|
|
499
|
+
<Layout.Toolbar>
|
|
500
|
+
<Button onPress={() => setIsPanelOpen(!isPanelOpen)}>
|
|
501
|
+
{isPanelOpen ? 'Close' : 'Open'} Panel
|
|
502
|
+
</Button>
|
|
503
|
+
</Layout.Toolbar>
|
|
504
|
+
<Layout.Content>
|
|
505
|
+
<Text>Main content area</Text>
|
|
506
|
+
</Layout.Content>
|
|
507
|
+
</Layout>
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
### Multiple Panels
|
|
513
|
+
|
|
514
|
+
```jsx
|
|
515
|
+
function MultiplePanelsExample() {
|
|
516
|
+
const [leftOpen, setLeftOpen] = useState(true);
|
|
517
|
+
const [rightOpen, setRightOpen] = useState(true);
|
|
518
|
+
|
|
519
|
+
return (
|
|
520
|
+
<Layout height="100dvh">
|
|
521
|
+
<Layout.Panel hasTransition side="left" size={180} isOpen={leftOpen}>
|
|
522
|
+
<Layout.PanelHeader isClosable title="Left" onClose={() => setLeftOpen(false)} />
|
|
523
|
+
<Layout.Content>
|
|
524
|
+
<Text>Left panel</Text>
|
|
525
|
+
</Layout.Content>
|
|
526
|
+
</Layout.Panel>
|
|
527
|
+
<Layout.Panel hasTransition side="right" size={180} isOpen={rightOpen}>
|
|
528
|
+
<Layout.PanelHeader isClosable title="Right" onClose={() => setRightOpen(false)} />
|
|
529
|
+
<Layout.Content>
|
|
530
|
+
<Text>Right panel</Text>
|
|
531
|
+
</Layout.Content>
|
|
532
|
+
</Layout.Panel>
|
|
533
|
+
<Layout.Toolbar>
|
|
534
|
+
<Space>
|
|
535
|
+
<Button onPress={() => setLeftOpen(!leftOpen)}>Left</Button>
|
|
536
|
+
<Button onPress={() => setRightOpen(!rightOpen)}>Right</Button>
|
|
537
|
+
</Space>
|
|
538
|
+
</Layout.Toolbar>
|
|
539
|
+
<Layout.Content>
|
|
540
|
+
<Text>Main content between two panels</Text>
|
|
541
|
+
</Layout.Content>
|
|
542
|
+
</Layout>
|
|
543
|
+
);
|
|
544
|
+
}
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
### Sticky Panel
|
|
548
|
+
|
|
549
|
+
In `sticky` mode, the panel floats over the content without pushing it aside. The main content area remains unaffected by the panel's size.
|
|
550
|
+
|
|
551
|
+
```jsx
|
|
552
|
+
function StickyPanelExample() {
|
|
553
|
+
const [isPanelOpen, setIsPanelOpen] = useState(true);
|
|
554
|
+
|
|
555
|
+
return (
|
|
556
|
+
<Layout height="100dvh">
|
|
557
|
+
<Layout.Panel
|
|
558
|
+
hasTransition
|
|
559
|
+
mode="sticky"
|
|
560
|
+
side="left"
|
|
561
|
+
size={260}
|
|
562
|
+
isOpen={isPanelOpen}
|
|
563
|
+
onOpenChange={setIsPanelOpen}
|
|
564
|
+
>
|
|
565
|
+
<Layout.PanelHeader isClosable title="Sticky Panel" onClose={() => setIsPanelOpen(false)} />
|
|
566
|
+
<Layout.Content>
|
|
567
|
+
<Text>This panel floats over the content.</Text>
|
|
568
|
+
</Layout.Content>
|
|
569
|
+
</Layout.Panel>
|
|
570
|
+
<Layout.Content>
|
|
571
|
+
<Text>Main content stays in place.</Text>
|
|
572
|
+
</Layout.Content>
|
|
573
|
+
</Layout>
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### Overlay Panel
|
|
579
|
+
|
|
580
|
+
In `overlay` mode, a semi-transparent backdrop appears behind the panel. The panel is dismissed (when `isDismissable` is true, which is the default) when:
|
|
581
|
+
- Clicking the backdrop overlay
|
|
582
|
+
- Pressing Escape anywhere in the Layout
|
|
583
|
+
- Moving focus to the main content area
|
|
584
|
+
|
|
585
|
+
```jsx
|
|
586
|
+
function OverlayPanelExample() {
|
|
587
|
+
const [isPanelOpen, setIsPanelOpen] = useState(true);
|
|
588
|
+
|
|
589
|
+
return (
|
|
590
|
+
<Layout height="100dvh">
|
|
591
|
+
<Layout.Panel
|
|
592
|
+
hasTransition
|
|
593
|
+
mode="overlay"
|
|
594
|
+
side="right"
|
|
595
|
+
size={300}
|
|
596
|
+
isOpen={isPanelOpen}
|
|
597
|
+
onOpenChange={setIsPanelOpen}
|
|
598
|
+
>
|
|
599
|
+
<Layout.PanelHeader isClosable title="Overlay Panel" onClose={() => setIsPanelOpen(false)} />
|
|
600
|
+
<Layout.Content>
|
|
601
|
+
<Text>Click the overlay, press Escape, or focus the main content to close.</Text>
|
|
602
|
+
</Layout.Content>
|
|
603
|
+
</Layout.Panel>
|
|
604
|
+
<Layout.Content>
|
|
605
|
+
<Text>Background content is dimmed.</Text>
|
|
606
|
+
</Layout.Content>
|
|
607
|
+
</Layout>
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
You can customize the overlay styles using the `overlayStyles` prop:
|
|
613
|
+
|
|
614
|
+
```jsx
|
|
615
|
+
<Layout.Panel mode="overlay" overlayStyles={{ fill: '#dark.5' }}>
|
|
616
|
+
{/* Panel with darker overlay */}
|
|
617
|
+
</Layout.Panel>
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
To prevent dismissing the overlay by clicking or pressing Escape, set `isDismissable={false}`:
|
|
621
|
+
|
|
622
|
+
```jsx
|
|
623
|
+
<Layout.Panel mode="overlay" isDismissable={false}>
|
|
624
|
+
{/* User must use explicit controls to close */}
|
|
625
|
+
</Layout.Panel>
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
### Tiny Scrollbar
|
|
629
|
+
|
|
630
|
+
```jsx
|
|
631
|
+
<Layout height="100dvh">
|
|
632
|
+
<Layout.Header title="Tiny Scrollbar" />
|
|
633
|
+
<Layout.Content scrollbar="tiny">
|
|
634
|
+
{Array.from({ length: 20 }, (_, i) => (
|
|
635
|
+
<div key={i} style={{ padding: '8px' }}>
|
|
636
|
+
<Text>Line {i + 1}: Hover to reveal scrollbar indicator.</Text>
|
|
637
|
+
</div>
|
|
638
|
+
))}
|
|
639
|
+
</Layout.Content>
|
|
640
|
+
</Layout>
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### Nested Layouts
|
|
644
|
+
|
|
645
|
+
```jsx
|
|
646
|
+
<Layout height="100dvh">
|
|
647
|
+
<Layout.Header title="Nested Layouts" />
|
|
648
|
+
<Layout flow="row">
|
|
649
|
+
<Layout width="200px" border="right">
|
|
650
|
+
<Layout.Content>
|
|
651
|
+
<Text>Left sidebar</Text>
|
|
652
|
+
</Layout.Content>
|
|
653
|
+
</Layout>
|
|
654
|
+
<Layout>
|
|
655
|
+
<Layout.Toolbar>
|
|
656
|
+
<Text>Inner toolbar</Text>
|
|
657
|
+
</Layout.Toolbar>
|
|
658
|
+
<Layout.Content>
|
|
659
|
+
<Text>Main content</Text>
|
|
660
|
+
</Layout.Content>
|
|
661
|
+
</Layout>
|
|
662
|
+
</Layout>
|
|
663
|
+
</Layout>
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
### Complete Application Shell
|
|
667
|
+
|
|
668
|
+
```jsx
|
|
669
|
+
function ApplicationShell() {
|
|
670
|
+
const [sidebarOpen, setSidebarOpen] = useState(true);
|
|
671
|
+
|
|
672
|
+
return (
|
|
673
|
+
<Layout height="100dvh">
|
|
674
|
+
<Layout.Panel
|
|
675
|
+
hasTransition
|
|
676
|
+
isResizable
|
|
677
|
+
side="right"
|
|
678
|
+
defaultSize={240}
|
|
679
|
+
isOpen={sidebarOpen}
|
|
680
|
+
minSize={180}
|
|
681
|
+
maxSize={350}
|
|
682
|
+
onOpenChange={setSidebarOpen}
|
|
683
|
+
>
|
|
684
|
+
<Layout.PanelHeader
|
|
685
|
+
isClosable
|
|
686
|
+
title="Navigation"
|
|
687
|
+
onClose={() => setSidebarOpen(false)}
|
|
688
|
+
/>
|
|
689
|
+
<Layout.Content padding=".5x" scrollbar="tiny" gap="1bw">
|
|
690
|
+
{['Dashboard', 'Analytics', 'Reports'].map((item) => (
|
|
691
|
+
<ItemButton key={item} type="neutral" width="100%">
|
|
692
|
+
{item}
|
|
693
|
+
</ItemButton>
|
|
694
|
+
))}
|
|
695
|
+
</Layout.Content>
|
|
696
|
+
</Layout.Panel>
|
|
697
|
+
|
|
698
|
+
<Layout.Header
|
|
699
|
+
title="Dashboard"
|
|
700
|
+
level={2}
|
|
701
|
+
breadcrumbs={[['Home', '/'], ['Analytics', '/analytics']]}
|
|
702
|
+
subtitle="Real-time overview of your metrics"
|
|
703
|
+
suffix={
|
|
704
|
+
<Button type="neutral" onPress={() => setSidebarOpen(!sidebarOpen)}>
|
|
705
|
+
☰
|
|
706
|
+
</Button>
|
|
707
|
+
}
|
|
708
|
+
extra={
|
|
709
|
+
<Button.Group>
|
|
710
|
+
<Button>Export</Button>
|
|
711
|
+
<Button type="primary">Create Report</Button>
|
|
712
|
+
</Button.Group>
|
|
713
|
+
}
|
|
714
|
+
/>
|
|
715
|
+
|
|
716
|
+
<Layout.Content scrollbar="tiny">
|
|
717
|
+
{/* Main content */}
|
|
718
|
+
</Layout.Content>
|
|
719
|
+
|
|
720
|
+
<Layout.Footer>
|
|
721
|
+
<Text preset="t4" color="#dark-03">© 2024 Your Company</Text>
|
|
722
|
+
<Space>
|
|
723
|
+
<Button type="link" size="small">Privacy</Button>
|
|
724
|
+
<Button type="link" size="small">Terms</Button>
|
|
725
|
+
</Space>
|
|
726
|
+
</Layout.Footer>
|
|
727
|
+
</Layout>
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
---
|
|
733
|
+
|
|
734
|
+
## Accessibility
|
|
735
|
+
|
|
736
|
+
### Keyboard Navigation
|
|
737
|
+
|
|
738
|
+
- `Tab` - Navigate between interactive elements
|
|
739
|
+
- Focus management is handled automatically when panels open/close
|
|
740
|
+
- Resize handlers can be focused and resized using arrow keys:
|
|
741
|
+
- `Arrow keys` - Resize panel by 10px
|
|
742
|
+
- `Shift + Arrow keys` - Resize panel by 50px
|
|
743
|
+
- `Double-click` on resize handler - Reset to default size
|
|
744
|
+
|
|
745
|
+
### Screen Reader Support
|
|
746
|
+
|
|
747
|
+
- `Layout.Header` uses semantic heading elements (`h1`-`h6`) based on `level` prop
|
|
748
|
+
- `Layout.Toolbar` has `role="toolbar"` for proper announcement
|
|
749
|
+
- `Layout.Footer` has `role="contentinfo"` for landmark navigation
|
|
750
|
+
- Breadcrumbs use Link components with proper navigation semantics
|
|
751
|
+
- Panel close buttons have accessible labels
|
|
752
|
+
|
|
753
|
+
### ARIA Properties
|
|
754
|
+
|
|
755
|
+
- `aria-label` - Available on all components for custom labels
|
|
756
|
+
- Landmarks are automatically set for header, footer, and toolbar
|
|
757
|
+
- Panel close buttons include `aria-label="Close panel"`
|
|
758
|
+
- Resize handlers have `role="separator"` with proper `aria-orientation` and `aria-label`
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
762
|
+
## Best Practices
|
|
763
|
+
|
|
764
|
+
1. **Do**: Set an explicit height on the root Layout
|
|
765
|
+
|
|
766
|
+
```jsx
|
|
767
|
+
<Layout height="100dvh">
|
|
768
|
+
{/* Content won't overflow */}
|
|
769
|
+
</Layout>
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
2. **Don't**: Nest multiple Layout.Content without explicit heights
|
|
773
|
+
|
|
774
|
+
```jsx
|
|
775
|
+
{/* This may cause layout issues */}
|
|
776
|
+
<Layout.Content>
|
|
777
|
+
<Layout.Content>...</Layout.Content>
|
|
778
|
+
</Layout.Content>
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
3. **Do**: Use appropriate heading levels for accessibility
|
|
782
|
+
|
|
783
|
+
```jsx
|
|
784
|
+
<Layout.Header title="Page Title" level={1} />
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
4. **Do**: Provide close handlers when panels are closable
|
|
788
|
+
|
|
789
|
+
```jsx
|
|
790
|
+
<Layout.Panel isOpen={isOpen} onOpenChange={setIsOpen}>
|
|
791
|
+
<Layout.PanelHeader
|
|
792
|
+
isClosable
|
|
793
|
+
title="Panel"
|
|
794
|
+
onClose={() => setIsOpen(false)}
|
|
795
|
+
/>
|
|
796
|
+
</Layout.Panel>
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
5. **Do**: Use `hasTransition` for better UX when toggling panels
|
|
800
|
+
|
|
801
|
+
```jsx
|
|
802
|
+
<Layout.Panel hasTransition side="left" isOpen={isOpen}>
|
|
803
|
+
{/* Smooth slide animation */}
|
|
804
|
+
</Layout.Panel>
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
---
|
|
808
|
+
|
|
809
|
+
## Architecture Notes
|
|
810
|
+
|
|
811
|
+
### Overflow-Safe Design
|
|
812
|
+
|
|
813
|
+
Layout uses a two-element architecture (wrapper + content). The wrapper has `overflow: visible` by default, allowing content to be visible outside its boundaries. Use `doNotOverflow` prop to apply `overflow: hidden` when you need to clip content. The inner element has absolute positioning with insets that adjust based on panel sizes.
|
|
814
|
+
|
|
815
|
+
### Panel Registration
|
|
816
|
+
|
|
817
|
+
Panels automatically register with the Layout context and report their sizes. This allows the main content area to adjust its insets accordingly, preventing content from being hidden behind panels.
|
|
818
|
+
|
|
819
|
+
### Nested Layouts
|
|
820
|
+
|
|
821
|
+
Each Layout.Content and panel header uses `LayoutContextReset` internally, which resets the layout context. This prevents nested Layouts from accidentally affecting parent layouts.
|
|
822
|
+
|
|
823
|
+
### Transitions
|
|
824
|
+
|
|
825
|
+
Panel transitions are disabled during drag operations and initial mount to prevent visual glitches. The `isReady` state ensures transitions only activate after the first paint.
|
|
826
|
+
|
|
827
|
+
---
|
|
828
|
+
|
|
829
|
+
## Suggested Improvements
|
|
830
|
+
|
|
831
|
+
- **Collapsible mode**: Add a mode where panels collapse to icons/mini state instead of fully hiding
|
|
832
|
+
- **Responsive breakpoints**: Automatically switch panels to dialog mode on smaller screens
|
|
833
|
+
- **Open state persistence**: Add `openStorageKey` for persisting panel open/closed state (size persistence is available via `sizeStorageKey`)
|
|
834
|
+
- **Split view**: Support for multiple resizable content areas (not just side panels)
|
|
835
|
+
|
|
836
|
+
---
|
|
837
|
+
|
|
838
|
+
## Related
|
|
839
|
+
|
|
840
|
+
- [Layout Guide](../../ComplexLayout.md) - Patterns and examples for building layouts
|
|
841
|
+
- [Dialog](../overlays/Dialog.md) - For modal panels
|
|
842
|
+
- [Item](./Item.md) - Used by PanelHeader
|
|
843
|
+
|