@cube-dev/ui-kit 0.0.0-canary-0a0425e → 0.0.0-canary-b7944fa
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-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.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 +72 -22
- package/dist/components/data/DataTable/DataTable.js.map +1 -1
- package/dist/components/data/DataTable/types.d.ts +43 -0
- package/dist/components/data/ItemTable/ItemTable.js +8 -3
- package/dist/components/data/ItemTable/ItemTable.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/ItemTable/types.d.ts +19 -0
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +5 -3
- package/dist/components/data/TableBase/RowCollection.js.map +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +115 -0
- package/dist/components/data/TableBase/TableHeaderCell.js.map +1 -0
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +180 -29
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/column-menu.d.ts +36 -0
- package/dist/components/data/TableBase/column-menu.js +104 -0
- package/dist/components/data/TableBase/column-menu.js.map +1 -0
- package/dist/components/data/TableBase/column-tint.js +168 -0
- package/dist/components/data/TableBase/column-tint.js.map +1 -0
- package/dist/components/data/TableBase/index.d.ts +2 -1
- package/dist/components/data/TableBase/row-menu.js +11 -6
- package/dist/components/data/TableBase/row-menu.js.map +1 -1
- package/dist/components/data/TableBase/styled.js +36 -8
- package/dist/components/data/TableBase/styled.js.map +1 -1
- package/dist/components/data/TableBase/types.d.ts +85 -4
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/types.js.map +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-order.js +100 -0
- package/dist/components/data/TableBase/use-column-order.js.map +1 -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 +20 -1
- package/dist/components/data/TableBase/use-table-sort.js.map +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +40 -1
- package/dist/components/data/TableBase/use-table-sorts.js.map +1 -1
- package/dist/components/data/TableBase/use-table-storage.d.ts +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +6 -2
- package/dist/components/data/TableBase/use-table-storage.js.map +1 -1
- package/dist/components/data/index.d.ts +1 -0
- 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 +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.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/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.d.ts +1 -8
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/ResizablePanel.js.map +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 +42 -216
- 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 +5 -1
- package/dist/i18n/locales/en-US/uikit.js +5 -1
- package/dist/i18n/locales/en-US/uikit.json.d.ts +4 -0
- package/dist/i18n/locales/es-ES/uikit.js +5 -1
- package/dist/i18n/locales/es-MX/uikit.js +5 -1
- package/dist/i18n/locales/fr-FR/uikit.js +5 -1
- package/dist/i18n/locales/it-IT/uikit.js +5 -1
- package/dist/i18n/locales/ja-JP/uikit.js +5 -1
- package/dist/i18n/locales/nb-NO/uikit.js +5 -1
- package/dist/i18n/locales/pt-BR/uikit.js +5 -1
- package/dist/i18n/locales/pt-PT/uikit.js +5 -1
- package/dist/i18n/locales/sv-SE/uikit.js +5 -1
- package/dist/i18n/locales/vi-VN/uikit.js +5 -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.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +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/color-theme.d.ts +86 -0
- package/dist/tokens/color-theme.js +156 -0
- package/dist/tokens/color-theme.js.map +1 -0
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +2 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/palette-config.js +2 -2
- package/dist/tokens/palette.d.ts +1 -1
- package/dist/tokens/palette.js +44 -2
- package/dist/tokens/palette.js.map +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/data/DataTable.md +105 -1
- package/package.json +3 -4
- package/tasty.config.ts +0 -390
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { getColumnText, getColumnValue } from "./use-table-columns.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
@@ -45,6 +45,24 @@ function useTableSort({ columns, rows, mode, sort: sortProp, defaultSort, onSort
|
|
|
45
45
|
direction: "asc"
|
|
46
46
|
} : null);
|
|
47
47
|
});
|
|
48
|
+
/**
|
|
49
|
+
* Set the column's direction outright instead of advancing the cycle — see
|
|
50
|
+
* `use-table-sorts.ts` for why the column menu cannot reuse `toggleSort`.
|
|
51
|
+
*/
|
|
52
|
+
const setColumnSort = useEvent((columnKey, direction) => {
|
|
53
|
+
const column = columns.find((entry) => entry.key === columnKey);
|
|
54
|
+
if (!column || !isSortable(column)) return;
|
|
55
|
+
if (direction == null) {
|
|
56
|
+
if (sort?.columnKey !== columnKey || column.disallowSortRemoval) return;
|
|
57
|
+
setSort(null);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (sort?.columnKey === columnKey && sort.direction === direction) return;
|
|
61
|
+
setSort({
|
|
62
|
+
columnKey,
|
|
63
|
+
direction
|
|
64
|
+
});
|
|
65
|
+
});
|
|
48
66
|
return {
|
|
49
67
|
sort,
|
|
50
68
|
sortedRows: useMemo(() => {
|
|
@@ -67,6 +85,7 @@ function useTableSort({ columns, rows, mode, sort: sortProp, defaultSort, onSort
|
|
|
67
85
|
collator
|
|
68
86
|
]),
|
|
69
87
|
toggleSort,
|
|
88
|
+
setColumnSort,
|
|
70
89
|
isSortable,
|
|
71
90
|
mode: resolvedMode
|
|
72
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table-sort.js","names":[],"sources":["../../../../src/components/data/TableBase/use-table-sort.ts"],"sourcesContent":["import { useControlledState } from '@react-stately/utils';\nimport { useMemo } from 'react';\nimport { useCollator } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks';\n\nimport { getColumnText, getColumnValue } from './use-table-columns';\n\nimport type {
|
|
1
|
+
{"version":3,"file":"use-table-sort.js","names":[],"sources":["../../../../src/components/data/TableBase/use-table-sort.ts"],"sourcesContent":["import { useControlledState } from '@react-stately/utils';\nimport { useMemo } from 'react';\nimport { useCollator } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks';\n\nimport { getColumnText, getColumnValue } from './use-table-columns';\n\nimport type {\n CubeTableColumn,\n CubeTableSort,\n CubeTableSortDirection,\n} from './types';\n\nexport type CubeTableSortMode = 'client' | 'server' | 'off';\n\nexport interface UseTableSortOptions<T> {\n columns: CubeTableColumn<T>[];\n rows: readonly T[];\n /** @default 'client' when any column is sortable, else 'off' */\n mode?: CubeTableSortMode;\n sort?: CubeTableSort | null;\n defaultSort?: CubeTableSort | null;\n onSortChange?: (sort: CubeTableSort | null) => void;\n}\n\nexport interface UseTableSortResult<T> {\n sort: CubeTableSort | null;\n /** `rows` reordered in client mode; the original array otherwise. */\n sortedRows: readonly T[];\n /** Advances a column through the sort cycle. */\n toggleSort: (columnKey: string) => void;\n /**\n * Sets a column's direction outright. `null` clears it.\n *\n * For the column menu's reserved sort keys, which have to reach a specific\n * direction in one step rather than cycling to it.\n */\n setColumnSort: (\n columnKey: string,\n direction: CubeTableSortDirection | null,\n ) => void;\n isSortable: (column: CubeTableColumn<T>) => boolean;\n /**\n * The mode after defaulting. The renderer needs this exact answer to decide\n * whether a header is clickable, and deriving it a second time at the call\n * site is how `DataTable` ended up sorting on `defaultSorts` but ignoring\n * every click.\n */\n mode: CubeTableSortMode;\n}\n\n/**\n * Sort state plus, in client mode, the reordered rows.\n *\n * The cycle is tri-state — `asc → desc → unsorted` — matching ag-grid's default\n * `sortingOrder`, because losing the ability to get back to the source order is\n * a real loss when the source order is meaningful. `disallowSortRemoval` on a\n * column reduces it to `asc ↔ desc`.\n */\nexport function useTableSort<T>({\n columns,\n rows,\n mode,\n sort: sortProp,\n defaultSort,\n onSortChange,\n}: UseTableSortOptions<T>): UseTableSortResult<T> {\n // A collator gives locale-correct, case-insensitive ordering — \"Ä\" sorts next\n // to \"A\" rather than after \"Z\", which a raw `<` comparison gets wrong.\n const collator = useCollator({ numeric: true, sensitivity: 'base' });\n\n const [sort, setSort] = useControlledState<CubeTableSort | null>(\n sortProp as CubeTableSort | null,\n defaultSort ?? null,\n onSortChange as (value: CubeTableSort | null) => void,\n );\n\n const hasSortableColumn = columns.some((column) => column.isSortable);\n const resolvedMode: CubeTableSortMode =\n mode ?? (hasSortableColumn ? 'client' : 'off');\n\n const isSortable = useEvent(\n (column: CubeTableColumn<T>) =>\n resolvedMode !== 'off' && column.isSortable === true,\n );\n\n const toggleSort = useEvent((columnKey: string) => {\n const column = columns.find((entry) => entry.key === columnKey);\n\n if (!column || !isSortable(column)) return;\n\n if (sort?.columnKey !== columnKey) {\n setSort({ columnKey, direction: 'asc' });\n\n return;\n }\n\n if (sort.direction === 'asc') {\n setSort({ columnKey, direction: 'desc' });\n\n return;\n }\n\n setSort(\n column.disallowSortRemoval ? { columnKey, direction: 'asc' } : null,\n );\n });\n\n /**\n * Set the column's direction outright instead of advancing the cycle — see\n * `use-table-sorts.ts` for why the column menu cannot reuse `toggleSort`.\n */\n const setColumnSort = useEvent(\n (columnKey: string, direction: CubeTableSortDirection | null) => {\n const column = columns.find((entry) => entry.key === columnKey);\n\n if (!column || !isSortable(column)) return;\n\n if (direction == null) {\n // Clearing a column that is not the sorted one is a no-op rather than a\n // reset, and `disallowSortRemoval` refuses the clear outright.\n if (sort?.columnKey !== columnKey || column.disallowSortRemoval) return;\n\n setSort(null);\n\n return;\n }\n\n if (sort?.columnKey === columnKey && sort.direction === direction) return;\n\n setSort({ columnKey, direction });\n },\n );\n\n const sortedRows = useMemo(() => {\n if (resolvedMode !== 'client' || !sort) return rows;\n\n const column = columns.find((entry) => entry.key === sort.columnKey);\n\n if (!column) return rows;\n\n const direction = sort.direction === 'asc' ? 1 : -1;\n\n // `map`/`sort`/`map` rather than sorting in place: `rows` is the caller's\n // array and `Array.prototype.sort` mutates. Carrying the original index also\n // makes the sort stable across engines.\n return rows\n .map((row, index) => ({ row, index }))\n .sort((a, b) => {\n const result = compareByColumn(\n column,\n collator,\n a.row,\n a.index,\n b.row,\n b.index,\n );\n\n return result !== 0 ? result * direction : a.index - b.index;\n })\n .map((entry) => entry.row);\n }, [resolvedMode, sort, rows, columns, collator]);\n\n // The resolved mode is returned rather than left for the caller to derive\n // again: the renderer needs the same answer to decide whether a header is\n // clickable, and two independent derivations drift.\n return {\n sort,\n sortedRows,\n toggleSort,\n setColumnSort,\n isSortable,\n mode: resolvedMode,\n };\n}\n\nexport function compareByColumn<T>(\n column: CubeTableColumn<T>,\n collator: Intl.Collator,\n rowA: T,\n indexA: number,\n rowB: T,\n indexB: number,\n): number {\n const valueA = getColumnValue(column, rowA, indexA);\n const valueB = getColumnValue(column, rowB, indexB);\n\n if (column.compare) return column.compare(valueA, valueB, rowA, rowB);\n\n // Nullish always sorts first, then gets flipped with the direction. Mixing\n // them into the value comparison instead produces an unstable order.\n if (valueA == null && valueB == null) return 0;\n if (valueA == null) return -1;\n if (valueB == null) return 1;\n\n if (typeof valueA === 'number' && typeof valueB === 'number') {\n return valueA - valueB;\n }\n if (typeof valueA === 'boolean' && typeof valueB === 'boolean') {\n return Number(valueA) - Number(valueB);\n }\n if (valueA instanceof Date && valueB instanceof Date) {\n return valueA.getTime() - valueB.getTime();\n }\n\n // Fall back to display text, so a column with a `format` sorts the way it\n // reads rather than the way it is stored.\n const textA = getColumnText(column, rowA, indexA) ?? String(valueA);\n const textB = getColumnText(column, rowB, indexB) ?? String(valueB);\n\n return collator.compare(textA, textB);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA4DA,SAAgB,aAAgB,EAC9B,SACA,MACA,MACA,MAAM,UACN,aACA,gBACgD;CAGhD,MAAM,WAAW,YAAY;EAAE,SAAS;EAAM,aAAa;EAAQ,CAAC;CAEpE,MAAM,CAAC,MAAM,WAAW,mBACtB,UACA,eAAe,MACf,aACD;CAED,MAAM,oBAAoB,QAAQ,MAAM,WAAW,OAAO,WAAW;CACrE,MAAM,eACJ,SAAS,oBAAoB,WAAW;CAE1C,MAAM,aAAa,UAChB,WACC,iBAAiB,SAAS,OAAO,eAAe,KACnD;CAED,MAAM,aAAa,UAAU,cAAsB;EACjD,MAAM,SAAS,QAAQ,MAAM,UAAU,MAAM,QAAQ,UAAU;AAE/D,MAAI,CAAC,UAAU,CAAC,WAAW,OAAO,CAAE;AAEpC,MAAI,MAAM,cAAc,WAAW;AACjC,WAAQ;IAAE;IAAW,WAAW;IAAO,CAAC;AAExC;;AAGF,MAAI,KAAK,cAAc,OAAO;AAC5B,WAAQ;IAAE;IAAW,WAAW;IAAQ,CAAC;AAEzC;;AAGF,UACE,OAAO,sBAAsB;GAAE;GAAW,WAAW;GAAO,GAAG,KAChE;GACD;;;;;CAMF,MAAM,gBAAgB,UACnB,WAAmB,cAA6C;EAC/D,MAAM,SAAS,QAAQ,MAAM,UAAU,MAAM,QAAQ,UAAU;AAE/D,MAAI,CAAC,UAAU,CAAC,WAAW,OAAO,CAAE;AAEpC,MAAI,aAAa,MAAM;AAGrB,OAAI,MAAM,cAAc,aAAa,OAAO,oBAAqB;AAEjE,WAAQ,KAAK;AAEb;;AAGF,MAAI,MAAM,cAAc,aAAa,KAAK,cAAc,UAAW;AAEnE,UAAQ;GAAE;GAAW;GAAW,CAAC;GAEpC;AAkCD,QAAO;EACL;EACA,YAlCiB,cAAc;AAC/B,OAAI,iBAAiB,YAAY,CAAC,KAAM,QAAO;GAE/C,MAAM,SAAS,QAAQ,MAAM,UAAU,MAAM,QAAQ,KAAK,UAAU;AAEpE,OAAI,CAAC,OAAQ,QAAO;GAEpB,MAAM,YAAY,KAAK,cAAc,QAAQ,IAAI;AAKjD,UAAO,KACJ,KAAK,KAAK,WAAW;IAAE;IAAK;IAAO,EAAE,CACrC,MAAM,GAAG,MAAM;IACd,MAAM,SAAS,gBACb,QACA,UACA,EAAE,KACF,EAAE,OACF,EAAE,KACF,EAAE,MACH;AAED,WAAO,WAAW,IAAI,SAAS,YAAY,EAAE,QAAQ,EAAE;KACvD,CACD,KAAK,UAAU,MAAM,IAAI;KAC3B;GAAC;GAAc;GAAM;GAAM;GAAS;GAAS,CAAC;EAQ/C;EACA;EACA;EACA,MAAM;EACP;;AAGH,SAAgB,gBACd,QACA,UACA,MACA,QACA,MACA,QACQ;CACR,MAAM,SAAS,eAAe,QAAQ,MAAM,OAAO;CACnD,MAAM,SAAS,eAAe,QAAQ,MAAM,OAAO;AAEnD,KAAI,OAAO,QAAS,QAAO,OAAO,QAAQ,QAAQ,QAAQ,MAAM,KAAK;AAIrE,KAAI,UAAU,QAAQ,UAAU,KAAM,QAAO;AAC7C,KAAI,UAAU,KAAM,QAAO;AAC3B,KAAI,UAAU,KAAM,QAAO;AAE3B,KAAI,OAAO,WAAW,YAAY,OAAO,WAAW,SAClD,QAAO,SAAS;AAElB,KAAI,OAAO,WAAW,aAAa,OAAO,WAAW,UACnD,QAAO,OAAO,OAAO,GAAG,OAAO,OAAO;AAExC,KAAI,kBAAkB,QAAQ,kBAAkB,KAC9C,QAAO,OAAO,SAAS,GAAG,OAAO,SAAS;CAK5C,MAAM,QAAQ,cAAc,QAAQ,MAAM,OAAO,IAAI,OAAO,OAAO;CACnE,MAAM,QAAQ,cAAc,QAAQ,MAAM,OAAO,IAAI,OAAO,OAAO;AAEnE,QAAO,SAAS,QAAQ,OAAO,MAAM"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { compareByColumn } from "./use-table-sort.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
@@ -59,6 +59,44 @@ function useTableSorts({ columns, rows, mode, sorts: sortsProp, defaultSorts, on
|
|
|
59
59
|
next.splice(index, 1);
|
|
60
60
|
setSorts(next);
|
|
61
61
|
});
|
|
62
|
+
/**
|
|
63
|
+
* Set one column's direction outright instead of advancing the cycle.
|
|
64
|
+
*
|
|
65
|
+
* The column menu's `sort-desc` has to reach `desc` in one step. Reaching it
|
|
66
|
+
* by calling `toggleSort` twice cannot work here: under `disallowSortRemoval`
|
|
67
|
+
* the cycle never leaves `asc`/`desc`, and a column that was unsorted would
|
|
68
|
+
* be appended and then re-read, so every intermediate state is observable.
|
|
69
|
+
*
|
|
70
|
+
* Precedence is preserved — an already-sorted column keeps its slot, and a
|
|
71
|
+
* newly sorted one is appended as the least significant, the same rule
|
|
72
|
+
* `toggleSort` follows.
|
|
73
|
+
*/
|
|
74
|
+
const setColumnSort = useEvent((columnKey, direction) => {
|
|
75
|
+
const column = columns.find((entry) => entry.key === columnKey);
|
|
76
|
+
if (!column || !isSortable(column)) return;
|
|
77
|
+
const index = sorts.findIndex((entry) => entry.columnKey === columnKey);
|
|
78
|
+
if (direction == null) {
|
|
79
|
+
if (index === -1 || column.disallowSortRemoval) return;
|
|
80
|
+
const next = [...sorts];
|
|
81
|
+
next.splice(index, 1);
|
|
82
|
+
setSorts(next);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (index === -1) {
|
|
86
|
+
setSorts([...sorts, {
|
|
87
|
+
columnKey,
|
|
88
|
+
direction
|
|
89
|
+
}]);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (sorts[index].direction === direction) return;
|
|
93
|
+
const next = [...sorts];
|
|
94
|
+
next[index] = {
|
|
95
|
+
columnKey,
|
|
96
|
+
direction
|
|
97
|
+
};
|
|
98
|
+
setSorts(next);
|
|
99
|
+
});
|
|
62
100
|
return {
|
|
63
101
|
sorts,
|
|
64
102
|
sortedRows: useMemo(() => {
|
|
@@ -86,6 +124,7 @@ function useTableSorts({ columns, rows, mode, sorts: sortsProp, defaultSorts, on
|
|
|
86
124
|
collator
|
|
87
125
|
]),
|
|
88
126
|
toggleSort,
|
|
127
|
+
setColumnSort,
|
|
89
128
|
isSortable,
|
|
90
129
|
sortRank: useEvent((columnKey) => sorts.findIndex((entry) => entry.columnKey === columnKey) + 1),
|
|
91
130
|
mode: resolvedMode
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table-sorts.js","names":[],"sources":["../../../../src/components/data/TableBase/use-table-sorts.ts"],"sourcesContent":["import { useCollator } from '@react-aria/i18n';\nimport { useControlledState } from '@react-stately/utils';\nimport { useMemo } from 'react';\n\nimport { useEvent } from '../../../_internal/hooks';\n\nimport { compareByColumn } from './use-table-sort';\n\nimport type {
|
|
1
|
+
{"version":3,"file":"use-table-sorts.js","names":[],"sources":["../../../../src/components/data/TableBase/use-table-sorts.ts"],"sourcesContent":["import { useCollator } from '@react-aria/i18n';\nimport { useControlledState } from '@react-stately/utils';\nimport { useMemo } from 'react';\n\nimport { useEvent } from '../../../_internal/hooks';\n\nimport { compareByColumn } from './use-table-sort';\n\nimport type {\n CubeTableColumn,\n CubeTableSort,\n CubeTableSortDirection,\n} from './types';\n\nexport interface UseTableSortsOptions<T> {\n columns: CubeTableColumn<T>[];\n rows: readonly T[];\n mode?: 'client' | 'server' | 'off';\n sorts?: CubeTableSort[];\n defaultSorts?: CubeTableSort[];\n onSortsChange?: (sorts: CubeTableSort[]) => void;\n}\n\nconst EMPTY: CubeTableSort[] = [];\n\n/**\n * Multi-column sorting.\n *\n * `ItemTable` sorts by one column, which is right for a list. An analytical\n * grid is routinely ordered by one dimension and then another, and Cloud's\n * reports send an array of sorts to the query — so the order of the array is\n * the sort precedence, and it has to survive round-tripping.\n *\n * Clicking a header cycles that column `asc → desc → off` exactly as the single\n * version does; the difference is that it edits its entry in place rather than\n * replacing the whole sort, so the other columns keep their precedence.\n */\nexport function useTableSorts<T>({\n columns,\n rows,\n mode,\n sorts: sortsProp,\n defaultSorts,\n onSortsChange,\n}: UseTableSortsOptions<T>) {\n const collator = useCollator({ numeric: true, sensitivity: 'base' });\n\n const [sorts, setSorts] = useControlledState<CubeTableSort[]>(\n sortsProp as CubeTableSort[],\n defaultSorts ?? EMPTY,\n onSortsChange as (value: CubeTableSort[]) => void,\n );\n\n const hasSortableColumn = columns.some((column) => column.isSortable);\n const resolvedMode = mode ?? (hasSortableColumn ? 'client' : 'off');\n\n const isSortable = useEvent(\n (column: CubeTableColumn<T>) =>\n resolvedMode !== 'off' && column.isSortable === true,\n );\n\n const toggleSort = useEvent((columnKey: string) => {\n const column = columns.find((entry) => entry.key === columnKey);\n\n if (!column || !isSortable(column)) return;\n\n const index = sorts.findIndex((entry) => entry.columnKey === columnKey);\n\n if (index === -1) {\n // Appended, not prepended: a newly sorted column is the least\n // significant, so the ordering the user already established still leads.\n setSorts([...sorts, { columnKey, direction: 'asc' }]);\n\n return;\n }\n\n const next = [...sorts];\n\n if (next[index].direction === 'asc') {\n next[index] = { columnKey, direction: 'desc' };\n setSorts(next);\n\n return;\n }\n\n if (column.disallowSortRemoval) {\n next[index] = { columnKey, direction: 'asc' };\n setSorts(next);\n\n return;\n }\n\n next.splice(index, 1);\n setSorts(next);\n });\n\n /**\n * Set one column's direction outright instead of advancing the cycle.\n *\n * The column menu's `sort-desc` has to reach `desc` in one step. Reaching it\n * by calling `toggleSort` twice cannot work here: under `disallowSortRemoval`\n * the cycle never leaves `asc`/`desc`, and a column that was unsorted would\n * be appended and then re-read, so every intermediate state is observable.\n *\n * Precedence is preserved — an already-sorted column keeps its slot, and a\n * newly sorted one is appended as the least significant, the same rule\n * `toggleSort` follows.\n */\n const setColumnSort = useEvent(\n (columnKey: string, direction: CubeTableSortDirection | null) => {\n const column = columns.find((entry) => entry.key === columnKey);\n\n if (!column || !isSortable(column)) return;\n\n const index = sorts.findIndex((entry) => entry.columnKey === columnKey);\n\n if (direction == null) {\n // `disallowSortRemoval` means the column is never *left* unsorted, so an\n // explicit clear is refused too rather than quietly re-sorting.\n if (index === -1 || column.disallowSortRemoval) return;\n\n const next = [...sorts];\n\n next.splice(index, 1);\n setSorts(next);\n\n return;\n }\n\n if (index === -1) {\n setSorts([...sorts, { columnKey, direction }]);\n\n return;\n }\n\n if (sorts[index].direction === direction) return;\n\n const next = [...sorts];\n\n next[index] = { columnKey, direction };\n setSorts(next);\n },\n );\n\n const sortedRows = useMemo(() => {\n if (resolvedMode !== 'client' || !sorts.length) return rows;\n\n const active = sorts\n .map((sort) => ({\n sort,\n column: columns.find((entry) => entry.key === sort.columnKey),\n }))\n .filter(\n (entry): entry is { sort: CubeTableSort; column: CubeTableColumn<T> } =>\n entry.column != null,\n );\n\n if (!active.length) return rows;\n\n // Not sorted in place: `rows` belongs to the caller and `sort` mutates.\n // The original index is carried so the result is stable when every sort\n // ties.\n return rows\n .map((row, index) => ({ row, index }))\n .sort((a, b) => {\n for (const { sort, column } of active) {\n const result = compareByColumn(\n column,\n collator,\n a.row,\n a.index,\n b.row,\n b.index,\n );\n\n if (result !== 0) {\n return result * (sort.direction === 'asc' ? 1 : -1);\n }\n }\n\n return a.index - b.index;\n })\n .map((entry) => entry.row);\n }, [resolvedMode, sorts, rows, columns, collator]);\n\n /** Where a column sits in the precedence, 1-based. `0` when unsorted. */\n const sortRank = useEvent(\n (columnKey: string) =>\n sorts.findIndex((entry) => entry.columnKey === columnKey) + 1,\n );\n\n // Returned for the same reason as the single-column hook: the renderer needs\n // this exact answer to decide whether a header is clickable.\n return {\n sorts,\n sortedRows,\n toggleSort,\n setColumnSort,\n isSortable,\n sortRank,\n mode: resolvedMode,\n };\n}\n"],"mappings":";;;;;;;;AAuBA,MAAM,QAAyB,EAAE;;;;;;;;;;;;;AAcjC,SAAgB,cAAiB,EAC/B,SACA,MACA,MACA,OAAO,WACP,cACA,iBAC0B;CAC1B,MAAM,WAAW,YAAY;EAAE,SAAS;EAAM,aAAa;EAAQ,CAAC;CAEpE,MAAM,CAAC,OAAO,YAAY,mBACxB,WACA,gBAAgB,OAChB,cACD;CAED,MAAM,oBAAoB,QAAQ,MAAM,WAAW,OAAO,WAAW;CACrE,MAAM,eAAe,SAAS,oBAAoB,WAAW;CAE7D,MAAM,aAAa,UAChB,WACC,iBAAiB,SAAS,OAAO,eAAe,KACnD;CAED,MAAM,aAAa,UAAU,cAAsB;EACjD,MAAM,SAAS,QAAQ,MAAM,UAAU,MAAM,QAAQ,UAAU;AAE/D,MAAI,CAAC,UAAU,CAAC,WAAW,OAAO,CAAE;EAEpC,MAAM,QAAQ,MAAM,WAAW,UAAU,MAAM,cAAc,UAAU;AAEvE,MAAI,UAAU,IAAI;AAGhB,YAAS,CAAC,GAAG,OAAO;IAAE;IAAW,WAAW;IAAO,CAAC,CAAC;AAErD;;EAGF,MAAM,OAAO,CAAC,GAAG,MAAM;AAEvB,MAAI,KAAK,OAAO,cAAc,OAAO;AACnC,QAAK,SAAS;IAAE;IAAW,WAAW;IAAQ;AAC9C,YAAS,KAAK;AAEd;;AAGF,MAAI,OAAO,qBAAqB;AAC9B,QAAK,SAAS;IAAE;IAAW,WAAW;IAAO;AAC7C,YAAS,KAAK;AAEd;;AAGF,OAAK,OAAO,OAAO,EAAE;AACrB,WAAS,KAAK;GACd;;;;;;;;;;;;;CAcF,MAAM,gBAAgB,UACnB,WAAmB,cAA6C;EAC/D,MAAM,SAAS,QAAQ,MAAM,UAAU,MAAM,QAAQ,UAAU;AAE/D,MAAI,CAAC,UAAU,CAAC,WAAW,OAAO,CAAE;EAEpC,MAAM,QAAQ,MAAM,WAAW,UAAU,MAAM,cAAc,UAAU;AAEvE,MAAI,aAAa,MAAM;AAGrB,OAAI,UAAU,MAAM,OAAO,oBAAqB;GAEhD,MAAM,OAAO,CAAC,GAAG,MAAM;AAEvB,QAAK,OAAO,OAAO,EAAE;AACrB,YAAS,KAAK;AAEd;;AAGF,MAAI,UAAU,IAAI;AAChB,YAAS,CAAC,GAAG,OAAO;IAAE;IAAW;IAAW,CAAC,CAAC;AAE9C;;AAGF,MAAI,MAAM,OAAO,cAAc,UAAW;EAE1C,MAAM,OAAO,CAAC,GAAG,MAAM;AAEvB,OAAK,SAAS;GAAE;GAAW;GAAW;AACtC,WAAS,KAAK;GAEjB;AAmDD,QAAO;EACL;EACA,YAnDiB,cAAc;AAC/B,OAAI,iBAAiB,YAAY,CAAC,MAAM,OAAQ,QAAO;GAEvD,MAAM,SAAS,MACZ,KAAK,UAAU;IACd;IACA,QAAQ,QAAQ,MAAM,UAAU,MAAM,QAAQ,KAAK,UAAU;IAC9D,EAAE,CACF,QACE,UACC,MAAM,UAAU,KACnB;AAEH,OAAI,CAAC,OAAO,OAAQ,QAAO;AAK3B,UAAO,KACJ,KAAK,KAAK,WAAW;IAAE;IAAK;IAAO,EAAE,CACrC,MAAM,GAAG,MAAM;AACd,SAAK,MAAM,EAAE,MAAM,YAAY,QAAQ;KACrC,MAAM,SAAS,gBACb,QACA,UACA,EAAE,KACF,EAAE,OACF,EAAE,KACF,EAAE,MACH;AAED,SAAI,WAAW,EACb,QAAO,UAAU,KAAK,cAAc,QAAQ,IAAI;;AAIpD,WAAO,EAAE,QAAQ,EAAE;KACnB,CACD,KAAK,UAAU,MAAM,IAAI;KAC3B;GAAC;GAAc;GAAO;GAAM;GAAS;GAAS,CAAC;EAahD;EACA;EACA;EACA,UAbe,UACd,cACC,MAAM,WAAW,UAAU,MAAM,cAAc,UAAU,GAAG,EAC/D;EAWC,MAAM;EACP"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/data/TableBase/use-table-storage.d.ts
|
|
5
|
-
type CubeTablePersistKey = 'pageSize' | 'columnWidths' | 'sort';
|
|
5
|
+
type CubeTablePersistKey = 'pageSize' | 'columnWidths' | 'columnOrder' | 'sort';
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CubeTablePersistKey };
|
|
8
8
|
//# sourceMappingURL=use-table-storage.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { useCallback, useRef, useState } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/data/TableBase/use-table-storage.ts
|
|
@@ -8,7 +8,11 @@ import { useCallback, useRef, useState } from "react";
|
|
|
8
8
|
* cleared as a group later.
|
|
9
9
|
*/
|
|
10
10
|
const PREFIX = "cube-ui-kit:table:";
|
|
11
|
-
const DEFAULT_PERSIST_KEYS = [
|
|
11
|
+
const DEFAULT_PERSIST_KEYS = [
|
|
12
|
+
"pageSize",
|
|
13
|
+
"columnWidths",
|
|
14
|
+
"columnOrder"
|
|
15
|
+
];
|
|
12
16
|
function read(storageKey) {
|
|
13
17
|
if (!storageKey || typeof window === "undefined") return {};
|
|
14
18
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table-storage.js","names":[],"sources":["../../../../src/components/data/TableBase/use-table-storage.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\n\nimport type { CubeTableSort } from './types';\n\n/**\n * Namespaced so a `storageKey` cannot collide with whatever else the host app\n * keeps in `localStorage`, and so the kit's own stored shape can be migrated or\n * cleared as a group later.\n */\nconst PREFIX = 'cube-ui-kit:table:';\n\nexport type CubeTablePersistKey
|
|
1
|
+
{"version":3,"file":"use-table-storage.js","names":[],"sources":["../../../../src/components/data/TableBase/use-table-storage.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\n\nimport type { CubeTableSort } from './types';\n\n/**\n * Namespaced so a `storageKey` cannot collide with whatever else the host app\n * keeps in `localStorage`, and so the kit's own stored shape can be migrated or\n * cleared as a group later.\n */\nconst PREFIX = 'cube-ui-kit:table:';\n\nexport type CubeTablePersistKey =\n | 'pageSize'\n | 'columnWidths'\n | 'columnOrder'\n | 'sort';\n\nexport interface CubeTableStoredState {\n pageSize?: number;\n sort?: CubeTableSort | null;\n columnWidths?: Record<string, number>;\n /** Every column key in order, including hidden and pinned ones. */\n columnOrder?: string[];\n}\n\nexport const DEFAULT_PERSIST_KEYS: CubeTablePersistKey[] = [\n 'pageSize',\n 'columnWidths',\n // A column layout the user arranged by hand is the same kind of state as the\n // widths they dragged — losing it on reload would be as surprising.\n 'columnOrder',\n];\n\nfunction read(storageKey: string | undefined): CubeTableStoredState {\n // No `storageKey` means the feature is off; no `window` means SSR. Both are\n // normal, not errors.\n if (!storageKey || typeof window === 'undefined') return {};\n\n try {\n const raw = window.localStorage.getItem(PREFIX + storageKey);\n\n if (!raw) return {};\n\n const parsed = JSON.parse(raw);\n\n // Anything could be under that key — a hand-edited value, a stale shape\n // from an older version. A non-object is simply ignored.\n return parsed && typeof parsed === 'object' ? parsed : {};\n } catch {\n // Private mode, a disabled store, or malformed JSON. Persistence is a\n // convenience; losing it must never take the table down with it.\n return {};\n }\n}\n\n/**\n * Persists the parts of the table's own state that a user expects to survive a\n * reload. Only state the table *owns* is stored: a controlled `pageSize` or\n * `sort` belongs to the page, so restoring it would fight the page's own source\n * of truth.\n *\n * Returns the state read at mount — a one-shot snapshot, deliberately, so a\n * second table sharing the key cannot yank this one's page size mid-session.\n */\nexport function useTableStorage(\n storageKey: string | undefined,\n persist: CubeTablePersistKey[] = DEFAULT_PERSIST_KEYS,\n) {\n const [initial] = useState(() => read(storageKey));\n const persistRef = useRef(persist);\n\n persistRef.current = persist;\n\n const write = useCallback(\n (patch: CubeTableStoredState) => {\n if (!storageKey || typeof window === 'undefined') return;\n\n const allowed = persistRef.current;\n const entries = Object.entries(patch).filter(([key]) =>\n allowed.includes(key as CubeTablePersistKey),\n );\n\n if (!entries.length) return;\n\n try {\n const next = {\n ...read(storageKey),\n ...Object.fromEntries(entries),\n };\n\n window.localStorage.setItem(PREFIX + storageKey, JSON.stringify(next));\n } catch {\n // Quota exceeded or a disabled store — nothing to do but carry on.\n }\n },\n [storageKey],\n );\n\n return {\n initial: storageKey ? initial : {},\n /** `true` when this key is persisted, so callers can skip the work. */\n has: (key: CubeTablePersistKey) => !!storageKey && persist.includes(key),\n write,\n };\n}\n"],"mappings":";;;;;;;;;AASA,MAAM,SAAS;AAgBf,MAAa,uBAA8C;CACzD;CACA;CAGA;CACD;AAED,SAAS,KAAK,YAAsD;AAGlE,KAAI,CAAC,cAAc,OAAO,WAAW,YAAa,QAAO,EAAE;AAE3D,KAAI;EACF,MAAM,MAAM,OAAO,aAAa,QAAQ,SAAS,WAAW;AAE5D,MAAI,CAAC,IAAK,QAAO,EAAE;EAEnB,MAAM,SAAS,KAAK,MAAM,IAAI;AAI9B,SAAO,UAAU,OAAO,WAAW,WAAW,SAAS,EAAE;SACnD;AAGN,SAAO,EAAE;;;;;;;;;;;;AAab,SAAgB,gBACd,YACA,UAAiC,sBACjC;CACA,MAAM,CAAC,WAAW,eAAe,KAAK,WAAW,CAAC;CAClD,MAAM,aAAa,OAAO,QAAQ;AAElC,YAAW,UAAU;CAErB,MAAM,QAAQ,aACX,UAAgC;AAC/B,MAAI,CAAC,cAAc,OAAO,WAAW,YAAa;EAElD,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,OAAO,QAAQ,MAAM,CAAC,QAAQ,CAAC,SAC7C,QAAQ,SAAS,IAA2B,CAC7C;AAED,MAAI,CAAC,QAAQ,OAAQ;AAErB,MAAI;GACF,MAAM,OAAO;IACX,GAAG,KAAK,WAAW;IACnB,GAAG,OAAO,YAAY,QAAQ;IAC/B;AAED,UAAO,aAAa,QAAQ,SAAS,YAAY,KAAK,UAAU,KAAK,CAAC;UAChE;IAIV,CAAC,WAAW,CACb;AAED,QAAO;EACL,SAAS,aAAa,UAAU,EAAE;EAElC,MAAM,QAA6B,CAAC,CAAC,cAAc,QAAQ,SAAS,IAAI;EACxE;EACD"}
|
|
@@ -7,4 +7,5 @@ import { CubeTableRowRenderProps } from "./TableBase/TableView.js";
|
|
|
7
7
|
import { CubeItemTableColumn, CubeItemTableProps } from "./ItemTable/types.js";
|
|
8
8
|
import { _ItemTable } from "./ItemTable/ItemTable.js";
|
|
9
9
|
import "./ItemTable/index.js";
|
|
10
|
+
import { COLUMN_MENU_SORT_KEYS, CubeColumnMenuSortKey, columnSortMenu } from "./TableBase/column-menu.js";
|
|
10
11
|
import "./TableBase/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { _Text } from "../../content/Text.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { FormContext } from "../../form/Form/Form.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { _Text } from "../../content/Text.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { getCaretRect } from "./caretPosition.js";
|
|
3
3
|
import { useEffect, useLayoutEffect, useRef } from "react";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { getValidationMods } from "../../form/validation/resolve-validation-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
3
3
|
import { CalendarIcon } from "../../../icons/CalendarIcon.js";
|
|
4
4
|
import { tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { DatePickerSegment } from "./DatePickerSegment.js";
|
|
4
4
|
import { formatSegments } from "./utils.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { tasty } from "@tenphi/tasty";
|
|
3
3
|
import { useRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { Space } from "../../layout/Space.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { _PeriodPicker } from "./PeriodPicker.js";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { _PeriodPicker } from "./PeriodPicker.js";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { _PeriodPicker } from "./PeriodPicker.js";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { _PeriodPicker } from "./PeriodPicker.js";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { parseAbsolute } from "@internationalized/date";
|
|
3
3
|
|
|
4
4
|
//#region src/components/fields/DatePicker/parseDate.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { CalendarDate, startOfMonth, startOfWeek, startOfYear, toCalendarDate } from "@internationalized/date";
|
|
3
3
|
|
|
4
4
|
//#region src/components/fields/DatePicker/period.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { useImperativeHandle, useRef } from "react";
|
|
3
3
|
import { createDOMRef } from "@react-spectrum/utils";
|
|
4
4
|
import { createFocusManager } from "@react-aria/focus";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { _Text } from "../../content/Text.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { TextInput } from "../TextInput/TextInput.js";
|
|
3
3
|
import { _FileInput } from "../FileInput/FileInput.js";
|
|
4
4
|
import { _NumberInput } from "../NumberInput/NumberInput.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { DraggableCollection } from "../../shared/DraggableCollection.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { DisplayTransition } from "../../helpers/DisplayTransition/DisplayTransition.js";
|
|
4
4
|
import { Portal } from "../../portal/Portal.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
//#region src/components/fields/ListBoxPopover/listNavigation.ts
|
|
3
3
|
/**
|
|
4
4
|
* Walks a collection (possibly nested under sections) and collects the keys of
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { useCallback, useEffect, useRef } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/fields/ListBoxPopover/useCompositeFocus.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
4
4
|
import { castNullableNumberValue } from "../../../utils/react/nullableValue.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
3
3
|
import { DirectionIcon } from "../../../icons/DirectionIcon.js";
|
|
4
4
|
import { Button } from "../../actions/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { _Text } from "../../content/Text.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { useFocus as useFocus$1 } from "../../../utils/react/interactions.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | 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 { FormContext } from "../../form/Form/Form.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.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.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b7944fa | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { forwardRefWithGenerics } from "../../../utils/react/forwardRefWithGenerics.js";
|
|
4
4
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|