@cube-dev/ui-kit 0.0.0-canary-6e5b985 → 0.0.0-canary-a702373
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/README.md +64 -0
- package/dist/README.md +64 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/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 +2 -2
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +7 -7
- package/dist/components/content/Placeholder/Placeholder.js.map +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.d.ts +14 -14
- 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 +39 -13
- package/dist/components/content/use-auto-tooltip.js.map +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/TableBase/ColumnResizer.js +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/column-menu.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 +7 -7
- package/dist/components/data/TableBase/styled.js.map +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-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 +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-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 +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 +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.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 +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/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/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/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/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/Board/Board.js +4 -9
- package/dist/components/layout/Board/Board.js.map +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.d.ts +2 -17
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/Widget.js.map +1 -1
- package/dist/components/layout/Board/WidgetHost.js +32 -359
- package/dist/components/layout/Board/WidgetHost.js.map +1 -1
- package/dist/components/layout/Board/board-context.js +1 -1
- package/dist/components/layout/Board/board-context.js.map +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.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/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/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/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/context.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/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/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 +5 -1
- 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 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- 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.js +1 -1
- package/dist/precompile/index.d.ts +45 -0
- package/dist/precompile/index.js +52 -0
- package/dist/precompile/index.js.map +1 -0
- package/dist/precompiled/index.d.ts +1 -0
- package/dist/precompiled/index.js +2 -0
- package/dist/precompiled/manifest.d.ts +4 -0
- package/dist/precompiled/manifest.js +2944 -0
- package/dist/precompiled/manifest.json +2942 -0
- package/dist/precompiled/register.d.ts +1 -0
- package/dist/precompiled/register.js +4 -0
- package/dist/precompiled/report.json +1548 -0
- package/dist/precompiled/styles.css +3416 -0
- package/dist/precompiled/styles.d.ts +1 -0
- 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/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/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/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/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/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 +3 -3
- package/docs/components/layout/Board.md +2 -20
- package/docs/tasty/README.md +3 -1
- package/docs/tasty/debug.md +17 -6
- package/docs/tasty/precompile.md +186 -0
- package/docs/tasty/runtime-benchmarks.md +10 -1
- package/docs/tasty/ssr.md +151 -31
- package/package.json +35 -5
- package/scripts/precompile-tasty-catalog.mjs +727 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-a702373 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
5
|
-
import { BoardHostContext
|
|
5
|
+
import { BoardHostContext } from "./board-context.js";
|
|
6
6
|
import { calcGridColWidth, calcGridItemPosition } from "./grid-core/calculate.js";
|
|
7
|
-
import { isDevEnv } from "../../../utils/is-dev-env.js";
|
|
8
7
|
import { tasty } from "@tenphi/tasty";
|
|
9
8
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
10
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -23,41 +22,6 @@ const AUTO_HEIGHT_TOLERANCE = 4;
|
|
|
23
22
|
* hit-zone reads the same number so what you see is what you can grab.
|
|
24
23
|
*/
|
|
25
24
|
const GRIP_SIZE = 10;
|
|
26
|
-
/**
|
|
27
|
-
* How far a `corner`-placed hit-zone may reach *inward*: exactly the half of the
|
|
28
|
-
* dot that is painted inside the widget, and no further. Reaching deeper would
|
|
29
|
-
* park an invisible resize target over the widget's own content — and when that
|
|
30
|
-
* content is a nested `Board`, the child in the bottom-right cell loses its own
|
|
31
|
-
* corner handle to it and cannot be resized at all (CUB-4166).
|
|
32
|
-
*/
|
|
33
|
-
const CORNER_HIT_INWARD = GRIP_SIZE / 2;
|
|
34
|
-
/**
|
|
35
|
-
* Ceiling on how far the same hit-zone reaches *outward*, where there is only
|
|
36
|
-
* grid gutter to cover. Past a whole grip size the target stops reading as "that
|
|
37
|
-
* dot" and starts reading as "somewhere near the corner".
|
|
38
|
-
*/
|
|
39
|
-
const CORNER_HIT_OUTWARD_MAX = GRIP_SIZE;
|
|
40
|
-
/**
|
|
41
|
-
* Thickness of an `outside` grip: the band, measured out from the widget's edge,
|
|
42
|
-
* that the affordance owns. It is the grid gutter where the gutter is big enough
|
|
43
|
-
* to hold it, and this floor where it is not — an affordance thinner than this
|
|
44
|
-
* stops being reliably clickable, so it overhangs the neighbour instead and the
|
|
45
|
-
* board says so in development.
|
|
46
|
-
*/
|
|
47
|
-
const OUTSIDE_GRIP_MIN_BAND = 8;
|
|
48
|
-
/** Length of an `outside` edge grip along the edge it belongs to. */
|
|
49
|
-
const OUTSIDE_GRIP_LENGTH = 24;
|
|
50
|
-
/**
|
|
51
|
-
* Painted thickness of an `outside` edge grip, which is deliberately less than
|
|
52
|
-
* the band it sits in: the rest becomes a gap, so the control reads as a thing
|
|
53
|
-
* lying in the gutter rather than as an extension of the widget's own edge.
|
|
54
|
-
*
|
|
55
|
-
* Only the PAINT is inset. The element keeps the whole band, so the target does
|
|
56
|
-
* not shrink with the visual and the two still cannot drift apart.
|
|
57
|
-
*/
|
|
58
|
-
const OUTSIDE_GRIP_THICKNESS = 4;
|
|
59
|
-
/** Gap between a widget's corner and its `outside` corner grip. */
|
|
60
|
-
const OUTSIDE_CORNER_GAP = 2;
|
|
61
25
|
const WidgetElement = tasty({
|
|
62
26
|
qa: "BoardWidget",
|
|
63
27
|
styles: {
|
|
@@ -119,48 +83,37 @@ const HandleElement = tasty({
|
|
|
119
83
|
fill: "#clear",
|
|
120
84
|
pointerEvents: "auto",
|
|
121
85
|
"--handle-size": "3x",
|
|
122
|
-
"--handle-
|
|
123
|
-
"--edge-overhang": "-8px",
|
|
124
|
-
"--corner-overhang": {
|
|
86
|
+
"--handle-overhang": {
|
|
125
87
|
"": "-8px",
|
|
126
|
-
"placement=corner":
|
|
127
|
-
},
|
|
128
|
-
"--corner-size": {
|
|
129
|
-
"": "$handle-size",
|
|
130
|
-
"placement=corner": "$corner-hit-size"
|
|
88
|
+
"placement=corner": `${-GRIP_SIZE / 2}px`
|
|
131
89
|
},
|
|
90
|
+
"--handle-inset": "1x",
|
|
132
91
|
width: {
|
|
133
|
-
"": "$
|
|
134
|
-
"[data-axis=\"e\"] | [data-axis=\"w\"]": "$handle-size",
|
|
92
|
+
"": "$handle-size",
|
|
135
93
|
"[data-axis=\"n\"] | [data-axis=\"s\"]": "auto"
|
|
136
94
|
},
|
|
137
95
|
height: {
|
|
138
|
-
"": "$
|
|
139
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"]": "$handle-size",
|
|
96
|
+
"": "$handle-size",
|
|
140
97
|
"[data-axis=\"e\"] | [data-axis=\"w\"]": "auto"
|
|
141
98
|
},
|
|
142
99
|
top: {
|
|
143
100
|
"": "auto",
|
|
144
|
-
"[data-axis=\"ne\"] | [data-axis=\"nw\"]": "$
|
|
145
|
-
"[data-axis=\"n\"]": "$edge-overhang",
|
|
101
|
+
"[data-axis=\"n\"] | [data-axis=\"ne\"] | [data-axis=\"nw\"]": "$handle-overhang",
|
|
146
102
|
"[data-axis=\"e\"] | [data-axis=\"w\"]": "$handle-inset"
|
|
147
103
|
},
|
|
148
104
|
bottom: {
|
|
149
105
|
"": "auto",
|
|
150
|
-
"[data-axis=\"se\"] | [data-axis=\"sw\"]": "$
|
|
151
|
-
"[data-axis=\"s\"]": "$edge-overhang",
|
|
106
|
+
"[data-axis=\"s\"] | [data-axis=\"se\"] | [data-axis=\"sw\"]": "$handle-overhang",
|
|
152
107
|
"[data-axis=\"e\"] | [data-axis=\"w\"]": "$handle-inset"
|
|
153
108
|
},
|
|
154
109
|
left: {
|
|
155
110
|
"": "auto",
|
|
156
|
-
"[data-axis=\"nw\"] | [data-axis=\"sw\"]": "$
|
|
157
|
-
"[data-axis=\"w\"]": "$edge-overhang",
|
|
111
|
+
"[data-axis=\"w\"] | [data-axis=\"nw\"] | [data-axis=\"sw\"]": "$handle-overhang",
|
|
158
112
|
"[data-axis=\"n\"] | [data-axis=\"s\"]": "$handle-inset"
|
|
159
113
|
},
|
|
160
114
|
right: {
|
|
161
115
|
"": "auto",
|
|
162
|
-
"[data-axis=\"ne\"] | [data-axis=\"se\"]": "$
|
|
163
|
-
"[data-axis=\"e\"]": "$edge-overhang",
|
|
116
|
+
"[data-axis=\"e\"] | [data-axis=\"ne\"] | [data-axis=\"se\"]": "$handle-overhang",
|
|
164
117
|
"[data-axis=\"n\"] | [data-axis=\"s\"]": "$handle-inset"
|
|
165
118
|
},
|
|
166
119
|
cursor: {
|
|
@@ -234,115 +187,6 @@ const GripElement = tasty({
|
|
|
234
187
|
}
|
|
235
188
|
});
|
|
236
189
|
/**
|
|
237
|
-
* An `outside` grip: the visible control and the hit-zone in one element.
|
|
238
|
-
*
|
|
239
|
-
* The two used to be separate boxes of different sizes, aligned by hand, which is
|
|
240
|
-
* how a 10px dot came to stand for a 24px target reaching back over the widget's
|
|
241
|
-
* own content (CUB-4166). Here they cannot drift apart, because there is only one
|
|
242
|
-
* box: what is painted is exactly what is grabbed.
|
|
243
|
-
*
|
|
244
|
-
* It lives in the grid gutter, beyond the widget's edge — never over the widget's
|
|
245
|
-
* content, so a nested board's children keep every pixel of their own. The band
|
|
246
|
-
* it occupies (`--grip-band-x` / `--grip-band-y`) is the gutter, floored at
|
|
247
|
-
* `OUTSIDE_GRIP_MIN_BAND`. Rendered in `GripLayerElement`, which nothing clips.
|
|
248
|
-
*
|
|
249
|
-
* Always hit-testable, painted only once revealed: you have to be able to hover
|
|
250
|
-
* it to reveal it, and `opacity` leaves hit-testing alone.
|
|
251
|
-
*/
|
|
252
|
-
const OutsideGripElement = tasty({
|
|
253
|
-
qa: "BoardResizeHandle",
|
|
254
|
-
styles: {
|
|
255
|
-
position: "absolute",
|
|
256
|
-
boxSizing: "border-box",
|
|
257
|
-
pointerEvents: "auto",
|
|
258
|
-
touchAction: "none",
|
|
259
|
-
zIndex: 20,
|
|
260
|
-
opacity: {
|
|
261
|
-
"": 0,
|
|
262
|
-
revealed: 1
|
|
263
|
-
},
|
|
264
|
-
transition: "opacity 120ms ease-in-out, theme",
|
|
265
|
-
left: {
|
|
266
|
-
"": "auto",
|
|
267
|
-
"[data-axis=\"e\"] | [data-axis=\"ne\"] | [data-axis=\"se\"]": "100%",
|
|
268
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"]": "50%"
|
|
269
|
-
},
|
|
270
|
-
right: {
|
|
271
|
-
"": "auto",
|
|
272
|
-
"[data-axis=\"w\"] | [data-axis=\"nw\"] | [data-axis=\"sw\"]": "100%"
|
|
273
|
-
},
|
|
274
|
-
top: {
|
|
275
|
-
"": "auto",
|
|
276
|
-
"[data-axis=\"s\"] | [data-axis=\"se\"] | [data-axis=\"sw\"]": "100%",
|
|
277
|
-
"[data-axis=\"e\"] | [data-axis=\"w\"]": "50%"
|
|
278
|
-
},
|
|
279
|
-
bottom: {
|
|
280
|
-
"": "auto",
|
|
281
|
-
"[data-axis=\"n\"] | [data-axis=\"ne\"] | [data-axis=\"nw\"]": "100%"
|
|
282
|
-
},
|
|
283
|
-
transform: {
|
|
284
|
-
"": "translate(0, 0)",
|
|
285
|
-
"[data-axis=\"e\"] | [data-axis=\"w\"]": "translate(0, -50%)",
|
|
286
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"]": "translate(-50%, 0)",
|
|
287
|
-
"[data-axis=\"se\"]": `translate(${OUTSIDE_CORNER_GAP}px, ${OUTSIDE_CORNER_GAP}px)`,
|
|
288
|
-
"[data-axis=\"sw\"]": `translate(${-OUTSIDE_CORNER_GAP}px, ${OUTSIDE_CORNER_GAP}px)`,
|
|
289
|
-
"[data-axis=\"ne\"]": `translate(${OUTSIDE_CORNER_GAP}px, ${-OUTSIDE_CORNER_GAP}px)`,
|
|
290
|
-
"[data-axis=\"nw\"]": `translate(${-OUTSIDE_CORNER_GAP}px, ${-OUTSIDE_CORNER_GAP}px)`
|
|
291
|
-
},
|
|
292
|
-
width: {
|
|
293
|
-
"": `${GRIP_SIZE}px`,
|
|
294
|
-
"[data-axis=\"e\"] | [data-axis=\"w\"]": "$grip-band-x",
|
|
295
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"]": `${OUTSIDE_GRIP_LENGTH}px`
|
|
296
|
-
},
|
|
297
|
-
height: {
|
|
298
|
-
"": `${GRIP_SIZE}px`,
|
|
299
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"]": "$grip-band-y",
|
|
300
|
-
"[data-axis=\"e\"] | [data-axis=\"w\"]": `${OUTSIDE_GRIP_LENGTH}px`
|
|
301
|
-
},
|
|
302
|
-
padding: {
|
|
303
|
-
"": 0,
|
|
304
|
-
"[data-axis=\"e\"] | [data-axis=\"w\"]": "0 $grip-pad-x",
|
|
305
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"]": "$grip-pad-y 0"
|
|
306
|
-
},
|
|
307
|
-
backgroundClip: "content-box",
|
|
308
|
-
fill: {
|
|
309
|
-
"": "#clear",
|
|
310
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"] | [data-axis=\"e\"] | [data-axis=\"w\"]": "#dark.30",
|
|
311
|
-
"([data-axis=\"n\"] | [data-axis=\"s\"] | [data-axis=\"e\"] | [data-axis=\"w\"]) & resizing": "#dark.50"
|
|
312
|
-
},
|
|
313
|
-
borderTop: {
|
|
314
|
-
"": "0",
|
|
315
|
-
"[data-axis=\"ne\"] | [data-axis=\"nw\"]": "2px solid #dark.40"
|
|
316
|
-
},
|
|
317
|
-
borderBottom: {
|
|
318
|
-
"": "0",
|
|
319
|
-
"[data-axis=\"se\"] | [data-axis=\"sw\"]": "2px solid #dark.40"
|
|
320
|
-
},
|
|
321
|
-
borderLeft: {
|
|
322
|
-
"": "0",
|
|
323
|
-
"[data-axis=\"nw\"] | [data-axis=\"sw\"]": "2px solid #dark.40"
|
|
324
|
-
},
|
|
325
|
-
borderRight: {
|
|
326
|
-
"": "0",
|
|
327
|
-
"[data-axis=\"ne\"] | [data-axis=\"se\"]": "2px solid #dark.40"
|
|
328
|
-
},
|
|
329
|
-
radius: {
|
|
330
|
-
"": "round",
|
|
331
|
-
"[data-axis=\"se\"]": "4px bottom-right",
|
|
332
|
-
"[data-axis=\"sw\"]": "4px bottom-left",
|
|
333
|
-
"[data-axis=\"ne\"]": "4px top-right",
|
|
334
|
-
"[data-axis=\"nw\"]": "4px top-left"
|
|
335
|
-
},
|
|
336
|
-
cursor: {
|
|
337
|
-
"": "default",
|
|
338
|
-
"[data-axis=\"n\"] | [data-axis=\"s\"]": "ns-resize",
|
|
339
|
-
"[data-axis=\"e\"] | [data-axis=\"w\"]": "ew-resize",
|
|
340
|
-
"[data-axis=\"ne\"] | [data-axis=\"sw\"]": "nesw-resize",
|
|
341
|
-
"[data-axis=\"nw\"] | [data-axis=\"se\"]": "nwse-resize"
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
/**
|
|
346
190
|
* Where the corner grips are drawn when `resizeGripPlacement` is `'corner'`.
|
|
347
191
|
*
|
|
348
192
|
* `WidgetElement` clips its children (`overflow: hidden`, and that clipping is
|
|
@@ -354,17 +198,9 @@ const OutsideGripElement = tasty({
|
|
|
354
198
|
*
|
|
355
199
|
* It sits above a resting widget (`zIndex: 1`) so a grip is never hidden by the
|
|
356
200
|
* neighbour it overhangs, and below a dragged or resized one (`zIndex: 10`) so a
|
|
357
|
-
* lifted widget still paints over its neighbours' grips.
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
* widget flush against its board's edge (`containerPadding: [0, 0]`, which
|
|
361
|
-
* `isAligned` sets) is painted *outside* the board's content box rather than
|
|
362
|
-
* cropped to fit inside it. Inside a nested board that puts it exactly on the
|
|
363
|
-
* host widget's own corner: the two corners are the same point, so the two hit
|
|
364
|
-
* zones cannot be separated by geometry, and `z-index` cannot arbitrate either
|
|
365
|
-
* (this layer is a sibling of the host, so it outranks the whole nested subtree
|
|
366
|
-
* whatever the inner handle asks for). `ResizeHandle` settles it by depth
|
|
367
|
-
* instead.
|
|
201
|
+
* lifted widget still paints over its neighbours' grips. The board's own content
|
|
202
|
+
* box still clips it, so a grip on a widget flush against the board edge needs
|
|
203
|
+
* `containerPadding` >= half the grip size to show in full.
|
|
368
204
|
*/
|
|
369
205
|
const GripLayerElement = tasty({
|
|
370
206
|
qa: "BoardResizeGripLayer",
|
|
@@ -480,89 +316,7 @@ function isCornerAxis(axis) {
|
|
|
480
316
|
function isEdgeAxis(axis) {
|
|
481
317
|
return axis.length === 1;
|
|
482
318
|
}
|
|
483
|
-
|
|
484
|
-
const HANDLE_QA = "BoardResizeHandle";
|
|
485
|
-
/**
|
|
486
|
-
* The deepest resize hit-zone under `point` belonging to a board nested deeper
|
|
487
|
-
* than `depth`, or `null` when the caller is already the innermost one there.
|
|
488
|
-
*
|
|
489
|
-
* Asked of the document rather than of a registry, deliberately: the two handles
|
|
490
|
-
* belong to different boards, which share no owner below the app root, and "what
|
|
491
|
-
* is under this pixel" is the browser's own question to answer.
|
|
492
|
-
* `elementsFromPoint` skips `pointer-events: none` nodes, so everything it hands
|
|
493
|
-
* back is something the pointer could genuinely have landed on.
|
|
494
|
-
*/
|
|
495
|
-
function findDeeperHandle(point, depth) {
|
|
496
|
-
let stack;
|
|
497
|
-
try {
|
|
498
|
-
if (typeof document.elementsFromPoint !== "function") return null;
|
|
499
|
-
stack = document.elementsFromPoint(point.x, point.y);
|
|
500
|
-
} catch {
|
|
501
|
-
return null;
|
|
502
|
-
}
|
|
503
|
-
let deepest = null;
|
|
504
|
-
let deepestDepth = depth;
|
|
505
|
-
for (const node of stack) {
|
|
506
|
-
if (!(node instanceof HTMLElement)) continue;
|
|
507
|
-
if (node.dataset.qa !== HANDLE_QA) continue;
|
|
508
|
-
const nodeDepth = Number(node.dataset.boardDepth);
|
|
509
|
-
if (!Number.isFinite(nodeDepth) || nodeDepth <= deepestDepth) continue;
|
|
510
|
-
deepest = node;
|
|
511
|
-
deepestDepth = nodeDepth;
|
|
512
|
-
}
|
|
513
|
-
return deepest;
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Hand a press to `target` unchanged.
|
|
517
|
-
*
|
|
518
|
-
* Safe because of how `useMove` (which owns the resize gesture) tracks a
|
|
519
|
-
* pointer: through `window` listeners matched on `pointerId`, never through
|
|
520
|
-
* `setPointerCapture`. So only the opening `pointerdown` is re-dispatched — every
|
|
521
|
-
* real `pointermove`/`pointerup` that follows drives the forwarded gesture just
|
|
522
|
-
* as it would drive a direct one.
|
|
523
|
-
*/
|
|
524
|
-
function forwardPointerDown(e, target) {
|
|
525
|
-
const forwarded = new PointerEvent("pointerdown", {
|
|
526
|
-
bubbles: true,
|
|
527
|
-
cancelable: true,
|
|
528
|
-
composed: true,
|
|
529
|
-
pointerId: e.pointerId,
|
|
530
|
-
pointerType: e.pointerType,
|
|
531
|
-
isPrimary: e.isPrimary,
|
|
532
|
-
button: e.button,
|
|
533
|
-
buttons: e.buttons,
|
|
534
|
-
clientX: e.clientX,
|
|
535
|
-
clientY: e.clientY,
|
|
536
|
-
screenX: e.screenX,
|
|
537
|
-
screenY: e.screenY,
|
|
538
|
-
shiftKey: e.shiftKey,
|
|
539
|
-
ctrlKey: e.ctrlKey,
|
|
540
|
-
altKey: e.altKey,
|
|
541
|
-
metaKey: e.metaKey
|
|
542
|
-
});
|
|
543
|
-
Object.defineProperty(forwarded, "pageX", {
|
|
544
|
-
value: e.pageX,
|
|
545
|
-
configurable: true
|
|
546
|
-
});
|
|
547
|
-
Object.defineProperty(forwarded, "pageY", {
|
|
548
|
-
value: e.pageY,
|
|
549
|
-
configurable: true
|
|
550
|
-
});
|
|
551
|
-
target.dispatchEvent(forwarded);
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* Warnings already emitted, keyed by their own text. A widget that yields its
|
|
555
|
-
* only resize affordance is a layout mistake, not an event: it is the same
|
|
556
|
-
* mistake every single time the user reaches for that corner, so it is worth
|
|
557
|
-
* saying exactly once.
|
|
558
|
-
*/
|
|
559
|
-
const yieldWarnings = /* @__PURE__ */ new Set();
|
|
560
|
-
function warnOnce(message) {
|
|
561
|
-
if (!message || yieldWarnings.has(message)) return;
|
|
562
|
-
yieldWarnings.add(message);
|
|
563
|
-
console.warn(message);
|
|
564
|
-
}
|
|
565
|
-
function ResizeHandle({ axis, placement, boardDepth, yieldWarning, isRevealed, isResizing, onResize }) {
|
|
319
|
+
function ResizeHandle({ axis, placement, onResize }) {
|
|
566
320
|
const { moveProps } = useMove({
|
|
567
321
|
onMoveStart() {
|
|
568
322
|
onResize(axis, "start", 0, 0);
|
|
@@ -574,50 +328,15 @@ function ResizeHandle({ axis, placement, boardDepth, yieldWarning, isRevealed, i
|
|
|
574
328
|
onResize(axis, "end", 0, 0);
|
|
575
329
|
}
|
|
576
330
|
});
|
|
577
|
-
const
|
|
331
|
+
const stopProps = {
|
|
578
332
|
onPointerDown: (e) => e.stopPropagation(),
|
|
579
333
|
onMouseDown: (e) => e.stopPropagation(),
|
|
580
334
|
onTouchStart: (e) => e.stopPropagation()
|
|
581
|
-
}, moveProps);
|
|
582
|
-
/**
|
|
583
|
-
* Two resize hit-zones can want the same pixel. A `corner`-placed zone
|
|
584
|
-
* straddles its widget's corner, and in a nested board that sits flush — which
|
|
585
|
-
* `isAligned` guarantees, since it pins `containerPadding` to `[0, 0]` — the
|
|
586
|
-
* host widget's corner and its bottom-right child's corner ARE one point.
|
|
587
|
-
* Geometry has nothing left to separate them with, and `z-index` cannot
|
|
588
|
-
* arbitrate either (see `GripLayerElement`), so the tie is broken here: the
|
|
589
|
-
* innermost handle takes the press. It is the more specific target, and the
|
|
590
|
-
* outer widget can still be resized from its edges — where it has any, which is
|
|
591
|
-
* what `yieldWarning` is about.
|
|
592
|
-
*
|
|
593
|
-
* Decided on the press rather than on hover so that touch, which has no hover
|
|
594
|
-
* to decide on, is covered by the same code. Nothing is lost by deciding this
|
|
595
|
-
* late: both handles ask for the same resize cursor anyway.
|
|
596
|
-
*/
|
|
597
|
-
const onPointerDown = (e) => {
|
|
598
|
-
const deeper = findDeeperHandle({
|
|
599
|
-
x: e.clientX,
|
|
600
|
-
y: e.clientY
|
|
601
|
-
}, boardDepth);
|
|
602
|
-
if (deeper) {
|
|
603
|
-
e.stopPropagation();
|
|
604
|
-
e.preventDefault();
|
|
605
|
-
warnOnce(yieldWarning);
|
|
606
|
-
forwardPointerDown(e, deeper);
|
|
607
|
-
return;
|
|
608
|
-
}
|
|
609
|
-
handleProps.onPointerDown?.(e);
|
|
610
335
|
};
|
|
611
|
-
return /* @__PURE__ */ jsx(
|
|
336
|
+
return /* @__PURE__ */ jsx(HandleElement, {
|
|
612
337
|
"data-axis": axis,
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
placement,
|
|
616
|
-
revealed: isRevealed,
|
|
617
|
-
resizing: isResizing
|
|
618
|
-
},
|
|
619
|
-
...handleProps,
|
|
620
|
-
onPointerDown,
|
|
338
|
+
mods: { placement },
|
|
339
|
+
...mergeProps$1(stopProps, moveProps),
|
|
621
340
|
"aria-hidden": "true"
|
|
622
341
|
});
|
|
623
342
|
}
|
|
@@ -628,7 +347,7 @@ function ResizeHandle({ axis, placement, boardDepth, yieldWarning, isRevealed, i
|
|
|
628
347
|
* renders into the shared overlay portal so it can float outside its board.
|
|
629
348
|
*/
|
|
630
349
|
function WidgetHost(props) {
|
|
631
|
-
const { boardId, item, positionParams, registration, isCard, hoverRing, cornerChrome, cornerChromePlacement = "ne", mods: customMods, styles: widgetStyles, isDraggable, isResizable, resizeHandles, resizeGripPlacement,
|
|
350
|
+
const { boardId, item, positionParams, registration, isCard, hoverRing, cornerChrome, cornerChromePlacement = "ne", mods: customMods, styles: widgetStyles, isDraggable, isResizable, resizeHandles, resizeGripPlacement, isAutoHeight, qa, dragCancel, dragHandle, registry, dragState, settled, onResize, onAutoHeight, onDragLifecycle, isSelectable = false, isSelected = false, isPreSelected = false, selectionCancel, selectedHintId, onSelect, onSelectionReset, selectModifierKey = "metaKey" } = props;
|
|
632
351
|
const { t } = useI18n();
|
|
633
352
|
const ariaLabel = registration?.["aria-label"];
|
|
634
353
|
const hostRef = useRef(null);
|
|
@@ -642,26 +361,10 @@ function WidgetHost(props) {
|
|
|
642
361
|
const neededRows = Math.max(1, Math.ceil((neededPx + positionParams.margin[1] - AUTO_HEIGHT_TOLERANCE) / step));
|
|
643
362
|
onAutoHeight(item.i, neededRows);
|
|
644
363
|
});
|
|
645
|
-
const [nestedBoardCount, setNestedBoardCount] = useState(0);
|
|
646
|
-
const registerNestedBoard = useEvent(() => {
|
|
647
|
-
setNestedBoardCount((count) => count + 1);
|
|
648
|
-
return () => setNestedBoardCount((count) => Math.max(0, count - 1));
|
|
649
|
-
});
|
|
650
|
-
const [descendantHoverCount, setDescendantHoverCount] = useState(0);
|
|
651
|
-
const setDescendantHovered = useEvent((hovered) => {
|
|
652
|
-
setDescendantHoverCount((count) => Math.max(0, count + (hovered ? 1 : -1)));
|
|
653
|
-
});
|
|
654
364
|
const hostValue = useMemo(() => ({
|
|
655
365
|
isAutoHeight,
|
|
656
|
-
requestHeightDeficit
|
|
657
|
-
|
|
658
|
-
setDescendantHovered
|
|
659
|
-
}), [
|
|
660
|
-
isAutoHeight,
|
|
661
|
-
requestHeightDeficit,
|
|
662
|
-
registerNestedBoard,
|
|
663
|
-
setDescendantHovered
|
|
664
|
-
]);
|
|
366
|
+
requestHeightDeficit
|
|
367
|
+
}), [isAutoHeight, requestHeightDeficit]);
|
|
665
368
|
const useOverlay = isActiveDrag && dragState?.pointerType !== "keyboard";
|
|
666
369
|
const [isResizing, setIsResizing] = useState(false);
|
|
667
370
|
const [isFocusWithin, setIsFocusWithin] = useState(false);
|
|
@@ -669,14 +372,7 @@ function WidgetHost(props) {
|
|
|
669
372
|
const { hoverProps: layerHoverProps, isHovered: isLayerHovered } = useHover({ isDisabled: isActiveDrag });
|
|
670
373
|
const { focusProps, isFocusVisible } = useFocusRing();
|
|
671
374
|
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocusWithin });
|
|
672
|
-
const
|
|
673
|
-
const reportHoverToHost = useBoardHost()?.setDescendantHovered;
|
|
674
|
-
useEffect(() => {
|
|
675
|
-
if (!reportHoverToHost || !isHovered) return;
|
|
676
|
-
reportHoverToHost(true);
|
|
677
|
-
return () => reportHoverToHost(false);
|
|
678
|
-
}, [reportHoverToHost, isHovered]);
|
|
679
|
-
const gripsRevealed = isResizable && !item.static && !isActiveDrag && !descendantHoverCount && (isHovered || isLayerHovered || isFocusWithin || isResizing);
|
|
375
|
+
const gripsRevealed = isResizable && !item.static && !isActiveDrag && (isHovered || isLayerHovered || isFocusWithin || isResizing);
|
|
680
376
|
const { moveProps } = useMove({
|
|
681
377
|
onMoveStart(e) {
|
|
682
378
|
if (!isDraggable) return;
|
|
@@ -854,22 +550,15 @@ function WidgetHost(props) {
|
|
|
854
550
|
selected: isSelected,
|
|
855
551
|
"pre-selected": isPreSelected && !isSelected
|
|
856
552
|
};
|
|
857
|
-
const cornerYieldWarning = isDevEnv() && !resizeHandles.some(isEdgeAxis) ? `Board: widget "${item.i}" yielded a resize press to a handle of a board nested inside it, because their handles sit on the same point (a nested board with no \`containerPadding\` puts its last child's corner exactly on its host's). The innermost handle wins, and this widget has only corner \`resizeHandles\`, so it can no longer be resized there. Give it an edge axis to fall back on (e.g. \`resizeHandles={['se', 'e', 's']}\`), or give the nested board some \`containerPadding\` so the two corners stop coinciding.` : void 0;
|
|
858
|
-
if (isDevEnv() && placement === "outside") {
|
|
859
|
-
const [marginX, marginY] = positionParams.margin;
|
|
860
|
-
if (marginX < OUTSIDE_GRIP_MIN_BAND || marginY < OUTSIDE_GRIP_MIN_BAND) warnOnce(`Board: widget "${item.i}" holds a nested board, so its resize grips are drawn outside its box - but this board's \`margin\` is [${marginX}, ${marginY}] and a grip needs ${OUTSIDE_GRIP_MIN_BAND}px of gutter to sit in. The grips keep their size and overhang the neighbouring widgets. Raise \`margin\` to at least ${OUTSIDE_GRIP_MIN_BAND}px on both axes, or set \`resizeGripPlacement\` explicitly to put them back inside.`);
|
|
861
|
-
}
|
|
862
553
|
const content = /* @__PURE__ */ jsxs(BoardHostContext.Provider, {
|
|
863
554
|
value: hostValue,
|
|
864
|
-
children: [registration?.content, isResizable && !item.static
|
|
865
|
-
(
|
|
555
|
+
children: [registration?.content, isResizable && !item.static ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
556
|
+
(resizeGripPlacement === "corner" ? resizeHandles.filter((axis) => !isCornerAxis(axis)) : resizeHandles).map((axis) => /* @__PURE__ */ jsx(ResizeHandle, {
|
|
866
557
|
axis,
|
|
867
|
-
placement,
|
|
868
|
-
boardDepth,
|
|
869
|
-
yieldWarning: cornerYieldWarning,
|
|
558
|
+
placement: resizeGripPlacement,
|
|
870
559
|
onResize: handleResize
|
|
871
560
|
}, axis)),
|
|
872
|
-
|
|
561
|
+
resizeGripPlacement === "corner" ? null : resizeHandles.filter(isCornerAxis).map((axis) => /* @__PURE__ */ jsx(GripElement, {
|
|
873
562
|
"data-axis": axis,
|
|
874
563
|
mods: {
|
|
875
564
|
revealed: gripsRevealed,
|
|
@@ -904,18 +593,7 @@ function WidgetHost(props) {
|
|
|
904
593
|
width: memberRect.width,
|
|
905
594
|
height: memberRect.height
|
|
906
595
|
} : null;
|
|
907
|
-
const cornerHitOutward = Math.min(CORNER_HIT_OUTWARD_MAX, Math.max(CORNER_HIT_INWARD, Math.min(positionParams.margin[0], positionParams.margin[1]) / 2));
|
|
908
|
-
const gripBand = [Math.max(OUTSIDE_GRIP_MIN_BAND, positionParams.margin[0]), Math.max(OUTSIDE_GRIP_MIN_BAND, positionParams.margin[1])];
|
|
909
|
-
const cornerHitVars = {
|
|
910
|
-
"--corner-hit-size": `${CORNER_HIT_INWARD + cornerHitOutward}px`,
|
|
911
|
-
"--corner-hit-overhang": `${-cornerHitOutward}px`,
|
|
912
|
-
"--grip-band-x": `${gripBand[0]}px`,
|
|
913
|
-
"--grip-band-y": `${gripBand[1]}px`,
|
|
914
|
-
"--grip-pad-x": `${Math.max(0, (gripBand[0] - OUTSIDE_GRIP_THICKNESS) / 2)}px`,
|
|
915
|
-
"--grip-pad-y": `${Math.max(0, (gripBand[1] - OUTSIDE_GRIP_THICKNESS) / 2)}px`
|
|
916
|
-
};
|
|
917
596
|
const hostStyle = {
|
|
918
|
-
...cornerHitVars,
|
|
919
597
|
left: `${pos.left}px`,
|
|
920
598
|
top: `${pos.top}px`,
|
|
921
599
|
width: `${pos.width}px`,
|
|
@@ -959,13 +637,12 @@ function WidgetHost(props) {
|
|
|
959
637
|
"aria-hidden": "true",
|
|
960
638
|
children: content
|
|
961
639
|
}), overlayNode) : null;
|
|
962
|
-
const
|
|
640
|
+
const cornerAxes = isResizable && !item.static && resizeGripPlacement === "corner" ? resizeHandles.filter(isCornerAxis) : [];
|
|
963
641
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
964
642
|
host,
|
|
965
|
-
(
|
|
643
|
+
(cornerAxes.length || cornerChrome) && !floatInOverlay ? /* @__PURE__ */ jsxs(GripLayerElement, {
|
|
966
644
|
...layerHoverProps,
|
|
967
645
|
style: {
|
|
968
|
-
...cornerHitVars,
|
|
969
646
|
left: `${pos.left}px`,
|
|
970
647
|
top: `${pos.top}px`,
|
|
971
648
|
width: `${pos.width}px`,
|
|
@@ -973,16 +650,12 @@ function WidgetHost(props) {
|
|
|
973
650
|
},
|
|
974
651
|
"aria-hidden": cornerChrome ? void 0 : "true",
|
|
975
652
|
children: [
|
|
976
|
-
|
|
653
|
+
cornerAxes.map((axis) => /* @__PURE__ */ jsx(ResizeHandle, {
|
|
977
654
|
axis,
|
|
978
|
-
placement,
|
|
979
|
-
boardDepth,
|
|
980
|
-
yieldWarning: cornerYieldWarning,
|
|
981
|
-
isRevealed: gripsRevealed,
|
|
982
|
-
isResizing,
|
|
655
|
+
placement: "corner",
|
|
983
656
|
onResize: handleResize
|
|
984
657
|
}, `handle-${axis}`)),
|
|
985
|
-
|
|
658
|
+
cornerAxes.map((axis) => /* @__PURE__ */ jsx(GripElement, {
|
|
986
659
|
"data-axis": axis,
|
|
987
660
|
mods: {
|
|
988
661
|
revealed: gripsRevealed,
|