@cube-dev/ui-kit 0.0.0-canary-e056095 → 0.0.0-canary-31f7f8e
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/_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.d.ts +0 -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 +2 -2
- 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 +2 -2
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +2 -2
- 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.d.ts +28 -28
- 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 +2 -2
- 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/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 +2 -2
- 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.d.ts +1 -2
- 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.d.ts +0 -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 +2 -2
- package/dist/components/fields/Checkbox/CheckboxGroup.js +2 -2
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +2 -2
- package/dist/components/fields/ColorPicker/ColorPicker.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +2 -2
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +2 -2
- 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 +3 -3
- 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 +4 -4
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/index.d.ts +0 -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 +2 -2
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +2 -2
- package/dist/components/fields/Picker/Picker.js +3 -3
- package/dist/components/fields/RadioGroup/Radio.js +2 -2
- package/dist/components/fields/RadioGroup/RadioGroup.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/components/fields/TextArea/TextArea.js +2 -2
- package/dist/components/fields/TextInput/TextInput.js +2 -2
- 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 +7 -6
- package/dist/components/fields/color/channels.js.map +1 -1
- package/dist/components/fields/color/color.d.ts +1 -0
- package/dist/components/fields/color/color.js +22 -100
- package/dist/components/fields/color/color.js.map +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 +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.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +1 -1
- package/dist/components/layout/Board/board-context.js +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 +3 -3
- 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 +2 -2
- package/dist/components/navigation/Tabs/Tabs.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +4 -4
- 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.d.ts +1 -2
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.d.ts +0 -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/Modal/types.d.ts +0 -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.d.ts +0 -2
- 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/index.d.ts +0 -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 -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 -25
- package/dist/i18n/locales/en-US/uikit.js +1 -25
- package/dist/i18n/locales/en-US/uikit.json.d.ts +1 -27
- package/dist/i18n/locales/es-ES/uikit.js +1 -25
- package/dist/i18n/locales/es-MX/uikit.js +1 -25
- package/dist/i18n/locales/fr-FR/uikit.js +1 -25
- package/dist/i18n/locales/it-IT/uikit.js +1 -25
- package/dist/i18n/locales/ja-JP/uikit.js +1 -25
- package/dist/i18n/locales/nb-NO/uikit.js +1 -25
- package/dist/i18n/locales/pt-BR/uikit.js +1 -25
- package/dist/i18n/locales/pt-PT/uikit.js +1 -25
- package/dist/i18n/locales/sv-SE/uikit.js +1 -25
- package/dist/i18n/locales/vi-VN/uikit.js +1 -25
- 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/index.d.ts +0 -8
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.d.ts +2 -15
- package/dist/index.js +50 -61
- 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 +2 -2
- 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 +2 -2
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.d.ts +61 -0
- package/dist/tokens/legacy-color.js +58 -0
- package/dist/tokens/legacy-color.js.map +1 -0
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +2 -2
- 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.d.ts +2 -0
- package/dist/utils/colors.js +247 -0
- package/dist/utils/colors.js.map +1 -0
- 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 +2 -2
- package/docs/Usage.md +18 -0
- package/package.json +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.d.ts +0 -2
- package/dist/components/layout/Dashboard/Dashboard.d.ts +0 -19
- package/dist/components/layout/Dashboard/Dashboard.js +0 -188
- package/dist/components/layout/Dashboard/Dashboard.js.map +0 -1
- package/dist/components/layout/Dashboard/DashboardContainer.d.ts +0 -13
- package/dist/components/layout/Dashboard/DashboardContainer.js +0 -272
- package/dist/components/layout/Dashboard/DashboardContainer.js.map +0 -1
- package/dist/components/layout/Dashboard/DashboardContainerContent.js +0 -405
- package/dist/components/layout/Dashboard/DashboardContainerContent.js.map +0 -1
- package/dist/components/layout/Dashboard/DashboardNodeActions.js +0 -228
- package/dist/components/layout/Dashboard/DashboardNodeActions.js.map +0 -1
- package/dist/components/layout/Dashboard/DashboardTabs.d.ts +0 -14
- package/dist/components/layout/Dashboard/DashboardTabs.js +0 -85
- package/dist/components/layout/Dashboard/DashboardTabs.js.map +0 -1
- package/dist/components/layout/Dashboard/DashboardWidget.d.ts +0 -9
- package/dist/components/layout/Dashboard/DashboardWidget.js +0 -196
- package/dist/components/layout/Dashboard/DashboardWidget.js.map +0 -1
- package/dist/components/layout/Dashboard/context.js +0 -37
- package/dist/components/layout/Dashboard/context.js.map +0 -1
- package/dist/components/layout/Dashboard/drag.js +0 -481
- package/dist/components/layout/Dashboard/drag.js.map +0 -1
- package/dist/components/layout/Dashboard/index.d.ts +0 -6
- package/dist/components/layout/Dashboard/occupancy.js +0 -240
- package/dist/components/layout/Dashboard/occupancy.js.map +0 -1
- package/dist/components/layout/Dashboard/placement.js +0 -94
- package/dist/components/layout/Dashboard/placement.js.map +0 -1
- package/dist/components/layout/Dashboard/styles.js +0 -344
- package/dist/components/layout/Dashboard/styles.js.map +0 -1
- package/dist/components/layout/Dashboard/types.d.ts +0 -220
- package/dist/components/layout/Dashboard/use-dashboard-gestures.js +0 -321
- package/dist/components/layout/Dashboard/use-dashboard-gestures.js.map +0 -1
- package/dist/components/layout/Dashboard/use-dashboard-node.js +0 -93
- package/dist/components/layout/Dashboard/use-dashboard-node.js.map +0 -1
- package/dist/components/portal/PortalProvider.d.ts +0 -2
- package/dist/icons/ArrowsHorizontalIcon.d.ts +0 -12
- package/dist/icons/ArrowsHorizontalIcon.js +0 -11
- package/dist/icons/ArrowsHorizontalIcon.js.map +0 -1
- package/dist/icons/ArrowsInHorizontalIcon.d.ts +0 -20
- package/dist/icons/ArrowsInHorizontalIcon.js +0 -31
- package/dist/icons/ArrowsInHorizontalIcon.js.map +0 -1
- package/dist/icons/ArrowsInVerticalIcon.d.ts +0 -13
- package/dist/icons/ArrowsInVerticalIcon.js +0 -24
- package/dist/icons/ArrowsInVerticalIcon.js.map +0 -1
- package/dist/icons/ArrowsMaximizeIcon.d.ts +0 -12
- package/dist/icons/ArrowsMaximizeIcon.js +0 -11
- package/dist/icons/ArrowsMaximizeIcon.js.map +0 -1
- package/dist/icons/ArrowsMinimizeIcon.d.ts +0 -12
- package/dist/icons/ArrowsMinimizeIcon.js +0 -11
- package/dist/icons/ArrowsMinimizeIcon.js.map +0 -1
- package/dist/icons/ArrowsVerticalIcon.d.ts +0 -12
- package/dist/icons/ArrowsVerticalIcon.js +0 -11
- package/dist/icons/ArrowsVerticalIcon.js.map +0 -1
- package/dist/icons/CirclePlusIcon.d.ts +0 -12
- package/dist/icons/CirclePlusIcon.js +0 -11
- package/dist/icons/CirclePlusIcon.js.map +0 -1
- package/dist/icons/MaximizeIcon.d.ts +0 -12
- package/dist/icons/MaximizeIcon.js +0 -11
- package/dist/icons/MaximizeIcon.js.map +0 -1
- package/docs/components/layout/Dashboard.md +0 -409
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-e056095 | Cube Dev Team */
|
|
2
|
-
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
|
-
import { DASHBOARD_ROOT_GAP, clamp, isSamePlacement } from "./placement.js";
|
|
4
|
-
import { createDashboardDropPreviews, findDashboardDropTargets, freezeDashboardTargetGeometry, getCrossParentPlacement, getDashboardGestureItem, getDashboardGestureItems, getDashboardGesturePlacements, getOwnDashboardDropTarget, resolveDashboardDrop, useDashboardDropPreview } from "./drag.js";
|
|
5
|
-
import { getSurfaceMoveProps } from "./use-dashboard-node.js";
|
|
6
|
-
import { useEffect, useRef, useState } from "react";
|
|
7
|
-
import { useMove } from "react-aria";
|
|
8
|
-
|
|
9
|
-
//#region src/components/layout/Dashboard/use-dashboard-gestures.tsx
|
|
10
|
-
/**
|
|
11
|
-
* One pointer/keyboard gesture pipeline for both node types.
|
|
12
|
-
*
|
|
13
|
-
* Widgets and containers used to carry near-identical copies of this — the same
|
|
14
|
-
* quantization, the same hit testing, the same preview bookkeeping — differing
|
|
15
|
-
* only in the handful of `isRootChild` / `isContainer` branches below. Every fix
|
|
16
|
-
* to the drag engine had to be made twice, and the two copies had already
|
|
17
|
-
* drifted (one inlined the delta math the other called).
|
|
18
|
-
*/
|
|
19
|
-
function useDashboardGestures(options) {
|
|
20
|
-
const { id, isContainer, containerKind, nodeRef, tree, editing, metrics, placement, isSelected, selectSelf, onPlacementChange, canMove, canMoveColumns, canMoveRows, canResize, canResizeColumns, canResizeRows, minColumns, maxColumns, minRows, maxRows, isRootChild, maximumContainerParentDepth } = options;
|
|
21
|
-
const moveSessionRef = useRef(null);
|
|
22
|
-
const stopTrackingRef = useRef(null);
|
|
23
|
-
const stopEscapeRef = useRef(null);
|
|
24
|
-
const pointerRef = useRef({
|
|
25
|
-
clientX: 0,
|
|
26
|
-
clientY: 0
|
|
27
|
-
});
|
|
28
|
-
const resizeSessionRef = useRef(null);
|
|
29
|
-
const pointerStartRef = useRef({
|
|
30
|
-
clientX: 0,
|
|
31
|
-
clientY: 0
|
|
32
|
-
});
|
|
33
|
-
const [isMoving, setIsMoving] = useState(false);
|
|
34
|
-
const [isResizing, setIsResizing] = useState(false);
|
|
35
|
-
const [dropPreview, updateDropPreview] = useDashboardDropPreview();
|
|
36
|
-
const reportPlacement = useEvent((nextPlacement, reason, phase, input, sourceParentId = tree.layoutParentId, destinationParentId = sourceParentId, items, isBlocked, displaced) => {
|
|
37
|
-
onPlacementChange?.(nextPlacement, {
|
|
38
|
-
reason,
|
|
39
|
-
phase,
|
|
40
|
-
input,
|
|
41
|
-
...isBlocked && { isBlocked },
|
|
42
|
-
...displaced?.length && { displaced },
|
|
43
|
-
...destinationParentId !== sourceParentId && {
|
|
44
|
-
sourceParentId,
|
|
45
|
-
destinationParentId
|
|
46
|
-
},
|
|
47
|
-
...items && items.length > 1 && { items }
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
const createGesture = useEvent((input, reason) => {
|
|
51
|
-
const element = nodeRef.current;
|
|
52
|
-
const columnWidth = ((element?.parentElement?.getBoundingClientRect().width ?? 0) - metrics.columnGap * (tree.parentColumns - 1)) / tree.parentColumns + metrics.columnGap;
|
|
53
|
-
const ownRect = element?.getBoundingClientRect();
|
|
54
|
-
const pointerX = pointerStartRef.current.clientX;
|
|
55
|
-
const pointerY = pointerStartRef.current.clientY;
|
|
56
|
-
const gestureItems = !element ? [] : reason === "move" && input === "pointer" ? getDashboardGestureItems(element, id, placement, isSelected) : [getDashboardGestureItem(id, placement, element)];
|
|
57
|
-
return {
|
|
58
|
-
origin: placement,
|
|
59
|
-
current: placement,
|
|
60
|
-
currentItems: gestureItems.map((item) => ({
|
|
61
|
-
id: item.id,
|
|
62
|
-
placement: item.origin
|
|
63
|
-
})),
|
|
64
|
-
sourceParentId: tree.layoutParentId,
|
|
65
|
-
destinationParentId: tree.layoutParentId,
|
|
66
|
-
deltaX: 0,
|
|
67
|
-
deltaY: 0,
|
|
68
|
-
clientX: pointerX,
|
|
69
|
-
clientY: pointerY,
|
|
70
|
-
grabOffsetX: ownRect ? pointerX - ownRect.left : 0,
|
|
71
|
-
grabOffsetY: ownRect ? pointerY - ownRect.top : 0,
|
|
72
|
-
frozen: reason === "move" && input === "pointer" && element ? freezeDashboardTargetGeometry(element) : void 0,
|
|
73
|
-
keyboardColumns: 0,
|
|
74
|
-
keyboardRows: 0,
|
|
75
|
-
columnStep: Math.max(1, columnWidth),
|
|
76
|
-
rowStep: Math.max(1, reason === "move" && isRootChild ? (ownRect?.height ?? 0) + DASHBOARD_ROOT_GAP : metrics.rowHeight + metrics.rowGap),
|
|
77
|
-
input,
|
|
78
|
-
canCommit: true,
|
|
79
|
-
items: gestureItems
|
|
80
|
-
};
|
|
81
|
-
});
|
|
82
|
-
const updateGestureDeltas = useEvent((gesture, deltaX, deltaY, input) => {
|
|
83
|
-
gesture.input = input;
|
|
84
|
-
if (input === "keyboard") {
|
|
85
|
-
gesture.keyboardColumns += Math.sign(deltaX);
|
|
86
|
-
gesture.keyboardRows += Math.sign(deltaY);
|
|
87
|
-
} else {
|
|
88
|
-
gesture.deltaX += deltaX;
|
|
89
|
-
gesture.deltaY += deltaY;
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
columns: input === "keyboard" ? gesture.keyboardColumns : Math.round(gesture.deltaX / gesture.columnStep),
|
|
93
|
-
rows: input === "keyboard" ? gesture.keyboardRows : Math.round(gesture.deltaY / gesture.rowStep)
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
/** A `tabs` container is root-only, so it can leave its parent only upward. */
|
|
97
|
-
const canTargetOtherParent = useEvent((target) => containerKind !== "tabs" || target.kind === "root");
|
|
98
|
-
/**
|
|
99
|
-
* What one destination would accept, or `null` if it would accept nothing.
|
|
100
|
-
*
|
|
101
|
-
* Split out of `onMove` so the caller can try destinations in order instead of
|
|
102
|
-
* betting the frame on the deepest one.
|
|
103
|
-
*/
|
|
104
|
-
const proposeForTarget = useEvent((target, gesture, samePlacement) => {
|
|
105
|
-
const isSameParent = target.parentId === gesture.sourceParentId;
|
|
106
|
-
let landing;
|
|
107
|
-
if (isSameParent) landing = samePlacement;
|
|
108
|
-
else {
|
|
109
|
-
if (!canTargetOtherParent(target)) return null;
|
|
110
|
-
const crossParentPlacement = getCrossParentPlacement(target, gesture, minColumns, minRows, isContainer, metrics);
|
|
111
|
-
if (!crossParentPlacement) return null;
|
|
112
|
-
landing = crossParentPlacement;
|
|
113
|
-
}
|
|
114
|
-
const group = getDashboardGesturePlacements(target, gesture, landing);
|
|
115
|
-
if (!group?.length) return null;
|
|
116
|
-
const resolution = resolveDashboardDrop(target, group, new Set(gesture.items.map((item) => item.id)), gesture.sourceParentId, gesture.items.map((item) => item.origin));
|
|
117
|
-
return {
|
|
118
|
-
placement: resolution.items.find((item) => item.id === id)?.placement ?? landing,
|
|
119
|
-
items: resolution.items,
|
|
120
|
-
displaced: resolution.displaced,
|
|
121
|
-
destinationParentId: target.parentId,
|
|
122
|
-
isBlocked: resolution.status !== "valid",
|
|
123
|
-
preview: createDashboardDropPreviews(target, resolution.items, gesture.items, metrics, resolution.status)
|
|
124
|
-
};
|
|
125
|
-
});
|
|
126
|
-
/**
|
|
127
|
-
* Put the layout back and stop the gesture from committing.
|
|
128
|
-
*
|
|
129
|
-
* Used by Escape and by `pointercancel`. Both need the origin re-reported,
|
|
130
|
-
* because the consumer has been applying `preview` placements all along and
|
|
131
|
-
* simply not committing would leave it holding the last preview.
|
|
132
|
-
*/
|
|
133
|
-
const cancelMove = useEvent(() => {
|
|
134
|
-
const gesture = moveSessionRef.current;
|
|
135
|
-
if (!gesture || gesture.cancelled) return;
|
|
136
|
-
gesture.cancelled = true;
|
|
137
|
-
gesture.canCommit = false;
|
|
138
|
-
updateDropPreview(null);
|
|
139
|
-
if (isSamePlacement(gesture.current, gesture.origin) && gesture.destinationParentId === gesture.sourceParentId) return;
|
|
140
|
-
reportPlacement(gesture.origin, "move", "commit", gesture.input, gesture.sourceParentId, gesture.sourceParentId, gesture.items.map((item) => ({
|
|
141
|
-
id: item.id,
|
|
142
|
-
placement: item.origin
|
|
143
|
-
})));
|
|
144
|
-
});
|
|
145
|
-
/**
|
|
146
|
-
* Follow the pointer from press to release.
|
|
147
|
-
*
|
|
148
|
-
* Installed on pointer-down rather than at `onMoveStart`, which `useMove`
|
|
149
|
-
* only raises on the *first* move — by then one position has already been
|
|
150
|
-
* missed, and a gesture short enough to fit in a couple of events would hit-
|
|
151
|
-
* test against the press point. Capture phase so the position is current
|
|
152
|
-
* before `useMove`'s own window listener turns the event into `onMove`.
|
|
153
|
-
*/
|
|
154
|
-
const beginPointerTracking = useEvent((clientX, clientY) => {
|
|
155
|
-
pointerRef.current = {
|
|
156
|
-
clientX,
|
|
157
|
-
clientY
|
|
158
|
-
};
|
|
159
|
-
stopTrackingRef.current?.();
|
|
160
|
-
const onPointerMove = (event) => {
|
|
161
|
-
pointerRef.current = {
|
|
162
|
-
clientX: event.clientX,
|
|
163
|
-
clientY: event.clientY
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
const teardown = () => {
|
|
167
|
-
window.removeEventListener("pointermove", onPointerMove, { capture: true });
|
|
168
|
-
window.removeEventListener("pointerup", teardown, { capture: true });
|
|
169
|
-
window.removeEventListener("pointercancel", onPointerCancel, { capture: true });
|
|
170
|
-
stopTrackingRef.current = null;
|
|
171
|
-
};
|
|
172
|
-
const onPointerCancel = () => {
|
|
173
|
-
cancelMove();
|
|
174
|
-
teardown();
|
|
175
|
-
};
|
|
176
|
-
window.addEventListener("pointermove", onPointerMove, { capture: true });
|
|
177
|
-
window.addEventListener("pointerup", teardown, { capture: true });
|
|
178
|
-
window.addEventListener("pointercancel", onPointerCancel, { capture: true });
|
|
179
|
-
stopTrackingRef.current = teardown;
|
|
180
|
-
});
|
|
181
|
-
useEffect(() => () => {
|
|
182
|
-
stopTrackingRef.current?.();
|
|
183
|
-
stopEscapeRef.current?.();
|
|
184
|
-
}, []);
|
|
185
|
-
/** Escape has to come from the window: `useMove` reports no cancellation. */
|
|
186
|
-
const listenForEscape = useEvent(() => {
|
|
187
|
-
const onKeyDown = (event) => {
|
|
188
|
-
if (event.key !== "Escape") return;
|
|
189
|
-
event.preventDefault();
|
|
190
|
-
cancelMove();
|
|
191
|
-
};
|
|
192
|
-
window.addEventListener("keydown", onKeyDown, { capture: true });
|
|
193
|
-
return () => window.removeEventListener("keydown", onKeyDown, { capture: true });
|
|
194
|
-
});
|
|
195
|
-
const { moveProps } = useMove({
|
|
196
|
-
onMoveStart(event) {
|
|
197
|
-
if (!canMove) return;
|
|
198
|
-
if (!isSelected) selectSelf(false);
|
|
199
|
-
editing.startMoving(id);
|
|
200
|
-
setIsMoving(true);
|
|
201
|
-
updateDropPreview(null);
|
|
202
|
-
moveSessionRef.current = createGesture(event.pointerType === "keyboard" ? "keyboard" : "pointer", "move");
|
|
203
|
-
stopEscapeRef.current?.();
|
|
204
|
-
stopEscapeRef.current = listenForEscape();
|
|
205
|
-
},
|
|
206
|
-
onMove(event) {
|
|
207
|
-
const gesture = moveSessionRef.current;
|
|
208
|
-
if (!canMove || !gesture || gesture.cancelled) return;
|
|
209
|
-
const input = event.pointerType === "keyboard" ? "keyboard" : "pointer";
|
|
210
|
-
gesture.clientX = pointerRef.current.clientX;
|
|
211
|
-
gesture.clientY = pointerRef.current.clientY;
|
|
212
|
-
const delta = updateGestureDeltas(gesture, input === "pointer" || canMoveColumns ? event.deltaX : 0, input === "pointer" || canMoveRows ? event.deltaY : 0, input);
|
|
213
|
-
const samePlacement = {
|
|
214
|
-
...gesture.origin,
|
|
215
|
-
column: canMoveColumns ? clamp(gesture.origin.column + delta.columns, 0, tree.parentColumns - gesture.origin.columns) : gesture.origin.column,
|
|
216
|
-
row: canMoveRows ? isRootChild ? Math.max(0, gesture.origin.row + delta.rows) : clamp(gesture.origin.row + delta.rows, 0, tree.parentRows - gesture.origin.rows) : gesture.origin.row
|
|
217
|
-
};
|
|
218
|
-
let nextPlacement = samePlacement;
|
|
219
|
-
let destinationParentId = gesture.sourceParentId;
|
|
220
|
-
let isBlocked = false;
|
|
221
|
-
let displaced = [];
|
|
222
|
-
let currentItems = [{
|
|
223
|
-
id,
|
|
224
|
-
placement: samePlacement
|
|
225
|
-
}];
|
|
226
|
-
if (input === "pointer" && nodeRef.current) {
|
|
227
|
-
const targets = findDashboardDropTargets(nodeRef.current, gesture.clientX, gesture.clientY, id, isContainer, maximumContainerParentDepth, gesture.frozen);
|
|
228
|
-
let proposal = null;
|
|
229
|
-
for (const target of targets) {
|
|
230
|
-
proposal = proposeForTarget(target, gesture, samePlacement);
|
|
231
|
-
if (proposal) break;
|
|
232
|
-
}
|
|
233
|
-
updateDropPreview(proposal?.preview ?? null);
|
|
234
|
-
gesture.canCommit = !!proposal?.preview.length && proposal.preview.every((item) => item.status === "valid");
|
|
235
|
-
if (!proposal) return;
|
|
236
|
-
nextPlacement = proposal.placement;
|
|
237
|
-
destinationParentId = proposal.destinationParentId;
|
|
238
|
-
currentItems = proposal.items;
|
|
239
|
-
displaced = proposal.displaced;
|
|
240
|
-
isBlocked = proposal.isBlocked;
|
|
241
|
-
} else {
|
|
242
|
-
updateDropPreview(null);
|
|
243
|
-
const own = nodeRef.current ? getOwnDashboardDropTarget(nodeRef.current) : null;
|
|
244
|
-
const resolution = own ? resolveDashboardDrop(own, currentItems, new Set(gesture.items.map((item) => item.id)), gesture.sourceParentId, gesture.items.map((item) => item.origin)) : null;
|
|
245
|
-
if (resolution) {
|
|
246
|
-
currentItems = resolution.items;
|
|
247
|
-
displaced = resolution.displaced;
|
|
248
|
-
nextPlacement = resolution.items.find((item) => item.id === id)?.placement ?? nextPlacement;
|
|
249
|
-
isBlocked = resolution.status !== "valid";
|
|
250
|
-
}
|
|
251
|
-
gesture.canCommit = !isBlocked;
|
|
252
|
-
}
|
|
253
|
-
if (isSamePlacement(nextPlacement, gesture.current) && destinationParentId === gesture.destinationParentId) return;
|
|
254
|
-
gesture.current = nextPlacement;
|
|
255
|
-
gesture.currentItems = currentItems;
|
|
256
|
-
gesture.currentDisplaced = displaced;
|
|
257
|
-
gesture.destinationParentId = destinationParentId;
|
|
258
|
-
reportPlacement(nextPlacement, "move", "preview", gesture.input, gesture.sourceParentId, destinationParentId, currentItems, isBlocked, displaced);
|
|
259
|
-
},
|
|
260
|
-
onMoveEnd() {
|
|
261
|
-
const gesture = moveSessionRef.current;
|
|
262
|
-
moveSessionRef.current = null;
|
|
263
|
-
stopEscapeRef.current?.();
|
|
264
|
-
stopEscapeRef.current = null;
|
|
265
|
-
editing.stopMoving(id);
|
|
266
|
-
setIsMoving(false);
|
|
267
|
-
updateDropPreview(null);
|
|
268
|
-
if (!canMove || !gesture || gesture.cancelled || !gesture.canCommit || isSamePlacement(gesture.current, gesture.origin) && gesture.destinationParentId === gesture.sourceParentId) return;
|
|
269
|
-
reportPlacement(gesture.current, "move", "commit", gesture.input, gesture.sourceParentId, gesture.destinationParentId, gesture.currentItems, false, gesture.currentDisplaced);
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
const surfaceMoveProps = getSurfaceMoveProps(moveProps, canMove, nodeRef, (clientX, clientY) => {
|
|
273
|
-
pointerStartRef.current = {
|
|
274
|
-
clientX,
|
|
275
|
-
clientY
|
|
276
|
-
};
|
|
277
|
-
beginPointerTracking(clientX, clientY);
|
|
278
|
-
});
|
|
279
|
-
const { moveProps: resizeProps } = useMove({
|
|
280
|
-
onMoveStart(event) {
|
|
281
|
-
if (!canResize) return;
|
|
282
|
-
selectSelf(false);
|
|
283
|
-
setIsResizing(true);
|
|
284
|
-
resizeSessionRef.current = createGesture(event.pointerType === "keyboard" ? "keyboard" : "pointer", "resize");
|
|
285
|
-
},
|
|
286
|
-
onMove(event) {
|
|
287
|
-
const gesture = resizeSessionRef.current;
|
|
288
|
-
if (!canResize || !gesture) return;
|
|
289
|
-
const delta = updateGestureDeltas(gesture, canResizeColumns ? event.deltaX : 0, canResizeRows ? event.deltaY : 0, event.pointerType === "keyboard" ? "keyboard" : "pointer");
|
|
290
|
-
const maxColumnsAtOrigin = Math.min(maxColumns, tree.parentColumns - gesture.origin.column);
|
|
291
|
-
const maxRowsAtOrigin = isRootChild ? maxRows : Math.min(maxRows, tree.parentRows - gesture.origin.row);
|
|
292
|
-
const nextPlacement = {
|
|
293
|
-
...gesture.origin,
|
|
294
|
-
columns: canResizeColumns ? clamp(gesture.origin.columns + delta.columns, minColumns, maxColumnsAtOrigin) : gesture.origin.columns,
|
|
295
|
-
rows: canResizeRows ? clamp(gesture.origin.rows + delta.rows, minRows, maxRowsAtOrigin) : gesture.origin.rows
|
|
296
|
-
};
|
|
297
|
-
if (isSamePlacement(nextPlacement, gesture.current)) return;
|
|
298
|
-
gesture.current = nextPlacement;
|
|
299
|
-
reportPlacement(nextPlacement, "resize", "preview", gesture.input);
|
|
300
|
-
},
|
|
301
|
-
onMoveEnd() {
|
|
302
|
-
const gesture = resizeSessionRef.current;
|
|
303
|
-
resizeSessionRef.current = null;
|
|
304
|
-
setIsResizing(false);
|
|
305
|
-
if (!canResize || !gesture || isSamePlacement(gesture.current, gesture.origin)) return;
|
|
306
|
-
reportPlacement(gesture.current, "resize", "commit", gesture.input);
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
return {
|
|
310
|
-
isMoving,
|
|
311
|
-
isResizing,
|
|
312
|
-
dropPreview,
|
|
313
|
-
surfaceMoveProps,
|
|
314
|
-
resizeProps,
|
|
315
|
-
reportPlacement
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
//#endregion
|
|
320
|
-
export { useDashboardGestures };
|
|
321
|
-
//# sourceMappingURL=use-dashboard-gestures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-dashboard-gestures.js","names":[],"sources":["../../../../src/components/layout/Dashboard/use-dashboard-gestures.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { useMove } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks';\n\nimport {\n createDashboardDropPreviews,\n findDashboardDropTargets,\n freezeDashboardTargetGeometry,\n getCrossParentPlacement,\n getDashboardGestureItem,\n getDashboardGestureItems,\n getDashboardGesturePlacements,\n getOwnDashboardDropTarget,\n resolveDashboardDrop,\n useDashboardDropPreview,\n} from './drag';\nimport { clamp, DASHBOARD_ROOT_GAP, isSamePlacement } from './placement';\nimport { getSurfaceMoveProps } from './use-dashboard-node';\n\nimport type { RefObject } from 'react';\nimport type {\n DashboardDropPreview,\n DashboardDropTarget,\n DashboardPlacementGesture,\n} from './drag';\nimport type {\n DashboardContainerKind,\n DashboardEditingContextValue,\n DashboardMetrics,\n DashboardPlacement,\n DashboardPlacementChangeInfo,\n DashboardPlacementChangeInput,\n DashboardPlacementChangeItem,\n DashboardPlacementChangePhase,\n DashboardPlacementChangeReason,\n DashboardTreeContextValue,\n} from './types';\n\nexport interface DashboardGestureOptions {\n id: string;\n /** Containers and widgets differ in which destinations they may target. */\n isContainer: boolean;\n /** Set for containers; `tabs` may only move back to the root. */\n containerKind?: DashboardContainerKind;\n nodeRef: RefObject<HTMLElement | null>;\n tree: DashboardTreeContextValue;\n editing: DashboardEditingContextValue;\n metrics: DashboardMetrics;\n placement: DashboardPlacement;\n isSelected: boolean;\n selectSelf: (additive?: boolean) => void;\n onPlacementChange?: (\n placement: DashboardPlacement,\n info: DashboardPlacementChangeInfo,\n ) => void;\n canMove: boolean;\n canMoveColumns: boolean;\n canMoveRows: boolean;\n canResize: boolean;\n canResizeColumns: boolean;\n canResizeRows: boolean;\n minColumns: number;\n maxColumns: number;\n minRows: number;\n maxRows: number;\n /**\n * A top-level container orders itself vertically among its siblings instead of\n * occupying a row track, so its row axis is unbounded and one row step is the\n * height of the node rather than the shared row height.\n */\n isRootChild: boolean;\n /** How deep a destination may be before it would exceed three nesting levels. */\n maximumContainerParentDepth?: number;\n}\n\n/** One destination's answer: where the group lands and what that looks like. */\ninterface DashboardProposal {\n placement: DashboardPlacement;\n items: DashboardPlacementChangeItem[];\n destinationParentId: string | null;\n preview: DashboardDropPreview[];\n isBlocked: boolean;\n displaced: DashboardPlacementChangeItem[];\n}\n\nexport interface DashboardGestures {\n isMoving: boolean;\n isResizing: boolean;\n dropPreview: DashboardDropPreview[];\n surfaceMoveProps: Record<string, unknown>;\n resizeProps: ReturnType<typeof useMove>['moveProps'];\n reportPlacement: (\n placement: DashboardPlacement,\n reason: DashboardPlacementChangeReason,\n phase: DashboardPlacementChangePhase,\n input: DashboardPlacementChangeInput,\n sourceParentId?: string | null,\n destinationParentId?: string | null,\n items?: DashboardPlacementChangeItem[],\n isBlocked?: boolean,\n displaced?: DashboardPlacementChangeItem[],\n ) => void;\n}\n\n/**\n * One pointer/keyboard gesture pipeline for both node types.\n *\n * Widgets and containers used to carry near-identical copies of this — the same\n * quantization, the same hit testing, the same preview bookkeeping — differing\n * only in the handful of `isRootChild` / `isContainer` branches below. Every fix\n * to the drag engine had to be made twice, and the two copies had already\n * drifted (one inlined the delta math the other called).\n */\nexport function useDashboardGestures(\n options: DashboardGestureOptions,\n): DashboardGestures {\n const {\n id,\n isContainer,\n containerKind,\n nodeRef,\n tree,\n editing,\n metrics,\n placement,\n isSelected,\n selectSelf,\n onPlacementChange,\n canMove,\n canMoveColumns,\n canMoveRows,\n canResize,\n canResizeColumns,\n canResizeRows,\n minColumns,\n maxColumns,\n minRows,\n maxRows,\n isRootChild,\n maximumContainerParentDepth,\n } = options;\n\n const moveSessionRef = useRef<DashboardPlacementGesture | null>(null);\n const stopTrackingRef = useRef<(() => void) | null>(null);\n const stopEscapeRef = useRef<(() => void) | null>(null);\n const pointerRef = useRef({ clientX: 0, clientY: 0 });\n const resizeSessionRef = useRef<DashboardPlacementGesture | null>(null);\n const pointerStartRef = useRef({ clientX: 0, clientY: 0 });\n const [isMoving, setIsMoving] = useState(false);\n const [isResizing, setIsResizing] = useState(false);\n const [dropPreview, updateDropPreview] = useDashboardDropPreview();\n\n const reportPlacement = useEvent(\n (\n nextPlacement: DashboardPlacement,\n reason: DashboardPlacementChangeReason,\n phase: DashboardPlacementChangePhase,\n input: DashboardPlacementChangeInput,\n sourceParentId = tree.layoutParentId,\n destinationParentId = sourceParentId,\n items?: DashboardPlacementChangeItem[],\n isBlocked?: boolean,\n displaced?: DashboardPlacementChangeItem[],\n ) => {\n onPlacementChange?.(nextPlacement, {\n reason,\n phase,\n input,\n ...(isBlocked && { isBlocked }),\n ...(displaced?.length && { displaced }),\n ...(destinationParentId !== sourceParentId && {\n sourceParentId,\n destinationParentId,\n }),\n ...(items && items.length > 1 && { items }),\n });\n },\n );\n\n const createGesture = useEvent(\n (\n input: DashboardPlacementChangeInput,\n reason: DashboardPlacementChangeReason,\n ): DashboardPlacementGesture => {\n const element = nodeRef.current;\n const parentWidth =\n element?.parentElement?.getBoundingClientRect().width ?? 0;\n const columnWidth =\n (parentWidth - metrics.columnGap * (tree.parentColumns - 1)) /\n tree.parentColumns +\n metrics.columnGap;\n const ownRect = element?.getBoundingClientRect();\n const pointerX = pointerStartRef.current.clientX;\n const pointerY = pointerStartRef.current.clientY;\n const gestureItems = !element\n ? []\n : reason === 'move' && input === 'pointer'\n ? getDashboardGestureItems(element, id, placement, isSelected)\n : [getDashboardGestureItem(id, placement, element)];\n\n return {\n origin: placement,\n current: placement,\n currentItems: gestureItems.map((item) => ({\n id: item.id,\n placement: item.origin,\n })),\n sourceParentId: tree.layoutParentId,\n destinationParentId: tree.layoutParentId,\n deltaX: 0,\n deltaY: 0,\n clientX: pointerX,\n clientY: pointerY,\n grabOffsetX: ownRect ? pointerX - ownRect.left : 0,\n grabOffsetY: ownRect ? pointerY - ownRect.top : 0,\n frozen:\n reason === 'move' && input === 'pointer' && element\n ? freezeDashboardTargetGeometry(element)\n : undefined,\n keyboardColumns: 0,\n keyboardRows: 0,\n columnStep: Math.max(1, columnWidth),\n rowStep: Math.max(\n 1,\n reason === 'move' && isRootChild\n ? (ownRect?.height ?? 0) + DASHBOARD_ROOT_GAP\n : metrics.rowHeight + metrics.rowGap,\n ),\n input,\n canCommit: true,\n items: gestureItems,\n };\n },\n );\n\n const updateGestureDeltas = useEvent(\n (\n gesture: DashboardPlacementGesture,\n deltaX: number,\n deltaY: number,\n input: DashboardPlacementChangeInput,\n ) => {\n gesture.input = input;\n\n if (input === 'keyboard') {\n gesture.keyboardColumns += Math.sign(deltaX);\n gesture.keyboardRows += Math.sign(deltaY);\n } else {\n gesture.deltaX += deltaX;\n gesture.deltaY += deltaY;\n }\n\n return {\n columns:\n input === 'keyboard'\n ? gesture.keyboardColumns\n : Math.round(gesture.deltaX / gesture.columnStep),\n rows:\n input === 'keyboard'\n ? gesture.keyboardRows\n : Math.round(gesture.deltaY / gesture.rowStep),\n };\n },\n );\n\n /** A `tabs` container is root-only, so it can leave its parent only upward. */\n const canTargetOtherParent = useEvent(\n (target: DashboardDropTarget) =>\n containerKind !== 'tabs' || target.kind === 'root',\n );\n\n /**\n * What one destination would accept, or `null` if it would accept nothing.\n *\n * Split out of `onMove` so the caller can try destinations in order instead of\n * betting the frame on the deepest one.\n */\n const proposeForTarget = useEvent(\n (\n target: DashboardDropTarget,\n gesture: DashboardPlacementGesture,\n samePlacement: DashboardPlacement,\n ): DashboardProposal | null => {\n const isSameParent = target.parentId === gesture.sourceParentId;\n let landing: DashboardPlacement;\n\n if (isSameParent) {\n landing = samePlacement;\n } else {\n if (!canTargetOtherParent(target)) return null;\n const crossParentPlacement = getCrossParentPlacement(\n target,\n gesture,\n minColumns,\n minRows,\n isContainer,\n metrics,\n );\n if (!crossParentPlacement) return null;\n landing = crossParentPlacement;\n }\n\n const group = getDashboardGesturePlacements(target, gesture, landing);\n if (!group?.length) return null;\n\n const movingIds = new Set(gesture.items.map((item) => item.id));\n const resolution = resolveDashboardDrop(\n target,\n group,\n movingIds,\n gesture.sourceParentId,\n gesture.items.map((item) => item.origin),\n );\n\n return {\n placement:\n resolution.items.find((item) => item.id === id)?.placement ?? landing,\n items: resolution.items,\n displaced: resolution.displaced,\n destinationParentId: target.parentId,\n isBlocked: resolution.status !== 'valid',\n preview: createDashboardDropPreviews(\n target,\n resolution.items,\n gesture.items,\n metrics,\n resolution.status,\n ),\n };\n },\n );\n\n /**\n * Put the layout back and stop the gesture from committing.\n *\n * Used by Escape and by `pointercancel`. Both need the origin re-reported,\n * because the consumer has been applying `preview` placements all along and\n * simply not committing would leave it holding the last preview.\n */\n const cancelMove = useEvent(() => {\n const gesture = moveSessionRef.current;\n if (!gesture || gesture.cancelled) return;\n gesture.cancelled = true;\n gesture.canCommit = false;\n updateDropPreview(null);\n\n if (\n isSamePlacement(gesture.current, gesture.origin) &&\n gesture.destinationParentId === gesture.sourceParentId\n ) {\n return;\n }\n reportPlacement(\n gesture.origin,\n 'move',\n 'commit',\n gesture.input,\n gesture.sourceParentId,\n gesture.sourceParentId,\n gesture.items.map((item) => ({ id: item.id, placement: item.origin })),\n );\n });\n\n /**\n * Follow the pointer from press to release.\n *\n * Installed on pointer-down rather than at `onMoveStart`, which `useMove`\n * only raises on the *first* move — by then one position has already been\n * missed, and a gesture short enough to fit in a couple of events would hit-\n * test against the press point. Capture phase so the position is current\n * before `useMove`'s own window listener turns the event into `onMove`.\n */\n const beginPointerTracking = useEvent((clientX: number, clientY: number) => {\n pointerRef.current = { clientX, clientY };\n stopTrackingRef.current?.();\n\n const onPointerMove = (event: PointerEvent) => {\n pointerRef.current = { clientX: event.clientX, clientY: event.clientY };\n };\n const teardown = () => {\n window.removeEventListener('pointermove', onPointerMove, {\n capture: true,\n });\n window.removeEventListener('pointerup', teardown, { capture: true });\n window.removeEventListener('pointercancel', onPointerCancel, {\n capture: true,\n });\n stopTrackingRef.current = null;\n };\n const onPointerCancel = () => {\n cancelMove();\n teardown();\n };\n\n window.addEventListener('pointermove', onPointerMove, { capture: true });\n window.addEventListener('pointerup', teardown, { capture: true });\n window.addEventListener('pointercancel', onPointerCancel, {\n capture: true,\n });\n stopTrackingRef.current = teardown;\n });\n\n // A node removed mid-gesture — a deletion, a re-key, a StrictMode remount —\n // would otherwise leave its capture-phase window listeners running on every\n // pointer move for the rest of the session.\n useEffect(\n () => () => {\n stopTrackingRef.current?.();\n stopEscapeRef.current?.();\n },\n [],\n );\n\n /** Escape has to come from the window: `useMove` reports no cancellation. */\n const listenForEscape = useEvent(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n event.preventDefault();\n cancelMove();\n };\n\n window.addEventListener('keydown', onKeyDown, { capture: true });\n\n return () =>\n window.removeEventListener('keydown', onKeyDown, { capture: true });\n });\n\n const { moveProps } = useMove({\n onMoveStart(event) {\n if (!canMove) return;\n if (!isSelected) selectSelf(false);\n editing.startMoving(id);\n setIsMoving(true);\n updateDropPreview(null);\n moveSessionRef.current = createGesture(\n event.pointerType === 'keyboard' ? 'keyboard' : 'pointer',\n 'move',\n );\n stopEscapeRef.current?.();\n stopEscapeRef.current = listenForEscape();\n },\n onMove(event) {\n const gesture = moveSessionRef.current;\n if (!canMove || !gesture || gesture.cancelled) return;\n const input = event.pointerType === 'keyboard' ? 'keyboard' : 'pointer';\n gesture.clientX = pointerRef.current.clientX;\n gesture.clientY = pointerRef.current.clientY;\n const delta = updateGestureDeltas(\n gesture,\n input === 'pointer' || canMoveColumns ? event.deltaX : 0,\n input === 'pointer' || canMoveRows ? event.deltaY : 0,\n input,\n );\n const samePlacement: DashboardPlacement = {\n ...gesture.origin,\n column: canMoveColumns\n ? clamp(\n gesture.origin.column + delta.columns,\n 0,\n tree.parentColumns - gesture.origin.columns,\n )\n : gesture.origin.column,\n row: canMoveRows\n ? isRootChild\n ? Math.max(0, gesture.origin.row + delta.rows)\n : clamp(\n gesture.origin.row + delta.rows,\n 0,\n tree.parentRows - gesture.origin.rows,\n )\n : gesture.origin.row,\n };\n let nextPlacement = samePlacement;\n let destinationParentId = gesture.sourceParentId;\n let isBlocked = false;\n let displaced: DashboardPlacementChangeItem[] = [];\n let currentItems: DashboardPlacementChangeItem[] = [\n { id, placement: samePlacement },\n ];\n\n if (input === 'pointer' && nodeRef.current) {\n const targets = findDashboardDropTargets(\n nodeRef.current,\n gesture.clientX,\n gesture.clientY,\n id,\n isContainer,\n maximumContainerParentDepth,\n gesture.frozen,\n );\n let proposal: DashboardProposal | null = null;\n\n for (const target of targets) {\n proposal = proposeForTarget(target, gesture, samePlacement);\n if (proposal) break;\n }\n\n updateDropPreview(proposal?.preview ?? null);\n gesture.canCommit =\n !!proposal?.preview.length &&\n proposal.preview.every((item) => item.status === 'valid');\n if (!proposal) return;\n\n nextPlacement = proposal.placement;\n destinationParentId = proposal.destinationParentId;\n currentItems = proposal.items;\n displaced = proposal.displaced;\n isBlocked = proposal.isBlocked;\n } else {\n updateDropPreview(null);\n const own = nodeRef.current\n ? getOwnDashboardDropTarget(nodeRef.current)\n : null;\n const resolution = own\n ? resolveDashboardDrop(\n own,\n currentItems,\n new Set(gesture.items.map((item) => item.id)),\n gesture.sourceParentId,\n gesture.items.map((item) => item.origin),\n )\n : null;\n\n if (resolution) {\n currentItems = resolution.items;\n displaced = resolution.displaced;\n nextPlacement =\n resolution.items.find((item) => item.id === id)?.placement ??\n nextPlacement;\n isBlocked = resolution.status !== 'valid';\n }\n gesture.canCommit = !isBlocked;\n }\n\n if (\n isSamePlacement(nextPlacement, gesture.current) &&\n destinationParentId === gesture.destinationParentId\n ) {\n return;\n }\n gesture.current = nextPlacement;\n gesture.currentItems = currentItems;\n gesture.currentDisplaced = displaced;\n gesture.destinationParentId = destinationParentId;\n reportPlacement(\n nextPlacement,\n 'move',\n 'preview',\n gesture.input,\n gesture.sourceParentId,\n destinationParentId,\n currentItems,\n isBlocked,\n displaced,\n );\n },\n onMoveEnd() {\n const gesture = moveSessionRef.current;\n moveSessionRef.current = null;\n stopEscapeRef.current?.();\n stopEscapeRef.current = null;\n editing.stopMoving(id);\n setIsMoving(false);\n updateDropPreview(null);\n if (\n !canMove ||\n !gesture ||\n gesture.cancelled ||\n !gesture.canCommit ||\n (isSamePlacement(gesture.current, gesture.origin) &&\n gesture.destinationParentId === gesture.sourceParentId)\n ) {\n return;\n }\n reportPlacement(\n gesture.current,\n 'move',\n 'commit',\n gesture.input,\n gesture.sourceParentId,\n gesture.destinationParentId,\n gesture.currentItems,\n false,\n gesture.currentDisplaced,\n );\n },\n });\n\n const surfaceMoveProps = getSurfaceMoveProps(\n moveProps,\n canMove,\n nodeRef,\n (clientX, clientY) => {\n pointerStartRef.current = { clientX, clientY };\n beginPointerTracking(clientX, clientY);\n },\n );\n\n const { moveProps: resizeProps } = useMove({\n onMoveStart(event) {\n if (!canResize) return;\n selectSelf(false);\n setIsResizing(true);\n resizeSessionRef.current = createGesture(\n event.pointerType === 'keyboard' ? 'keyboard' : 'pointer',\n 'resize',\n );\n },\n onMove(event) {\n const gesture = resizeSessionRef.current;\n if (!canResize || !gesture) return;\n const delta = updateGestureDeltas(\n gesture,\n canResizeColumns ? event.deltaX : 0,\n canResizeRows ? event.deltaY : 0,\n event.pointerType === 'keyboard' ? 'keyboard' : 'pointer',\n );\n const maxColumnsAtOrigin = Math.min(\n maxColumns,\n tree.parentColumns - gesture.origin.column,\n );\n const maxRowsAtOrigin = isRootChild\n ? maxRows\n : Math.min(maxRows, tree.parentRows - gesture.origin.row);\n const nextPlacement: DashboardPlacement = {\n ...gesture.origin,\n columns: canResizeColumns\n ? clamp(\n gesture.origin.columns + delta.columns,\n minColumns,\n maxColumnsAtOrigin,\n )\n : gesture.origin.columns,\n rows: canResizeRows\n ? clamp(gesture.origin.rows + delta.rows, minRows, maxRowsAtOrigin)\n : gesture.origin.rows,\n };\n\n if (isSamePlacement(nextPlacement, gesture.current)) return;\n gesture.current = nextPlacement;\n reportPlacement(nextPlacement, 'resize', 'preview', gesture.input);\n },\n onMoveEnd() {\n const gesture = resizeSessionRef.current;\n resizeSessionRef.current = null;\n setIsResizing(false);\n if (\n !canResize ||\n !gesture ||\n isSamePlacement(gesture.current, gesture.origin)\n ) {\n return;\n }\n reportPlacement(gesture.current, 'resize', 'commit', gesture.input);\n },\n });\n\n return {\n isMoving,\n isResizing,\n dropPreview,\n surfaceMoveProps,\n resizeProps,\n reportPlacement,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkHA,SAAgB,qBACd,SACmB;CACnB,MAAM,EACJ,IACA,aACA,eACA,SACA,MACA,SACA,SACA,WACA,YACA,YACA,mBACA,SACA,gBACA,aACA,WACA,kBACA,eACA,YACA,YACA,SACA,SACA,aACA,gCACE;CAEJ,MAAM,iBAAiB,OAAyC,KAAK;CACrE,MAAM,kBAAkB,OAA4B,KAAK;CACzD,MAAM,gBAAgB,OAA4B,KAAK;CACvD,MAAM,aAAa,OAAO;EAAE,SAAS;EAAG,SAAS;EAAG,CAAC;CACrD,MAAM,mBAAmB,OAAyC,KAAK;CACvE,MAAM,kBAAkB,OAAO;EAAE,SAAS;EAAG,SAAS;EAAG,CAAC;CAC1D,MAA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ACF,MAAM,QAAQ,OAAO,OAAO,MAAM,MAAM,SAAS,gBAAgB,GACjE,QAAQ,OAAO;IACpB;AAED,OAAI,gBAAgB,eAAe,QAAQ,QAAQ,CAAE;AACrD,WAAQ,UAAU;AAClB,mBAAgB,eAAe,UAAU,WAAW,QAAQ,MAAM;;EAEpE,YAAY;GACV,MAAM,UAAU,iBAAiB;AACjC,oBAAiB,UAAU;AAC3B,iBAAc,MAAM;AACpB,OACE,CAAC,aACD,CAAC,WACD,gBAAgB,QAAQ,SAAS,QAAQ,OAAO,CAEhD;AAEF,mBAAgB,QAAQ,SAAS,UAAU,UAAU,QAAQ,MAAM;;EAEtE,CAAC;AAEF,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-e056095 | Cube Dev Team */
|
|
2
|
-
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
|
-
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
|
-
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
5
|
-
import { DashboardEditingContext, DashboardSelectionContext, DashboardTreeContext } from "./context.js";
|
|
6
|
-
import { useContext, useState } from "react";
|
|
7
|
-
import { useFocusWithin, useHover } from "react-aria";
|
|
8
|
-
|
|
9
|
-
//#region src/components/layout/Dashboard/use-dashboard-node.ts
|
|
10
|
-
const INTERACTIVE_SELECTOR = "button,input,textarea,select,a,[role=\"button\"],[role=\"menuitem\"],[role=\"checkbox\"],[role=\"switch\"],[role=\"tab\"],[contenteditable=\"true\"],[data-dashboard-no-select],[data-dashboard-no-move]";
|
|
11
|
-
function useDashboardNodeInteraction({ id, isContainer, isSelectable = true }) {
|
|
12
|
-
const tree = useContext(DashboardTreeContext);
|
|
13
|
-
const selection = useContext(DashboardSelectionContext);
|
|
14
|
-
const editing = useContext(DashboardEditingContext);
|
|
15
|
-
const [isFocusWithin, setIsFocusWithin] = useState(false);
|
|
16
|
-
const { hoverProps, isHovered } = useHover({});
|
|
17
|
-
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocusWithin });
|
|
18
|
-
const containerDepth = isContainer ? tree.containerDepth + 1 : tree.containerDepth;
|
|
19
|
-
const canSelect = isSelectable && selection.selectionMode !== "none";
|
|
20
|
-
const isSelected = selection.selectedKeys.has(id);
|
|
21
|
-
useLayoutEffect$1(() => selection.register(id, {
|
|
22
|
-
parentId: tree.parentId,
|
|
23
|
-
ancestorIds: tree.ancestorIds
|
|
24
|
-
}), [
|
|
25
|
-
id,
|
|
26
|
-
selection.register,
|
|
27
|
-
tree.parentId,
|
|
28
|
-
tree.ancestorIds
|
|
29
|
-
]);
|
|
30
|
-
const selectSelf = useEvent((additive = false) => {
|
|
31
|
-
if (canSelect) selection.select(id, additive);
|
|
32
|
-
});
|
|
33
|
-
return {
|
|
34
|
-
tree,
|
|
35
|
-
editing,
|
|
36
|
-
containerDepth,
|
|
37
|
-
canSelect,
|
|
38
|
-
isSelected,
|
|
39
|
-
isHovered,
|
|
40
|
-
isFocusWithin,
|
|
41
|
-
interactionProps: mergeProps$1(hoverProps, focusWithinProps, {
|
|
42
|
-
onClick: useEvent((event) => {
|
|
43
|
-
if (!canSelect) return;
|
|
44
|
-
if (event.target.closest(INTERACTIVE_SELECTOR)) return;
|
|
45
|
-
event.stopPropagation();
|
|
46
|
-
selectSelf(event.shiftKey || event.metaKey || event.ctrlKey);
|
|
47
|
-
}),
|
|
48
|
-
onKeyDown: useEvent((event) => {
|
|
49
|
-
if (!canSelect || event.target !== event.currentTarget) return;
|
|
50
|
-
if (event.key !== " " && event.key !== "Spacebar") return;
|
|
51
|
-
event.preventDefault();
|
|
52
|
-
event.stopPropagation();
|
|
53
|
-
selectSelf(selection.selectionMode === "multiple");
|
|
54
|
-
})
|
|
55
|
-
}),
|
|
56
|
-
selectSelf
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function isDashboardActionTarget(target) {
|
|
60
|
-
return !!target?.closest?.(INTERACTIVE_SELECTOR);
|
|
61
|
-
}
|
|
62
|
-
function getSurfaceMoveProps(moveProps, canMove, focusRef, onPointerStart) {
|
|
63
|
-
if (!canMove) return {};
|
|
64
|
-
return {
|
|
65
|
-
...moveProps,
|
|
66
|
-
...moveProps.onPointerDown && { onPointerDown(event) {
|
|
67
|
-
if (isDashboardActionTarget(event.target)) return;
|
|
68
|
-
onPointerStart(event.clientX, event.clientY);
|
|
69
|
-
focusRef.current?.focus({ preventScroll: true });
|
|
70
|
-
moveProps.onPointerDown?.(event);
|
|
71
|
-
} },
|
|
72
|
-
...moveProps.onMouseDown && { onMouseDown(event) {
|
|
73
|
-
if (isDashboardActionTarget(event.target)) return;
|
|
74
|
-
onPointerStart(event.clientX, event.clientY);
|
|
75
|
-
focusRef.current?.focus({ preventScroll: true });
|
|
76
|
-
moveProps.onMouseDown?.(event);
|
|
77
|
-
} },
|
|
78
|
-
...moveProps.onTouchStart && { onTouchStart(event) {
|
|
79
|
-
if (isDashboardActionTarget(event.target)) return;
|
|
80
|
-
const touch = event.touches[0];
|
|
81
|
-
if (touch) onPointerStart(touch.clientX, touch.clientY);
|
|
82
|
-
moveProps.onTouchStart?.(event);
|
|
83
|
-
} },
|
|
84
|
-
...moveProps.onKeyDown && { onKeyDown(event) {
|
|
85
|
-
if (event.target !== event.currentTarget) return;
|
|
86
|
-
moveProps.onKeyDown?.(event);
|
|
87
|
-
} }
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
//#endregion
|
|
92
|
-
export { getSurfaceMoveProps, useDashboardNodeInteraction };
|
|
93
|
-
//# sourceMappingURL=use-dashboard-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-dashboard-node.js","names":["mergeProps"],"sources":["../../../../src/components/layout/Dashboard/use-dashboard-node.ts"],"sourcesContent":["import { useContext, useState } from 'react';\nimport { useFocusWithin, useHover, useMove } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks';\nimport { mergeProps, useLayoutEffect } from '../../../utils/react';\n\nimport {\n DashboardEditingContext,\n DashboardSelectionContext,\n DashboardTreeContext,\n} from './context';\n\nimport type {\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n PointerEvent as ReactPointerEvent,\n TouchEvent as ReactTouchEvent,\n} from 'react';\nimport type { DashboardNodeInteractionOptions } from './types';\n\nexport const INTERACTIVE_SELECTOR =\n 'button,input,textarea,select,a,[role=\"button\"],[role=\"menuitem\"],' +\n '[role=\"checkbox\"],[role=\"switch\"],[role=\"tab\"],[contenteditable=\"true\"],' +\n '[data-dashboard-no-select],[data-dashboard-no-move]';\n\nexport function useDashboardNodeInteraction({\n id,\n isContainer,\n isSelectable = true,\n}: DashboardNodeInteractionOptions) {\n const tree = useContext(DashboardTreeContext);\n const selection = useContext(DashboardSelectionContext);\n const editing = useContext(DashboardEditingContext);\n const [isFocusWithin, setIsFocusWithin] = useState(false);\n const { hoverProps, isHovered } = useHover({});\n const { focusWithinProps } = useFocusWithin({\n onFocusWithinChange: setIsFocusWithin,\n });\n\n const containerDepth = isContainer\n ? tree.containerDepth + 1\n : tree.containerDepth;\n const canSelect = isSelectable && selection.selectionMode !== 'none';\n const isSelected = selection.selectedKeys.has(id);\n\n // Deps matter here: without them every render tears the registration down and\n // rebuilds it, for every node in the tree, on every preview frame of a drag.\n useLayoutEffect(\n () =>\n selection.register(id, {\n parentId: tree.parentId,\n ancestorIds: tree.ancestorIds,\n }),\n [id, selection.register, tree.parentId, tree.ancestorIds],\n );\n\n const selectSelf = useEvent((additive = false) => {\n if (canSelect) selection.select(id, additive);\n });\n\n const onClick = useEvent((event: ReactMouseEvent<HTMLElement>) => {\n if (!canSelect) return;\n const target = event.target as HTMLElement;\n if (target.closest(INTERACTIVE_SELECTOR)) return;\n event.stopPropagation();\n selectSelf(event.shiftKey || event.metaKey || event.ctrlKey);\n });\n\n const onKeyDown = useEvent((event: ReactKeyboardEvent<HTMLElement>) => {\n if (!canSelect || event.target !== event.currentTarget) return;\n if (event.key !== ' ' && event.key !== 'Spacebar') return;\n event.preventDefault();\n event.stopPropagation();\n selectSelf(selection.selectionMode === 'multiple');\n });\n\n const interactionProps = mergeProps(hoverProps, focusWithinProps, {\n onClick,\n onKeyDown,\n });\n\n return {\n tree,\n editing,\n containerDepth,\n canSelect,\n isSelected,\n isHovered,\n isFocusWithin,\n interactionProps,\n selectSelf,\n };\n}\n\nexport function isDashboardActionTarget(target: EventTarget | null): boolean {\n const element = target as HTMLElement | null;\n\n return !!element?.closest?.(INTERACTIVE_SELECTOR);\n}\n\nexport function getSurfaceMoveProps(\n moveProps: ReturnType<typeof useMove>['moveProps'],\n canMove: boolean,\n focusRef: { current: HTMLElement | null },\n onPointerStart: (clientX: number, clientY: number) => void,\n) {\n if (!canMove) return {};\n\n return {\n ...moveProps,\n ...(moveProps.onPointerDown && {\n onPointerDown(event: ReactPointerEvent<HTMLElement>) {\n if (isDashboardActionTarget(event.target)) return;\n onPointerStart(event.clientX, event.clientY);\n focusRef.current?.focus({ preventScroll: true });\n moveProps.onPointerDown?.(event);\n },\n }),\n ...(moveProps.onMouseDown && {\n onMouseDown(event: ReactMouseEvent<HTMLElement>) {\n if (isDashboardActionTarget(event.target)) return;\n onPointerStart(event.clientX, event.clientY);\n focusRef.current?.focus({ preventScroll: true });\n moveProps.onMouseDown?.(event);\n },\n }),\n ...(moveProps.onTouchStart && {\n onTouchStart(event: ReactTouchEvent<HTMLElement>) {\n if (isDashboardActionTarget(event.target)) return;\n const touch = event.touches[0];\n if (touch) onPointerStart(touch.clientX, touch.clientY);\n moveProps.onTouchStart?.(event);\n },\n }),\n ...(moveProps.onKeyDown && {\n onKeyDown(event: ReactKeyboardEvent<HTMLElement>) {\n if (event.target !== event.currentTarget) return;\n moveProps.onKeyDown?.(event);\n },\n }),\n };\n}\n"],"mappings":";;;;;;;;;AAoBA,MAAa,uB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GnD,SAAgB,oBACd,WACA,SACA,UACA,gBACA;AACA,KAAI,CAAC,QAAS,QAAO,EAAE;AAEvB,QAAO;EACL,GAAG;EACH,GAAI,UAAU,iBAAiB,EAC7B,cAAc,OAAuC;AACnD,OAAI,wBAAwB,MAAM,OAAO,CAAE;AAC3C,kBAAe,MAAM,SAAS,MAAM,QAAQ;AAC5C,YAAS,SAAS,MAAM,EAAE,eAAe,MAAM,CAAC;AAChD,aAAU,gBAAgB,MAAM;KAEnC;EACD,GAAI,UAAU,eAAe,EAC3B,YAAY,OAAqC;AAC/C,OAAI,wBAAwB,MAAM,OAAO,CAAE;AAC3C,kBAAe,MAAM,SAAS,MAAM,QAAQ;AAC5C,YAAS,SAAS,MAAM,EAAE,eAAe,MAAM,CAAC;AAChD,aAAU,cAAc,MAAM;KAEjC;EACD,GAAI,UAAU,gBAAgB,EAC5B,aAAa,OAAqC;AAChD,OAAI,wBAAwB,MAAM,OAAO,CAAE;GAC3C,MAAM,QAAQ,MAAM,QAAQ;AAC5B,OAAI,MAAO,gBAAe,MAAM,SAAS,MAAM,QAAQ;AACvD,aAAU,eAAe,MAAM;KAElC;EACD,GAAI,UAAU,aAAa,EACzB,UAAU,OAAwC;AAChD,OAAI,MAAM,WAAW,MAAM,cAAe;AAC1C,aAAU,YAAY,MAAM;KAE/B;EACF"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { CubeIconProps } from "./Icon.js";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/icons/ArrowsHorizontalIcon.d.ts
|
|
6
|
-
declare const ArrowsHorizontalIcon: {
|
|
7
|
-
(props: CubeIconProps): react_jsx_runtime0.JSX.Element;
|
|
8
|
-
displayName: string;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { ArrowsHorizontalIcon };
|
|
12
|
-
//# sourceMappingURL=ArrowsHorizontalIcon.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-e056095 | Cube Dev Team */
|
|
2
|
-
import { wrapIcon } from "./wrap-icon.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { IconArrowsHorizontal } from "@tabler/icons-react";
|
|
5
|
-
|
|
6
|
-
//#region src/icons/ArrowsHorizontalIcon.tsx
|
|
7
|
-
const ArrowsHorizontalIcon = wrapIcon("ArrowsHorizontalIcon", /* @__PURE__ */ jsx(IconArrowsHorizontal, {}));
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { ArrowsHorizontalIcon };
|
|
11
|
-
//# sourceMappingURL=ArrowsHorizontalIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowsHorizontalIcon.js","names":[],"sources":["../../src/icons/ArrowsHorizontalIcon.tsx"],"sourcesContent":["import { IconArrowsHorizontal } from '@tabler/icons-react';\n\nimport { wrapIcon } from './wrap-icon';\n\nexport const ArrowsHorizontalIcon = wrapIcon(\n 'ArrowsHorizontalIcon',\n <IconArrowsHorizontal />,\n);\n"],"mappings":";;;;;;AAIA,MAAa,uBAAuB,SAClC,wBACA,oBAAC,yBAAuB,CACzB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { CubeIconProps } from "./Icon.js";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/icons/ArrowsInHorizontalIcon.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Inward horizontal arrows — the counterpart to `ArrowsHorizontalIcon`.
|
|
8
|
-
*
|
|
9
|
-
* Hand-authored because Tabler ships the outward pair (`IconArrowsHorizontal`,
|
|
10
|
-
* `IconArrowsVertical`) but no single-axis inward twin, and pairing "reduce
|
|
11
|
-
* width" with a merge or an exchange glyph reads as something else entirely.
|
|
12
|
-
* Same 24×24 grid and 2px stroke as the Tabler pair it sits next to.
|
|
13
|
-
*/
|
|
14
|
-
declare const ArrowsInHorizontalIcon: {
|
|
15
|
-
(props: CubeIconProps): react_jsx_runtime0.JSX.Element;
|
|
16
|
-
displayName: string;
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { ArrowsInHorizontalIcon };
|
|
20
|
-
//# sourceMappingURL=ArrowsInHorizontalIcon.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-e056095 | Cube Dev Team */
|
|
2
|
-
import { wrapIcon } from "./wrap-icon.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/icons/ArrowsInHorizontalIcon.tsx
|
|
6
|
-
/**
|
|
7
|
-
* Inward horizontal arrows — the counterpart to `ArrowsHorizontalIcon`.
|
|
8
|
-
*
|
|
9
|
-
* Hand-authored because Tabler ships the outward pair (`IconArrowsHorizontal`,
|
|
10
|
-
* `IconArrowsVertical`) but no single-axis inward twin, and pairing "reduce
|
|
11
|
-
* width" with a merge or an exchange glyph reads as something else entirely.
|
|
12
|
-
* Same 24×24 grid and 2px stroke as the Tabler pair it sits next to.
|
|
13
|
-
*/
|
|
14
|
-
const ArrowsInHorizontalIcon = wrapIcon("ArrowsInHorizontalIcon", /* @__PURE__ */ jsx("svg", {
|
|
15
|
-
viewBox: "0 0 24 24",
|
|
16
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
-
width: "24",
|
|
18
|
-
height: "24",
|
|
19
|
-
fill: "none",
|
|
20
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
21
|
-
stroke: "currentColor",
|
|
22
|
-
strokeLinecap: "round",
|
|
23
|
-
strokeLinejoin: "round",
|
|
24
|
-
strokeWidth: "2",
|
|
25
|
-
d: "M3 12h18M7 8l4 4-4 4m10-8-4 4 4 4"
|
|
26
|
-
})
|
|
27
|
-
}));
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export { ArrowsInHorizontalIcon };
|
|
31
|
-
//# sourceMappingURL=ArrowsInHorizontalIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowsInHorizontalIcon.js","names":[],"sources":["../../src/icons/ArrowsInHorizontalIcon.tsx"],"sourcesContent":["import { wrapIcon } from './wrap-icon';\n\n/**\n * Inward horizontal arrows — the counterpart to `ArrowsHorizontalIcon`.\n *\n * Hand-authored because Tabler ships the outward pair (`IconArrowsHorizontal`,\n * `IconArrowsVertical`) but no single-axis inward twin, and pairing \"reduce\n * width\" with a merge or an exchange glyph reads as something else entirely.\n * Same 24×24 grid and 2px stroke as the Tabler pair it sits next to.\n */\nexport const ArrowsInHorizontalIcon = wrapIcon(\n 'ArrowsInHorizontalIcon',\n <svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n >\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M3 12h18M7 8l4 4-4 4m10-8-4 4 4 4\"\n />\n </svg>,\n);\n"],"mappings":";;;;;;;;;;;;;AAUA,MAAa,yBAAyB,SACpC,0BACA,oBAAC;CACC,SAAQ;CACR,OAAM;CACN,OAAM;CACN,QAAO;CACP,MAAK;WAEL,oBAAC;EACC,QAAO;EACP,eAAc;EACd,gBAAe;EACf,aAAY;EACZ,GAAE;GACF;EACE,CACP"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { CubeIconProps } from "./Icon.js";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/icons/ArrowsInVerticalIcon.d.ts
|
|
6
|
-
/** Inward vertical arrows. See {@link ArrowsInHorizontalIcon} for why it is local. */
|
|
7
|
-
declare const ArrowsInVerticalIcon: {
|
|
8
|
-
(props: CubeIconProps): react_jsx_runtime0.JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { ArrowsInVerticalIcon };
|
|
13
|
-
//# sourceMappingURL=ArrowsInVerticalIcon.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-e056095 | Cube Dev Team */
|
|
2
|
-
import { wrapIcon } from "./wrap-icon.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/icons/ArrowsInVerticalIcon.tsx
|
|
6
|
-
/** Inward vertical arrows. See {@link ArrowsInHorizontalIcon} for why it is local. */
|
|
7
|
-
const ArrowsInVerticalIcon = wrapIcon("ArrowsInVerticalIcon", /* @__PURE__ */ jsx("svg", {
|
|
8
|
-
viewBox: "0 0 24 24",
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
width: "24",
|
|
11
|
-
height: "24",
|
|
12
|
-
fill: "none",
|
|
13
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
14
|
-
stroke: "currentColor",
|
|
15
|
-
strokeLinecap: "round",
|
|
16
|
-
strokeLinejoin: "round",
|
|
17
|
-
strokeWidth: "2",
|
|
18
|
-
d: "M12 3v18M8 7l4 4 4-4M8 17l4-4 4 4"
|
|
19
|
-
})
|
|
20
|
-
}));
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
export { ArrowsInVerticalIcon };
|
|
24
|
-
//# sourceMappingURL=ArrowsInVerticalIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowsInVerticalIcon.js","names":[],"sources":["../../src/icons/ArrowsInVerticalIcon.tsx"],"sourcesContent":["import { wrapIcon } from './wrap-icon';\n\n/** Inward vertical arrows. See {@link ArrowsInHorizontalIcon} for why it is local. */\nexport const ArrowsInVerticalIcon = wrapIcon(\n 'ArrowsInVerticalIcon',\n <svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n >\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"M12 3v18M8 7l4 4 4-4M8 17l4-4 4 4\"\n />\n </svg>,\n);\n"],"mappings":";;;;;;AAGA,MAAa,uBAAuB,SAClC,wBACA,oBAAC;CACC,SAAQ;CACR,OAAM;CACN,OAAM;CACN,QAAO;CACP,MAAK;WAEL,oBAAC;EACC,QAAO;EACP,eAAc;EACd,gBAAe;EACf,aAAY;EACZ,GAAE;GACF;EACE,CACP"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { CubeIconProps } from "./Icon.js";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/icons/ArrowsMaximizeIcon.d.ts
|
|
6
|
-
declare const ArrowsMaximizeIcon: {
|
|
7
|
-
(props: CubeIconProps): react_jsx_runtime0.JSX.Element;
|
|
8
|
-
displayName: string;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { ArrowsMaximizeIcon };
|
|
12
|
-
//# sourceMappingURL=ArrowsMaximizeIcon.d.ts.map
|