@cube-dev/ui-kit 0.0.0-canary-34ce1a4 → 0.0.0-canary-7dc6906
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 +10 -4
- package/dist/components/actions/Button/Button.js.map +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.d.ts +7 -0
- package/dist/components/content/Item/Item.js +13 -6
- package/dist/components/content/Item/Item.js.map +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 +41 -32
- package/dist/components/content/use-auto-tooltip.js.map +1 -1
- package/dist/components/data/DataTable/DataTable.js +24 -82
- package/dist/components/data/DataTable/DataTable.js.map +1 -1
- package/dist/components/data/DataTable/types.d.ts +1 -56
- package/dist/components/data/ItemTable/ItemTable.js +5 -13
- package/dist/components/data/ItemTable/ItemTable.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +3 -7
- package/dist/components/data/ItemTable/ItemTableBulkBar.js.map +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 +0 -19
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +3 -5
- package/dist/components/data/TableBase/RowCollection.js.map +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +31 -192
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/index.d.ts +2 -3
- package/dist/components/data/TableBase/row-menu.js +6 -11
- package/dist/components/data/TableBase/row-menu.js.map +1 -1
- package/dist/components/data/TableBase/styled.js +11 -44
- package/dist/components/data/TableBase/styled.js.map +1 -1
- package/dist/components/data/TableBase/types.d.ts +6 -104
- 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-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 +2 -24
- package/dist/components/data/TableBase/use-table-columns.js.map +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -20
- package/dist/components/data/TableBase/use-table-sort.js.map +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -40
- 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 +2 -6
- package/dist/components/data/TableBase/use-table-storage.js.map +1 -1
- package/dist/components/data/index.d.ts +1 -2
- 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.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 +1 -13
- 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 -5
- package/dist/i18n/locales/en-US/uikit.js +1 -5
- package/dist/i18n/locales/en-US/uikit.json.d.ts +0 -4
- package/dist/i18n/locales/es-ES/uikit.js +1 -5
- package/dist/i18n/locales/es-MX/uikit.js +1 -5
- package/dist/i18n/locales/fr-FR/uikit.js +1 -5
- package/dist/i18n/locales/it-IT/uikit.js +1 -5
- package/dist/i18n/locales/ja-JP/uikit.js +1 -5
- package/dist/i18n/locales/nb-NO/uikit.js +1 -5
- package/dist/i18n/locales/pt-BR/uikit.js +1 -5
- package/dist/i18n/locales/pt-PT/uikit.js +1 -5
- package/dist/i18n/locales/sv-SE/uikit.js +1 -5
- package/dist/i18n/locales/vi-VN/uikit.js +1 -5
- 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 -4
- package/dist/index.js +3 -4
- 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/colors.js +1 -1
- package/dist/tokens/index.d.ts +0 -1
- package/dist/tokens/index.js +1 -2
- 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 +2 -44
- 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/index.d.ts +1 -0
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.d.ts +49 -0
- package/dist/utils/react/disabledProps.js +82 -0
- package/dist/utils/react/disabledProps.js.map +1 -0
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.d.ts +1 -0
- package/dist/utils/react/index.js +2 -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/actions/Button.md +17 -0
- package/docs/components/content/Item.md +8 -1
- package/docs/components/data/DataTable.md +2 -118
- package/docs/components/data/ItemTable.md +5 -37
- package/package.json +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +0 -115
- package/dist/components/data/TableBase/TableHeaderCell.js.map +0 -1
- package/dist/components/data/TableBase/column-menu.d.ts +0 -36
- package/dist/components/data/TableBase/column-menu.js +0 -104
- package/dist/components/data/TableBase/column-menu.js.map +0 -1
- package/dist/components/data/TableBase/column-tint.js +0 -168
- package/dist/components/data/TableBase/column-tint.js.map +0 -1
- package/dist/components/data/TableBase/use-column-order.js +0 -100
- package/dist/components/data/TableBase/use-column-order.js.map +0 -1
- package/dist/tokens/color-theme.d.ts +0 -86
- package/dist/tokens/color-theme.js +0 -156
- package/dist/tokens/color-theme.js.map +0 -1
|
@@ -140,7 +140,7 @@ declare const MinorText: react.ComponentType<{
|
|
|
140
140
|
accessKey?: string | undefined;
|
|
141
141
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
142
142
|
autoFocus?: boolean | undefined;
|
|
143
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
143
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
144
144
|
contextMenu?: string | undefined;
|
|
145
145
|
dir?: string | undefined;
|
|
146
146
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -179,7 +179,7 @@ declare const MinorText: react.ComponentType<{
|
|
|
179
179
|
part?: string | undefined;
|
|
180
180
|
"aria-activedescendant"?: string | undefined;
|
|
181
181
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
182
|
-
"aria-autocomplete"?: "list" | "
|
|
182
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
183
183
|
"aria-braillelabel"?: string | undefined;
|
|
184
184
|
"aria-brailleroledescription"?: string | undefined;
|
|
185
185
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -546,7 +546,7 @@ declare const DangerText: react.ComponentType<{
|
|
|
546
546
|
accessKey?: string | undefined;
|
|
547
547
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
548
548
|
autoFocus?: boolean | undefined;
|
|
549
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
549
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
550
550
|
contextMenu?: string | undefined;
|
|
551
551
|
dir?: string | undefined;
|
|
552
552
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -585,7 +585,7 @@ declare const DangerText: react.ComponentType<{
|
|
|
585
585
|
part?: string | undefined;
|
|
586
586
|
"aria-activedescendant"?: string | undefined;
|
|
587
587
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
588
|
-
"aria-autocomplete"?: "list" | "
|
|
588
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
589
589
|
"aria-braillelabel"?: string | undefined;
|
|
590
590
|
"aria-brailleroledescription"?: string | undefined;
|
|
591
591
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -952,7 +952,7 @@ declare const SuccessText: react.ComponentType<{
|
|
|
952
952
|
accessKey?: string | undefined;
|
|
953
953
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
954
954
|
autoFocus?: boolean | undefined;
|
|
955
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
955
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
956
956
|
contextMenu?: string | undefined;
|
|
957
957
|
dir?: string | undefined;
|
|
958
958
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -991,7 +991,7 @@ declare const SuccessText: react.ComponentType<{
|
|
|
991
991
|
part?: string | undefined;
|
|
992
992
|
"aria-activedescendant"?: string | undefined;
|
|
993
993
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
994
|
-
"aria-autocomplete"?: "list" | "
|
|
994
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
995
995
|
"aria-braillelabel"?: string | undefined;
|
|
996
996
|
"aria-brailleroledescription"?: string | undefined;
|
|
997
997
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -1358,7 +1358,7 @@ declare const StrongText: react.ComponentType<{
|
|
|
1358
1358
|
accessKey?: string | undefined;
|
|
1359
1359
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1360
1360
|
autoFocus?: boolean | undefined;
|
|
1361
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
1361
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
1362
1362
|
contextMenu?: string | undefined;
|
|
1363
1363
|
dir?: string | undefined;
|
|
1364
1364
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1397,7 +1397,7 @@ declare const StrongText: react.ComponentType<{
|
|
|
1397
1397
|
part?: string | undefined;
|
|
1398
1398
|
"aria-activedescendant"?: string | undefined;
|
|
1399
1399
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
1400
|
-
"aria-autocomplete"?: "list" | "
|
|
1400
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
1401
1401
|
"aria-braillelabel"?: string | undefined;
|
|
1402
1402
|
"aria-brailleroledescription"?: string | undefined;
|
|
1403
1403
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -1764,7 +1764,7 @@ declare const EmphasisText: react.ComponentType<{
|
|
|
1764
1764
|
accessKey?: string | undefined;
|
|
1765
1765
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
1766
1766
|
autoFocus?: boolean | undefined;
|
|
1767
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
1767
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
1768
1768
|
contextMenu?: string | undefined;
|
|
1769
1769
|
dir?: string | undefined;
|
|
1770
1770
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1803,7 +1803,7 @@ declare const EmphasisText: react.ComponentType<{
|
|
|
1803
1803
|
part?: string | undefined;
|
|
1804
1804
|
"aria-activedescendant"?: string | undefined;
|
|
1805
1805
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
1806
|
-
"aria-autocomplete"?: "list" | "
|
|
1806
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
1807
1807
|
"aria-braillelabel"?: string | undefined;
|
|
1808
1808
|
"aria-brailleroledescription"?: string | undefined;
|
|
1809
1809
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -2170,7 +2170,7 @@ declare const PlaceholderText: react.ComponentType<{
|
|
|
2170
2170
|
accessKey?: string | undefined;
|
|
2171
2171
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
2172
2172
|
autoFocus?: boolean | undefined;
|
|
2173
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
2173
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
2174
2174
|
contextMenu?: string | undefined;
|
|
2175
2175
|
dir?: string | undefined;
|
|
2176
2176
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -2209,7 +2209,7 @@ declare const PlaceholderText: react.ComponentType<{
|
|
|
2209
2209
|
part?: string | undefined;
|
|
2210
2210
|
"aria-activedescendant"?: string | undefined;
|
|
2211
2211
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
2212
|
-
"aria-autocomplete"?: "list" | "
|
|
2212
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
2213
2213
|
"aria-braillelabel"?: string | undefined;
|
|
2214
2214
|
"aria-brailleroledescription"?: string | undefined;
|
|
2215
2215
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -2576,7 +2576,7 @@ declare const HighlightText: react.ComponentType<{
|
|
|
2576
2576
|
accessKey?: string | undefined;
|
|
2577
2577
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
2578
2578
|
autoFocus?: boolean | undefined;
|
|
2579
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
2579
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
2580
2580
|
contextMenu?: string | undefined;
|
|
2581
2581
|
dir?: string | undefined;
|
|
2582
2582
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -2615,7 +2615,7 @@ declare const HighlightText: react.ComponentType<{
|
|
|
2615
2615
|
part?: string | undefined;
|
|
2616
2616
|
"aria-activedescendant"?: string | undefined;
|
|
2617
2617
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
2618
|
-
"aria-autocomplete"?: "list" | "
|
|
2618
|
+
"aria-autocomplete"?: "list" | "inline" | "none" | "both" | undefined;
|
|
2619
2619
|
"aria-braillelabel"?: string | undefined;
|
|
2620
2620
|
"aria-brailleroledescription"?: string | undefined;
|
|
2621
2621
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -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-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useSlotProps } from "../../utils/react/Slots.js";
|
|
4
4
|
import { BASE_STYLES, COLOR_STYLES, TEXT_STYLES, filterBaseProps, 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-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { TEXT_PROP_MAP, _Text } from "../Text.js";
|
|
4
4
|
import { highlightText } from "../highlightText.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-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useSlotProps } from "../../utils/react/Slots.js";
|
|
4
4
|
import { TEXT_PROP_MAP } from "./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-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeRefs } 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.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { mergeRefs } 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.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { _Item } from "../Item/Item.js";
|
|
3
3
|
import { Action } from "../../actions/Action/Action.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-7dc6906 | Cube Dev Team */
|
|
2
2
|
//#region src/components/content/Tree/tree-index.ts
|
|
3
3
|
function buildTreeIndex(treeData) {
|
|
4
4
|
const byKey = /* @__PURE__ */ new 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-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { TooltipProvider } from "../overlays/Tooltip/TooltipProvider.js";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -68,38 +68,46 @@ function useAutoTooltip({ tooltip, children, labelProps, isDynamicLabel = false
|
|
|
68
68
|
delete props.ref;
|
|
69
69
|
return props;
|
|
70
70
|
}, [labelProps]);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
if (typeof tooltip === "object") {
|
|
87
|
-
const { auto, ...tooltipProps } = tooltip;
|
|
88
|
-
if (tooltipProps.title && auto !== true) return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
89
|
-
placement: defaultTooltipPlacement,
|
|
90
|
-
...tooltipProps,
|
|
91
|
-
children: (triggerProps, ref) => renderElement(triggerProps, ref)
|
|
92
|
-
});
|
|
93
|
-
if ((children || labelProps) && (isLabelOverflowed || isDynamicLabel)) return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
94
|
-
placement: defaultTooltipPlacement,
|
|
95
|
-
title: tooltipProps.title ?? children,
|
|
96
|
-
isDisabled: !isLabelOverflowed && isDynamicLabel && tooltipProps.isDisabled !== true,
|
|
97
|
-
...tooltipProps,
|
|
98
|
-
children: (triggerProps, ref) => renderElement(triggerProps, ref)
|
|
99
|
-
});
|
|
100
|
-
}
|
|
71
|
+
/**
|
|
72
|
+
* The `TooltipProvider` props this tooltip resolves to, or `null` when no
|
|
73
|
+
* tooltip is rendered at all. Resolved once so that both the rendering below
|
|
74
|
+
* and `isTooltipActive` speak about the same tooltip.
|
|
75
|
+
*/
|
|
76
|
+
const resolvedTooltip = useMemo(() => {
|
|
77
|
+
if (!tooltip) return null;
|
|
78
|
+
if (typeof tooltip === "string") return { title: tooltip };
|
|
79
|
+
const hasAutoContent = !!(children || labelProps) && (isLabelOverflowed || isDynamicLabel);
|
|
80
|
+
if (tooltip === true) {
|
|
81
|
+
if (!hasAutoContent) return null;
|
|
82
|
+
return {
|
|
83
|
+
title: children,
|
|
84
|
+
isDisabled: !isLabelOverflowed && isDynamicLabel
|
|
85
|
+
};
|
|
101
86
|
}
|
|
102
|
-
|
|
87
|
+
const { auto, ...tooltipProps } = tooltip;
|
|
88
|
+
if (tooltipProps.title && auto !== true) return tooltipProps;
|
|
89
|
+
if (!hasAutoContent) return null;
|
|
90
|
+
return {
|
|
91
|
+
title: tooltipProps.title ?? children,
|
|
92
|
+
isDisabled: !isLabelOverflowed && isDynamicLabel && tooltipProps.isDisabled !== true,
|
|
93
|
+
...tooltipProps
|
|
94
|
+
};
|
|
95
|
+
}, [
|
|
96
|
+
tooltip,
|
|
97
|
+
children,
|
|
98
|
+
labelProps,
|
|
99
|
+
isLabelOverflowed,
|
|
100
|
+
isDynamicLabel
|
|
101
|
+
]);
|
|
102
|
+
/** Whether a tooltip is rendered and able to open. */
|
|
103
|
+
const isTooltipActive = !!resolvedTooltip && resolvedTooltip.isDisabled !== true;
|
|
104
|
+
const renderWithTooltip = (renderElement, defaultTooltipPlacement) => {
|
|
105
|
+
if (!resolvedTooltip) return renderElement();
|
|
106
|
+
return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
107
|
+
placement: defaultTooltipPlacement,
|
|
108
|
+
...resolvedTooltip,
|
|
109
|
+
children: (triggerProps, ref) => renderElement(triggerProps, ref)
|
|
110
|
+
});
|
|
103
111
|
};
|
|
104
112
|
return {
|
|
105
113
|
labelRef: handleLabelElementRef,
|
|
@@ -107,6 +115,7 @@ function useAutoTooltip({ tooltip, children, labelProps, isDynamicLabel = false
|
|
|
107
115
|
isLabelOverflowed,
|
|
108
116
|
isAutoTooltipEnabled,
|
|
109
117
|
hasTooltip: !!tooltip,
|
|
118
|
+
isTooltipActive,
|
|
110
119
|
renderWithTooltip
|
|
111
120
|
};
|
|
112
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-auto-tooltip.js","names":[],"sources":["../../../src/components/content/use-auto-tooltip.tsx"],"sourcesContent":["import {\n HTMLAttributes,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { OverlayProps } from 'react-aria';\n\nimport {\n CubeTooltipProviderProps,\n TooltipProvider,\n} from '../overlays/Tooltip/TooltipProvider';\n\nimport type { Props } from '../../props';\n\nexport type AutoTooltipValue =\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n\nexport interface UseAutoTooltipOptions {\n tooltip: AutoTooltipValue | undefined;\n children: ReactNode;\n labelProps?: Props;\n isDynamicLabel?: boolean;\n}\n\nexport function useAutoTooltip({\n tooltip,\n children,\n labelProps,\n isDynamicLabel = false,\n}: UseAutoTooltipOptions) {\n // Determine if auto tooltip is enabled\n // Auto tooltip only works when children is a string (overflow detection needs text)\n const isAutoTooltipEnabled = useMemo(() => {\n if (typeof children !== 'string') return false;\n\n // Boolean true enables auto overflow detection\n if (tooltip === true) return true;\n if (typeof tooltip === 'object') {\n // If title is provided and auto is explicitly true, enable auto overflow detection\n if (tooltip.title) {\n return tooltip.auto === true;\n }\n\n // If no title is provided, default to auto=true unless explicitly disabled\n const autoValue = tooltip.auto !== undefined ? tooltip.auto : true;\n return !!autoValue;\n }\n return false;\n }, [tooltip, children]);\n\n // Track label overflow for auto tooltip (only when enabled)\n const externalLabelRef = (labelProps as any)?.ref;\n const [isLabelOverflowed, setIsLabelOverflowed] = useState(false);\n const elementRef = useRef<HTMLElement | null>(null);\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n\n const checkLabelOverflow = useCallback(() => {\n const label = elementRef.current;\n if (!label) {\n setIsLabelOverflowed(false);\n return;\n }\n\n const hasOverflow = label.scrollWidth > label.clientWidth;\n setIsLabelOverflowed(hasOverflow);\n }, []);\n\n useEffect(() => {\n if (isAutoTooltipEnabled) {\n checkLabelOverflow();\n }\n }, [isAutoTooltipEnabled, checkLabelOverflow]);\n\n // Attach ResizeObserver via callback ref to handle DOM node changes\n const handleLabelElementRef = useCallback(\n (element: HTMLElement | null) => {\n // Call external callback ref to notify external refs\n if (externalLabelRef) {\n if (typeof externalLabelRef === 'function') {\n externalLabelRef(element);\n } else {\n (externalLabelRef as any).current = element;\n }\n }\n\n // Disconnect previous observer\n if (resizeObserverRef.current) {\n try {\n resizeObserverRef.current.disconnect();\n } catch {\n // do nothing\n }\n resizeObserverRef.current = null;\n }\n\n elementRef.current = element;\n\n if (element && isAutoTooltipEnabled) {\n // Create a fresh observer to capture the latest callback\n const obs = new ResizeObserver(() => {\n checkLabelOverflow();\n });\n resizeObserverRef.current = obs;\n obs.observe(element);\n // Initial check\n checkLabelOverflow();\n } else {\n setIsLabelOverflowed(false);\n }\n },\n [externalLabelRef, isAutoTooltipEnabled, checkLabelOverflow],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (resizeObserverRef.current) {\n try {\n resizeObserverRef.current.disconnect();\n } catch {\n // do nothing\n }\n resizeObserverRef.current = null;\n }\n elementRef.current = null;\n };\n }, []);\n\n const finalLabelProps = useMemo(() => {\n const props = {\n ...(labelProps || {}),\n };\n\n delete props.ref;\n\n return props;\n }, [labelProps]);\n\n
|
|
1
|
+
{"version":3,"file":"use-auto-tooltip.js","names":[],"sources":["../../../src/components/content/use-auto-tooltip.tsx"],"sourcesContent":["import {\n HTMLAttributes,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { OverlayProps } from 'react-aria';\n\nimport {\n CubeTooltipProviderProps,\n TooltipProvider,\n} from '../overlays/Tooltip/TooltipProvider';\n\nimport type { Props } from '../../props';\n\nexport type AutoTooltipValue =\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n\nexport interface UseAutoTooltipOptions {\n tooltip: AutoTooltipValue | undefined;\n children: ReactNode;\n labelProps?: Props;\n isDynamicLabel?: boolean;\n}\n\nexport function useAutoTooltip({\n tooltip,\n children,\n labelProps,\n isDynamicLabel = false,\n}: UseAutoTooltipOptions) {\n // Determine if auto tooltip is enabled\n // Auto tooltip only works when children is a string (overflow detection needs text)\n const isAutoTooltipEnabled = useMemo(() => {\n if (typeof children !== 'string') return false;\n\n // Boolean true enables auto overflow detection\n if (tooltip === true) return true;\n if (typeof tooltip === 'object') {\n // If title is provided and auto is explicitly true, enable auto overflow detection\n if (tooltip.title) {\n return tooltip.auto === true;\n }\n\n // If no title is provided, default to auto=true unless explicitly disabled\n const autoValue = tooltip.auto !== undefined ? tooltip.auto : true;\n return !!autoValue;\n }\n return false;\n }, [tooltip, children]);\n\n // Track label overflow for auto tooltip (only when enabled)\n const externalLabelRef = (labelProps as any)?.ref;\n const [isLabelOverflowed, setIsLabelOverflowed] = useState(false);\n const elementRef = useRef<HTMLElement | null>(null);\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n\n const checkLabelOverflow = useCallback(() => {\n const label = elementRef.current;\n if (!label) {\n setIsLabelOverflowed(false);\n return;\n }\n\n const hasOverflow = label.scrollWidth > label.clientWidth;\n setIsLabelOverflowed(hasOverflow);\n }, []);\n\n useEffect(() => {\n if (isAutoTooltipEnabled) {\n checkLabelOverflow();\n }\n }, [isAutoTooltipEnabled, checkLabelOverflow]);\n\n // Attach ResizeObserver via callback ref to handle DOM node changes\n const handleLabelElementRef = useCallback(\n (element: HTMLElement | null) => {\n // Call external callback ref to notify external refs\n if (externalLabelRef) {\n if (typeof externalLabelRef === 'function') {\n externalLabelRef(element);\n } else {\n (externalLabelRef as any).current = element;\n }\n }\n\n // Disconnect previous observer\n if (resizeObserverRef.current) {\n try {\n resizeObserverRef.current.disconnect();\n } catch {\n // do nothing\n }\n resizeObserverRef.current = null;\n }\n\n elementRef.current = element;\n\n if (element && isAutoTooltipEnabled) {\n // Create a fresh observer to capture the latest callback\n const obs = new ResizeObserver(() => {\n checkLabelOverflow();\n });\n resizeObserverRef.current = obs;\n obs.observe(element);\n // Initial check\n checkLabelOverflow();\n } else {\n setIsLabelOverflowed(false);\n }\n },\n [externalLabelRef, isAutoTooltipEnabled, checkLabelOverflow],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (resizeObserverRef.current) {\n try {\n resizeObserverRef.current.disconnect();\n } catch {\n // do nothing\n }\n resizeObserverRef.current = null;\n }\n elementRef.current = null;\n };\n }, []);\n\n const finalLabelProps = useMemo(() => {\n const props = {\n ...(labelProps || {}),\n };\n\n delete props.ref;\n\n return props;\n }, [labelProps]);\n\n /**\n * The `TooltipProvider` props this tooltip resolves to, or `null` when no\n * tooltip is rendered at all. Resolved once so that both the rendering below\n * and `isTooltipActive` speak about the same tooltip.\n */\n const resolvedTooltip = useMemo<Omit<\n CubeTooltipProviderProps,\n 'children'\n > | null>(() => {\n if (!tooltip) return null;\n\n // String tooltip - simple case\n if (typeof tooltip === 'string') {\n return { title: tooltip };\n }\n\n const hasAutoContent =\n !!(children || labelProps) && (isLabelOverflowed || isDynamicLabel);\n\n // Boolean tooltip - auto tooltip on overflow\n if (tooltip === true) {\n if (!hasAutoContent) return null;\n\n return {\n title: children,\n isDisabled: !isLabelOverflowed && isDynamicLabel,\n };\n }\n\n // Object tooltip - advanced configuration\n const { auto, ...tooltipProps } = tooltip;\n\n // If title is provided and auto is not explicitly true, always show the tooltip\n if (tooltipProps.title && auto !== true) {\n return tooltipProps;\n }\n\n // If title is provided with auto=true, OR no title but auto behavior enabled\n if (!hasAutoContent) return null;\n\n return {\n title: tooltipProps.title ?? children,\n isDisabled:\n !isLabelOverflowed &&\n isDynamicLabel &&\n tooltipProps.isDisabled !== true,\n ...tooltipProps,\n };\n }, [tooltip, children, labelProps, isLabelOverflowed, isDynamicLabel]);\n\n /** Whether a tooltip is rendered and able to open. */\n const isTooltipActive =\n !!resolvedTooltip && resolvedTooltip.isDisabled !== true;\n\n const renderWithTooltip = (\n renderElement: (\n tooltipTriggerProps?: HTMLAttributes<HTMLElement>,\n tooltipRef?: RefObject<HTMLElement>,\n ) => ReactNode,\n defaultTooltipPlacement: OverlayProps['placement'],\n ) => {\n if (!resolvedTooltip) return renderElement();\n\n return (\n <TooltipProvider placement={defaultTooltipPlacement} {...resolvedTooltip}>\n {(triggerProps, ref) => renderElement(triggerProps, ref)}\n </TooltipProvider>\n );\n };\n\n return {\n labelRef: handleLabelElementRef,\n labelProps: finalLabelProps,\n isLabelOverflowed,\n isAutoTooltipEnabled,\n hasTooltip: !!tooltip,\n isTooltipActive,\n renderWithTooltip,\n };\n}\n"],"mappings":";;;;;;AA+BA,SAAgB,eAAe,EAC7B,SACA,UACA,YACA,iBAAiB,SACO;CAGxB,MAAM,uBAAuB,cAAc;AACzC,MAAI,OAAO,aAAa,SAAU,QAAO;AAGzC,MAAI,YAAY,KAAM,QAAO;AAC7B,MAAI,OAAO,YAAY,UAAU;AAE/B,OAAI,QAAQ,MACV,QAAO,QAAQ,SAAS;AAK1B,UAAO,CAAC,EADU,QAAQ,SAAS,SAAY,QAAQ,OAAO;;AAGhE,SAAO;IACN,CAAC,SAAS,SAAS,CAAC;CAGvB,MAAM,mBAAoB,YAAoB;CAC9C,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,MAAM;CACjE,MAAM,aAAa,OAA2B,KAAK;CACnD,MAAM,oBAAoB,OAA8B,KAAK;CAE7D,MAAM,qBAAqB,kBAAkB;EAC3C,MAAM,QAAQ,WAAW;AACzB,MAAI,CAAC,OAAO;AACV,wBAAqB,MAAM;AAC3B;;AAIF,uBADoB,MAAM,cAAc,MAAM,YACb;IAChC,EAAE,CAAC;AAEN,iBAAgB;AACd,MAAI,qBACF,qBAAoB;IAErB,CAAC,sBAAsB,mBAAmB,CAAC;CAG9C,MAAM,wBAAwB,aAC3B,YAAgC;AAE/B,MAAI,iBACF,KAAI,OAAO,qBAAqB,WAC9B,kBAAiB,QAAQ;MAEzB,CAAC,iBAAyB,UAAU;AAKxC,MAAI,kBAAkB,SAAS;AAC7B,OAAI;AACF,sBAAkB,QAAQ,YAAY;WAChC;AAGR,qBAAkB,UAAU;;AAG9B,aAAW,UAAU;AAErB,MAAI,WAAW,sBAAsB;GAEnC,MAAM,MAAM,IAAI,qBAAqB;AACnC,wBAAoB;KACpB;AACF,qBAAkB,UAAU;AAC5B,OAAI,QAAQ,QAAQ;AAEpB,uBAAoB;QAEpB,sBAAqB,MAAM;IAG/B;EAAC;EAAkB;EAAsB;EAAmB,CAC7D;AAGD,iBAAgB;AACd,eAAa;AACX,OAAI,kBAAkB,SAAS;AAC7B,QAAI;AACF,uBAAkB,QAAQ,YAAY;YAChC;AAGR,sBAAkB,UAAU;;AAE9B,cAAW,UAAU;;IAEtB,EAAE,CAAC;CAEN,MAAM,kBAAkB,cAAc;EACpC,MAAM,QAAQ,EACZ,GAAI,cAAc,EAAE,EACrB;AAED,SAAO,MAAM;AAEb,SAAO;IACN,CAAC,WAAW,CAAC;;;;;;CAOhB,MAAM,kBAAkB,cAGR;AACd,MAAI,CAAC,QAAS,QAAO;AAGrB,MAAI,OAAO,YAAY,SACrB,QAAO,EAAE,OAAO,SAAS;EAG3B,MAAM,iBACJ,CAAC,EAAE,YAAY,gBAAgB,qBAAqB;AAGtD,MAAI,YAAY,MAAM;AACpB,OAAI,CAAC,eAAgB,QAAO;AAE5B,UAAO;IACL,OAAO;IACP,YAAY,CAAC,qBAAqB;IACnC;;EAIH,MAAM,EAAE,MAAM,GAAG,iBAAiB;AAGlC,MAAI,aAAa,SAAS,SAAS,KACjC,QAAO;AAIT,MAAI,CAAC,eAAgB,QAAO;AAE5B,SAAO;GACL,OAAO,aAAa,SAAS;GAC7B,YACE,CAAC,qBACD,kBACA,aAAa,eAAe;GAC9B,GAAG;GACJ;IACA;EAAC;EAAS;EAAU;EAAY;EAAmB;EAAe,CAAC;;CAGtE,MAAM,kBACJ,CAAC,CAAC,mBAAmB,gBAAgB,eAAe;CAEtD,MAAM,qBACJ,eAIA,4BACG;AACH,MAAI,CAAC,gBAAiB,QAAO,eAAe;AAE5C,SACE,oBAAC;GAAgB,WAAW;GAAyB,GAAI;cACrD,cAAc,QAAQ,cAAc,cAAc,IAAI;IACxC;;AAItB,QAAO;EACL,UAAU;EACV,YAAY;EACZ;EACA;EACA,YAAY,CAAC,CAAC;EACd;EACA;EACD"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-7dc6906 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
5
5
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
6
|
-
import { DraggableCollection } from "../../shared/DraggableCollection.js";
|
|
7
6
|
import { clampPage, getPageInfo } from "../../navigation/Pagination/use-pagination.js";
|
|
8
7
|
import { ItemTableFooter } from "../ItemTable/ItemTableFooter.js";
|
|
9
|
-
import { RowCollection } from "../TableBase/RowCollection.js";
|
|
10
8
|
import { selectionRowKey } from "../TableBase/types.js";
|
|
11
9
|
import { useCellSelection } from "../TableBase/use-cell-selection.js";
|
|
12
|
-
import {
|
|
13
|
-
import { freezeColumnWidths, useTableColumns } from "../TableBase/use-table-columns.js";
|
|
10
|
+
import { useTableColumns } from "../TableBase/use-table-columns.js";
|
|
14
11
|
import { ROW_NUMBER_COLUMN_KEY } from "../TableBase/use-table-selection.js";
|
|
15
12
|
import { TableView } from "../TableBase/TableView.js";
|
|
16
13
|
import { useContainerWidth } from "../TableBase/use-container-width.js";
|
|
@@ -19,9 +16,7 @@ import { useTableStorage } from "../TableBase/use-table-storage.js";
|
|
|
19
16
|
import { CONTAINER_STYLES } from "@tenphi/tasty";
|
|
20
17
|
import { forwardRef, useMemo, useRef, useState } from "react";
|
|
21
18
|
import { jsx } from "react/jsx-runtime";
|
|
22
|
-
import { useMultipleSelectionState } from "react-stately";
|
|
23
19
|
import { useControlledState } from "@react-stately/utils";
|
|
24
|
-
import { SelectionManager } from "@react-stately/selection";
|
|
25
20
|
|
|
26
21
|
//#region src/components/data/DataTable/DataTable.tsx
|
|
27
22
|
/** Wide enough for five digits at the dense default. */
|
|
@@ -47,31 +42,29 @@ function defaultGetRowKey(rowKey) {
|
|
|
47
42
|
* Cloud.
|
|
48
43
|
*/
|
|
49
44
|
function DataTable(props, ref) {
|
|
50
|
-
const { data, columns, rowKey = "id", getRowKey, pinnedTopRows, pinnedBottomRows, isLoading = false, loadingIndicator = "overlay", skeletonRowCount, error, emptyLabel, noResultsLabel, isFiltered, shape = "plain", size = "small",
|
|
45
|
+
const { data, columns, rowKey = "id", getRowKey, pinnedTopRows, pinnedBottomRows, isLoading = false, loadingIndicator = "overlay", skeletonRowCount, error, emptyLabel, noResultsLabel, isFiltered, shape = "plain", size = "small", rowHeight, headerHeight, isStriped = true, isHeaderHidden, isHeaderSticky, showRowNumbers = false, sortMode, sorts: sortsProp, defaultSorts, onSortsChange, paginationMode = "client", page: pageProp, defaultPage, onPageChange, pageSize: pageSizeProp, defaultPageSize = 100, onPageSizeChange, pageSizeOptions, total: totalProp, totalPages, hasNextPage, summary = true, autoHidePagination = true, footerStart, footerCenter, footerEnd, cellSelectionMode = "range", isCellSelectable, selectedCellRange, defaultSelectedCellRange, onCellRangeChange, isRowMoveAnimated, isResizable = true, columnWidths: columnWidthsProp, defaultColumnWidths, onColumnResize, isVirtualized, virtualizeThreshold, overscan, getRowProps, storageKey, styles, headerStyles, headerCellStyles, bodyStyles, rowStyles, cellStyles, footerStyles, ariaLabel, qa, mods, ...rest } = props;
|
|
51
46
|
const rootRef = useCombinedRefs(ref, useRef(null));
|
|
52
47
|
const [scrollerEl, setScrollerEl] = useState(null);
|
|
53
48
|
const containerWidth = useContainerWidth(scrollerEl);
|
|
54
49
|
const storage = useTableStorage(storageKey);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const { sorts, sortedRows, toggleSort, setColumnSort, mode: resolvedSortMode } = useTableSorts({
|
|
74
|
-
columns: orderedColumns,
|
|
50
|
+
/**
|
|
51
|
+
* `dataType` is presentational, so it is folded into the column here rather
|
|
52
|
+
* than reaching the renderer: `number` right-aligns and takes tabular figures
|
|
53
|
+
* so digits line up down the column.
|
|
54
|
+
*/
|
|
55
|
+
const resolvedColumns = useMemo(() => columns.map((column) => {
|
|
56
|
+
const isNumeric = column.dataType === "number";
|
|
57
|
+
return {
|
|
58
|
+
...column,
|
|
59
|
+
align: column.align ?? (isNumeric ? "end" : "start"),
|
|
60
|
+
cellStyles: isNumeric ? {
|
|
61
|
+
fontVariantNumeric: "tabular-nums",
|
|
62
|
+
...typeof column.cellStyles === "object" ? column.cellStyles : null
|
|
63
|
+
} : column.cellStyles
|
|
64
|
+
};
|
|
65
|
+
}), [columns]);
|
|
66
|
+
const { sorts, sortedRows, toggleSort, mode: resolvedSortMode } = useTableSorts({
|
|
67
|
+
columns: resolvedColumns,
|
|
75
68
|
rows: data,
|
|
76
69
|
mode: sortMode,
|
|
77
70
|
sorts: sortsProp,
|
|
@@ -101,15 +94,9 @@ function DataTable(props, ref) {
|
|
|
101
94
|
const draftRef = useRef(null);
|
|
102
95
|
const baseColumnWidths = columnWidthsProp ?? ownColumnWidths;
|
|
103
96
|
const columnWidths = draftColumnWidths ?? baseColumnWidths;
|
|
104
|
-
/**
|
|
105
|
-
* The resolved widths, for the freeze below. A ref because `layout` is
|
|
106
|
-
* computed *after* this handler is defined, and `useEvent` only reads it when
|
|
107
|
-
* the drag actually runs.
|
|
108
|
-
*/
|
|
109
|
-
const layoutRef = useRef(null);
|
|
110
97
|
const handleColumnResize = useEvent((key, width) => {
|
|
111
98
|
draftRef.current = {
|
|
112
|
-
...draftRef.current ??
|
|
99
|
+
...draftRef.current ?? baseColumnWidths,
|
|
113
100
|
[key]: Math.round(width)
|
|
114
101
|
};
|
|
115
102
|
setDraftColumnWidths(draftRef.current);
|
|
@@ -125,7 +112,7 @@ function DataTable(props, ref) {
|
|
|
125
112
|
setDraftColumnWidths(null);
|
|
126
113
|
});
|
|
127
114
|
const layout = useTableColumns({
|
|
128
|
-
columns:
|
|
115
|
+
columns: resolvedColumns,
|
|
129
116
|
containerWidth,
|
|
130
117
|
columnWidths,
|
|
131
118
|
leadingColumns: useMemo(() => showRowNumbers ? [{
|
|
@@ -133,7 +120,6 @@ function DataTable(props, ref) {
|
|
|
133
120
|
width: ROW_NUMBER_WIDTH
|
|
134
121
|
}] : void 0, [showRowNumbers])
|
|
135
122
|
});
|
|
136
|
-
layoutRef.current = layout;
|
|
137
123
|
const { t } = useI18n();
|
|
138
124
|
const resolvedGetRowKey = useMemo(() => getRowKey ?? defaultGetRowKey(rowKey), [getRowKey, rowKey]);
|
|
139
125
|
const selectionRows = useMemo(() => [
|
|
@@ -183,27 +169,7 @@ function DataTable(props, ref) {
|
|
|
183
169
|
const smallestPageSize = pageSizeOptions?.length ? Math.min(...pageSizeOptions) : pageSize;
|
|
184
170
|
const showPagination = isPaginated && !(autoHidePagination && !hasNextPage && pageInfo.totalPages <= 1 && total <= smallestPageSize);
|
|
185
171
|
const hasFooter = showPagination || footerStart != null || footerCenter != null || footerEnd != null;
|
|
186
|
-
|
|
187
|
-
const draggableColumnKeys = useMemo(() => getDraggableColumnKeys(layout.columns, isColumnReorderable), [layout.columns, isColumnReorderable]);
|
|
188
|
-
const columnCollection = useMemo(() => new RowCollection(layout.columns.filter((column) => isColumnDraggable(column, isColumnReorderable)), (column) => column.key, /* @__PURE__ */ new Set(), (column) => typeof column.title === "string" ? column.title : column.key), [layout.columns, isColumnReorderable]);
|
|
189
|
-
/**
|
|
190
|
-
* `'single'`, not `'none'`.
|
|
191
|
-
*
|
|
192
|
-
* `useDraggableItem` only deletes its own `onClick` — the one that would
|
|
193
|
-
* hijack a screen-reader click away from the sort — when the selection mode is
|
|
194
|
-
* not `'none'`, and only then does it attach the keyboard drag description.
|
|
195
|
-
* Nothing is ever actually selected here.
|
|
196
|
-
*/
|
|
197
|
-
const columnSelectionState = useMultipleSelectionState({
|
|
198
|
-
selectionMode: "single",
|
|
199
|
-
disabledBehavior: "all"
|
|
200
|
-
});
|
|
201
|
-
const columnSelectionManager = useMemo(() => new SelectionManager(columnCollection, columnSelectionState), [columnCollection, columnSelectionState]);
|
|
202
|
-
const handleColumnFocus = useEvent((columnKey) => {
|
|
203
|
-
columnSelectionManager.setFocusedKey(columnKey);
|
|
204
|
-
});
|
|
205
|
-
const isColumnDragEnabled = isColumnReorderable && draggableColumnKeys.length > 1;
|
|
206
|
-
const renderTable = (columnDragState, columnDropState, headCollectionProps) => /* @__PURE__ */ jsx(TableView, {
|
|
172
|
+
return /* @__PURE__ */ jsx(TableView, {
|
|
207
173
|
...rest,
|
|
208
174
|
rootRef,
|
|
209
175
|
qa: qa || "DataTable",
|
|
@@ -227,7 +193,6 @@ function DataTable(props, ref) {
|
|
|
227
193
|
isFiltered,
|
|
228
194
|
shape,
|
|
229
195
|
size,
|
|
230
|
-
rowSize,
|
|
231
196
|
rowHeight,
|
|
232
197
|
headerHeight,
|
|
233
198
|
isStriped,
|
|
@@ -239,11 +204,6 @@ function DataTable(props, ref) {
|
|
|
239
204
|
sortMode: resolvedSortMode,
|
|
240
205
|
sorts,
|
|
241
206
|
onColumnSort: toggleSort,
|
|
242
|
-
onColumnSortChange: setColumnSort,
|
|
243
|
-
columnContextMenu,
|
|
244
|
-
onColumnMenuAction,
|
|
245
|
-
columnMenuTriggerProps,
|
|
246
|
-
columnMenuProps,
|
|
247
207
|
isVirtualized,
|
|
248
208
|
virtualizeThreshold,
|
|
249
209
|
overscan,
|
|
@@ -259,12 +219,6 @@ function DataTable(props, ref) {
|
|
|
259
219
|
rowStyles,
|
|
260
220
|
cellStyles,
|
|
261
221
|
mods,
|
|
262
|
-
isColumnReorderable: isColumnDragEnabled,
|
|
263
|
-
columnDragState,
|
|
264
|
-
columnDropState,
|
|
265
|
-
headCollectionProps,
|
|
266
|
-
headRowRef,
|
|
267
|
-
onColumnFocus: handleColumnFocus,
|
|
268
222
|
footer: hasFooter ? /* @__PURE__ */ jsx(ItemTableFooter, {
|
|
269
223
|
start: footerStart,
|
|
270
224
|
center: footerCenter,
|
|
@@ -283,18 +237,6 @@ function DataTable(props, ref) {
|
|
|
283
237
|
} : void 0
|
|
284
238
|
}) : null
|
|
285
239
|
});
|
|
286
|
-
return isColumnDragEnabled ? /* @__PURE__ */ jsx(DraggableCollection, {
|
|
287
|
-
state: {
|
|
288
|
-
collection: columnCollection,
|
|
289
|
-
selectionManager: columnSelectionManager,
|
|
290
|
-
disabledKeys: /* @__PURE__ */ new Set()
|
|
291
|
-
},
|
|
292
|
-
listRef: headRowRef,
|
|
293
|
-
orderedKeys: draggableColumnKeys,
|
|
294
|
-
orientation: "horizontal",
|
|
295
|
-
onReorder: columnOrderState.reorder,
|
|
296
|
-
children: (dragState, dropState, collectionProps) => renderTable(dragState, dropState, collectionProps)
|
|
297
|
-
}) : renderTable();
|
|
298
240
|
}
|
|
299
241
|
const _DataTable = forwardRef(DataTable);
|
|
300
242
|
_DataTable.displayName = "DataTable";
|