@cube-dev/ui-kit 0.202.0 → 0.204.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +24 -0
- 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/ItemActionsWrapper.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/MenuCollectionItem.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/actions-run.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/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/Item/ItemWithNativeLinks.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 +2 -2
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPanelTransition.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/checked-keys.js +1 -1
- package/dist/components/content/Tree/rowId.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +233 -178
- 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/index.d.ts +2 -2
- package/dist/components/data/ItemTable/item-table-sections.js +68 -0
- package/dist/components/data/ItemTable/item-table-sections.js.map +1 -0
- package/dist/components/data/ItemTable/types.d.ts +12 -0
- package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-selection.js +31 -27
- package/dist/components/data/ItemTable/use-item-table-selection.js.map +1 -1
- package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableRowLink.js +1 -1
- package/dist/components/data/TableBase/TableView.d.ts +1 -0
- package/dist/components/data/TableBase/TableView.js +86 -21
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/TreeGridTable.js +1 -1
- package/dist/components/data/TableBase/column-header.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-styles.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +25 -1
- package/dist/components/data/TableBase/styled.js.map +1 -1
- package/dist/components/data/TableBase/table-body-sections.d.ts +3 -0
- package/dist/components/data/TableBase/table-body-sections.js +30 -0
- package/dist/components/data/TableBase/table-body-sections.js.map +1 -0
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-menu.js +1 -1
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-column-window.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/data/index.d.ts +2 -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/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.d.ts +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +382 -344
- package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/fields/ComboBox/comboBoxOptions.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 +3 -4
- package/dist/components/fields/DatePicker/DateInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +3 -4
- package/dist/components/fields/DatePicker/DatePicker.js.map +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 +3 -4
- package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +3 -4
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +3 -3
- package/dist/components/fields/DatePicker/PeriodPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +4 -5
- package/dist/components/fields/DatePicker/TimeInput.js.map +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 +77 -79
- package/dist/components/fields/FileInput/FileInput.js.map +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterListBox/styled.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/FilterPicker/FilterTree.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/ListBox/optionId.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 +36 -19
- package/dist/components/fields/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +52 -37
- package/dist/components/fields/NumberInput/StepButton.js.map +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/SliderBase.js.map +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/Slider/types.d.ts +0 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.js +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useTagError.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.d.ts +10 -0
- package/dist/components/fields/TextInput/TextInputBase.js +67 -55
- package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
- package/dist/components/fields/TextInput/displayed-validation.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/fields/option-origin-press.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/field-description.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/ModernFormRoot.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/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/store.js +18 -2
- package/dist/components/form/Form/modern/store.js.map +1 -1
- package/dist/components/form/Form/modern/types.d.ts +5 -0
- package/dist/components/form/Form/modern/validation.js +1 -1
- package/dist/components/form/Form/modern/values.js +1 -1
- package/dist/components/form/Form/reset-unbound-controls.js +1 -1
- package/dist/components/form/Form/use-field/use-field-binding.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/field-chrome.js +1 -1
- package/dist/components/form/field-layout.d.ts +12 -2
- package/dist/components/form/field-layout.js +29 -11
- package/dist/components/form/field-layout.js.map +1 -1
- package/dist/components/form/legacy-tooltip.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/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/BoardDragActiveProvider.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 +7 -3
- package/dist/components/navigation/Tabs/Tabs.js.map +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 +18 -18
- package/dist/components/navigation/Tabs/styled.js.map +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +2 -2
- package/dist/components/overlays/AlertDialog/types.d.ts +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +9 -4
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.d.ts +7 -0
- package/dist/components/overlays/Dialog/DialogContainer.js +61 -32
- package/dist/components/overlays/Dialog/DialogContainer.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogForm.d.ts +7 -0
- package/dist/components/overlays/Dialog/DialogForm.js +10 -3
- package/dist/components/overlays/Dialog/DialogForm.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.d.ts +8 -0
- package/dist/components/overlays/Dialog/DialogTrigger.js +24 -11
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +213 -185
- package/dist/components/overlays/Dialog/ModernDialogForm.js.map +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/context.js.map +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-open-sync.js +1 -1
- package/dist/components/overlays/Dialog/use-dismiss-confirmation.js +211 -0
- package/dist/components/overlays/Dialog/use-dismiss-confirmation.js.map +1 -0
- package/dist/components/overlays/Dialog/use-retained-dialog-focus.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/Modal/modal-containment.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/overlays/Tooltip/split-trigger-props.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 +25 -1
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +10 -2
- package/dist/i18n/locales/en-US/uikit.js +10 -2
- package/dist/i18n/locales/en-US/uikit.json.d.ts +11 -4
- package/dist/i18n/locales/es-ES/uikit.js +10 -2
- package/dist/i18n/locales/es-MX/uikit.js +10 -2
- package/dist/i18n/locales/fr-FR/uikit.js +10 -2
- package/dist/i18n/locales/it-IT/uikit.js +10 -2
- package/dist/i18n/locales/ja-JP/uikit.js +10 -2
- package/dist/i18n/locales/nb-NO/uikit.js +10 -2
- package/dist/i18n/locales/pt-BR/uikit.js +10 -2
- package/dist/i18n/locales/pt-PT/uikit.js +10 -2
- package/dist/i18n/locales/sv-SE/uikit.js +10 -2
- package/dist/i18n/locales/vi-VN/uikit.js +10 -2
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/namespace.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigation-url.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/providers/use-navigation.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/overlayKeyPropagation.js +1 -1
- package/dist/utils/react/programmaticFocus.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/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/FieldProperties.md +16 -4
- package/docs/Usage.md +1 -1
- package/docs/components/data/ItemTable.md +25 -0
- package/docs/components/fields/ComboBox.md +8 -4
- package/docs/components/fields/CommandTextArea.md +1 -0
- package/docs/components/fields/HueSlider.md +0 -1
- package/docs/components/fields/NumberInput.md +4 -0
- package/docs/components/fields/PasswordInput.md +2 -0
- package/docs/components/fields/SearchInput.md +13 -0
- package/docs/components/fields/Slider.md +0 -1
- package/docs/components/fields/TextArea.md +1 -0
- package/docs/components/fields/TextInput.md +14 -1
- package/docs/components/navigation/Tabs.md +47 -0
- package/docs/components/overlays/Dialog.md +2 -2
- package/docs/components/overlays/DialogContainer.md +1 -0
- package/docs/components/overlays/DialogForm.md +3 -1
- package/docs/components/overlays/DialogTrigger.md +31 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.204.0 | Cube Dev Team */
|
|
2
2
|
import { useSlotProps } from "../../../utils/react/Slots.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { TooltipProvider } from "../../overlays/Tooltip/TooltipProvider.js";
|
|
@@ -23,6 +23,7 @@ import { columnCellClassName } from "./column-styles.js";
|
|
|
23
23
|
import { buildColumnTints, tintSlot } from "./column-tint.js";
|
|
24
24
|
import { ColumnResizer } from "./ColumnResizer.js";
|
|
25
25
|
import { isMenuEmpty, normalizeMenuAction } from "./row-menu.js";
|
|
26
|
+
import { buildTableBodyItems } from "./table-body-sections.js";
|
|
26
27
|
import { TableHeaderCell } from "./TableHeaderCell.js";
|
|
27
28
|
import { TableRow, TableRowDropIndicator } from "./TableRow.js";
|
|
28
29
|
import { TableRowLink } from "./TableRowLink.js";
|
|
@@ -56,10 +57,11 @@ function isCellControl(target, row) {
|
|
|
56
57
|
const control = target.closest(CELL_CONTROL_SELECTOR);
|
|
57
58
|
return control != null && control !== row;
|
|
58
59
|
}
|
|
59
|
-
function flatRowTabStop(restingRow, visibleRow, mountedRows, range) {
|
|
60
|
+
function flatRowTabStop(restingRow, visibleRow, mountedRows, range, recordIndices) {
|
|
60
61
|
if (!mountedRows || !restingRow) return restingRow;
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
const restingIndex = recordIndices?.[restingRow.index] ?? restingRow.index;
|
|
63
|
+
if (range && restingIndex >= range.startIndex && restingIndex <= range.endIndex) return restingRow;
|
|
64
|
+
return visibleRow && mountedRows.some((item) => item.index === (recordIndices?.[visibleRow.index] ?? visibleRow.index)) ? visibleRow : null;
|
|
63
65
|
}
|
|
64
66
|
function scrollerTabStop(hasCellSelection, hasRowNavigation, restingRow, tabStopRow) {
|
|
65
67
|
if (hasRowNavigation && restingRow && !tabStopRow) return 0;
|
|
@@ -139,10 +141,25 @@ const ESTIMATED_ROW_HEIGHT = {
|
|
|
139
141
|
large: 48,
|
|
140
142
|
xlarge: 56
|
|
141
143
|
};
|
|
144
|
+
const ESTIMATED_HEADER_HEIGHT = {
|
|
145
|
+
xsmall: 24,
|
|
146
|
+
small: 28,
|
|
147
|
+
medium: 32,
|
|
148
|
+
large: 40,
|
|
149
|
+
xlarge: 48
|
|
150
|
+
};
|
|
142
151
|
function pinStyle(column) {
|
|
143
152
|
if (column.pinOffset == null) return void 0;
|
|
144
153
|
return { ["--pin-offset"]: `${column.pinOffset}px` };
|
|
145
154
|
}
|
|
155
|
+
/** Reuse the adapter's measured scrollport; captions need no width observer. */
|
|
156
|
+
function sectionCaptionTokens(layout, tableWidth) {
|
|
157
|
+
if (!layout) return void 0;
|
|
158
|
+
return {
|
|
159
|
+
"$section-table-width": tableWidth != null ? `${tableWidth}px` : "100%",
|
|
160
|
+
"$section-viewport-width": layout.viewportWidth != null ? `${layout.viewportWidth}px` : "100%"
|
|
161
|
+
};
|
|
162
|
+
}
|
|
146
163
|
/** Default text keeps its tooltip tree while the virtual window moves. */
|
|
147
164
|
function TableCellContent(t0) {
|
|
148
165
|
const $ = c(8);
|
|
@@ -217,7 +234,7 @@ function renderTreeCellContent(entry, isExpanded, expandButtonProps, content) {
|
|
|
217
234
|
* bookkeeping and the tasty sub-element contract have a single implementation.
|
|
218
235
|
*/
|
|
219
236
|
function TableView(props) {
|
|
220
|
-
const { qa, rows, rowKeys, getRowKey, layout, columnHeaderPaths, onScrollerRef, rootRef, size = "medium", shape = "plain", rowSize, rowHeight, headerHeight, isHeaderHidden = false, isStriped = false, hasColumnDividers, isRowMoveAnimated = true, isHeaderSticky = true, isAutoHeight = false, isVirtualized = "auto", virtualizeThreshold = 50, overscan = 20, isLoading = false, loadingIndicator = "overlay", skeletonRowCount = 6, selection, selectionTooltip, overlay, rowMenu, rowContextMenu = false, onRowMenuAction, rowMenuTriggerProps, rowLink, onRowAction, onLoadMore, hasMore = false, isLoadingMore = false, loadMoreMargin, pinnedTopRows, pinnedBottomRows, cellSelection, rowNumberOffset = 0, rowIndexOffset = 0, totalRowCount, tree, isReorderable = false, dragState, dropState, collectionProps, isColumnReorderable = false, columnDragState, columnDropState, headCollectionProps, headRowRef, onColumnFocus, bodyRef, isResizable = false, onColumnResize, onColumnResizeEnd, emptyLabel, noResultsLabel, error, isFiltered = false, sortMode = "off", sort, sorts, onColumnSort, onColumnSortChange, columnContextMenu = true, onColumnMenuAction, columnMenuTriggerProps, columnMenuProps, getRowProps, headerPreset, contentPreset, toolbar, footer, ariaLabel, styles, headerStyles, headerCellStyles, bodyStyles, rowStyles, cellStyles, mods } = props;
|
|
237
|
+
const { qa, rows, rowKeys, sectionLayout, getRowKey, layout, columnHeaderPaths, onScrollerRef, rootRef, size = "medium", shape = "plain", rowSize, rowHeight, headerHeight, isHeaderHidden = false, isStriped = false, hasColumnDividers, isRowMoveAnimated = true, isHeaderSticky = true, isAutoHeight = false, isVirtualized = "auto", virtualizeThreshold = 50, overscan = 20, isLoading = false, loadingIndicator = "overlay", skeletonRowCount = 6, selection, selectionTooltip, overlay, rowMenu, rowContextMenu = false, onRowMenuAction, rowMenuTriggerProps, rowLink, onRowAction, onLoadMore, hasMore = false, isLoadingMore = false, loadMoreMargin, pinnedTopRows, pinnedBottomRows, cellSelection, rowNumberOffset = 0, rowIndexOffset = 0, totalRowCount, tree, isReorderable = false, dragState, dropState, collectionProps, isColumnReorderable = false, columnDragState, columnDropState, headCollectionProps, headRowRef, onColumnFocus, bodyRef, isResizable = false, onColumnResize, onColumnResizeEnd, emptyLabel, noResultsLabel, error, isFiltered = false, sortMode = "off", sort, sorts, onColumnSort, onColumnSortChange, columnContextMenu = true, onColumnMenuAction, columnMenuTriggerProps, columnMenuProps, getRowProps, headerPreset, contentPreset, toolbar, footer, ariaLabel, styles, headerStyles, headerCellStyles, bodyStyles, rowStyles, cellStyles, mods } = props;
|
|
221
238
|
const { columns } = layout;
|
|
222
239
|
useGlobalStyles(NATIVE_CELL_CONTROL_SELECTOR, rowLink ? NATIVE_CELL_CONTROL_STYLES : void 0);
|
|
223
240
|
const columnCount = columns.length;
|
|
@@ -250,9 +267,9 @@ function TableView(props) {
|
|
|
250
267
|
const headerRowCount = isHeaderHidden ? 0 : headerGroupDepth + 1;
|
|
251
268
|
const pinnedTopCount = pinnedTopRows?.length ?? 0;
|
|
252
269
|
const pinnedBottomCount = pinnedBottomRows?.length ?? 0;
|
|
253
|
-
const bodyRowCount = Math.max(totalRowCount ?? rows.length, rowIndexOffset + rows.length);
|
|
270
|
+
const bodyRowCount = sectionLayout?.rowCount ?? Math.max(totalRowCount ?? rows.length, rowIndexOffset + rows.length);
|
|
254
271
|
/** 1-based `aria-rowindex` for the i-th body row of the current page. */
|
|
255
|
-
const bodyRowIndex = (rowIndex) => headerRowCount + pinnedTopCount + rowIndexOffset + rowIndex + 1;
|
|
272
|
+
const bodyRowIndex = (rowIndex) => headerRowCount + pinnedTopCount + (sectionLayout?.rowIndices[rowIndex] ?? rowIndexOffset + rowIndex) + 1;
|
|
256
273
|
const bodyRowKey = (row, rowIndex) => rowKeys?.[rowIndex] ?? getRowKey(row, rowIndex);
|
|
257
274
|
const treeRowState = (rowIndex) => {
|
|
258
275
|
const entry = tree?.entries[rowIndex];
|
|
@@ -801,7 +818,7 @@ function TableView(props) {
|
|
|
801
818
|
...Object.fromEntries(Object.entries(extra?.mods ?? {}).filter(([, active]) => active).map(([name]) => [`data-${name}`, ""]))
|
|
802
819
|
};
|
|
803
820
|
}
|
|
804
|
-
function renderRow(row, rowIndex, isVirtual = false) {
|
|
821
|
+
function renderRow(row, rowIndex, isVirtual = false, virtualIndex = rowIndex) {
|
|
805
822
|
const { height, ...rowProps } = getRowElementProps(row, rowIndex);
|
|
806
823
|
const rowKey = bodyRowKey(row, rowIndex);
|
|
807
824
|
const treeNode = tree?.nodes[rowIndex];
|
|
@@ -810,7 +827,7 @@ function TableView(props) {
|
|
|
810
827
|
rowKey,
|
|
811
828
|
rowProps,
|
|
812
829
|
height,
|
|
813
|
-
index: isVirtual ?
|
|
830
|
+
index: isVirtual ? virtualIndex : void 0,
|
|
814
831
|
measureRef: isVirtual ? virtualizer.measureElement : void 0,
|
|
815
832
|
dragState: isReorderable ? dragState : void 0,
|
|
816
833
|
dropState: isReorderable ? dropState : void 0,
|
|
@@ -826,7 +843,7 @@ function TableView(props) {
|
|
|
826
843
|
return /* @__PURE__ */ jsx(TableRowLink, {
|
|
827
844
|
to: link,
|
|
828
845
|
children: render
|
|
829
|
-
}, rowProps["data-key"]);
|
|
846
|
+
}, `record:${rowProps["data-key"]}`);
|
|
830
847
|
}
|
|
831
848
|
function renderSpacerRow(height, position) {
|
|
832
849
|
if (height <= 0) return null;
|
|
@@ -846,9 +863,9 @@ function TableView(props) {
|
|
|
846
863
|
* The indicators render nothing unless a drag is in flight, so a table that
|
|
847
864
|
* is merely *capable* of dragging keeps its ordinary structure.
|
|
848
865
|
*/
|
|
849
|
-
function withDropIndicators(row, index, isVirtual = false) {
|
|
866
|
+
function withDropIndicators(row, index, isVirtual = false, virtualIndex = index) {
|
|
850
867
|
const rowKey = bodyRowKey(row, index);
|
|
851
|
-
const rowNode = renderRow(row, index, isVirtual);
|
|
868
|
+
const rowNode = renderRow(row, index, isVirtual, virtualIndex);
|
|
852
869
|
if (!isReorderable || !dropState) return rowNode;
|
|
853
870
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
854
871
|
/* @__PURE__ */ jsx(TableRowDropIndicator, {
|
|
@@ -871,17 +888,26 @@ function TableView(props) {
|
|
|
871
888
|
const showSkeleton = isLoading && loadingIndicator !== "none" && (!hasRows || loadingIndicator === "skeleton");
|
|
872
889
|
const showBlank = isLoading && !hasRows && loadingIndicator === "none";
|
|
873
890
|
const shouldVirtualize = !isAutoHeight && hasRows && error == null && (isVirtualized === true || isVirtualized === "auto" && rows.length > virtualizeThreshold);
|
|
874
|
-
const
|
|
891
|
+
const bodyItems = useMemo(() => sectionLayout ? buildTableBodyItems(rows.length, sectionLayout) : void 0, [rows.length, sectionLayout]);
|
|
892
|
+
const getItemKey = useCallback((index) => {
|
|
893
|
+
const item = bodyItems?.items[index];
|
|
894
|
+
if (item?.kind === "section") return `section:${typeof item.section.key}:${item.section.key}`;
|
|
895
|
+
const rowIndex = item?.rowIndex ?? index;
|
|
896
|
+
const key = String(rowKeys?.[rowIndex] ?? getRowKey(rows[rowIndex], rowIndex));
|
|
897
|
+
return bodyItems ? `record:${key}` : key;
|
|
898
|
+
}, [
|
|
875
899
|
rows,
|
|
876
900
|
rowKeys,
|
|
877
|
-
getRowKey
|
|
901
|
+
getRowKey,
|
|
902
|
+
bodyItems
|
|
878
903
|
]);
|
|
879
904
|
const estimatedRowHeight = (rowHeight ?? (rowSizeKey ? SIZES[rowSizeKey] : ESTIMATED_ROW_HEIGHT[size ?? "medium"])) + 1;
|
|
905
|
+
const estimatedSectionHeight = (headerHeight ?? ESTIMATED_HEADER_HEIGHT[size]) + 1;
|
|
880
906
|
const virtualizer = useVirtualizer({
|
|
881
|
-
count: shouldVirtualize ? rows.length : 0,
|
|
907
|
+
count: shouldVirtualize ? bodyItems?.items.length ?? rows.length : 0,
|
|
882
908
|
getScrollElement: () => scrollerRef.current,
|
|
883
909
|
getItemKey,
|
|
884
|
-
estimateSize: () => estimatedRowHeight,
|
|
910
|
+
estimateSize: (index) => bodyItems?.items[index]?.kind === "section" ? estimatedSectionHeight : estimatedRowHeight,
|
|
885
911
|
measureElement: (element) => element.getBoundingClientRect().height,
|
|
886
912
|
overscan
|
|
887
913
|
});
|
|
@@ -890,7 +916,11 @@ function TableView(props) {
|
|
|
890
916
|
virtualizer.measure();
|
|
891
917
|
virtualizer.getTotalSize();
|
|
892
918
|
localBodyRef.current?.querySelectorAll("tr[data-index]").forEach((element) => virtualizer.measureElement(element));
|
|
893
|
-
}, [
|
|
919
|
+
}, [
|
|
920
|
+
estimatedRowHeight,
|
|
921
|
+
estimatedSectionHeight,
|
|
922
|
+
virtualizer
|
|
923
|
+
]);
|
|
894
924
|
useTableTooltipRefresh(scrollerEl, virtualizer.isScrolling, refreshAppearance, resetRange);
|
|
895
925
|
const focusedTreeKey = tree?.state.selectionManager.focusedKey;
|
|
896
926
|
useEffect(() => {
|
|
@@ -975,7 +1005,11 @@ function TableView(props) {
|
|
|
975
1005
|
const focusedRowIndex = focusedRow.key == null ? -1 : rowIndexForKey(focusedRow.key);
|
|
976
1006
|
const restingIndex = focusedRowIndex >= 0 ? focusedRowIndex : Math.min(focusedRow.index, rows.length - 1);
|
|
977
1007
|
const restingRow = hasFlatRowNavigation ? focusableRowFrom(Math.max(restingIndex, 0), 1) ?? focusableRowFrom(restingIndex, -1) : null;
|
|
978
|
-
const tabStopRow = flatRowTabStop(restingRow, shouldVirtualize && virtualItems.length && hasFlatRowNavigation ? focusableRowFrom(virtualizer.range?.startIndex ?? virtualItems[0].index, 1) : null, shouldVirtualize ? virtualItems : void 0, virtualizer.range);
|
|
1008
|
+
const tabStopRow = flatRowTabStop(restingRow, shouldVirtualize && virtualItems.length && hasFlatRowNavigation ? focusableRowFrom(recordIndexAtItem(virtualizer.range?.startIndex ?? virtualItems[0].index), 1) : null, shouldVirtualize ? virtualItems : void 0, virtualizer.range, bodyItems?.recordIndices);
|
|
1009
|
+
function recordIndexAtItem(index) {
|
|
1010
|
+
const item = bodyItems?.items[index];
|
|
1011
|
+
return item?.kind === "section" ? item.section.rowIndex : item?.rowIndex ?? index;
|
|
1012
|
+
}
|
|
979
1013
|
function mountedRow(key) {
|
|
980
1014
|
return Array.from(localBodyRef.current?.querySelectorAll("tr[data-element=\"Row\"][data-key]") ?? []).find((element) => element.dataset.key === String(key));
|
|
981
1015
|
}
|
|
@@ -985,7 +1019,7 @@ function TableView(props) {
|
|
|
985
1019
|
setFocusedRow((current) => current.key === next.key && current.index === next.index ? current : next);
|
|
986
1020
|
selection?.selectionManager.setFocusedKey(next.key);
|
|
987
1021
|
if (shouldVirtualize) {
|
|
988
|
-
const offset = virtualizer.getOffsetForIndex(next.index, "auto")?.[0];
|
|
1022
|
+
const offset = virtualizer.getOffsetForIndex(bodyItems?.recordIndices[next.index] ?? next.index, "auto")?.[0];
|
|
989
1023
|
if (offset != null) virtualizer.scrollToOffset(offset);
|
|
990
1024
|
}
|
|
991
1025
|
const target = mountedRow(next.key);
|
|
@@ -1274,10 +1308,40 @@ function TableView(props) {
|
|
|
1274
1308
|
if (!hasRows) return renderStateRow(isFiltered ? noResultsLabel : emptyLabel);
|
|
1275
1309
|
if (shouldVirtualize) return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1276
1310
|
renderSpacerRow(paddingTop, "top"),
|
|
1277
|
-
virtualItems.map((v) =>
|
|
1311
|
+
virtualItems.map((v) => renderBodyItem(bodyItems?.items[v.index], v.index, true)),
|
|
1278
1312
|
renderSpacerRow(paddingBottom, "bottom")
|
|
1279
1313
|
] });
|
|
1280
|
-
return rows.map((row, index) => withDropIndicators(row, index));
|
|
1314
|
+
return bodyItems ? bodyItems.items.map((item, index) => renderBodyItem(item, index)) : rows.map((row, index) => withDropIndicators(row, index));
|
|
1315
|
+
}
|
|
1316
|
+
function renderBodyItem(item, index, isVirtual = false) {
|
|
1317
|
+
if (item?.kind !== "section") {
|
|
1318
|
+
const rowIndex = item?.rowIndex ?? index;
|
|
1319
|
+
return withDropIndicators(rows[rowIndex], rowIndex, isVirtual, index);
|
|
1320
|
+
}
|
|
1321
|
+
const { section } = item;
|
|
1322
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
1323
|
+
"data-element": "SectionRow",
|
|
1324
|
+
"data-section-key": String(section.key),
|
|
1325
|
+
role: "row",
|
|
1326
|
+
"aria-rowindex": headerRowCount + pinnedTopCount + section.index + 1,
|
|
1327
|
+
"data-index": isVirtual ? index : void 0,
|
|
1328
|
+
ref: isVirtual ? virtualizer.measureElement : void 0,
|
|
1329
|
+
children: Array.from({ length: Math.ceil(Math.max(columnCount, 1) / 1e3) }, (_, index) => /* @__PURE__ */ jsx("td", {
|
|
1330
|
+
"data-element": "SectionCell",
|
|
1331
|
+
role: index === 0 ? "gridcell" : "presentation",
|
|
1332
|
+
"aria-hidden": index > 0 || void 0,
|
|
1333
|
+
colSpan: Math.min(Math.max(columnCount, 1) - index * 1e3, 1e3),
|
|
1334
|
+
"aria-colindex": index === 0 ? 1 : void 0,
|
|
1335
|
+
"aria-colspan": index === 0 ? Math.max(columnCount, 1) : void 0,
|
|
1336
|
+
children: index === 0 ? /* @__PURE__ */ jsx("div", {
|
|
1337
|
+
"data-element": "SectionContent",
|
|
1338
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1339
|
+
"data-element": "SectionLabel",
|
|
1340
|
+
children: section.title
|
|
1341
|
+
})
|
|
1342
|
+
}) : null
|
|
1343
|
+
}, index))
|
|
1344
|
+
}, `section:${typeof section.key}:${section.key}`);
|
|
1281
1345
|
}
|
|
1282
1346
|
const bodyContent = renderBodyContent();
|
|
1283
1347
|
const tableContent = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -1330,6 +1394,7 @@ function TableView(props) {
|
|
|
1330
1394
|
ref: rootRef,
|
|
1331
1395
|
qa: qa || "Table",
|
|
1332
1396
|
styles: mergedStyles,
|
|
1397
|
+
tokens: sectionCaptionTokens(sectionLayout, layout.totalWidth),
|
|
1333
1398
|
mods: {
|
|
1334
1399
|
size,
|
|
1335
1400
|
shape,
|