@cube-dev/ui-kit 0.157.0 → 0.157.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +43 -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 +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.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 +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/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- 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/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/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/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/ColorSwatch.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 +10 -7
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js.map +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Board/Board.d.ts +8 -0
- package/dist/components/layout/Board/Board.js +6 -5
- 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.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.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +2 -2
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +84 -4
- package/dist/components/layout/Board/grid-core/group-move.js.map +1 -1
- package/dist/components/layout/Board/grid-core/layout.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/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.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/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/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.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/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/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/components/layout/Board.md +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
//#region src/components/layout/Board/grid-core/constraints.ts
|
|
3
3
|
function clamp(value, min, max) {
|
|
4
4
|
return Math.max(min, Math.min(max, value));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { collides, getFirstCollision } from "./collision.js";
|
|
3
|
-
import {
|
|
3
|
+
import { sortLayoutItemsByColRow, sortLayoutItemsByRowCol } from "./sort.js";
|
|
4
|
+
import { bottom, cloneLayout, cloneLayoutItem, getStatics } from "./layout.js";
|
|
5
|
+
import { compactItemHorizontal, compactItemVertical } from "./compactors.js";
|
|
4
6
|
|
|
5
7
|
//#region src/components/layout/Board/grid-core/group-move.ts
|
|
6
8
|
/**
|
|
@@ -14,7 +16,8 @@ import { bottom, cloneLayout } from "./layout.js";
|
|
|
14
16
|
*
|
|
15
17
|
* `moveElements` moves a set of items rigidly instead. Every mover receives the
|
|
16
18
|
* same `(dx, dy)`, so the group's shape is invariant *by construction* rather
|
|
17
|
-
* than by repair
|
|
19
|
+
* than by repair — and the compaction that follows is ordered so it cannot
|
|
20
|
+
* undo that (see `compactWithGroupOrder`).
|
|
18
21
|
*
|
|
19
22
|
* This module is UI-Kit-specific; it is not part of the vendored react-grid-layout
|
|
20
23
|
* core (see ./NOTICE.md).
|
|
@@ -38,6 +41,10 @@ function isMovable(item) {
|
|
|
38
41
|
* positions, so only mover↔non-mover and non-mover↔non-mover overlaps resolve.
|
|
39
42
|
* - **A static item is never a mover**, matching `moveElement`'s own guard, and
|
|
40
43
|
* a mover can never displace a static item — that frame is rejected instead.
|
|
44
|
+
* - **Gravity still wins, but it cannot reach inside the group.** A compacting
|
|
45
|
+
* board reflows the movers along with everyone else, so the block is not held
|
|
46
|
+
* in mid-air; the group is merely compacted as one consecutive run, which is
|
|
47
|
+
* what stops a displaced neighbour being packed *between* two members.
|
|
41
48
|
*
|
|
42
49
|
* Returns a new layout in the input's item order; the input is never mutated.
|
|
43
50
|
*/
|
|
@@ -84,13 +91,86 @@ function moveElements(layout, ids, dx, dy, options) {
|
|
|
84
91
|
} else if (compactor.type === null && !pushOthersDown(movers, others)) return rejected;
|
|
85
92
|
}
|
|
86
93
|
return {
|
|
87
|
-
layout:
|
|
94
|
+
layout: !compactor.allowOverlap && (compactor.type === "vertical" || compactor.type === "horizontal") ? compactWithGroupOrder(working, moverIds, {
|
|
95
|
+
axis: compactor.type,
|
|
96
|
+
travel: compactor.type === "horizontal" ? clampedDx : clampedDy,
|
|
97
|
+
cols
|
|
98
|
+
}) : [...compactor.compact(working, cols)],
|
|
88
99
|
dx: clampedDx,
|
|
89
100
|
dy: clampedDy,
|
|
90
101
|
moved: true
|
|
91
102
|
};
|
|
92
103
|
}
|
|
93
104
|
/**
|
|
105
|
+
* Compact a layout the way the board's own compactor would, except that the
|
|
106
|
+
* movers are placed as one consecutive run instead of being interleaved with
|
|
107
|
+
* everyone else by a global `(y, x)` sort.
|
|
108
|
+
*
|
|
109
|
+
* Each member still floats individually under gravity, so the result is a fixed
|
|
110
|
+
* point of the plain compactor — nothing is parked in mid-air, and a later
|
|
111
|
+
* unrelated drag (which re-compacts the whole board) cannot shear the group
|
|
112
|
+
* after the fact. The single invariant this adds is that a non-mover can never
|
|
113
|
+
* end up *between* two members.
|
|
114
|
+
*
|
|
115
|
+
* Placement order decides everything, and it turns on the direction of travel:
|
|
116
|
+
*
|
|
117
|
+
* - Moving **against** gravity (`travel < 0`), the group claims the row it was
|
|
118
|
+
* dropped on and the widgets it passed fall in below it.
|
|
119
|
+
* - Moving **with** gravity, the non-movers close the vacated space first.
|
|
120
|
+
* Handing the group the tie here would leave it exactly where it started and
|
|
121
|
+
* the drag would read as a no-op.
|
|
122
|
+
*
|
|
123
|
+
* The comparison is a strict `travel < 0`, so a zero-travel re-run lands in the
|
|
124
|
+
* second branch — that is what makes the pass idempotent, which the live drag
|
|
125
|
+
* and the keyboard path both depend on.
|
|
126
|
+
*/
|
|
127
|
+
function compactWithGroupOrder(layout, moverIds, { axis, travel, cols }) {
|
|
128
|
+
const horizontal = axis === "horizontal";
|
|
129
|
+
const head = horizontal ? "x" : "y";
|
|
130
|
+
const cross = horizontal ? "y" : "x";
|
|
131
|
+
const groupFirst = travel < 0;
|
|
132
|
+
const clones = layout.map(cloneLayoutItem);
|
|
133
|
+
const movers = [];
|
|
134
|
+
const units = [];
|
|
135
|
+
for (const it of clones) if (moverIds.has(it.i)) movers.push(it);
|
|
136
|
+
else units.push({
|
|
137
|
+
isGroup: false,
|
|
138
|
+
head: it[head],
|
|
139
|
+
cross: it[cross],
|
|
140
|
+
members: [it]
|
|
141
|
+
});
|
|
142
|
+
if (movers.length > 0) {
|
|
143
|
+
const groupHead = Math.min(...movers.map((it) => it[head]));
|
|
144
|
+
units.push({
|
|
145
|
+
isGroup: true,
|
|
146
|
+
head: groupHead,
|
|
147
|
+
cross: Math.min(...movers.filter((it) => it[head] === groupHead).map((it) => it[cross])),
|
|
148
|
+
members: horizontal ? sortLayoutItemsByColRow(movers) : sortLayoutItemsByRowCol(movers)
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
units.sort((a, b) => {
|
|
152
|
+
if (a.head !== b.head) return a.head - b.head;
|
|
153
|
+
if (a.isGroup !== b.isGroup) return a.isGroup === groupFirst ? -1 : 1;
|
|
154
|
+
if (a.cross !== b.cross) return a.cross - b.cross;
|
|
155
|
+
return 0;
|
|
156
|
+
});
|
|
157
|
+
const order = units.flatMap((unit) => unit.members);
|
|
158
|
+
const compareWith = getStatics(clones);
|
|
159
|
+
let maxY = bottom(compareWith);
|
|
160
|
+
for (const l of order) {
|
|
161
|
+
if (!l.static) {
|
|
162
|
+
if (horizontal) compactItemHorizontal(compareWith, l, cols, order);
|
|
163
|
+
else {
|
|
164
|
+
compactItemVertical(compareWith, l, order, maxY);
|
|
165
|
+
maxY = Math.max(maxY, l.y + l.h);
|
|
166
|
+
}
|
|
167
|
+
compareWith.push(l);
|
|
168
|
+
}
|
|
169
|
+
l.moved = false;
|
|
170
|
+
}
|
|
171
|
+
return clones;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
94
174
|
* Push every non-mover that overlaps the group (or another displaced item)
|
|
95
175
|
* straight down until nothing overlaps.
|
|
96
176
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-move.js","names":[],"sources":["../../../../../src/components/layout/Board/grid-core/group-move.ts"],"sourcesContent":["/**\n * Rigid multi-item movement.\n *\n * `moveElement` (see ./layout.ts) moves exactly one item and is free to displace\n * any other item — including one the caller also wanted to move — as a collision\n * victim. That makes it unusable for moving a *selection* as a block: the shape\n * of the group would be destroyed by the very collision resolution meant to make\n * room for it.\n *\n * `moveElements` moves a set of items rigidly instead. Every mover receives the\n * same `(dx, dy)`, so the group's shape is invariant *by construction* rather\n * than by repair.\n *\n * This module is UI-Kit-specific; it is not part of the vendored react-grid-layout\n * core (see ./NOTICE.md).\n */\n\nimport { collides, getFirstCollision } from './collision';\nimport { bottom, cloneLayout } from './layout';\n\nimport type { Compactor, Layout, LayoutItem, Mutable } from './types';\n\nexport interface MoveElementsOptions {\n /**\n * The board's compactor. Supplies `type`, `allowOverlap` and\n * `preventCollision` as one consistent unit, and performs the tidy-up pass —\n * taking it whole is what keeps this function from ever disagreeing with the\n * board about compaction mode.\n */\n compactor: Compactor;\n cols: number;\n /** @default Infinity */\n maxRows?: number;\n}\n\nexport interface MoveElementsResult {\n layout: LayoutItem[];\n /** The delta actually applied, after clamping the group to the grid. */\n dx: number;\n dy: number;\n /**\n * Whether a valid arrangement was produced. `false` means the frame must be\n * discarded and the previous one kept — never partially applied, since a\n * partial delta is precisely what shears the group apart.\n */\n moved: boolean;\n}\n\n/** An item may be moved unless it is static and does not opt back in. */\nfunction isMovable(item: LayoutItem): boolean {\n return !item.static || item.isDraggable === true;\n}\n\n/**\n * Move every item in `ids` by the same delta, resolving collisions with the\n * items that are *not* moving.\n *\n * Semantics, all deliberate:\n *\n * - **Group-clamped, not item-clamped.** The delta is clamped once against the\n * whole group, so dragging into an edge parks the block against it. Clamping\n * each item into bounds separately would collapse the group's shape the first\n * time it touched a wall, and it would never recover.\n * - **All-or-nothing.** If the frame cannot be resolved, nothing moves.\n * - **Movers never collide with each other.** They keep their relative\n * positions, so only mover↔non-mover and non-mover↔non-mover overlaps resolve.\n * - **A static item is never a mover**, matching `moveElement`'s own guard, and\n * a mover can never displace a static item — that frame is rejected instead.\n *\n * Returns a new layout in the input's item order; the input is never mutated.\n */\nexport function moveElements(\n layout: Layout,\n ids: ReadonlySet<string>,\n dx: number,\n dy: number,\n options: MoveElementsOptions,\n): MoveElementsResult {\n const { compactor, cols, maxRows = Infinity } = options;\n\n const working = cloneLayout(layout);\n const movers = working.filter((it) => ids.has(it.i) && isMovable(it));\n\n if (movers.length === 0) {\n return { layout: working, dx: 0, dy: 0, moved: false };\n }\n\n const moverIds = new Set(movers.map((it) => it.i));\n const others = working.filter((it) => !moverIds.has(it.i));\n\n // ---- Clamp the delta to the group ----------------------------------------\n //\n // The group can travel until its *first* item hits an edge. `Math.max` on the\n // upper bounds guards the degenerate case of an item wider/taller than the\n // grid, where the max would otherwise fall below the min and invert the range.\n let minDx = -Infinity;\n let maxDx = Infinity;\n let minDy = -Infinity;\n let maxDy = Infinity;\n\n for (const it of movers) {\n minDx = Math.max(minDx, -it.x);\n maxDx = Math.min(maxDx, cols - it.w - it.x);\n minDy = Math.max(minDy, -it.y);\n maxDy = Math.min(maxDy, maxRows - it.h - it.y);\n }\n maxDx = Math.max(minDx, maxDx);\n maxDy = Math.max(minDy, maxDy);\n\n // `|| 0` collapses `-0`, which `Math.max` produces whenever a mover sits at\n // coordinate 0. It compares equal to `0` but not under `Object.is`, and it\n // would otherwise be handed back to callers as a delta.\n const clampedDx = Math.min(Math.max(dx, minDx), maxDx) || 0;\n const clampedDy = Math.min(Math.max(dy, minDy), maxDy) || 0;\n\n for (const it of movers) {\n (it as Mutable<LayoutItem>).x = it.x + clampedDx;\n (it as Mutable<LayoutItem>).y = it.y + clampedDy;\n }\n\n const rejected: MoveElementsResult = {\n layout: cloneLayout(layout),\n dx: 0,\n dy: 0,\n moved: false,\n };\n\n if (!compactor.allowOverlap) {\n // A static non-mover cannot be pushed out of the way, so overlapping one is\n // never resolvable.\n for (const it of others) {\n if (it.static && getFirstCollision(movers, it)) {\n return rejected;\n }\n }\n\n if (compactor.preventCollision) {\n // `compact=\"free\"` / legacy no-compaction with collisions prevented: the\n // group may only land where it fits outright.\n for (const it of movers) {\n if (getFirstCollision(others, it)) {\n return rejected;\n }\n }\n } else if (compactor.type === null && !pushOthersDown(movers, others)) {\n // Only when nothing else will: a compacting compactor resolves overlaps\n // itself (and floats items back up afterwards), so pre-pushing there just\n // shoves neighbours further than needed and makes the board look like it\n // is lagging a step behind the pointer.\n return rejected;\n }\n }\n\n // Compact exactly as the single-widget path does — the group is not held in\n // place. On a vertically-compacted board a lone widget can never be parked in\n // empty space, and a group must not be able to either: neighbours have to\n // close the gap the moment it opens, or the board reads as a step behind.\n const out = [...compactor.compact(working, cols)];\n\n return { layout: out, dx: clampedDx, dy: clampedDy, moved: true };\n}\n\n/**\n * Push every non-mover that overlaps the group (or another displaced item)\n * straight down until nothing overlaps.\n *\n * Down, always — even under horizontal compaction. Downward is the one direction\n * a grid always has room in, so the pass is guaranteed to terminate; the\n * compactor then re-packs along its own axis immediately afterwards. Pushing\n * sideways would need overflow wrapping here and could ping-pong an item between\n * two neighbours.\n *\n * Mutates `others` in place. Returns `false` if the cascade fails to settle,\n * which the caller turns into a rejected frame.\n */\nfunction pushOthersDown(movers: LayoutItem[], others: LayoutItem[]): boolean {\n // Place one at a time, in reading order, against a set that starts as the\n // group. Each push moves an item strictly past a placed item's bottom edge, so\n // it advances monotonically and the loop is bounded by the stack height.\n const ordered = [...others].sort((a, b) =>\n a.y === b.y ? a.x - b.x : a.y - b.y,\n );\n const placed: LayoutItem[] = [...movers];\n const limit = bottom(movers) + bottom(others) + others.length + 1;\n\n for (const item of ordered) {\n if (item.static) {\n // Verified collision-free against the movers by the caller; other statics\n // are pre-existing and not ours to resolve.\n placed.push(item);\n continue;\n }\n\n let steps = 0;\n let shifted = true;\n\n while (shifted) {\n shifted = false;\n for (const other of placed) {\n if (collides(item, other)) {\n (item as Mut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file":"group-move.js","names":[],"sources":["../../../../../src/components/layout/Board/grid-core/group-move.ts"],"sourcesContent":["/**\n * Rigid multi-item movement.\n *\n * `moveElement` (see ./layout.ts) moves exactly one item and is free to displace\n * any other item — including one the caller also wanted to move — as a collision\n * victim. That makes it unusable for moving a *selection* as a block: the shape\n * of the group would be destroyed by the very collision resolution meant to make\n * room for it.\n *\n * `moveElements` moves a set of items rigidly instead. Every mover receives the\n * same `(dx, dy)`, so the group's shape is invariant *by construction* rather\n * than by repair — and the compaction that follows is ordered so it cannot\n * undo that (see `compactWithGroupOrder`).\n *\n * This module is UI-Kit-specific; it is not part of the vendored react-grid-layout\n * core (see ./NOTICE.md).\n */\n\nimport { collides, getFirstCollision } from './collision';\nimport { compactItemHorizontal, compactItemVertical } from './compactors';\nimport { bottom, cloneLayout, cloneLayoutItem, getStatics } from './layout';\nimport { sortLayoutItemsByColRow, sortLayoutItemsByRowCol } from './sort';\n\nimport type { Compactor, Layout, LayoutItem, Mutable } from './types';\n\nexport interface MoveElementsOptions {\n /**\n * The board's compactor. Supplies `type`, `allowOverlap` and\n * `preventCollision` as one consistent unit, and performs the tidy-up pass —\n * taking it whole is what keeps this function from ever disagreeing with the\n * board about compaction mode.\n */\n compactor: Compactor;\n cols: number;\n /** @default Infinity */\n maxRows?: number;\n}\n\nexport interface MoveElementsResult {\n layout: LayoutItem[];\n /** The delta actually applied, after clamping the group to the grid. */\n dx: number;\n dy: number;\n /**\n * Whether a valid arrangement was produced. `false` means the frame must be\n * discarded and the previous one kept — never partially applied, since a\n * partial delta is precisely what shears the group apart.\n */\n moved: boolean;\n}\n\n/** An item may be moved unless it is static and does not opt back in. */\nfunction isMovable(item: LayoutItem): boolean {\n return !item.static || item.isDraggable === true;\n}\n\n/**\n * Move every item in `ids` by the same delta, resolving collisions with the\n * items that are *not* moving.\n *\n * Semantics, all deliberate:\n *\n * - **Group-clamped, not item-clamped.** The delta is clamped once against the\n * whole group, so dragging into an edge parks the block against it. Clamping\n * each item into bounds separately would collapse the group's shape the first\n * time it touched a wall, and it would never recover.\n * - **All-or-nothing.** If the frame cannot be resolved, nothing moves.\n * - **Movers never collide with each other.** They keep their relative\n * positions, so only mover↔non-mover and non-mover↔non-mover overlaps resolve.\n * - **A static item is never a mover**, matching `moveElement`'s own guard, and\n * a mover can never displace a static item — that frame is rejected instead.\n * - **Gravity still wins, but it cannot reach inside the group.** A compacting\n * board reflows the movers along with everyone else, so the block is not held\n * in mid-air; the group is merely compacted as one consecutive run, which is\n * what stops a displaced neighbour being packed *between* two members.\n *\n * Returns a new layout in the input's item order; the input is never mutated.\n */\nexport function moveElements(\n layout: Layout,\n ids: ReadonlySet<string>,\n dx: number,\n dy: number,\n options: MoveElementsOptions,\n): MoveElementsResult {\n const { compactor, cols, maxRows = Infinity } = options;\n\n const working = cloneLayout(layout);\n const movers = working.filter((it) => ids.has(it.i) && isMovable(it));\n\n if (movers.length === 0) {\n return { layout: working, dx: 0, dy: 0, moved: false };\n }\n\n const moverIds = new Set(movers.map((it) => it.i));\n const others = working.filter((it) => !moverIds.has(it.i));\n\n // ---- Clamp the delta to the group ----------------------------------------\n //\n // The group can travel until its *first* item hits an edge. `Math.max` on the\n // upper bounds guards the degenerate case of an item wider/taller than the\n // grid, where the max would otherwise fall below the min and invert the range.\n let minDx = -Infinity;\n let maxDx = Infinity;\n let minDy = -Infinity;\n let maxDy = Infinity;\n\n for (const it of movers) {\n minDx = Math.max(minDx, -it.x);\n maxDx = Math.min(maxDx, cols - it.w - it.x);\n minDy = Math.max(minDy, -it.y);\n maxDy = Math.min(maxDy, maxRows - it.h - it.y);\n }\n maxDx = Math.max(minDx, maxDx);\n maxDy = Math.max(minDy, maxDy);\n\n // `|| 0` collapses `-0`, which `Math.max` produces whenever a mover sits at\n // coordinate 0. It compares equal to `0` but not under `Object.is`, and it\n // would otherwise be handed back to callers as a delta.\n const clampedDx = Math.min(Math.max(dx, minDx), maxDx) || 0;\n const clampedDy = Math.min(Math.max(dy, minDy), maxDy) || 0;\n\n for (const it of movers) {\n (it as Mutable<LayoutItem>).x = it.x + clampedDx;\n (it as Mutable<LayoutItem>).y = it.y + clampedDy;\n }\n\n const rejected: MoveElementsResult = {\n layout: cloneLayout(layout),\n dx: 0,\n dy: 0,\n moved: false,\n };\n\n if (!compactor.allowOverlap) {\n // A static non-mover cannot be pushed out of the way, so overlapping one is\n // never resolvable.\n for (const it of others) {\n if (it.static && getFirstCollision(movers, it)) {\n return rejected;\n }\n }\n\n if (compactor.preventCollision) {\n // `compact=\"free\"` / legacy no-compaction with collisions prevented: the\n // group may only land where it fits outright.\n for (const it of movers) {\n if (getFirstCollision(others, it)) {\n return rejected;\n }\n }\n } else if (compactor.type === null && !pushOthersDown(movers, others)) {\n // Only when nothing else will: a compacting compactor resolves overlaps\n // itself (and floats items back up afterwards), so pre-pushing there just\n // shoves neighbours further than needed and makes the board look like it\n // is lagging a step behind the pointer.\n return rejected;\n }\n }\n\n // Compact exactly as the single-widget path does — the group is not held in\n // place. On a vertically-compacted board a lone widget can never be parked in\n // empty space, and a group must not be able to either: neighbours have to\n // close the gap the moment it opens, or the board reads as a step behind.\n //\n // But *order* the pass so the group stays one run. A plain compaction sorts\n // every item by `(y, x)` and packs each one independently, with no idea a\n // group exists — so the moment movers and non-movers interleave in y, a\n // displaced neighbour gets packed between two members and the selection comes\n // apart mid-drag. Check `allowOverlap` first: the overlap compactors report a\n // `type` but their `compact` is a plain clone, so there is nothing to order.\n const groupAware =\n !compactor.allowOverlap &&\n (compactor.type === 'vertical' || compactor.type === 'horizontal');\n\n const out = groupAware\n ? compactWithGroupOrder(working, moverIds, {\n axis: compactor.type as CompactionAxis,\n travel: compactor.type === 'horizontal' ? clampedDx : clampedDy,\n cols,\n })\n : [...compactor.compact(working, cols)];\n\n return { layout: out, dx: clampedDx, dy: clampedDy, moved: true };\n}\n\ntype CompactionAxis = 'vertical' | 'horizontal';\n\ninterface GroupOrderOptions {\n /** The axis the board compacts along. */\n axis: CompactionAxis;\n /**\n * The group's clamped travel along that axis. Only the sign is read — it\n * decides who wins a tie for the same row (or column).\n */\n travel: number;\n cols: number;\n}\n\n/** A group of movers, or a single non-mover, as one thing to place. */\ninterface CompactionUnit {\n isGroup: boolean;\n /** Leading edge along the compaction axis. */\n head: number;\n /** Leading edge across it, among the members sitting at `head`. */\n cross: number;\n members: LayoutItem[];\n}\n\n/**\n * Compact a layout the way the board's own compactor would, except that the\n * movers are placed as one consecutive run instead of being interleaved with\n * everyone else by a global `(y, x)` sort.\n *\n * Each member still floats individually under gravity, so the result is a fixed\n * point of the plain compactor — nothing is parked in mid-air, and a later\n * unrelated drag (which re-compacts the whole board) cannot shear the group\n * after the fact. The single invariant this adds is that a non-mover can never\n * end up *between* two members.\n *\n * Placement order decides everything, and it turns on the direction of travel:\n *\n * - Moving **against** gravity (`travel < 0`), the group claims the row it was\n * dropped on and the widgets it passed fall in below it.\n * - Moving **with** gravity, the non-movers close the vacated space first.\n * Handing the group the tie here would leave it exactly where it started and\n * the drag would read as a no-op.\n *\n * The comparison is a strict `travel < 0`, so a zero-travel re-run lands in the\n * second branch — that is what makes the pass idempotent, which the live drag\n * and the keyboard path both depend on.\n */\nfunction compactWithGroupOrder(\n layout: Layout,\n moverIds: ReadonlySet<string>,\n { axis, travel, cols }: GroupOrderOptions,\n): LayoutItem[] {\n const horizontal = axis === 'horizontal';\n const head = horizontal ? 'x' : 'y';\n const cross = horizontal ? 'y' : 'x';\n const groupFirst = travel < 0;\n\n const clones = layout.map(cloneLayoutItem);\n const movers: LayoutItem[] = [];\n const units: CompactionUnit[] = [];\n\n for (const it of clones) {\n if (moverIds.has(it.i)) {\n movers.push(it);\n } else {\n units.push({\n isGroup: false,\n head: it[head],\n cross: it[cross],\n members: [it],\n });\n }\n }\n\n if (movers.length > 0) {\n const groupHead = Math.min(...movers.map((it) => it[head]));\n\n units.push({\n isGroup: true,\n head: groupHead,\n cross: Math.min(\n ...movers.filter((it) => it[head] === groupHead).map((it) => it[cross]),\n ),\n // Members are placed in the same reading order the compactor would have\n // used, so within the run each one lands exactly where it would have.\n members: horizontal\n ? sortLayoutItemsByColRow(movers)\n : sortLayoutItemsByRowCol(movers),\n });\n }\n\n units.sort((a, b) => {\n if (a.head !== b.head) return a.head - b.head;\n // Same row: direction decides whether the group or the displaced non-movers\n // get first claim on it.\n if (a.isGroup !== b.isGroup) return a.isGroup === groupFirst ? -1 : 1;\n if (a.cross !== b.cross) return a.cross - b.cross;\n\n return 0;\n });\n\n // From here on this mirrors `verticalCompactor` / `horizontalCompactor`\n // exactly: statics seed the obstacle set and are never floated, every other\n // item is packed against what is already placed, and `maxY` tracks how far\n // down the board has filled.\n const order = units.flatMap((unit) => unit.members);\n const compareWith = getStatics(clones);\n let maxY = bottom(compareWith);\n\n for (const l of order) {\n if (!l.static) {\n if (horizontal) {\n compactItemHorizontal(compareWith, l, cols, order);\n } else {\n compactItemVertical(compareWith, l, order, maxY);\n maxY = Math.max(maxY, l.y + l.h);\n }\n compareWith.push(l);\n }\n l.moved = false;\n }\n\n return clones;\n}\n\n/**\n * Push every non-mover that overlaps the group (or another displaced item)\n * straight down until nothing overlaps.\n *\n * Down, always — even under horizontal compaction. Downward is the one direction\n * a grid always has room in, so the pass is guaranteed to terminate; the\n * compactor then re-packs along its own axis immediately afterwards. Pushing\n * sideways would need overflow wrapping here and could ping-pong an item between\n * two neighbours.\n *\n * Mutates `others` in place. Returns `false` if the cascade fails to settle,\n * which the caller turns into a rejected frame.\n */\nfunction pushOthersDown(movers: LayoutItem[], others: LayoutItem[]): boolean {\n // Place one at a time, in reading order, against a set that starts as the\n // group. Each push moves an item strictly past a placed item's bottom edge, so\n // it advances monotonically and the loop is bounded by the stack height.\n const ordered = [...others].sort((a, b) =>\n a.y === b.y ? a.x - b.x : a.y - b.y,\n );\n const placed: LayoutItem[] = [...movers];\n const limit = bottom(movers) + bottom(others) + others.length + 1;\n\n for (const item of ordered) {\n if (item.static) {\n // Verified collision-free against the movers by the caller; other statics\n // are pre-existing and not ours to resolve.\n placed.push(item);\n continue;\n }\n\n let steps = 0;\n let shifted = true;\n\n while (shifted) {\n shifted = false;\n for (const other of placed) {\n if (collides(item, other)) {\n (item as Mutable<LayoutItem>).y = other.y + other.h;\n shifted = true;\n }\n }\n if (++steps > limit) {\n return false;\n }\n }\n\n placed.push(item);\n }\n\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,SAAS,UAAU,MAA2B;AAC5C,QAAO,CAAC,KAAK,UAAU,KAAK,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;AAyB9C,SAAgB,aACd,QACA,KACA,IACA,IACA,SACoB;CACpB,MAAM,EAAE,WAAW,MAAM,UAAU,aAAa;CAEhD,MAAM,UAAU,YAAY,OAAO;CACnC,MAAM,SAAS,QAAQ,QAAQ,OAAO,IAAI,IAAI,GAAG,EAAE,IAAI,UAAU,GAAG,CAAC;AAErE,KAAI,OAAO,WAAW,EACpB,QAAO;EAAE,QAAQ;EAAS,IAAI;EAAG,IAAI;EAAG,OAAO;EAAO;CAGxD,MAAM,WAAW,IAAI,IAAI,OAAO,KAAK,OAAO,GAAG,EAAE,CAAC;CAClD,MAAM,SAAS,QAAQ,QAAQ,OAAO,CAAC,SAAS,IAAI,GAAG,EAAE,CAAC;CAO1D,IAAI,QAAQ;CACZ,IAAI,QAAQ;CACZ,IAAI,QAAQ;CACZ,IAAI,QAAQ;AAEZ,MAAK,MAAM,MAAM,QAAQ;AACvB,UAAQ,KAAK,IAAI,OAAO,CAAC,GAAG,EAAE;AAC9B,UAAQ,KAAK,IAAI,OAAO,OAAO,GAAG,IAAI,GAAG,EAAE;AAC3C,UAAQ,KAAK,IAAI,OAAO,CAAC,GAAG,EAAE;AAC9B,UAAQ,KAAK,IAAI,OAAO,UAAU,GAAG,IAAI,GAAG,EAAE;;AAEhD,SAAQ,KAAK,IAAI,OAAO,MAAM;AAC9B,SAAQ,KAAK,IAAI,OAAO,MAAM;CAK9B,MAAM,YAAY,KAAK,IAAI,KAAK,IAA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Q,OAAO,OAAO,GAAG,OAAO,OAAO,GAAG,OAAO,SAAS;AAEhE,MAAK,MAAM,QAAQ,SAAS;AAC1B,MAAI,KAAK,QAAQ;AAGf,UAAO,KAAK,KAAK;AACjB;;EAGF,IAAI,QAAQ;EACZ,IAAI,UAAU;AAEd,SAAO,SAAS;AACd,aAAU;AACV,QAAK,MAAM,SAAS,OAClB,KAAI,SAAS,MAAM,MAAM,EAAE;AACzB,IAAC,KAA6B,IAAI,MAAM,IAAI,MAAM;AAClD,cAAU;;AAGd,OAAI,EAAE,QAAQ,MACZ,QAAO;;AAIX,SAAO,KAAK,KAAK;;AAGnB,QAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { getCompactor, horizontalCompactor, noCompactor, verticalCompactor } from "./grid-core/compactors.js";
|
|
3
3
|
import { aspectRatio, boundedX, boundedY, containerBounds, gridBounds, maxSize, minMaxSize, minSize, snapToGrid } from "./grid-core/constraints.js";
|
|
4
4
|
import { BoardProvider } from "./BoardProvider.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { cloneLayout } from "./grid-core/layout.js";
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { BoardWidgetStore } from "./board-store.js";
|
|
4
4
|
import { collides } from "./grid-core/collision.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { useIsDarwin } from "../../../utils/react/useIsDarwin.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layout/Board/use-board-select-modifier-key.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { CONTAINER_STYLES, filterBaseProps, tasty } from "@tenphi/tasty";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { CONTAINER_STYLES, filterBaseProps, tasty } from "@tenphi/tasty";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { CONTAINER_STYLES, filterBaseProps, tasty } from "@tenphi/tasty";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { BASE_STYLES, BLOCK_STYLES, COLOR_STYLES, DIMENSION_STYLES, OUTER_STYLES, tasty } from "@tenphi/tasty";
|
|
3
3
|
import { forwardRef, useMemo } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../utils/react/useLayoutEffect.js";
|
|
4
4
|
import { useCombinedRefs } from "../../utils/react/useCombinedRefs.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../utils/react/mergeProps.js";
|
|
3
3
|
import { useCombinedRefs } from "../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useEvent } from "../../_internal/hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { CONTAINER_STYLES, filterBaseProps, tasty } from "@tenphi/tasty";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { CONTAINER_STYLES, filterBaseProps, parseStyle, tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useControlledState } from "@react-stately/utils";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | 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 { ItemActionProvider } from "../../actions/ItemActionContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { DropIndicatorElement } from "./styled.js";
|
|
3
3
|
import { useTabsContext } from "./TabsContext.js";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { TabPanelElement } from "./styled.js";
|
|
3
3
|
import { useEffect, useMemo, useRef } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { CloseIcon } from "../../../icons/CloseIcon.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { _ItemButton } from "../../actions/ItemButton/ItemButton.js";
|
|
3
3
|
import { useOptionalTabsContext } from "./TabsContext.js";
|
|
4
4
|
import { tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
//#region src/components/navigation/Tabs/popover-placement.ts
|
|
3
3
|
/**
|
|
4
4
|
* Maps the parent Tabs `placement` to the popover placement for menus and
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { _Text } from "../../content/Text.js";
|
|
3
3
|
import { _Title } from "../../content/Title.js";
|
|
4
4
|
import { Card } from "../../content/Card/Card.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { _Title } from "../../content/Title.js";
|
|
3
3
|
import { useProviderProps } from "../../../provider.js";
|
|
4
4
|
import { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { getWeekNumber } from "../../fields/DatePicker/period.js";
|
|
3
3
|
import { CalendarCell } from "./CalendarCell.js";
|
|
4
4
|
import { tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { _Title } from "../../content/Title.js";
|
|
3
3
|
import { useProviderProps } from "../../../provider.js";
|
|
4
4
|
import { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { _Title } from "../../content/Title.js";
|
|
3
3
|
import { useProviderProps } from "../../../provider.js";
|
|
4
4
|
import { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { Paragraph } from "../../content/Paragraph.js";
|
|
4
4
|
import { _Title } from "../../content/Title.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { AlertDialogZone } from "./AlertDialogZone.js";
|
|
3
3
|
import { createContext, useContext, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { Portal } from "../../portal/Portal.js";
|
|
3
3
|
import { DialogContainer } from "../Dialog/DialogContainer.js";
|
|
4
4
|
import { _AlertDialog } from "./AlertDialog.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { SlotProvider } from "../../../utils/react/Slots.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { _Modal } from "../Modal/Modal.js";
|
|
3
3
|
import { DialogContext } from "./context.js";
|
|
4
4
|
import { Children, isValidElement, useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { _Title } from "../../content/Title.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { ButtonGroup } from "../../actions/ButtonGroup/ButtonGroup.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { usePopoverSync } from "../../../utils/react/usePopoverSync.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { mergeProps } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { DialogContainer } from "./DialogContainer.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { _Overlay } from "./Overlay.js";
|
|
4
4
|
import { _Underlay } from "./Underlay.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { DisplayTransition } from "../../helpers/DisplayTransition/DisplayTransition.js";
|
|
3
3
|
import { Provider, useProviderProps } from "../../../provider.js";
|
|
4
4
|
import { OpenTransitionContext } from "./OpenTransitionContext.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { _Overlay } from "./Overlay.js";
|
|
4
4
|
import { tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { _Overlay } from "./Overlay.js";
|
|
4
4
|
import { _Underlay } from "./Underlay.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.157.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.157.2 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
4
4
|
import { createContext, useContext, useMemo } from "react";
|