@cube-dev/ui-kit 0.0.0-canary-c325dcb → 0.0.0-canary-162cdb3
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 +8 -0
- 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 +201 -201
- package/dist/components/actions/CommandMenu/CommandMenu.js.map +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/ItemActionsWrapper.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/actions-run.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.d.ts +6 -6
- 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/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.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/LayoutPanelTransition.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/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +3 -3
- package/dist/components/data/TableBase/ColumnResizer.js.map +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/TreeGridTable.js +1 -1
- package/dist/components/data/TableBase/column-header.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-styles.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-menu.js +1 -1
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +154 -166
- package/dist/components/data/TableBase/use-table-columns.js.map +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.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/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +194 -160
- package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.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/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.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/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +15 -8
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.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.d.ts +4 -4
- 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/SearchComboBox/SearchComboBox.js +71 -67
- package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +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/TagInput/TagInput.js +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useTagError.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/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.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/ModernFormRoot.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/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/store.js +1 -1
- package/dist/components/form/Form/modern/validation.js +1 -1
- package/dist/components/form/Form/modern/values.js +1 -1
- package/dist/components/form/Form/reset-unbound-controls.js +1 -1
- package/dist/components/form/Form/use-field/use-field-binding.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/legacy-tooltip.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.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/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/BoardDragActiveProvider.d.ts +36 -0
- package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +57 -0
- package/dist/components/navigation/Tabs/BoardDragActiveProvider.js.map +1 -0
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +2 -2
- package/dist/components/navigation/Tabs/TabButton.js.map +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 +2 -2
- package/dist/components/navigation/Tabs/Tabs.js.map +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/index.d.ts +2 -1
- package/dist/components/navigation/Tabs/popover-placement.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/navigation/index.d.ts +1 -0
- 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/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.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/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.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/OpenTransitionContext.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/overlays/Tooltip/split-trigger-props.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/DraggableCollection.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/eslint-plugin/defaults.generated.js +1 -83
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -9
- package/dist/i18n/locales/en-US/uikit.js +1 -9
- package/dist/i18n/locales/en-US/uikit.json.d.ts +1 -9
- package/dist/i18n/locales/es-ES/uikit.js +1 -9
- package/dist/i18n/locales/es-MX/uikit.js +1 -9
- package/dist/i18n/locales/fr-FR/uikit.js +1 -9
- package/dist/i18n/locales/it-IT/uikit.js +1 -9
- package/dist/i18n/locales/ja-JP/uikit.js +1 -9
- package/dist/i18n/locales/nb-NO/uikit.js +1 -9
- package/dist/i18n/locales/pt-BR/uikit.js +1 -9
- package/dist/i18n/locales/pt-PT/uikit.js +1 -9
- package/dist/i18n/locales/sv-SE/uikit.js +1 -9
- package/dist/i18n/locales/vi-VN/uikit.js +1 -9
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.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.d.ts +3 -15
- package/dist/index.js +3 -11
- package/dist/index.js.map +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/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.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/colors.js +1 -1
- package/dist/utils/dotize.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/disabledProps.js +1 -1
- package/dist/utils/react/escapePropagation.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/programmaticFocus.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.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/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.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/components/data/ItemTable.md +1 -1
- package/docs/components/navigation/Tabs.md +8 -2
- package/package.json +1 -1
- package/dist/components/layout/Board/Board.d.ts +0 -253
- package/dist/components/layout/Board/Board.js +0 -771
- package/dist/components/layout/Board/Board.js.map +0 -1
- package/dist/components/layout/Board/BoardProvider.d.ts +0 -28
- package/dist/components/layout/Board/BoardProvider.js +0 -47
- package/dist/components/layout/Board/BoardProvider.js.map +0 -1
- package/dist/components/layout/Board/BoardResponsive.d.ts +0 -55
- package/dist/components/layout/Board/BoardResponsive.js +0 -101
- package/dist/components/layout/Board/BoardResponsive.js.map +0 -1
- package/dist/components/layout/Board/Widget.d.ts +0 -152
- package/dist/components/layout/Board/Widget.js +0 -76
- package/dist/components/layout/Board/Widget.js.map +0 -1
- package/dist/components/layout/Board/WidgetHost.js +0 -1065
- package/dist/components/layout/Board/WidgetHost.js.map +0 -1
- package/dist/components/layout/Board/board-context.d.ts +0 -43
- package/dist/components/layout/Board/board-context.js +0 -79
- package/dist/components/layout/Board/board-context.js.map +0 -1
- package/dist/components/layout/Board/board-store.d.ts +0 -4
- package/dist/components/layout/Board/board-store.js +0 -49
- package/dist/components/layout/Board/board-store.js.map +0 -1
- package/dist/components/layout/Board/grid-core/calculate.js +0 -90
- package/dist/components/layout/Board/grid-core/calculate.js.map +0 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +0 -254
- package/dist/components/layout/Board/grid-core/collision-modes.js.map +0 -1
- package/dist/components/layout/Board/grid-core/collision.js +0 -35
- package/dist/components/layout/Board/grid-core/collision.js.map +0 -1
- package/dist/components/layout/Board/grid-core/compactors.d.ts +0 -23
- package/dist/components/layout/Board/grid-core/compactors.js +0 -166
- package/dist/components/layout/Board/grid-core/compactors.js.map +0 -1
- package/dist/components/layout/Board/grid-core/constraints.d.ts +0 -35
- package/dist/components/layout/Board/grid-core/constraints.js +0 -155
- package/dist/components/layout/Board/grid-core/constraints.js.map +0 -1
- package/dist/components/layout/Board/grid-core/group-move.js +0 -317
- package/dist/components/layout/Board/grid-core/group-move.js.map +0 -1
- package/dist/components/layout/Board/grid-core/layout.js +0 -186
- package/dist/components/layout/Board/grid-core/layout.js.map +0 -1
- package/dist/components/layout/Board/grid-core/placement.d.ts +0 -58
- package/dist/components/layout/Board/grid-core/placement.js +0 -153
- package/dist/components/layout/Board/grid-core/placement.js.map +0 -1
- package/dist/components/layout/Board/grid-core/sort.js +0 -37
- package/dist/components/layout/Board/grid-core/sort.js.map +0 -1
- package/dist/components/layout/Board/grid-core/types.d.ts +0 -186
- package/dist/components/layout/Board/index.d.ts +0 -24
- package/dist/components/layout/Board/index.js +0 -20
- package/dist/components/layout/Board/index.js.map +0 -1
- package/dist/components/layout/Board/responsive-utils.d.ts +0 -13
- package/dist/components/layout/Board/responsive-utils.js +0 -55
- package/dist/components/layout/Board/responsive-utils.js.map +0 -1
- package/dist/components/layout/Board/use-board-layout.d.ts +0 -26
- package/dist/components/layout/Board/use-board-layout.js +0 -57
- package/dist/components/layout/Board/use-board-layout.js.map +0 -1
- package/dist/components/layout/Board/use-board-registry.js +0 -700
- package/dist/components/layout/Board/use-board-registry.js.map +0 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +0 -24
- package/dist/components/layout/Board/use-board-select-modifier-key.js.map +0 -1
- package/dist/components/layout/Board/use-board-selection.d.ts +0 -8
- package/dist/components/layout/Board/use-board-selection.js +0 -113
- package/dist/components/layout/Board/use-board-selection.js.map +0 -1
- package/docs/components/layout/Board.md +0 -473
|
@@ -1,473 +0,0 @@
|
|
|
1
|
-
# Board
|
|
2
|
-
|
|
3
|
-
A draggable and resizable widget grid for building dashboards. Widgets are declared with `Board.Widget` and positioned via a `layout` (grid units). Wrap multiple boards in a `BoardProvider` (`Board.Provider`) to drag widgets between them, including out of a nested board into its parent.
|
|
4
|
-
|
|
5
|
-
Dragging and resizing are powered by React Aria's `useMove`, so they work with mouse, touch, and keyboard (focus a widget and use the arrow keys). While a widget is dragged with a pointer it renders into a fixed overlay so it is never clipped by an ancestor's `overflow: hidden`.
|
|
6
|
-
|
|
7
|
-
## When to Use
|
|
8
|
-
|
|
9
|
-
- Customizable dashboards where users arrange widgets
|
|
10
|
-
- Report/analytics layouts with resizable tiles
|
|
11
|
-
- Multi-panel workspaces where items move between areas
|
|
12
|
-
- Nested containers whose children can be dragged out
|
|
13
|
-
|
|
14
|
-
## Component
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Concepts
|
|
19
|
-
|
|
20
|
-
- **Layout** — an array of items in grid units. `i` matches a `Board.Widget` `id`; a widget whose `id` has no layout item is not rendered at all. Beyond `{ i, x, y, w, h }` an item may carry `minW`/`maxW`/`minH`/`maxH`, `constraints`, `resizeHandles`, `isDraggable`, `isResizable` and `static` — all of which outrank the same options declared on `Board.Widget` (see [How props interact](#how-props-interact)). `static` pins an item: it cannot be dragged, resized or swapped, and compaction flows around it.
|
|
21
|
-
- **Content vs. position** — `Board.Widget` declares content; the owning `Board` positions it. This decoupling is what lets a widget be transferred between boards.
|
|
22
|
-
- **Compaction** — `vertical` (default), `horizontal`, `free`, or `null`. In `free` mode a widget is placed exactly where you drop it and its neighbours are never pushed or swapped; without `allowOverlap` a drop onto an occupied cell is blocked, and with `allowOverlap` widgets may stack for a fully free canvas. `allowOverlap` also switches compaction off in the reflowing modes — see [How props interact](#how-props-interact).
|
|
23
|
-
- **Selection** — off by default. Pressing a widget selects it and arms a drag of the selection: selecting and grabbing are one gesture, so move the pointer and it drags, stay still and it was just a selection. <kbd>Shift</kbd> (or <kbd>Cmd</kbd>/<kbd>Ctrl</kbd>) toggles a widget's membership. Keys are layout item ids, scoped to a single board, and always reported in layout order.
|
|
24
|
-
- **Selection is focus-like** — it tracks what the user is working with, and touching anything else moves it on: pressing another widget makes _that_ the selection, pressing a control inside a widget drops it, and so does focus leaving the board. With `'multiple'`, pressing an already-selected widget keeps the selection so a drag moves the whole block.
|
|
25
|
-
|
|
26
|
-
## How props interact
|
|
27
|
-
|
|
28
|
-
Several props override, gate, or switch each other off. This is the full set of those relations.
|
|
29
|
-
|
|
30
|
-
### Grid sizing
|
|
31
|
-
|
|
32
|
-
| Props | Relation |
|
|
33
|
-
| --- | --- |
|
|
34
|
-
| `rows` + `extraRows` | `rows` wins outright. A fixed matrix renders exactly `rows` rows, so `extraRows` — which only pads a board that hugs its content — has no effect. |
|
|
35
|
-
| `rows` + `maxRows` | `rows` implies a `maxRows` of the same value, but an explicit `maxRows` still wins over that implication. |
|
|
36
|
-
| `rowHeight="stretch"` | Requires `rows`, and a measured height. Without either the board falls back to the default `100`px row rather than collapsing. |
|
|
37
|
-
| `width` | Disables width measurement. An `isAligned` board derives its column count from the measured width, so pass a real value if you use both. |
|
|
38
|
-
| `extraRows` + `maxRows` | `extraRows` is clamped by `maxRows`. |
|
|
39
|
-
| `margin` | The grid gap, not a CSS margin — `Board` deliberately drops `margin` from its style props. `Board.Widget` still accepts it as an ordinary style prop. |
|
|
40
|
-
|
|
41
|
-
### Collision and compaction
|
|
42
|
-
|
|
43
|
-
Three props decide what happens when a widget lands on an occupied cell, and they are resolved in this order:
|
|
44
|
-
|
|
45
|
-
1. **`allowOverlap` wins outright.** It replaces the compactor with a no-op, so `compact="vertical"` / `"horizontal"` **stop reflowing** as well: widgets stay where they are put and may stack. `preventCollision` and `collisionMode` are both dead while it is on, because nothing is ever refused.
|
|
46
|
-
2. **`compact="free"` ignores the `preventCollision` prop entirely.** Free mode derives blocking from `allowOverlap` instead — `free` without `allowOverlap` always blocks, `free` with it always stacks. `preventCollision` only reaches `'vertical'`, `'horizontal'` and `null`.
|
|
47
|
-
3. **`collisionMode` is consulted only where a collision would otherwise refuse the move** — `compact="free"` without `allowOverlap`, or an explicit `preventCollision` on one of the other modes. On a compacting board it does nothing, because there a collision pushes neighbours rather than blocking.
|
|
48
|
-
|
|
49
|
-
`'swap'` never trades with an item marked `static`, and falls back to `'downscale'`, then `'revert'`, when no exchange fits. A resize is blocked by a collision in exactly the modes above; on a compacting board a resize pushes its neighbours the way a drag does.
|
|
50
|
-
|
|
51
|
-
### `constraints` replaces the defaults
|
|
52
|
-
|
|
53
|
-
`constraints` on `Board` is a **replacement**, not an addition. The default is `[gridBounds, minMaxSize]`, so passing your own array turns off grid-bounds clamping _and_ min/max enforcement — `minW`/`maxW`/`minH`/`maxH` (on the layout item, on `Board.Widget`, or in `widgetProps`) stop being applied. Re-include the built-ins to keep them:
|
|
54
|
-
|
|
55
|
-
```jsx
|
|
56
|
-
import { aspectRatio, Board, gridBounds, minMaxSize } from '@cube-dev/ui-kit';
|
|
57
|
-
|
|
58
|
-
<Board constraints={[gridBounds, minMaxSize, aspectRatio(16 / 9)]} />;
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Per-item and per-widget `constraints` work the other way round: they are applied **in addition** to the board's, and after them. Between those two sources, a layout item's `constraints` replace the widget's rather than adding to them.
|
|
62
|
-
|
|
63
|
-
Built-ins exported alongside `Board`: `gridBounds`, `minMaxSize`, `containerBounds`, `boundedX`, `boundedY`, `aspectRatio`, `snapToGrid`, `minSize`, `maxSize`.
|
|
64
|
-
|
|
65
|
-
### Per-widget overrides
|
|
66
|
-
|
|
67
|
-
Two different shapes, and it matters which one a prop uses.
|
|
68
|
-
|
|
69
|
-
**Booleans that can only take away.** The board's value is a ceiling:
|
|
70
|
-
|
|
71
|
-
- **`isDraggable`** — a widget is draggable only when the board's `isDraggable` is `true` **and** neither `Board.Widget` nor `widgetProps` set it to `false` **and** the layout item's `isDraggable` is not `false` **and** the item is not `static`. `isDraggable={false}` on the board cannot be re-enabled per widget.
|
|
72
|
-
- **`isResizable`** — the same chain.
|
|
73
|
-
- **`isSelectable`** — only meaningful while `selectionMode` is not `'none'`; a widget can opt out, never opt in.
|
|
74
|
-
|
|
75
|
-
**Values with a precedence chain.** The first source that sets it wins:
|
|
76
|
-
|
|
77
|
-
| Prop | Precedence |
|
|
78
|
-
| --- | --- |
|
|
79
|
-
| `resizeHandles` | layout item → `Board.Widget` → `widgetProps` → `Board` |
|
|
80
|
-
| `minW` / `maxW` / `minH` / `maxH` | layout item → `Board.Widget` → `widgetProps` |
|
|
81
|
-
| `constraints` | layout item → `Board.Widget` → `widgetProps`, then _added_ to the board's |
|
|
82
|
-
| `resizeGripPlacement`, `dragCancel`, `dragHandle`, `selectionCancel` | `Board.Widget` → `widgetProps` → `Board` |
|
|
83
|
-
| `isCard`, `hoverRing`, `isAutoHeight`, `qa` | `Board.Widget` → `widgetProps` (no board-level prop) |
|
|
84
|
-
| `styles`, `mods` | merged, not replaced: `widgetProps` underneath, `Board.Widget` on top, key by key |
|
|
85
|
-
|
|
86
|
-
`resizeHandles` is the one case where the **layout item outranks `Board.Widget`**. Board's own modifiers always win over `mods`, so a custom modifier can never shadow `selected`, `drag` and the rest.
|
|
87
|
-
|
|
88
|
-
### Drag guards
|
|
89
|
-
|
|
90
|
-
`dragHandle` and `dragCancel` both apply — they are not alternatives. A press starts a drag only when it is inside `dragHandle` (if set) _and_ outside `dragCancel`. `dragCancel` already defaults to the interactive-descendant set, so widgets hosting controls need no configuration; pass `''` to let a drag start from anywhere. On a board with `selectionMode` on, `selectionCancel` acts as a third guard; on a board with `selectionMode="none"` it does nothing at all and `dragCancel` is the only guard. None of the three affects keyboard moves — those only run when the widget host itself is focused.
|
|
91
|
-
|
|
92
|
-
`isAutoHeight` raises the widget's resize floor above `minH`: you cannot drag it shorter than the height its content currently needs.
|
|
93
|
-
|
|
94
|
-
### Selection
|
|
95
|
-
|
|
96
|
-
`selectionMode="none"` (the default) switches the whole feature off: `selectedKeys`, `defaultSelectedKeys`, `onSelectionChange`, `selectionCancel`, `allowMarqueeSelection`, `onWidgetsDelete`, and the selection key bindings (<kbd>Space</kbd>, <kbd>Escape</kbd>, <kbd>Delete</kbd>) all do nothing.
|
|
97
|
-
|
|
98
|
-
| Props | Relation |
|
|
99
|
-
| --- | --- |
|
|
100
|
-
| `selectedKeys` + `defaultSelectedKeys` | `selectedKeys` wins. Keys with no matching layout item are ignored — no error, no flash — so removing a widget needs no selection cleanup. |
|
|
101
|
-
| Controlled vs. uncontrolled | An uncontrolled board prunes keys of removed widgets and reports that through `onSelectionChange`; a controlled board does not, since you own the state. |
|
|
102
|
-
| `allowMarqueeSelection` | Requires `selectionMode="multiple"`. Setting it `true` under `'single'` does nothing. |
|
|
103
|
-
| `selectionMode="single"` | Any multi-key selection collapses to the first key in layout order. |
|
|
104
|
-
| `onWidgetsDelete` | <kbd>Delete</kbd>/<kbd>Backspace</kbd> are only handled when this is set. Board never removes widgets itself. |
|
|
105
|
-
| `extraRows` | Effectively required for the marquee on a board that hugs its content: with no spare rows there is no empty canvas to lasso from. |
|
|
106
|
-
|
|
107
|
-
### Nested boards
|
|
108
|
-
|
|
109
|
-
`isAligned` only takes effect inside another `Board`'s widget; on a top-level board it is ignored. Where it does take effect it overrides the board's own grid metrics:
|
|
110
|
-
|
|
111
|
-
| Prop | Under `isAligned` |
|
|
112
|
-
| --- | --- |
|
|
113
|
-
| `rowHeight` | Ignored — the parent's row height is used verbatim, `'stretch'` included. |
|
|
114
|
-
| `margin` | Ignored — the parent's gap is inherited so widget edges line up. |
|
|
115
|
-
| `cols` | Ignored once the board has been measured; the column count is derived from the measured width at the parent's column pitch. Serves only as the pre-measurement fallback. |
|
|
116
|
-
| `containerPadding` | Defaults to `[0, 0]` instead of `margin`, so the grid origin sits flush. An explicit value still wins. |
|
|
117
|
-
|
|
118
|
-
An aligned board never shrinks its rows, so pair it with `isAutoHeight` on the container `Board.Widget` or its content is clipped.
|
|
119
|
-
|
|
120
|
-
`showGridLines` is inherited by a nested board that does not set it, but only in drag-scoped form: an ancestor's `true` reaches descendants as `'drag'` (lines during a drag, not permanently), while `'any-drag'` is inherited verbatim. An explicit `false` opts out of the inheritance; omitting it does not.
|
|
121
|
-
|
|
122
|
-
`isDroppable={false}` only refuses widgets arriving from _other_ boards; dragging within the board still works.
|
|
123
|
-
|
|
124
|
-
## Properties
|
|
125
|
-
|
|
126
|
-
### Board
|
|
127
|
-
|
|
128
|
-
- **`id`** `string` — Stable board id, used for cross-board drag and exposed as `data-board-id`. Auto-generated when omitted; set it when you need to address a specific board (tests, `onWidgetTransfer` bookkeeping).
|
|
129
|
-
- **`layout`** `LayoutItem[]` — Controlled layout. Wins over `defaultLayout`, and re-seeds the board only when the array reference changes: mutating it in place does nothing, and a gesture previews and commits locally regardless, so pass a new array back from `onLayoutChange` to stay authoritative.
|
|
130
|
-
- **`defaultLayout`** `LayoutItem[]` — Initial layout for uncontrolled usage. Ignored when `layout` is set.
|
|
131
|
-
- **`onLayoutChange`** `(layout: LayoutItem[], info: { reason }) => void` — Called when the layout is committed. `reason` is `'drag'`, `'resize'`, `'transfer'` (a widget arrived from or left for another board) or `'normalize'` (no gesture — a reflow for a changed column count, or an auto-height widget growing). See [Knowing why the layout changed](#knowing-why-the-layout-changed).
|
|
132
|
-
- **`onDragStart` / `onDrag` / `onDragStop`** `(info: BoardInteractionInfo) => void` — Drag lifecycle callbacks. `onDrag` fires on every step; `onDragStop` fires after the layout is committed.
|
|
133
|
-
- **`onResizeStart` / `onResize` / `onResizeStop`** `(info: BoardInteractionInfo) => void` — Resize lifecycle callbacks, mirroring the drag ones.
|
|
134
|
-
- **`cols`** `number` (default: `12`) — Number of columns. On an `isAligned` nested board this is only the pre-measurement fallback — the real count is derived from the measured width.
|
|
135
|
-
- **`rows`** `number` — Render exactly this many rows, whatever the content needs — a fixed `cols × rows` matrix rather than a grid that hugs its widgets. Implies a `maxRows` of the same value (an explicit `maxRows` still wins), so `gridBounds` keeps every drag and resize inside the matrix without a per-widget `maxH`. Overrides `extraRows`, which only pads a content-hugging board.
|
|
136
|
-
- **`rowHeight`** `number | 'stretch'` (default: `100`) — Row height in pixels, or `'stretch'` to divide the board's own measured height into its rows. `'stretch'` is what makes a fixed `rows × cols` matrix fill the box it is given: the board takes its parent's height and each cell an equal share of it, so resizing the container resizes the cells instead of adding or removing them. Requires `rows`: without a declared row count there is no matrix to fill, and dividing by the content extent instead would resize every cell whenever a widget landed on a new row. Unset, or before the parent's height is known, the board keeps its ordinary content-hugging behaviour at the default row height rather than collapsing. Ignored entirely on an `isAligned` nested board, which uses the parent's row height.
|
|
137
|
-
- **`margin`** `[number, number]` (default: `[8, 8]`) — Horizontal/vertical gap between widgets. This is the grid gap, not a CSS margin: `Board` does not accept `margin` as a style prop. Ignored on an `isAligned` nested board, which inherits the parent's gap.
|
|
138
|
-
- **`containerPadding`** `[number, number]` — Inner padding. Defaults to `margin`, or to `[0, 0]` for an aligned nested board (`isAligned`) so its grid lines up with the ancestor board's.
|
|
139
|
-
- **`maxRows`** `number` (default: `Infinity`) — Maximum number of rows. Defaults to `rows` when that is set; an explicit value overrides that.
|
|
140
|
-
- **`extraRows`** `number` (default: `0`) — Empty grid rows kept below the content. The board renders this many rows taller than its widgets need, so there is always somewhere to start a marquee and somewhere to drop a widget past the end. A board hugs its content by default, so on a full grid it has neither. Clamped by `maxRows`, and ignored entirely when `rows` fixes the matrix.
|
|
141
|
-
- **`compact`** `'vertical' | 'horizontal' | 'free' | null` (default: `'vertical'`) — Compaction behavior. `'vertical'`/`'horizontal'` reflow widgets to remove gaps; `'free'` places each widget exactly where dropped and never pushes its neighbours (blocked from occupied cells unless `allowOverlap`); `null` disables compaction but still resolves collisions the legacy react-grid-layout way.
|
|
142
|
-
- **`allowOverlap`** `boolean` (default: `false`) — Allow widgets to overlap (stack). It also **switches compaction off**: with it on, `compact="vertical"`/`"horizontal"` no longer reflow, and `preventCollision`/`collisionMode` have no effect at all, since nothing is ever refused. In `'free'` mode it is what distinguishes stacking from blocking a drop onto an occupied cell.
|
|
143
|
-
- **`preventCollision`** `boolean` (default: `false`) — Block movement into occupied cells instead of pushing. Applies to `'vertical'`, `'horizontal'` and `null` only: `compact="free"` derives blocking from `allowOverlap` and ignores this prop, and `allowOverlap` overrides it everywhere.
|
|
144
|
-
- **`collisionMode`** `'revert' | 'downscale' | 'swap'` (default: `'revert'`) — How to resolve a drop the grid would otherwise refuse. Only applies where a collision _blocks_ a move — `compact="free"` (which prevents collisions) or an explicit `preventCollision` — and never under `allowOverlap`, where nothing is blocked. `'revert'` snaps the widget back. `'downscale'` shrinks it into the free space at the drop cell, growing rightward and downward, floored at its `minW`/`minH` (below that it reverts). Within one board, `'swap'` trades places with **one** widget — the one the drop covers most — which takes the cell the drag began at, each keeping as much of its own size as fits there. It never displaces more than that one widget. A drop straddling two widgets trades with one of them rather than refusing, so the swap never blinks away as you sweep across a boundary; ties go to the widget earlier in reading order. Dragging back retraces the original arrangement exactly. For a widget arriving from another board (including a nested board entering its parent), there is no slot on the destination to give back, so `'swap'` resolves as `'downscale'`: the incoming widget keeps its size when possible or downscales into the available room to its right and below, and existing destination widgets are never exchanged. A release over an occupied anchor commits whatever the preview was showing rather than cancelling the transfer: the widget holds the last cell it fitted in as you sweep across a destination widget, and enters at the nearest fitting cell when the very first cell it is offered is occupied. No mode ever _grows_ a widget. Applies to single-widget drags. Arrow keys honour it too but never resize anything — each press is a gesture of its own, so a press that shrank a widget would have nothing to restore from, and only an exchange that fits outright is allowed. A multi-widget selection still only moves where it fits outright, and a resize is still blocked by a collision.
|
|
145
|
-
- **`isDraggable`** `boolean` (default: `true`) — Enable dragging for all widgets. A ceiling, not a default: `false` here cannot be re-enabled by a widget, and a `static` layout item is never draggable regardless.
|
|
146
|
-
- **`isResizable`** `boolean` (default: `true`) — Enable resizing for all widgets. Same ceiling semantics as `isDraggable`.
|
|
147
|
-
- **`isDroppable`** `boolean` (default: `true`) — Whether the board accepts widgets dropped from _other_ boards. `false` does not affect dragging within the board.
|
|
148
|
-
- **`resizeHandles`** `ResizeHandleAxis[]` (default: `['se']`) — Which resize handles to show. Corner handles (`ne`/`nw`/`se`/`sw`) show an angle grip; edge handles (`n`/`s`/`e`/`w`) show a dotted grip. Both are revealed on hover/focus/resize. A single edge (e.g. `['e']` or `['s']`) gives a horizontally- or vertically-only resizable widget.
|
|
149
|
-
- **`resizeGripPlacement`** `'inside' | 'corner' | 'outside'` — Where a widget's resize grips sit. Unset, **it resolves itself from the widget's content**: a widget holding a nested `Board` gets `'outside'`, and every other widget gets `'inside'`. Set it to override that, per board or per widget.
|
|
150
|
-
|
|
151
|
-
- `'inside'` tucks each grip into the widget box. The hit-zone is a band along the edge, inside the widget, so it sits over the widget's own content — which is fine for a leaf widget and is why a container resolves the other way.
|
|
152
|
-
- `'outside'` puts every grip in the grid gutter beyond the widget's edge, as a padded control of its own: a pill along each edge, and the same corner angle the other two placements draw, stepped off the corner into the square where two gutters cross. The control **is** the hit-zone — one element, so what you see is exactly what you can grab — and it never covers the widget's own content or a neighbour's.
|
|
153
|
-
- `'corner'` centres a corner grip on the widget's corner, straddling the edge, so it lines up with a control centred on the opposite corner (`cornerChrome`). Its hit-zone reaches half a grip inward, matching the half-dot painted there, and outward as far as half the gutter allows. Edge axes stay `'inside'`.
|
|
154
|
-
|
|
155
|
-
Whichever placement applies, grips are revealed on hover, focus or resize, and **only one widget's at a time**: the pointer is inside every ancestor at once, so a container stands down while the pointer is on one of its children. To resize a child you go inside it; to resize its container you go to the container's outer edge.
|
|
156
|
-
|
|
157
|
-
An `'outside'` grip needs gutter to sit in — at least 8px of `margin` on each axis. Below that it keeps its size and overhangs the neighbouring widgets, and the board warns in development; raise `margin`, or set `resizeGripPlacement` explicitly to put the grips back inside. The corner angle is the one exception: it shrinks to whatever the gutter leaves it rather than reaching past it onto the diagonal neighbour, and reaches its full size at 12px of `margin`.
|
|
158
|
-
|
|
159
|
-
Why the resolution exists: an inner board with no `containerPadding` — which `isAligned` sets — puts its last child's corner on exactly the same point as its host widget's. With both widgets drawing grips in the same place, the container's hit-zone covered the child's and the bottom-right child could not be resized at all. Sending the container's affordance outward and the child's inward leaves the two nothing in common, so nothing has to be arbitrated. Where they do still overlap — an explicit `'corner'` or `'inside'` on a container, or a gutter too thin — a press goes to the **innermost** handle under the pointer, and a container thereby left with no way to resize itself warns in development.
|
|
160
|
-
|
|
161
|
-
- **`dragCancel`** `string` (default: `BOARD_SELECTION_CANCEL`) — CSS selector for elements that must not start a pointer drag. Defaults to the same set `selectionCancel` uses, because a control inside a widget has to keep its own press whether or not the board supports selection — a board hosting interactive content needs no configuration for buttons, inputs, links and the common ARIA widget roles to stay usable. Pass your own selector to narrow or widen it, or `''` to let a drag start from anywhere. Does not affect keyboard moves. Can be overridden per widget.
|
|
162
|
-
- **`dragHandle`** `string` — CSS selector for the only elements from which a pointer drag may start. Combines with `dragCancel` rather than replacing it: a drag needs a target inside `dragHandle` _and_ outside `dragCancel`. Can be overridden per widget.
|
|
163
|
-
- **`showGridLines`** `boolean | 'drag' | 'any-drag'` (default: `false`) — Show grid lines behind the widgets. `true` always; `false` never; `'drag'` only while _this_ board is part of the active gesture — it owns the drag (as its source, or as the board the widget is currently over) or one of its own widgets is being resized; `'any-drag'` while any drag is in flight anywhere under a shared `Board.Provider`, so every board advertises itself as somewhere the widget could land. Under one `Board.Provider`, `'drag'` keeps boards a widget cannot land in quiet, and `'any-drag'` is the opt-in for the noisier, more informative version. A nested board that does not set this inherits an enabled ancestor's setting in drag-scoped form: an ancestor's `true` arrives as `'drag'` (a nested board shows lines during a drag, not permanently), while `'any-drag'` is inherited verbatim. An explicit `false` opts out of the inheritance.
|
|
164
|
-
- **`isAligned`** `boolean` (default: `false`) — Align a nested board with its ancestor `Board`'s layout. Only takes effect when the board is nested inside another `Board`'s widget. When set, every cell matches the parent's cell size exactly, which means it takes over three of the board's own metrics: `rowHeight` and `margin` are ignored in favour of the parent's, and `cols` is ignored once the board has been measured (the column count is derived from the measured width at the parent's column pitch, so cells stay parent-sized as the container is resized) — `cols` only serves as the pre-measurement fallback. It never shrinks rows to fit, so pair it with an `isAutoHeight` container so the widget grows to fit its rows at that height.
|
|
165
|
-
|
|
166
|
-
Widgets already on the board keep their cells. Narrowing the container lowers the column count, but a widget whose columns now fall outside it is **not** re-flowed into the narrower grid — it holds its position and is clipped by the container's edge, and widening the container brings it back exactly as it was. This is deliberate: resizing a container is not a request to rearrange the widgets inside it, and a layout that reshuffled on the way down could not be restored on the way back up.
|
|
167
|
-
|
|
168
|
-
- **`selectionMode`** `'none' | 'single' | 'multiple'` (default: `'none'`) — Whether widgets can be selected, and how many at a time. `'multiple'` also enables the marquee and rigid group movement.
|
|
169
|
-
- **`selectedKeys`** `string[]` — Controlled selection. Keys are layout item ids (`LayoutItem.i`); keys with no matching layout item are silently ignored. Requires `selectionMode` other than `'none'`.
|
|
170
|
-
- **`defaultSelectedKeys`** `string[]` — Initial selection for uncontrolled usage. Ignored when `selectedKeys` is set. An uncontrolled board also prunes keys of removed widgets and reports that through `onSelectionChange`; a controlled board leaves that to you.
|
|
171
|
-
- **`onSelectionChange`** `(keys: string[]) => void` — Called when the selection changes. Keys are deduped and returned in the board's layout order, never in click order.
|
|
172
|
-
- **`selectionCancel`** `string` (default: `BOARD_SELECTION_CANCEL`) — CSS selector marking interactive descendants. Only active while `selectionMode` is not `'none'`; on a non-selectable board `dragCancel` is the guard instead. A press on one never selects and never starts a drag, so the control keeps its own click _and_ its native focus; it also drops the selection, since interacting with a widget's content means the user has moved on — and that holds however the control handles the press, including one that stops propagation or renders in a portal (a menu opened from a widget's toolbar). On a selectable board this doubles as the drag guard, so form controls stay usable without also configuring `dragCancel`. The default covers native form controls, links, and the common ARIA widget roles, plus `[data-no-select]` as an escape hatch. Pass `''` to disable the guard. Can be overridden per widget.
|
|
173
|
-
- **`allowMarqueeSelection`** `boolean` (default: `selectionMode === 'multiple'`) — Draw a rubber-band selection when a drag starts on empty board space. Requires `selectionMode="multiple"` — setting it `true` under `'single'` or `'none'` does nothing. A press on a widget selects and drags instead, so the lasso owns empty canvas only. Hold <kbd>Shift</kbd> or <kbd>Cmd</kbd>/<kbd>Ctrl</kbd> to add to the existing selection rather than replacing it. A board sized to its content has no empty space left once the grid fills up, which makes the lasso undiscoverable — use `extraRows` to keep a band of it.
|
|
174
|
-
- **`onWidgetsDelete`** `(keys: string[]) => void` — Called when <kbd>Delete</kbd>/<kbd>Backspace</kbd> is pressed with a non-empty selection and focus is not in an editable field. **Board never mutates the layout itself** — removing the widgets is yours to do, which is what lets you make it undoable. Board only handles these keys when this handler is set.
|
|
175
|
-
- **`constraints`** `LayoutConstraint[]` (default: `[gridBounds, minMaxSize]`) — Grid layout constraints. **Replaces** the defaults rather than extending them, so a custom array turns off bounds clamping and `minW`/`maxW`/`minH`/`maxH` enforcement unless you re-include the built-ins. Per-item and per-widget `constraints` are additive on top of these. See [How props interact](#how-props-interact).
|
|
176
|
-
- **`width`** `number` — Explicit width, which **disables the board's own measurement**. Only needed for SSR, tests, or a forced-size export — see [Sizing](#sizing); a board in the document measures itself and does not need this.
|
|
177
|
-
- **`widgetProps`** `Partial<Board.Widget props>` — Default props applied to every widget this board hosts, excluding `id` and `children` (per-widget `Board.Widget` props override these; `styles` and `mods` are merged rather than replaced). Use it to add a card border to every widget (`widgetProps={{ isCard: true }}`) or set shared `styles`/sizing defaults without repeating them on each widget.
|
|
178
|
-
- **`place`** `Styles['place']` — Style prop shorthand for `place-items`/`place-content`.
|
|
179
|
-
- **`scrollMargin`** `Styles['scrollMargin']` — Style prop for scroll margin.
|
|
180
|
-
|
|
181
|
-
### Board.Widget
|
|
182
|
-
|
|
183
|
-
- **`id`** `string` (required) — Must match the `i` of a layout item. A widget whose `id` has no layout item is not rendered; `Board.Widget` itself renders nothing, it only registers content and options with the owning `Board`.
|
|
184
|
-
- **`cornerChrome`** `ReactNode` — A control anchored to one corner of the widget and centred on it — a settings button, a badge, a remove affordance. Drawn in the same layer as the corner resize grips, which is the layer that escapes the widget's own clip: chrome hung off the corner from _inside_ a widget is cropped in half by that clip, or by an ancestor's scroll container when the widget sits in the first row. It is also outside the drag gesture, so a press on it can never start a drag and needs no `dragCancel` entry.
|
|
185
|
-
- **`cornerChromePlacement`** `'ne' | 'nw' | 'se' | 'sw'` (default: `'ne'`) — Which corner the chrome sits on. Pair it with a `resizeGripPlacement="corner"` grip on the opposite corner and the two line up.
|
|
186
|
-
- **`mods`** `Record<string, boolean | string | undefined>` — App-defined modifiers for this widget, merged into the ones the board sets, so a `styles` map can match on app state: `mods={{ editing: true }}` with `styles={{ shadow: { editing: '0 0 0 1bw #primary' } }}`. Board's own modifiers always win, so a custom one can never shadow `selected`, `drag` and the rest. Board-level `widgetProps.mods` merge underneath, so a shared default can be set once and overridden per widget — and every modifier rides along on the clone that floats during a drag.
|
|
187
|
-
- **`hoverRing`** `boolean` (default: `true`) — Whether the widget shows the resting ring on hover — the affordance that says it can be picked up. Turn it off for a widget that is scenery rather than a thing to grab (a chromeless layout container, a spacer), where the ring advertises an interaction the widget does not really offer. Selection and drag treatments are unaffected. Can be set for the whole board via `widgetProps`.
|
|
188
|
-
- **`isCard`** `boolean` (default: `false`) — Render this widget as a card by adding a border. Widgets are always filled (`#surface-2`) and rounded (`1cr`); `isCard` adds the border on top. Defaults to `false` (borderless) unless the owning `Board`'s `widgetProps.isCard` opts in; set it per widget to override that default.
|
|
189
|
-
- **`isDraggable`** `boolean` — Disable dragging for this widget. Can only take away: it cannot re-enable dragging on a board with `isDraggable={false}`, nor on a `static` layout item.
|
|
190
|
-
- **`isResizable`** `boolean` — Disable resizing for this widget. Same one-way semantics as `isDraggable`.
|
|
191
|
-
- **`resizeHandles`** `ResizeHandleAxis[]` — Override the board's handles. Overridden in turn by the layout item's own `resizeHandles` — the one option where the layout item outranks `Board.Widget`.
|
|
192
|
-
- **`resizeGripPlacement`** `'inside' | 'corner' | 'outside'` — Override where this widget's grips sit, instead of letting it resolve from the widget's content.
|
|
193
|
-
- **`minW`** `number` — Minimum width in grid columns. Used when the layout item omits `minW`; the resize handle stops here.
|
|
194
|
-
- **`maxW`** `number` — Maximum width in grid columns. Used when the layout item omits `maxW`.
|
|
195
|
-
- **`minH`** `number` — Minimum height in grid rows. Used when the layout item omits `minH`.
|
|
196
|
-
- **`maxH`** `number` — Maximum height in grid rows. Used when the layout item omits `maxH`.
|
|
197
|
-
- **`constraints`** `LayoutConstraint[]` — Per-widget constraints, applied _in addition_ to the board's (unlike the board's own `constraints`, which replace the defaults). A layout item's `constraints` replace these.
|
|
198
|
-
- **`qa`** `string` — Test id for the rendered widget element.
|
|
199
|
-
- **`styles`** `Styles` — Style overrides for the rendered widget element.
|
|
200
|
-
- **Style properties** — `Board.Widget` also accepts container style props directly (e.g. `fill`, `padding`, `radius`, `border`, `shadow`, `color`, `flow`, `gap`), just like `Board`. They are merged into `styles` (a direct prop wins over the same key in the `styles` object). Shared `widgetProps.styles` from the owning `Board` are merged underneath, so a per-widget style only overrides the matching keys instead of replacing the whole default.
|
|
201
|
-
- **`isAutoHeight`** `boolean` (default: `false`) — Grow this widget's height in its board to fit its content (only ever increases, never shrinks). Pair it with a nested `Board isAligned` so the container expands until the inner board's rows fit at the parent's row height. It also pins the widget's resize floor above `minH`: you cannot drag the widget shorter than the height its content currently needs. A grow commits, so it fires the board's `onLayoutChange` with `reason: 'normalize'`.
|
|
202
|
-
- **`dragCancel`** `string` — Override the board's `dragCancel` selector for this widget.
|
|
203
|
-
- **`dragHandle`** `string` — Override the board's `dragHandle` selector for this widget.
|
|
204
|
-
- **`isSelectable`** `boolean` — Disable selection for this widget while the board's `selectionMode` is on. Cannot opt a widget in on a board with `selectionMode="none"`.
|
|
205
|
-
- **`selectionCancel`** `string` — Override the board's `selectionCancel` selector for this widget.
|
|
206
|
-
- **`aria-label`** `string` — Accessible name for the widget. Falls back to `qa`, then the layout item id — both developer-facing, so set this whenever the widget is user-visible. Also what the selection announcement reads out.
|
|
207
|
-
|
|
208
|
-
A widget clips its content to its grid cell, card or not — otherwise a nested board with more rows than currently fit, or a mid-drag reflow, would paint over its neighbours. The cost is that a descendant's `outline` is cropped at the edge (an outline is clipped by an _ancestor's_ overflow, not its own), so a widget whose content must paint outside — a control drawing its own active ring — sets `overflow="visible"`, or draws the ring inset with a negative `outlineOffset`.
|
|
209
|
-
|
|
210
|
-
### Board.Provider
|
|
211
|
-
|
|
212
|
-
Shares one drag context across multiple boards. A standalone `Board` provides its own automatically; only use `Board.Provider` when you need cross-board dragging.
|
|
213
|
-
|
|
214
|
-
- **`onWidgetTransfer`** `(info: { widgetId, fromBoardId, toBoardId, item }) => void` — Fired when a widget is dropped from one board into another.
|
|
215
|
-
|
|
216
|
-
Dragging a widget across a container that can unmount (for example, out of an inactive `Tab`) requires controlled ownership: a widget's content is declared by its `Board.Widget`, so if that declaration unmounts the content is lost. Keep each board's `layout` controlled and, in response to `onWidgetTransfer`, move the `Board.Widget` declaration into the destination container so the content follows the widget. The [Boards inside Tabs](#boards-inside-tabs) example shows the pattern.
|
|
217
|
-
|
|
218
|
-
### Board.Responsive
|
|
219
|
-
|
|
220
|
-
A wrapper around `Board` that selects a layout and column count based on the container's measured width, mirroring react-grid-layout's `Responsive` + `WidthProvider`. It accepts every `Board` prop, with five of them re-shaped or taken over: `layout` and `defaultLayout` are replaced by `layouts`/`defaultLayouts`, `cols` becomes a per-breakpoint map, `onLayoutChange` gains a second argument, and `width` stays available but defaults to the wrapper's own measurement. `breakpoints` and `cols` are required; the rest:
|
|
221
|
-
|
|
222
|
-
- **`breakpoints`** `Record<string, number>` — Breakpoint name to minimum container width (px).
|
|
223
|
-
- **`cols`** `Record<string, number>` — Breakpoint name to column count.
|
|
224
|
-
- **`layouts`** `Record<string, LayoutItem[]>` — Controlled per-breakpoint layouts.
|
|
225
|
-
- **`defaultLayouts`** `Record<string, LayoutItem[]>` — Initial per-breakpoint layouts for uncontrolled usage.
|
|
226
|
-
- **`onLayoutChange`** `(currentLayout: LayoutItem[], allLayouts: Record<string, LayoutItem[]>) => void` — Called on commit with the active breakpoint's layout and the full map.
|
|
227
|
-
- **`onBreakpointChange`** `(breakpoint: string, cols: number) => void` — Called when the active breakpoint changes.
|
|
228
|
-
- **`onWidthChange`** `(width: number, cols: number) => void` — Called when the measured container width changes, with the active breakpoint's column count. Mirrors react-grid-layout's `WidthProvider` `onWidthChange`. Not fired while width is unmeasured or when an explicit `width` is provided.
|
|
229
|
-
- **`breakpoint`** `string` — Force a specific breakpoint regardless of width (e.g. for a fixed-size screenshot or PDF export).
|
|
230
|
-
- **`width`** `number` — Explicit width; disables measurement (SSR/tests/forced-size exports).
|
|
231
|
-
|
|
232
|
-
A breakpoint with no layout is synthesized from the nearest available one, corrected into bounds and compacted for the target column count.
|
|
233
|
-
|
|
234
|
-
### Modifiers
|
|
235
|
-
|
|
236
|
-
Every widget host exposes these as `data-*` attributes, and any style map passed through `widgetProps.styles` or a per-widget `styles` resolves against them.
|
|
237
|
-
|
|
238
|
-
- **`selected`** — the widget is in the board's selection.
|
|
239
|
-
- **`pre-selected`** — a live marquee covers the widget, so releasing the pointer will select it. Never set at the same time as `selected`.
|
|
240
|
-
- **`card`** — the widget draws a card border (`isCard`).
|
|
241
|
-
- **`no-hover-ring`** — the widget opted out of the resting hover ring (`hoverRing={false}`).
|
|
242
|
-
- **`draggable`** — the widget can be dragged and no drag is in flight.
|
|
243
|
-
- **`drag`** — the widget is being dragged.
|
|
244
|
-
- **`floating`** — this is the clone floating in the drag overlay.
|
|
245
|
-
- **`resizing`** — the widget is being resized.
|
|
246
|
-
- **`static`** — the layout item is `static`.
|
|
247
|
-
- **`hovered`**, **`focus-visible`** — pointer and keyboard-focus states.
|
|
248
|
-
- **`settled`** — the board has painted its widgets once, so position changes animate.
|
|
249
|
-
|
|
250
|
-
Selection is an _edge_ treatment — a `#primary-border` border plus a `#primary` ring — because it reads as a focus-like state rather than a fill. `outline` stays reserved for the real focus ring, which is what keeps the two legible together: they use different tokens and the focus outline sits one border-width further out. `pre-selected` draws the same edge with the ring dimmed, so committing a lasso only changes the strength of something already on screen. To restyle either, override the same keys:
|
|
251
|
-
|
|
252
|
-
```jsx
|
|
253
|
-
<Board
|
|
254
|
-
selectionMode="multiple"
|
|
255
|
-
widgetProps={{
|
|
256
|
-
styles: {
|
|
257
|
-
border: { '': true, 'pre-selected': '#note-border', selected: '#note-border' },
|
|
258
|
-
shadow: { '': false, 'pre-selected': '0 0 0 1bw #note.40', selected: '0 0 0 1bw #note' },
|
|
259
|
-
},
|
|
260
|
-
}}
|
|
261
|
-
/>
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### Data attributes
|
|
265
|
-
|
|
266
|
-
Supported hooks for tests, E2E, and building your own selection overlay:
|
|
267
|
-
|
|
268
|
-
- **`data-board-id`** on the board element — the board's `id`.
|
|
269
|
-
- **`data-board-widget-host`** on every widget host — presence only, "this is a widget host".
|
|
270
|
-
- **`data-board-widget-id`** on every widget host — which widget.
|
|
271
|
-
- **`data-selected`** on a selected host.
|
|
272
|
-
- **`data-pre-selected`** on a host a live marquee currently covers.
|
|
273
|
-
- **`data-marquee`** on the board element while a marquee gesture is in progress.
|
|
274
|
-
|
|
275
|
-
### Base Properties
|
|
276
|
-
|
|
277
|
-
Supports [Base properties](../../BaseProperties.md).
|
|
278
|
-
|
|
279
|
-
### Style Properties
|
|
280
|
-
|
|
281
|
-
These properties allow direct style application without using the `styles` prop:
|
|
282
|
-
|
|
283
|
-
- **Base:** `display`, `font`, `preset`, `hide`, `whiteSpace`, `opacity`, `transition`
|
|
284
|
-
- **Position:** `gridArea`, `order`, `gridColumn`, `gridRow`, `placeSelf`, `alignSelf`, `justifySelf`, `zIndex`, `blockMargin`, `inlineMargin`, `inset`, `blockInset`, `inlineInset`, `position`, `scrollMargin`, `blockScrollMargin`, `inlineScrollMargin`, `scrollPadding`, `blockScrollPadding`, `inlineScrollPadding`
|
|
285
|
-
- **Dimension:** `width`, `height`, `blockSize`, `inlineSize`, `flexBasis`, `flexGrow`, `flexShrink`, `flex`
|
|
286
|
-
- **Block:** `border`, `blockBorder`, `inlineBorder`, `radius`, `shadow`, `outline`, `padding`, `blockPadding`, `inlinePadding`, `overflow`, `scrollbar`, `textAlign`
|
|
287
|
-
- **Color:** `color`, `fill`, `fade`, `image`
|
|
288
|
-
- **Flow:** `flow`, `place`, `placeItems`, `placeContent`, `alignItems`, `alignContent`, `justifyItems`, `justifyContent`, `align`, `justify`, `gap`, `columnGap`, `rowGap`, `gridColumns`, `gridRows`, `gridTemplate`, `gridAreas`
|
|
289
|
-
|
|
290
|
-
## Examples
|
|
291
|
-
|
|
292
|
-
### Controlled layout
|
|
293
|
-
|
|
294
|
-
### Fixed matrix
|
|
295
|
-
|
|
296
|
-
`rows` with `rowHeight="stretch"` gives a board of a declared size that fills its container: a `cols × rows` matrix whose cells resize with the box rather than a grid that grows a row at a time. Pair it with `compact="free"` for a canvas the author places things on directly.
|
|
297
|
-
|
|
298
|
-
### Free positioning
|
|
299
|
-
|
|
300
|
-
A widget stays exactly where you drop it and never shuffles its neighbours. Dropping onto an occupied cell is blocked, so the widget stays at its last free spot.
|
|
301
|
-
|
|
302
|
-
### Free positioning (overlap)
|
|
303
|
-
|
|
304
|
-
Add `allowOverlap` to let widgets stack on top of each other instead of being blocked from occupied cells.
|
|
305
|
-
|
|
306
|
-
### Horizontal compaction
|
|
307
|
-
|
|
308
|
-
### Non-resizable
|
|
309
|
-
|
|
310
|
-
### Read-only
|
|
311
|
-
|
|
312
|
-
`isDraggable={false}` together with `isResizable={false}` makes the whole board read-only. Because the board never installs its drag handlers, widget content stays fully interactive — text inside a widget can still be selected.
|
|
313
|
-
|
|
314
|
-
### Single-axis resize
|
|
315
|
-
|
|
316
|
-
Set a widget's `resizeHandles` to a single edge to constrain resizing to one axis: `['e']` for horizontal only, `['s']` for vertical only. Edge handles draw a dotted grip revealed on hover, focus, or while resizing.
|
|
317
|
-
|
|
318
|
-
### Min/max widget size
|
|
319
|
-
|
|
320
|
-
Bound resizing with per-widget `minW`/`maxW` (columns) and `minH`/`maxH` (rows).
|
|
321
|
-
|
|
322
|
-
### Grid lines
|
|
323
|
-
|
|
324
|
-
Show grid lines behind the widgets while dragging or resizing (or always). With several boards under one `Board.Provider`, `'drag'` lights up only the board the drag belongs to; `'any-drag'` lights up all of them.
|
|
325
|
-
|
|
326
|
-
### Scoped grid lines
|
|
327
|
-
|
|
328
|
-
Two boards under one `Board.Provider`. With `showGridLines="drag"` only the board taking part in the gesture lights up — the source, plus whichever board the widget is currently over. Switch to `'any-drag'` to light up both from the first pixel of any drag.
|
|
329
|
-
|
|
330
|
-
### Corner chrome
|
|
331
|
-
|
|
332
|
-
A control centred on a widget's corner with `cornerChrome`, drawn outside the widget's clip so nothing crops it. With a `resizeGripPlacement="corner"` grip on the opposite corner, the two line up.
|
|
333
|
-
|
|
334
|
-
### Corner resize grip
|
|
335
|
-
|
|
336
|
-
Centre the resize grip on the widget's corner with `resizeGripPlacement="corner"`, so it lines up with a control centred on the opposite corner.
|
|
337
|
-
|
|
338
|
-
### Nested board grips
|
|
339
|
-
|
|
340
|
-
Grip placement resolving itself across a nesting boundary, with no `resizeGripPlacement` set anywhere: the widget holding a `Board` draws its grips outside, in the gutter, and the leaf widgets keep theirs inside. Hover a child and only its grips appear; hover the container's outer edge and only the container's do.
|
|
341
|
-
|
|
342
|
-
### Resolving a blocked drop
|
|
343
|
-
|
|
344
|
-
On a free grid a drop onto occupied cells is refused. `collisionMode` resolves it instead: `'downscale'` shrinks the widget into whatever room is at the drop cell. Within one board, `'swap'` trades places with the widget already there. Across boards, the same mode downscales into an empty cell without exchanging destination widgets, and an occupied anchor commits the previewed cell instead of cancelling. None of these paths ever grows a widget. The examples below show all three behaviors.
|
|
345
|
-
|
|
346
|
-
### Card widgets
|
|
347
|
-
|
|
348
|
-
Widgets are filled (`#surface-2`) and rounded by default, but borderless. Add a card border per widget with `isCard`, or for the whole board at once with `widgetProps={{ isCard: true }}`. Per-widget `isCard` overrides the board default.
|
|
349
|
-
|
|
350
|
-
### Drag cancel
|
|
351
|
-
|
|
352
|
-
Keep interactive controls inside a widget clickable by excluding them from the drag gesture with `dragCancel`.
|
|
353
|
-
|
|
354
|
-
### Responsive
|
|
355
|
-
|
|
356
|
-
`Board.Responsive` swaps the layout and column count per breakpoint.
|
|
357
|
-
|
|
358
|
-
### Cross-board dragging
|
|
359
|
-
|
|
360
|
-
Wrap boards in `Board.Provider` to drag widgets between them.
|
|
361
|
-
|
|
362
|
-
### Nested boards
|
|
363
|
-
|
|
364
|
-
A `Board` can be placed inside a `Board.Widget`, making the whole container draggable while its children can be dragged out into sibling boards.
|
|
365
|
-
|
|
366
|
-
Set `isAligned` on the nested board to align it with the surrounding layout: every cell matches the parent's cell size exactly. Its columns keep the parent's pixel pitch (so resizing the container adds or removes columns instead of stretching them) and its rows use the parent's row height verbatim.
|
|
367
|
-
|
|
368
|
-
Because an aligned board never shrinks its rows to fit, add `isAutoHeight` to the container `Board.Widget` so it grows (only ever taller) until the inner board's rows fit at the parent's row height. It also stops the container's resize handle at that height, so you can't drag it shorter than the inner board needs.
|
|
369
|
-
|
|
370
|
-
### Aligned nested boards
|
|
371
|
-
|
|
372
|
-
A nested `Board` with `isAligned` and no padding, fill, border, or radius of its own — only a header above the grid — inherits the parent column pitch with zero offset, so its columns line up exactly with the outer board. Grid lines are shown on both boards while dragging to verify the alignment.
|
|
373
|
-
|
|
374
|
-
### Boards inside Tabs
|
|
375
|
-
|
|
376
|
-
A `Board.Widget` can host a `Tabs` where each tab renders its own `Board`, all under a shared `Board.Provider` so widgets can be dragged between tabs and out into the surrounding board. Because an inactive tab unmounts, this example is fully controlled: each board's `layout` is controlled and `onWidgetTransfer` moves a widget's declaration into the destination container so its content survives dragging out of (and switching away from) a tab.
|
|
377
|
-
|
|
378
|
-
When a `Tabs` sits inside a `Board`, tab switching becomes "spring-loaded" automatically: while you drag a widget, hovering a tab header for a moment opens that tab so you can drop into it (or move a widget between tabs). This needs no setup - `Tabs` detects the active Board drag and, for its duration, keeps panels mounted so the tab a widget is dragged out of (and the board owning the in-flight drag) is not unmounted mid-gesture. Spring-loading works with mouse and pen; touch drags capture the pointer, so they do not trigger it.
|
|
379
|
-
|
|
380
|
-
`Tabs` learns about the drag from a context this package owns, which a `Board` implementation living **outside** this package cannot reach — so both behaviours above would silently be missing there. Publish the drag state with `BoardDragActiveProvider` instead, wrapping the subtree your board renders at the same level as your drag registry:
|
|
381
|
-
|
|
382
|
-
```jsx
|
|
383
|
-
import { BoardDragActiveProvider } from '@cube-dev/ui-kit';
|
|
384
|
-
|
|
385
|
-
<BoardDragActiveProvider isActive={dragState != null}>{children}</BoardDragActiveProvider>;
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
You never need it alongside this package's `Board`, which provides it for you.
|
|
389
|
-
|
|
390
|
-
### Selection
|
|
391
|
-
|
|
392
|
-
Press a widget to select it, <kbd>Shift</kbd>-press to add or remove one, and drag from empty board space to lasso. Because the press both selects and arms the drag, grabbing a widget you have not selected simply makes it the selection and moves it; grabbing one that _is_ selected moves the whole block rigidly — keeping its shape, clamping against the grid edge as a unit rather than collapsing, and committing once. While the band is out, the widgets it covers show a dimmed version of the selected edge (`pre-selected`), and no text can be selected under it.
|
|
393
|
-
|
|
394
|
-
A group reflows like a single widget — it is compacted by the same rules, so on a `vertical` board it can no more be parked in empty space than one widget can, and the widgets around it close the gap in the same frame — but it does so as one block. Its members keep their exact offsets for the whole drag, and the widgets standing where it lands move out of its way rather than being packed between its members — whether it is dragged against the compaction axis or across it. When the drag ends the board compacts normally, so a group whose members could each float further settles on release. Under `compact="free"` (or `null`) nothing compacts, so the block stays precisely where it was dropped.
|
|
395
|
-
|
|
396
|
-
### Interactive content keeps its clicks
|
|
397
|
-
|
|
398
|
-
### Controlled selection and deleting widgets
|
|
399
|
-
|
|
400
|
-
### Knowing why the layout changed
|
|
401
|
-
|
|
402
|
-
`onLayoutChange` reports a `reason` alongside the layout, because a board commits for two different kinds of reason and an app usually needs to tell them apart. `'drag'`, `'resize'` and `'transfer'` are the user arranging their board. `'normalize'` is the board fitting an existing arrangement to a constraint that moved underneath it — the column count changed, or an `isAutoHeight` widget grew to fit its content.
|
|
403
|
-
|
|
404
|
-
An app that persists every commit without looking writes those normalizations back as if they were edits, which marks a document dirty that nobody touched and can overwrite saved positions with ones the board derived. Persist the gestures and let a normalization pass:
|
|
405
|
-
|
|
406
|
-
```jsx
|
|
407
|
-
<Board
|
|
408
|
-
onLayoutChange={(layout, { reason }) => {
|
|
409
|
-
if (reason === 'normalize') return;
|
|
410
|
-
save(layout);
|
|
411
|
-
}}
|
|
412
|
-
/>
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
### Restyling the selection
|
|
416
|
-
|
|
417
|
-
## Sizing
|
|
418
|
-
|
|
419
|
-
**A board measures its own container. You do not need to measure it for it.**
|
|
420
|
-
|
|
421
|
-
It observes its container with a `ResizeObserver` and derives the column width from that, so the only reason to pass `width` is to _prevent_ measurement — SSR, a test, or an export forced to a fixed size.
|
|
422
|
-
|
|
423
|
-
The part worth knowing, because it is what makes hand-measuring look necessary: **a board renders no widgets at all until it has a width.** At width 0 a column works out negative (`(0 - margin × (cols - 1) - containerPadding × 2) / cols`), so painting then would put every widget at a nonsense size for a frame. Instead the board renders its own box and nothing inside it, and the widgets appear on the first measured frame. A board briefly hidden (an inactive tab, say) keeps its last non-zero measurement rather than dropping back to zero, so its widgets stay mounted — which is what keeps an in-flight drag alive.
|
|
424
|
-
|
|
425
|
-
So a consumer that mirrors this — measuring the box itself, feeding the result back in as `width`, and gating its own render on `measured > 0` — is reimplementing behaviour it already has, and pays a `ResizeObserver` and an extra DOM node for it.
|
|
426
|
-
|
|
427
|
-
## Accessibility
|
|
428
|
-
|
|
429
|
-
### Keyboard Navigation
|
|
430
|
-
|
|
431
|
-
| Key | Action |
|
|
432
|
-
| --- | --- |
|
|
433
|
-
| <kbd>Tab</kbd> | Move focus to the next widget. |
|
|
434
|
-
| <kbd>Arrow</kbd> keys | Move the focused widget to the next valid cell in that direction — usually one cell, but it scans further when the adjacent cell cannot produce a valid move. With a selection, moves the whole selection. Honours `collisionMode`, but never resizes anything. |
|
|
435
|
-
| <kbd>Space</kbd> | Toggle the focused widget's selection (`selectionMode` only). |
|
|
436
|
-
| <kbd>Shift</kbd> / <kbd>Cmd</kbd> / <kbd>Ctrl</kbd> + press | Add or remove a widget from the selection. |
|
|
437
|
-
| <kbd>Escape</kbd> | Clear the selection. Only consumed when something is selected. |
|
|
438
|
-
| <kbd>Delete</kbd> / <kbd>Backspace</kbd> | Request deletion of the selection via `onWidgetsDelete`. Only consumed when that handler is set and the selection is non-empty. |
|
|
439
|
-
|
|
440
|
-
Arrow keys and <kbd>Space</kbd> only act when the widget host **itself** is focused, never when focus is inside a nested control, so an `input`, `textarea`, or `button` inside a widget keeps every key it needs. Board's own keys are handled on the board element rather than on `document`, and are only consumed when they actually do something — an <kbd>Escape</kbd> with nothing selected still reaches an ancestor Dialog, and <kbd>Backspace</kbd> stays available for text editing and browser-back.
|
|
441
|
-
|
|
442
|
-
Every draggable or selectable widget is its own tab stop. Roving tabindex would be an improvement on a large board, but arrow keys are already claimed for movement, so it needs a navigation key set of its own — see below.
|
|
443
|
-
|
|
444
|
-
### Screen Reader Support
|
|
445
|
-
|
|
446
|
-
Each widget host is a `group` with an accessible name, taken from `aria-label`, then `qa`, then the layout item id — set `aria-label` on any user-visible widget, since the other two are developer-facing. Draggable widgets carry a localized `aria-roledescription`, and selectable ones advertise `aria-keyshortcuts="Space"`.
|
|
447
|
-
|
|
448
|
-
Selection state is conveyed two ways: a selected widget is described as "Selected" via `aria-describedby`, and every selection change is announced through a polite live region owned by the board ("Revenue selected", "3 widgets selected", "Selection cleared"). A marquee announces once, on release — not once per pointer frame.
|
|
449
|
-
|
|
450
|
-
### ARIA Properties
|
|
451
|
-
|
|
452
|
-
Board deliberately does **not** use a collection role. `aria-selected` is only valid on `option`, `gridcell`, `row`, `treeitem` and friends, and every one of those requires presentational children — but a Board widget hosts arbitrary interactive content (nested boards, tabs, inputs), and a `grid`'s keyboard model would fight `useMove`'s arrow keys. Rather than ship ARIA that lies about the structure, selection is exposed through the name, description, and live region described above. Set `aria-label` on your widgets and this reads correctly.
|
|
453
|
-
|
|
454
|
-
## Not yet supported
|
|
455
|
-
|
|
456
|
-
- **External drag-in from a palette** — dragging a brand-new widget from an element outside any board into the grid (react-grid-layout's `isDroppable`/`onDrop`/`droppingItem`) is not implemented. Board's drag engine is built entirely on React Aria's `useMove` over registered widgets; drag-in is a separate HTML5 drag-and-drop modality (pixel-to-grid mapping, a dropping placeholder, and new `onDrop`/`droppingItem` props). Add widgets programmatically (render a new `Board.Widget` and add its layout item), or drag between boards with `Board.Provider`.
|
|
457
|
-
- **Cross-board group transfer** — a group drag never leaves its source board. Cross-board transfer is single-item throughout (`WidgetTransferInfo`, the carried preview, the free-slot fallback), and landing a group on a board with a different column count has no obvious right answer. Degrading to a single-widget transfer would silently split a selection the user made, so the gesture is confined instead. Drag widgets across one at a time.
|
|
458
|
-
- **Collection ARIA semantics** — `role="grid"`/`option`, `aria-selected` and `aria-multiselectable`, for the reason above.
|
|
459
|
-
- **Roving tabindex** — needs a widget-navigation key set that does not collide with `useMove`'s arrow keys.
|
|
460
|
-
- **<kbd>Cmd/Ctrl</kbd>+<kbd>A</kbd>** — select all.
|
|
461
|
-
- **Cross-board marquee and cross-board selection** — selection is per board; a `Board.Provider` shares drag, not selection.
|
|
462
|
-
- **Windows High Contrast Mode** — no component in the kit styles for `forced-colors` yet. The selected state uses a tint, a border _and_ an extra ring, so it does not rely on hue alone, but a full forced-colors pass is a system-wide change.
|
|
463
|
-
|
|
464
|
-
## Layout helpers
|
|
465
|
-
|
|
466
|
-
Placement questions the board answers for itself during a gesture, exported so an app can ask them for a widget it adds programmatically. Without these, an app re-implements the scan, and the same drop lands in two different cells depending on whether a pointer or a code path served it.
|
|
467
|
-
|
|
468
|
-
- **`placeInFreeSlot(others, item, cols, maxRows?)`** — the first position at or below the item's preferred cell where it fits without overlapping `others`, scanning the preferred row first, then down, then up. Never past `maxRows`, and never resizes to fit (only `w` is capped to `cols`). This is the rule the board itself applies when a dragged widget cannot stay where it was dropped.
|
|
469
|
-
- **`distributeEvenly(layout, { cols, rows })`** — tile every item evenly across both axes, keeping the row structure the layout already has: items are grouped into visual rows by their current `y`, `rows` is divided across the groups and `cols` across each group's members. A line holding more items than the grid is wide wraps into sub-rows. This is the one operation that deliberately _grows_ items — every gesture-driven path refuses to, which is why it is a call the app makes rather than a mode the board is in.
|
|
470
|
-
|
|
471
|
-
## Attribution
|
|
472
|
-
|
|
473
|
-
The layout engine in `grid-core/` is a vendored, trimmed copy of [react-grid-layout](https://github.com/react-grid-layout/react-grid-layout) (MIT). The React layer is a UI Kit-native reimplementation on top of tasty and React Aria. See `grid-core/NOTICE.md`.
|