@cube-dev/ui-kit 0.211.0 → 0.213.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 +36 -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.d.ts +2 -1
- package/dist/components/GridProvider.js +6 -4
- package/dist/components/GridProvider.js.map +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/AutoCollapseObserver.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/Button/index.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.d.ts +3 -2
- package/dist/components/actions/CommandMenu/CommandMenu.js +128 -131
- package/dist/components/actions/CommandMenu/CommandMenu.js.map +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 +4 -3
- package/dist/components/actions/Menu/MenuTrigger.js.map +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +4 -3
- package/dist/components/actions/Menu/SubMenuTrigger.js.map +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/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 +5 -1
- package/dist/components/content/Alert/Alert.js.map +1 -1
- package/dist/components/content/Alert/types.d.ts +8 -0
- package/dist/components/content/Alert/use-alert.js +24 -20
- package/dist/components/content/Alert/use-alert.js.map +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.d.ts +11 -1
- package/dist/components/content/Card/Card.js +52 -22
- package/dist/components/content/Card/Card.js.map +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 +6 -10
- package/dist/components/content/Item/ItemWithNativeLinks.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.d.ts +3 -2
- package/dist/components/content/Layout/Layout.js +12 -5
- package/dist/components/content/Layout/Layout.js.map +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.d.ts +3 -2
- package/dist/components/content/Layout/LayoutContainer.js +5 -3
- package/dist/components/content/Layout/LayoutContainer.js.map +1 -1
- package/dist/components/content/Layout/LayoutContent.d.ts +3 -2
- package/dist/components/content/Layout/LayoutContent.js +56 -45
- package/dist/components/content/Layout/LayoutContent.js.map +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 +3 -3
- package/dist/components/content/Layout/LayoutHeader.js.map +1 -1
- package/dist/components/content/Layout/LayoutPane.d.ts +3 -2
- package/dist/components/content/Layout/LayoutPane.js +66 -55
- package/dist/components/content/Layout/LayoutPane.js.map +1 -1
- package/dist/components/content/Layout/LayoutPanel.d.ts +3 -2
- package/dist/components/content/Layout/LayoutPanel.js +15 -8
- package/dist/components/content/Layout/LayoutPanel.js.map +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.d.ts +3 -2
- package/dist/components/content/Layout/LayoutPanelHeader.js +38 -68
- package/dist/components/content/Layout/LayoutPanelHeader.js.map +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.d.ts +3 -2
- package/dist/components/content/Placeholder/Placeholder.js +16 -37
- package/dist/components/content/Placeholder/Placeholder.js.map +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.d.ts +8 -0
- package/dist/components/content/Result/Result.js +8 -3
- package/dist/components/content/Result/Result.js.map +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 +11 -3
- package/dist/components/content/Tree/Tree.js.map +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/types.d.ts +3 -2
- 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 +3 -1
- package/dist/components/data/DataTable/DataTable.js.map +1 -1
- package/dist/components/data/DataTable/types.d.ts +3 -2
- package/dist/components/data/ItemTable/ItemTable.js +3 -1
- 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/item-table-sections.js +1 -1
- package/dist/components/data/ItemTable/types.d.ts +3 -2
- 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 +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 +7 -2
- 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 +1 -1
- package/dist/components/data/TableBase/table-body-sections.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.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/fields/Checkbox/Checkbox.d.ts +3 -2
- package/dist/components/fields/Checkbox/Checkbox.js +5 -6
- package/dist/components/fields/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.d.ts +3 -2
- package/dist/components/fields/Checkbox/CheckboxGroup.js +38 -31
- package/dist/components/fields/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.d.ts +3 -2
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js.map +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.d.ts +3 -2
- package/dist/components/fields/ColorPicker/ColorPicker.js +150 -137
- package/dist/components/fields/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.d.ts +3 -2
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +47 -28
- package/dist/components/fields/ColorSwatch/ColorSwatch.js.map +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.d.ts +3 -2
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +157 -135
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js.map +1 -1
- package/dist/components/fields/ComboBox/ComboBox.d.ts +3 -2
- package/dist/components/fields/ComboBox/ComboBox.js +240 -225
- 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/CalendarPopover.js +4 -3
- package/dist/components/fields/DatePicker/CalendarPopover.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInput.d.ts +3 -2
- package/dist/components/fields/DatePicker/DateInput.js +4 -1
- package/dist/components/fields/DatePicker/DateInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +108 -92
- package/dist/components/fields/DatePicker/DateInputBase.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePicker.d.ts +3 -2
- package/dist/components/fields/DatePicker/DatePicker.js +42 -32
- 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.d.ts +3 -2
- package/dist/components/fields/DatePicker/DateRangePicker.js +32 -27
- package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.d.ts +3 -2
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +185 -175
- 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.d.ts +3 -2
- package/dist/components/fields/DatePicker/PeriodPicker.js +97 -86
- 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.d.ts +3 -2
- package/dist/components/fields/DatePicker/TimeInput.js +4 -1
- 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.d.ts +3 -2
- package/dist/components/fields/FileInput/FileInput.js +104 -87
- package/dist/components/fields/FileInput/FileInput.js.map +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +3 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterListBox/styled.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.d.ts +2 -2
- package/dist/components/fields/FilterPicker/FilterPicker.js +4 -3
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +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.d.ts +3 -2
- package/dist/components/fields/ListBox/ListBox.js +15 -3
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/ListBox/empty-row.js +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +4 -3
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +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.d.ts +2 -2
- package/dist/components/fields/Picker/Picker.js +4 -3
- package/dist/components/fields/Picker/Picker.js.map +1 -1
- package/dist/components/fields/RadioGroup/Radio.d.ts +6 -5
- package/dist/components/fields/RadioGroup/Radio.js +113 -137
- package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.d.ts +3 -2
- package/dist/components/fields/RadioGroup/RadioGroup.js +67 -79
- package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/RadioGroup/joined-styles.js +100 -0
- package/dist/components/fields/RadioGroup/joined-styles.js.map +1 -0
- package/dist/components/fields/SearchComboBox/SearchComboBox.d.ts +3 -2
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +7 -3
- package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.d.ts +5 -3
- package/dist/components/fields/Select/Select.js +87 -69
- package/dist/components/fields/Select/Select.js.map +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 +44 -24
- 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 +3 -2
- package/dist/components/fields/Switch/Switch.d.ts +3 -2
- package/dist/components/fields/Switch/Switch.js +9 -3
- package/dist/components/fields/Switch/Switch.js.map +1 -1
- package/dist/components/fields/TagInput/TagInput.d.ts +3 -2
- package/dist/components/fields/TagInput/TagInput.js +5 -5
- package/dist/components/fields/TagInput/TagInput.js.map +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 +3 -2
- package/dist/components/fields/TextInput/TextInputBase.js +14 -3
- 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/ToggleGroup/ToggleGroup.d.ts +53 -0
- package/dist/components/fields/ToggleGroup/ToggleGroup.js +237 -0
- package/dist/components/fields/ToggleGroup/ToggleGroup.js.map +1 -0
- package/dist/components/fields/ToggleGroup/ToggleGroupItem.d.ts +29 -0
- package/dist/components/fields/ToggleGroup/ToggleGroupItem.js +166 -0
- package/dist/components/fields/ToggleGroup/ToggleGroupItem.js.map +1 -0
- package/dist/components/fields/ToggleGroup/context.d.ts +8 -0
- package/dist/components/fields/ToggleGroup/context.js +13 -0
- package/dist/components/fields/ToggleGroup/context.js.map +1 -0
- package/dist/components/fields/ToggleGroup/index.d.ts +5 -0
- 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/index.d.ts +5 -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.d.ts +3 -2
- package/dist/components/form/Form/Form.js +6 -4
- package/dist/components/form/Form/Form.js.map +1 -1
- package/dist/components/form/Form/FormContext.js +1 -1
- package/dist/components/form/Form/FormElement.js +1 -1
- package/dist/components/form/Form/ModernFormRoot.js +43 -40
- package/dist/components/form/Form/ModernFormRoot.js.map +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 +1 -1
- 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.d.ts +3 -2
- package/dist/components/form/Label.js +31 -26
- package/dist/components/form/Label.js.map +1 -1
- package/dist/components/form/field-chrome.js +1 -1
- package/dist/components/form/field-layout.js +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 +3 -2
- package/dist/components/layout/Panel.js.map +1 -1
- package/dist/components/layout/Prefix.d.ts +3 -2
- package/dist/components/layout/Prefix.js +22 -17
- package/dist/components/layout/Prefix.js.map +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.d.ts +3 -2
- package/dist/components/layout/Suffix.js +22 -17
- package/dist/components/layout/Suffix.js.map +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 +148 -143
- package/dist/components/navigation/Tabs/TabButton.js.map +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 +15 -5
- 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/segmented-styles.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.d.ts +4 -3
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/types.js.map +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +54 -101
- package/dist/components/navigation/Tabs/use-tab-indicator.js.map +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 +1 -1
- package/dist/components/overlays/Dialog/Dialog.d.ts +16 -3
- package/dist/components/overlays/Dialog/Dialog.js +13 -5
- package/dist/components/overlays/Dialog/Dialog.js.map +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 +8 -4
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +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 +1 -1
- 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.d.ts +3 -2
- package/dist/components/overlays/Tooltip/Tooltip.js +60 -28
- package/dist/components/overlays/Tooltip/Tooltip.js.map +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/TooltipTrigger.js.map +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 +3 -3
- package/dist/data/item-themes.js.map +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +30 -5
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/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 +4 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/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 +2 -2
- package/dist/tokens/base.js.map +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.d.ts +1 -1
- package/dist/tokens/colors.js +2 -2
- package/dist/tokens/colors.js.map +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 +12 -3
- package/dist/tokens/palette.js.map +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/layout-scale.js +25 -0
- package/dist/utils/layout-scale.js.map +1 -0
- 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/componentBaseProps.d.ts +9 -0
- package/dist/utils/react/componentBaseProps.js +15 -0
- package/dist/utils/react/componentBaseProps.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/utils/react/mergeProps.js +4 -2
- package/dist/utils/react/mergeProps.js.map +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/overlayKeyPropagation.js +1 -1
- package/dist/utils/react/pickBaseCustomizationProps.d.ts +2 -0
- package/dist/utils/react/pickBaseCustomizationProps.js +16 -0
- package/dist/utils/react/pickBaseCustomizationProps.js.map +1 -0
- 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/useOverlayPosition.js +75 -0
- package/dist/utils/react/useOverlayPosition.js.map +1 -0
- 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/BaseProperties.md +9 -4
- package/docs/CreateComponent.md +15 -8
- package/docs/Theming.md +2 -0
- package/docs/Usage.md +18 -0
- package/docs/components/GridProvider.md +1 -1
- package/docs/components/actions/Button.md +1 -1
- package/docs/components/actions/CommandMenu.md +1 -1
- package/docs/components/content/Alert.md +1 -0
- package/docs/components/content/Card.md +15 -1
- package/docs/components/content/Layout.md +21 -2
- package/docs/components/content/Result.md +2 -0
- package/docs/components/fields/ColorSwatchGroup.md +7 -5
- package/docs/components/fields/RadioGroup.md +13 -0
- package/docs/components/fields/ToggleGroup.md +227 -0
- package/docs/components/layout/Panel.md +1 -0
- package/docs/components/organisms/StatsCard.md +1 -0
- package/docs/components/overlays/AlertDialog.md +1 -0
- package/docs/components/overlays/Dialog.md +4 -1
- package/docs/components/overlays/DialogForm.md +1 -0
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
//#region src/components/navigation/Tabs/popover-placement.ts
|
|
3
3
|
/**
|
|
4
4
|
* Maps the parent Tabs `placement` to the popover placement for menus and
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
//#region src/components/navigation/Tabs/segmented-styles.ts
|
|
3
3
|
/**
|
|
4
4
|
* The track: the pill the segments sit on. Applied to `Tabs`' Bar and to the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { Item as _Item } from "../../content/Item/Item.js";
|
|
3
3
|
import { SEGMENTED_LIST_STYLES, SEGMENTED_SEGMENT_STYLES, SEGMENTED_TRACK_STYLES } from "./segmented-styles.js";
|
|
4
4
|
import { mergeStyles, tasty } from "@tenphi/tasty";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
import { ComponentBaseProps } from "../../../utils/react/componentBaseProps.js";
|
|
2
3
|
import { CubeItemActionProps } from "../../actions/ItemAction/ItemAction.js";
|
|
3
4
|
import { CubeMenuProps } from "../../actions/Menu/Menu.js";
|
|
4
5
|
import "../../actions/ItemAction/index.js";
|
|
5
6
|
import "../../actions/Menu/index.js";
|
|
6
7
|
import "../../content/Item/index.js";
|
|
7
8
|
import { CubeItemBaseProps as CubeItemProps } from "../../content/Item/Item.js";
|
|
8
|
-
import {
|
|
9
|
+
import { OuterStyleProps, Styles } from "@tenphi/tasty";
|
|
9
10
|
import { ReactNode } from "react";
|
|
10
11
|
//#region src/components/navigation/Tabs/types.d.ts
|
|
11
12
|
/** Visual appearance type for tabs */
|
|
@@ -40,7 +41,7 @@ export interface QAProps {
|
|
|
40
41
|
qaVal?: string;
|
|
41
42
|
}
|
|
42
43
|
/** Props from CubeItemProps that don't apply to Tab */
|
|
43
|
-
type OmittedItemProps = 'id' | 'type' | 'size' | 'theme' | 'shape' | 'description' | 'descriptionPlacement' | 'descriptionProps' | 'hotkeys' | 'keyboardShortcutProps' | 'labelProps' | 'labelRef' | 'level' | 'highlight' | 'highlightCaseSensitive' | 'highlightStyles' | 'variant' | 'htmlType' | 'isSelected' | 'preserveActionsSpace' | 'disableActionsFocus' | 'actions' | 'autoHideActions' | 'insideWrapper' | 'showActions' | 'skipActionsWidthTransition';
|
|
44
|
+
type OmittedItemProps = 'id' | 'type' | 'size' | 'theme' | 'element' | 'shape' | 'description' | 'descriptionPlacement' | 'descriptionProps' | 'hotkeys' | 'keyboardShortcutProps' | 'labelProps' | 'labelRef' | 'level' | 'highlight' | 'highlightCaseSensitive' | 'highlightStyles' | 'variant' | 'htmlType' | 'isSelected' | 'preserveActionsSpace' | 'disableActionsFocus' | 'actions' | 'autoHideActions' | 'insideWrapper' | 'showActions' | 'skipActionsWidthTransition';
|
|
44
45
|
/** Common styling props for tabs - inherits style props from CubeItemProps */
|
|
45
46
|
export interface TabStyleProps extends Omit<CubeItemProps, OmittedItemProps> {
|
|
46
47
|
/**
|
|
@@ -54,7 +55,7 @@ export interface TabStyleProps extends Omit<CubeItemProps, OmittedItemProps> {
|
|
|
54
55
|
}
|
|
55
56
|
/** Cache key type - primitives only for reliable comparison */
|
|
56
57
|
export type CacheKeyValue = string | number | boolean | null | undefined;
|
|
57
|
-
export interface CubeTabsProps extends
|
|
58
|
+
export interface CubeTabsProps extends ComponentBaseProps, OuterStyleProps, PanelBehaviorProps {
|
|
58
59
|
/** Controlled active tab key. When provided, component is controlled. */
|
|
59
60
|
activeKey?: string;
|
|
60
61
|
/** Initial active tab key for uncontrolled mode. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["BaseProps","OuterStyleProps","Styles","ReactNode","CubeItemActionProps","CubeMenuProps","CubeItemProps","TabType","TabPlacement","TabsActionPosition","TabSize","RADIO_SIZE_MAP","Record","medium","large","TabContextMenu","PanelBehaviorProps","prerender","keepMounted","QAProps","qa","qaVal","OmittedItemProps","TabStyleProps","Omit","size","autoHideActions","CacheKeyValue","CubeTabsProps","activeKey","defaultActiveKey","type","placement","label","prefix","suffix","onChange","key","onDelete","onTitleChange","newTitle","isEditable","menu","menuTriggerProps","Partial","menuProps","contextMenu","onAction","action","tabKey","styles","children","renderPanel","panelCacheKeys","isReorderable","keyOrder","onReorder","newOrder","showTabPicker","showScrollArrows","tabPickerPosition","scrollArrowsPosition","hideTabListScroll","tabListPadding","barStyles","tabListStyles","prefixStyles","suffixStyles","CubeTabProps","id","title","isDisabled","actions","CubeTabPanelProps","CubeTabListProps","ParsedTab","content","ParsedPanel"],"sources":["../../../../src/components/navigation/Tabs/types.ts"],"sourcesContent":["import type { BaseProps, OuterStyleProps, Styles } from '@tenphi/tasty';\nimport type { ReactNode } from 'react';\nimport type { CubeItemActionProps } from '../../actions/ItemAction';\nimport type { CubeMenuProps } from '../../actions/Menu';\nimport type { CubeItemProps } from '../../content/Item';\n\n// =============================================================================\n// Core Types\n// =============================================================================\n\n/** Visual appearance type for tabs */\nexport type TabType = 'default' | 'narrow' | 'file' | 'radio';\n\n/**\n * Where the tab bar sits relative to its panels.\n * - `'top'` / `'bottom'` keep the bar horizontal.\n * - `'left'` / `'right'` switch it to a vertical strip.\n */\nexport type TabPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n/** Position for TabPicker and scroll arrows */\nexport type TabsActionPosition = 'prefix' | 'suffix';\n\n/**\n * Tab size options.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n */\nexport type TabSize = 'xsmall' | 'small' | 'medium' | 'large';\n\n/**\n * Size mapping for radio type tabs.\n * API sizes mapped to Item button sizes:\n * medium (default) -> xsmall (32px total), large -> medium (40px total).\n */\nexport const RADIO_SIZE_MAP: Record<'medium' | 'large', TabSize> = {\n medium: 'xsmall',\n large: 'medium',\n};\n\n/** How the tab `menu` is exposed alongside or instead of the overflow trigger. */\nexport type TabContextMenu = boolean | 'context-only';\n\n// =============================================================================\n// Shared Props Interfaces\n// =============================================================================\n\n/** Common props for panel rendering behavior */\nexport interface PanelBehaviorProps {\n /** If true, panel is rendered but hidden when not active. */\n prerender?: boolean;\n /** If true, once visited the panel stays in DOM. */\n keepMounted?: boolean;\n}\n\n/** Common props for QA attributes */\nexport interface QAProps {\n /** QA selector attribute. */\n qa?: string;\n /** Additional QA value attribute. */\n qaVal?: string;\n}\n\n// =============================================================================\n// Tab Style Props\n// =============================================================================\n\n/** Props from CubeItemProps that don't apply to Tab */\ntype OmittedItemProps =\n | 'id' // Tab has its own id as Key type\n | 'type' // Type is decided at the Tabs level, never per-tab\n | 'size' // Tab has its own TabSize\n | 'theme' // Tabs have internal theming\n | 'shape' // Tabs have internal shape logic\n | 'description' // Tabs don't have descriptions\n | 'descriptionPlacement'\n | 'descriptionProps'\n | 'hotkeys' // Tabs have their own keyboard navigation\n | 'keyboardShortcutProps'\n | 'labelProps' // Tabs use title prop instead\n | 'labelRef'\n | 'level' // Tabs don't use heading levels\n | 'highlight' // Tabs don't use highlighting\n | 'highlightCaseSensitive'\n | 'highlightStyles'\n | 'variant' // Tabs have internal variant logic\n | 'htmlType' // Tab is always a button\n | 'isSelected' // Handled internally by state\n | 'preserveActionsSpace' // Set internally in TabButton\n | 'disableActionsFocus' // Not used in Tab\n | 'actions' // Tab has its own actions definition\n | 'autoHideActions' // Tab has its own autoHideActions\n | 'insideWrapper' // Internal Item wrapper prop\n | 'showActions' // Internal Item wrapper prop\n | 'skipActionsWidthTransition'; // Internal Item wrapper prop\n\n/** Common styling props for tabs - inherits style props from CubeItemProps */\nexport interface TabStyleProps extends Omit<CubeItemProps, OmittedItemProps> {\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type supports 'medium' (default, 32px) and 'large' (40px),\n * mapped to Item button sizes xsmall (24px) and medium (32px).\n */\n size?: TabSize;\n /** Whether to show actions only on hover. */\n autoHideActions?: boolean;\n}\n\n// =============================================================================\n// Component Props\n// =============================================================================\n\n/** Cache key type - primitives only for reliable comparison */\nexport type CacheKeyValue = string | number | boolean | null | undefined;\n\nexport interface CubeTabsProps\n extends BaseProps, OuterStyleProps, PanelBehaviorProps {\n /** Controlled active tab key. When provided, component is controlled. */\n activeKey?: string;\n /** Initial active tab key for uncontrolled mode. */\n defaultActiveKey?: string;\n /**\n * Visual appearance type for tabs.\n * - `default` - Standard tabs with selection indicator below (default)\n * - `narrow` - Same as default but with collapsed vertical padding on labels\n * - `file` - File-style tabs with border bottom highlight on selection, delimiter between tabs\n * - `radio` - Radio button style for tab selection\n * @default 'default'\n */\n type?: TabType;\n /**\n * Where the tab bar sits relative to its panels.\n * `'top'` / `'bottom'` keep the bar horizontal; `'left'` / `'right'`\n * switch it to a vertical strip. The selection indicator, scroll behavior,\n * fades, and per-type visuals all adapt automatically.\n * @default 'top'\n */\n placement?: TabPlacement;\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type supports 'medium' (default, 32px) and 'large' (40px),\n * mapped to Item button sizes xsmall (24px) and medium (32px).\n * @default 'medium'\n */\n size?: TabSize;\n /** Accessible label for the tab list. */\n label?: string;\n /** Content rendered before the tab list. */\n prefix?: ReactNode;\n /** Content rendered after the tab list. */\n suffix?: ReactNode;\n /** Callback when active tab changes. */\n onChange?: (key: string) => void;\n /** Callback when tab delete button is clicked. Presence enables delete buttons. */\n onDelete?: (key: string) => void;\n /** Callback when a tab title is changed. Enables title editing on tabs with isEditable. */\n onTitleChange?: (key: string, newTitle: string) => void;\n /** Whether to show tab actions only on hover. Can be overridden per-tab. */\n autoHideActions?: boolean;\n /**\n * Whether tabs are editable by default.\n * Can be overridden per-tab via Tab's isEditable prop.\n * @default false\n */\n isEditable?: boolean;\n /**\n * Default menu items for all tabs.\n * Can be overridden per-tab via Tab's menu prop.\n * Set to `null` on individual Tab to disable menu for that tab.\n */\n menu?: ReactNode;\n /**\n * Default props for the menu trigger button.\n * Can be overridden per-tab via Tab's menuTriggerProps prop.\n * @default { icon: <MoreIcon /> }\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Default props passed to the Menu component.\n * Can be overridden per-tab via Tab's menuProps prop.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Context menu / overflow behavior for tab `menu` items.\n * - `false` (default) — overflow trigger only; no right-click menu\n * - `true` — overflow trigger and right-click menu\n * - `'context-only'` — right-click menu only; no overflow trigger. Inline close\n * (`onDelete`) shows even when `menu` is non-empty, like tabs without a menu.\n * Can be overridden per-tab via Tab's contextMenu prop.\n * @default false\n */\n contextMenu?: TabContextMenu;\n /**\n * Callback when a menu action is triggered on any tab.\n * Called with the action key and the tab key.\n * Tab-level onAction is called first, then this.\n */\n onAction?: (action: string, tabKey: string) => void;\n /** Custom tasty styles for the tab bar container. */\n styles?: Styles;\n /** QA selector attribute. */\n qa?: string;\n /** Tab components or Tabs.List with Tabs.Panel. */\n children?: ReactNode;\n /**\n * Functional content renderer for optimized lazy evaluation.\n * When provided, panel content is only evaluated for the active tab,\n * while inactive tabs use cached content.\n */\n renderPanel?: (key: string) => ReactNode;\n /**\n * Cache keys for individual panels. Enables caching for specified panels.\n */\n panelCacheKeys?: Record<string | number, CacheKeyValue>;\n /**\n * Enable drag-and-drop tab reordering.\n * When a tab picker is shown (`showTabPicker`), reordering is automatically\n * enabled in the picker dropdown as well.\n * @default false\n */\n isReorderable?: boolean;\n /**\n * Controlled order of tab keys.\n * When provided, tabs are displayed in this order.\n */\n keyOrder?: string[];\n /**\n * Callback when tabs are reordered via drag-and-drop.\n */\n onReorder?: (newOrder: string[]) => void;\n /**\n * Whether to show a tab picker dropdown in the suffix area.\n * - `true` - always show the tab picker\n * - `false` - never show the tab picker (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showTabPicker?: boolean | 'auto';\n /**\n * Whether to show scroll arrow buttons in the suffix area.\n * - `true` - always show scroll arrows\n * - `false` - never show scroll arrows (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showScrollArrows?: boolean | 'auto';\n /**\n * Position of the tab picker dropdown.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n tabPickerPosition?: TabsActionPosition;\n /**\n * Position of the scroll arrow buttons.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n scrollArrowsPosition?: TabsActionPosition;\n /**\n * Visually hide the custom horizontal scrollbar in the tab list\n * and skip its tracking logic. Does not affect tab picker, scroll arrows,\n * or fade indicators — only the tiny scrollbar visual.\n * @default false\n */\n hideTabListScroll?: boolean;\n /**\n * Inline padding for the tab list container.\n * Sets horizontal padding only (e.g., \"2x\" → padding: \"0 2x\").\n */\n tabListPadding?: string;\n /** Custom tasty styles for the tab bar (Bar sub-element). */\n barStyles?: Styles;\n /** Custom tasty styles for the TabList sub-element. */\n tabListStyles?: Styles;\n /** Custom tasty styles for the Prefix sub-element. */\n prefixStyles?: Styles;\n /** Custom tasty styles for the Suffix sub-element. */\n suffixStyles?: Styles;\n}\n\nexport interface CubeTabProps extends TabStyleProps, PanelBehaviorProps {\n /**\n * Unique identifier for the tab.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /**\n * Content displayed in the tab button. Optional for icon-only tabs\n * (`icon` / `rightIcon`). When omitted, provide an `aria-label` (and\n * typically a `tooltip`) so the tab has an accessible name.\n */\n title?: ReactNode;\n /** Panel content rendered when tab is active. */\n children?: ReactNode;\n /** Disables the tab (cannot be selected). */\n isDisabled?: boolean;\n /** Actions to render in the tab. Rendered before menu trigger if tab has menu. */\n actions?: ReactNode;\n /** Whether the tab title can be edited. Overrides the Tabs-level isEditable default. */\n isEditable?: boolean;\n /** Callback when this tab's title is changed. Overrides parent's onTitleChange. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Menu items to display in a dropdown menu on the tab.\n * Pass Menu.Item elements directly - they will be wrapped in a Menu internally.\n * Overrides the Tabs-level menu default. Set to `null` to disable menu.\n */\n menu?: ReactNode | null;\n /**\n * Props to customize the menu trigger button.\n * Overrides the Tabs-level menuTriggerProps default.\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Props passed to the Menu component.\n * Overrides the Tabs-level menuProps default.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Context menu / overflow behavior. Same values as Tabs `contextMenu`.\n * Uses the same menu items as `menu` prop.\n * @default false\n */\n contextMenu?: TabContextMenu;\n /**\n * Callback when a menu action is triggered.\n * Called with the action key from Menu.Item.\n */\n onAction?: (action: string) => void;\n}\n\nexport interface CubeTabPanelProps extends PanelBehaviorProps, QAProps {\n /**\n * Panel identifier. Must match a Tab's id.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /** Panel content. */\n children?: ReactNode;\n /** Custom tasty styles for the panel container. */\n styles?: Styles;\n}\n\nexport interface CubeTabListProps extends QAProps {\n /** Tab components. */\n children?: ReactNode;\n}\n\n// =============================================================================\n// Internal Types\n// =============================================================================\n\n/**\n * Internal representation of a parsed Tab.\n * Uses `content` instead of `children` to distinguish panel content.\n */\nexport interface ParsedTab extends Omit<CubeTabProps, 'id' | 'children'> {\n /** Tab key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from Tab's children prop */\n content: ReactNode;\n}\n\n/**\n * Internal representation of a parsed TabPanel.\n */\nexport interface ParsedPanel extends Omit<\n CubeTabPanelProps,\n 'id' | 'children'\n> {\n /** Panel key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from TabPanel's children prop */\n content: ReactNode;\n}\n"],"mappings":";;;;;;;AAkCA,MAAaW,iBAAsD;CACjEE,QAAQ;CACRC,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["OuterStyleProps","Styles","ReactNode","ComponentBaseProps","CubeItemActionProps","CubeMenuProps","CubeItemProps","TabType","TabPlacement","TabsActionPosition","TabSize","RADIO_SIZE_MAP","Record","medium","large","TabContextMenu","PanelBehaviorProps","prerender","keepMounted","QAProps","qa","qaVal","OmittedItemProps","TabStyleProps","Omit","size","autoHideActions","CacheKeyValue","CubeTabsProps","activeKey","defaultActiveKey","type","placement","label","prefix","suffix","onChange","key","onDelete","onTitleChange","newTitle","isEditable","menu","menuTriggerProps","Partial","menuProps","contextMenu","onAction","action","tabKey","styles","children","renderPanel","panelCacheKeys","isReorderable","keyOrder","onReorder","newOrder","showTabPicker","showScrollArrows","tabPickerPosition","scrollArrowsPosition","hideTabListScroll","tabListPadding","barStyles","tabListStyles","prefixStyles","suffixStyles","CubeTabProps","id","title","isDisabled","actions","CubeTabPanelProps","CubeTabListProps","ParsedTab","content","ParsedPanel"],"sources":["../../../../src/components/navigation/Tabs/types.ts"],"sourcesContent":["import type { OuterStyleProps, Styles } from '@tenphi/tasty';\nimport type { ReactNode } from 'react';\nimport type { ComponentBaseProps } from '../../../utils/react/componentBaseProps';\nimport type { CubeItemActionProps } from '../../actions/ItemAction';\nimport type { CubeMenuProps } from '../../actions/Menu';\nimport type { CubeItemProps } from '../../content/Item';\n\n// =============================================================================\n// Core Types\n// =============================================================================\n\n/** Visual appearance type for tabs */\nexport type TabType = 'default' | 'narrow' | 'file' | 'radio';\n\n/**\n * Where the tab bar sits relative to its panels.\n * - `'top'` / `'bottom'` keep the bar horizontal.\n * - `'left'` / `'right'` switch it to a vertical strip.\n */\nexport type TabPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n/** Position for TabPicker and scroll arrows */\nexport type TabsActionPosition = 'prefix' | 'suffix';\n\n/**\n * Tab size options.\n * Radio type only supports 'medium' | 'large' (mapped to smaller Item sizes).\n */\nexport type TabSize = 'xsmall' | 'small' | 'medium' | 'large';\n\n/**\n * Size mapping for radio type tabs.\n * API sizes mapped to Item button sizes:\n * medium (default) -> xsmall (32px total), large -> medium (40px total).\n */\nexport const RADIO_SIZE_MAP: Record<'medium' | 'large', TabSize> = {\n medium: 'xsmall',\n large: 'medium',\n};\n\n/** How the tab `menu` is exposed alongside or instead of the overflow trigger. */\nexport type TabContextMenu = boolean | 'context-only';\n\n// =============================================================================\n// Shared Props Interfaces\n// =============================================================================\n\n/** Common props for panel rendering behavior */\nexport interface PanelBehaviorProps {\n /** If true, panel is rendered but hidden when not active. */\n prerender?: boolean;\n /** If true, once visited the panel stays in DOM. */\n keepMounted?: boolean;\n}\n\n/** Common props for QA attributes */\nexport interface QAProps {\n /** QA selector attribute. */\n qa?: string;\n /** Additional QA value attribute. */\n qaVal?: string;\n}\n\n// =============================================================================\n// Tab Style Props\n// =============================================================================\n\n/** Props from CubeItemProps that don't apply to Tab */\ntype OmittedItemProps =\n | 'id' // Tab has its own id as Key type\n | 'type' // Type is decided at the Tabs level, never per-tab\n | 'size' // Tab has its own TabSize\n | 'theme' // Tabs have internal theming\n | 'element' // Tabs own their slot names\n | 'shape' // Tabs have internal shape logic\n | 'description' // Tabs don't have descriptions\n | 'descriptionPlacement'\n | 'descriptionProps'\n | 'hotkeys' // Tabs have their own keyboard navigation\n | 'keyboardShortcutProps'\n | 'labelProps' // Tabs use title prop instead\n | 'labelRef'\n | 'level' // Tabs don't use heading levels\n | 'highlight' // Tabs don't use highlighting\n | 'highlightCaseSensitive'\n | 'highlightStyles'\n | 'variant' // Tabs have internal variant logic\n | 'htmlType' // Tab is always a button\n | 'isSelected' // Handled internally by state\n | 'preserveActionsSpace' // Set internally in TabButton\n | 'disableActionsFocus' // Not used in Tab\n | 'actions' // Tab has its own actions definition\n | 'autoHideActions' // Tab has its own autoHideActions\n | 'insideWrapper' // Internal Item wrapper prop\n | 'showActions' // Internal Item wrapper prop\n | 'skipActionsWidthTransition'; // Internal Item wrapper prop\n\n/** Common styling props for tabs - inherits style props from CubeItemProps */\nexport interface TabStyleProps extends Omit<CubeItemProps, OmittedItemProps> {\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type supports 'medium' (default, 32px) and 'large' (40px),\n * mapped to Item button sizes xsmall (24px) and medium (32px).\n */\n size?: TabSize;\n /** Whether to show actions only on hover. */\n autoHideActions?: boolean;\n}\n\n// =============================================================================\n// Component Props\n// =============================================================================\n\n/** Cache key type - primitives only for reliable comparison */\nexport type CacheKeyValue = string | number | boolean | null | undefined;\n\nexport interface CubeTabsProps\n extends ComponentBaseProps, OuterStyleProps, PanelBehaviorProps {\n /** Controlled active tab key. When provided, component is controlled. */\n activeKey?: string;\n /** Initial active tab key for uncontrolled mode. */\n defaultActiveKey?: string;\n /**\n * Visual appearance type for tabs.\n * - `default` - Standard tabs with selection indicator below (default)\n * - `narrow` - Same as default but with collapsed vertical padding on labels\n * - `file` - File-style tabs with border bottom highlight on selection, delimiter between tabs\n * - `radio` - Radio button style for tab selection\n * @default 'default'\n */\n type?: TabType;\n /**\n * Where the tab bar sits relative to its panels.\n * `'top'` / `'bottom'` keep the bar horizontal; `'left'` / `'right'`\n * switch it to a vertical strip. The selection indicator, scroll behavior,\n * fades, and per-type visuals all adapt automatically.\n * @default 'top'\n */\n placement?: TabPlacement;\n /**\n * Tab size. Supports 'xsmall', 'small', 'medium', 'large'.\n * Radio type supports 'medium' (default, 32px) and 'large' (40px),\n * mapped to Item button sizes xsmall (24px) and medium (32px).\n * @default 'medium'\n */\n size?: TabSize;\n /** Accessible label for the tab list. */\n label?: string;\n /** Content rendered before the tab list. */\n prefix?: ReactNode;\n /** Content rendered after the tab list. */\n suffix?: ReactNode;\n /** Callback when active tab changes. */\n onChange?: (key: string) => void;\n /** Callback when tab delete button is clicked. Presence enables delete buttons. */\n onDelete?: (key: string) => void;\n /** Callback when a tab title is changed. Enables title editing on tabs with isEditable. */\n onTitleChange?: (key: string, newTitle: string) => void;\n /** Whether to show tab actions only on hover. Can be overridden per-tab. */\n autoHideActions?: boolean;\n /**\n * Whether tabs are editable by default.\n * Can be overridden per-tab via Tab's isEditable prop.\n * @default false\n */\n isEditable?: boolean;\n /**\n * Default menu items for all tabs.\n * Can be overridden per-tab via Tab's menu prop.\n * Set to `null` on individual Tab to disable menu for that tab.\n */\n menu?: ReactNode;\n /**\n * Default props for the menu trigger button.\n * Can be overridden per-tab via Tab's menuTriggerProps prop.\n * @default { icon: <MoreIcon /> }\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Default props passed to the Menu component.\n * Can be overridden per-tab via Tab's menuProps prop.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Context menu / overflow behavior for tab `menu` items.\n * - `false` (default) — overflow trigger only; no right-click menu\n * - `true` — overflow trigger and right-click menu\n * - `'context-only'` — right-click menu only; no overflow trigger. Inline close\n * (`onDelete`) shows even when `menu` is non-empty, like tabs without a menu.\n * Can be overridden per-tab via Tab's contextMenu prop.\n * @default false\n */\n contextMenu?: TabContextMenu;\n /**\n * Callback when a menu action is triggered on any tab.\n * Called with the action key and the tab key.\n * Tab-level onAction is called first, then this.\n */\n onAction?: (action: string, tabKey: string) => void;\n /** Custom tasty styles for the tab bar container. */\n styles?: Styles;\n /** QA selector attribute. */\n qa?: string;\n /** Tab components or Tabs.List with Tabs.Panel. */\n children?: ReactNode;\n /**\n * Functional content renderer for optimized lazy evaluation.\n * When provided, panel content is only evaluated for the active tab,\n * while inactive tabs use cached content.\n */\n renderPanel?: (key: string) => ReactNode;\n /**\n * Cache keys for individual panels. Enables caching for specified panels.\n */\n panelCacheKeys?: Record<string | number, CacheKeyValue>;\n /**\n * Enable drag-and-drop tab reordering.\n * When a tab picker is shown (`showTabPicker`), reordering is automatically\n * enabled in the picker dropdown as well.\n * @default false\n */\n isReorderable?: boolean;\n /**\n * Controlled order of tab keys.\n * When provided, tabs are displayed in this order.\n */\n keyOrder?: string[];\n /**\n * Callback when tabs are reordered via drag-and-drop.\n */\n onReorder?: (newOrder: string[]) => void;\n /**\n * Whether to show a tab picker dropdown in the suffix area.\n * - `true` - always show the tab picker\n * - `false` - never show the tab picker (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showTabPicker?: boolean | 'auto';\n /**\n * Whether to show scroll arrow buttons in the suffix area.\n * - `true` - always show scroll arrows\n * - `false` - never show scroll arrows (default)\n * - `'auto'` - show only when tabs overflow (has horizontal scroll)\n * @default false\n */\n showScrollArrows?: boolean | 'auto';\n /**\n * Position of the tab picker dropdown.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n tabPickerPosition?: TabsActionPosition;\n /**\n * Position of the scroll arrow buttons.\n * - `'prefix'` - render in the prefix slot (before tab list)\n * - `'suffix'` - render in the suffix slot (after tab list)\n * @default 'suffix'\n */\n scrollArrowsPosition?: TabsActionPosition;\n /**\n * Visually hide the custom horizontal scrollbar in the tab list\n * and skip its tracking logic. Does not affect tab picker, scroll arrows,\n * or fade indicators — only the tiny scrollbar visual.\n * @default false\n */\n hideTabListScroll?: boolean;\n /**\n * Inline padding for the tab list container.\n * Sets horizontal padding only (e.g., \"2x\" → padding: \"0 2x\").\n */\n tabListPadding?: string;\n /** Custom tasty styles for the tab bar (Bar sub-element). */\n barStyles?: Styles;\n /** Custom tasty styles for the TabList sub-element. */\n tabListStyles?: Styles;\n /** Custom tasty styles for the Prefix sub-element. */\n prefixStyles?: Styles;\n /** Custom tasty styles for the Suffix sub-element. */\n suffixStyles?: Styles;\n}\n\nexport interface CubeTabProps extends TabStyleProps, PanelBehaviorProps {\n /**\n * Unique identifier for the tab.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /**\n * Content displayed in the tab button. Optional for icon-only tabs\n * (`icon` / `rightIcon`). When omitted, provide an `aria-label` (and\n * typically a `tooltip`) so the tab has an accessible name.\n */\n title?: ReactNode;\n /** Panel content rendered when tab is active. */\n children?: ReactNode;\n /** Disables the tab (cannot be selected). */\n isDisabled?: boolean;\n /** Actions to render in the tab. Rendered before menu trigger if tab has menu. */\n actions?: ReactNode;\n /** Whether the tab title can be edited. Overrides the Tabs-level isEditable default. */\n isEditable?: boolean;\n /** Callback when this tab's title is changed. Overrides parent's onTitleChange. */\n onTitleChange?: (newTitle: string) => void;\n /**\n * Menu items to display in a dropdown menu on the tab.\n * Pass Menu.Item elements directly - they will be wrapped in a Menu internally.\n * Overrides the Tabs-level menu default. Set to `null` to disable menu.\n */\n menu?: ReactNode | null;\n /**\n * Props to customize the menu trigger button.\n * Overrides the Tabs-level menuTriggerProps default.\n */\n menuTriggerProps?: Partial<CubeItemActionProps>;\n /**\n * Props passed to the Menu component.\n * Overrides the Tabs-level menuProps default.\n */\n menuProps?: Partial<CubeMenuProps<object>>;\n /**\n * Context menu / overflow behavior. Same values as Tabs `contextMenu`.\n * Uses the same menu items as `menu` prop.\n * @default false\n */\n contextMenu?: TabContextMenu;\n /**\n * Callback when a menu action is triggered.\n * Called with the action key from Menu.Item.\n */\n onAction?: (action: string) => void;\n}\n\nexport interface CubeTabPanelProps extends PanelBehaviorProps, QAProps {\n /**\n * Panel identifier. Must match a Tab's id.\n * Auto-injected from the React `key` prop (converted to string).\n */\n id?: string;\n /** Panel content. */\n children?: ReactNode;\n /** Custom tasty styles for the panel container. */\n styles?: Styles;\n}\n\nexport interface CubeTabListProps extends QAProps {\n /** Tab components. */\n children?: ReactNode;\n}\n\n// =============================================================================\n// Internal Types\n// =============================================================================\n\n/**\n * Internal representation of a parsed Tab.\n * Uses `content` instead of `children` to distinguish panel content.\n */\nexport interface ParsedTab extends Omit<CubeTabProps, 'id' | 'children'> {\n /** Tab key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from Tab's children prop */\n content: ReactNode;\n}\n\n/**\n * Internal representation of a parsed TabPanel.\n */\nexport interface ParsedPanel extends Omit<\n CubeTabPanelProps,\n 'id' | 'children'\n> {\n /** Panel key (always a string internally for React Aria compatibility) */\n key: string;\n /** Panel content extracted from TabPanel's children prop */\n content: ReactNode;\n}\n"],"mappings":";;;;;;;AAmCA,MAAaW,iBAAsD;CACjEE,QAAQ;CACRC,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
//#region src/components/navigation/Tabs/use-tab-editing.ts
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
2
|
-
import {
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect$1 } from "../../../utils/react/useLayoutEffect.js";
|
|
3
|
+
import { getLayoutScale } from "../../../utils/layout-scale.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import {
|
|
5
|
+
import { useEffectEvent, useState } from "react";
|
|
5
6
|
//#region src/components/navigation/Tabs/use-tab-indicator.ts
|
|
6
7
|
/**
|
|
7
8
|
* Hook to track and animate tab indicator position.
|
|
@@ -10,126 +11,78 @@ import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
|
10
11
|
* along the orientation axis. Returns null if disabled (e.g., for
|
|
11
12
|
* non-default/narrow tab types).
|
|
12
13
|
*
|
|
13
|
-
* @param
|
|
14
|
+
* @param container - The tab list element. An element rather than a ref, so a
|
|
15
|
+
* list that is replaced by a new one is watched in its place.
|
|
14
16
|
* @param selectedKey - Currently selected tab key
|
|
15
17
|
* @param enabled - Whether the indicator should be shown
|
|
16
18
|
* @param orientation - Axis along which the indicator moves
|
|
17
19
|
* @param orderToken - Optional token that changes when tab order changes (triggers recalculation)
|
|
18
20
|
* @returns Indicator style (`start`, `size`) or null if disabled/not ready
|
|
19
21
|
*/
|
|
20
|
-
function useTabIndicator(
|
|
21
|
-
const $ = c(
|
|
22
|
+
function useTabIndicator(container, selectedKey, enabled, t0, orderToken) {
|
|
23
|
+
const $ = c(13);
|
|
22
24
|
const orientation = t0 === void 0 ? "horizontal" : t0;
|
|
23
25
|
const [style, setStyle] = useState(null);
|
|
24
|
-
|
|
26
|
+
if (!enabled && style) setStyle(null);
|
|
25
27
|
let t1;
|
|
26
|
-
if ($[0] !==
|
|
27
|
-
t1 = () => {
|
|
28
|
-
|
|
28
|
+
if ($[0] !== orientation || $[1] !== selectedKey) {
|
|
29
|
+
t1 = (container_0) => {
|
|
30
|
+
const selectedTab = container_0.querySelector("[aria-selected=\"true\"]");
|
|
31
|
+
if (selectedKey == null || !selectedTab) {
|
|
29
32
|
setStyle(null);
|
|
30
33
|
return;
|
|
31
34
|
}
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
setStyle(null);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const containerRect = containerRef.current.getBoundingClientRect();
|
|
35
|
+
const isVertical = orientation === "vertical";
|
|
36
|
+
const containerRect = container_0.getBoundingClientRect();
|
|
38
37
|
const tabRect = selectedTab.getBoundingClientRect();
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
const tabSize = isVertical ? tabRect.height : tabRect.width;
|
|
39
|
+
if (tabSize <= 0) return;
|
|
40
|
+
const scale = getLayoutScale(container_0, orientation);
|
|
41
|
+
const offset = isVertical ? tabRect.top - containerRect.top : tabRect.left - containerRect.left;
|
|
42
|
+
const scroll = isVertical ? container_0.scrollTop : container_0.scrollLeft;
|
|
43
|
+
const start = offset / scale + scroll;
|
|
44
|
+
const size = tabSize / scale;
|
|
45
|
+
setStyle((prev) => prev?.start === start && prev.size === size ? prev : {
|
|
46
|
+
start,
|
|
47
|
+
size
|
|
47
48
|
});
|
|
48
49
|
};
|
|
49
|
-
$[0] =
|
|
50
|
-
$[1] =
|
|
51
|
-
$[2] =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
} else t1 = $[4];
|
|
55
|
-
const updateIndicator = t1;
|
|
50
|
+
$[0] = orientation;
|
|
51
|
+
$[1] = selectedKey;
|
|
52
|
+
$[2] = t1;
|
|
53
|
+
} else t1 = $[2];
|
|
54
|
+
const measure = useEffectEvent(t1);
|
|
56
55
|
let t2;
|
|
57
|
-
|
|
58
|
-
if ($[5] !== updateIndicator) {
|
|
56
|
+
if ($[3] !== container || $[4] !== enabled || $[5] !== measure) {
|
|
59
57
|
t2 = () => {
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return () => {
|
|
65
|
-
if (cancelRef.current) cancelRef.current();
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
t3 = [updateIndicator];
|
|
69
|
-
$[5] = updateIndicator;
|
|
70
|
-
$[6] = t2;
|
|
71
|
-
$[7] = t3;
|
|
72
|
-
} else {
|
|
73
|
-
t2 = $[6];
|
|
74
|
-
t3 = $[7];
|
|
75
|
-
}
|
|
76
|
-
useLayoutEffect(t2, t3);
|
|
77
|
-
let t4;
|
|
78
|
-
let t5;
|
|
79
|
-
if ($[8] !== enabled || $[9] !== updateIndicator) {
|
|
80
|
-
t4 = () => {
|
|
81
|
-
if (!enabled) return;
|
|
82
|
-
const handleResize = () => updateIndicator();
|
|
83
|
-
window.addEventListener("resize", handleResize);
|
|
84
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
85
|
-
};
|
|
86
|
-
t5 = [enabled, updateIndicator];
|
|
87
|
-
$[8] = enabled;
|
|
88
|
-
$[9] = updateIndicator;
|
|
89
|
-
$[10] = t4;
|
|
90
|
-
$[11] = t5;
|
|
91
|
-
} else {
|
|
92
|
-
t4 = $[10];
|
|
93
|
-
t5 = $[11];
|
|
94
|
-
}
|
|
95
|
-
useEffect(t4, t5);
|
|
96
|
-
let t6;
|
|
97
|
-
if ($[12] !== containerRef || $[13] !== enabled || $[14] !== orientation || $[15] !== updateIndicator) {
|
|
98
|
-
t6 = () => {
|
|
99
|
-
if (!enabled) return;
|
|
100
|
-
const container = containerRef.current;
|
|
101
|
-
if (!container) return;
|
|
102
|
-
const getAxisSize = (rect) => orientation === "vertical" ? rect.height : rect.width;
|
|
103
|
-
let prevSize = getAxisSize(container.getBoundingClientRect());
|
|
104
|
-
const observer = new ResizeObserver((entries) => {
|
|
105
|
-
const entry = entries[0];
|
|
106
|
-
if (!entry) return;
|
|
107
|
-
const newSize = getAxisSize(entry.contentRect);
|
|
108
|
-
if (prevSize === 0 && newSize > 0) updateIndicator();
|
|
109
|
-
prevSize = newSize;
|
|
110
|
-
});
|
|
111
|
-
observer.observe(container);
|
|
58
|
+
if (!enabled || !container) return;
|
|
59
|
+
const observer = new ResizeObserver(() => measure(container));
|
|
60
|
+
observer.observe(container, { box: "border-box" });
|
|
61
|
+
for (const child of container.children) if (child.querySelector("[role=\"tab\"]")) observer.observe(child);
|
|
112
62
|
return () => observer.disconnect();
|
|
113
63
|
};
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
64
|
+
$[3] = container;
|
|
65
|
+
$[4] = enabled;
|
|
66
|
+
$[5] = measure;
|
|
67
|
+
$[6] = t2;
|
|
68
|
+
} else t2 = $[6];
|
|
69
|
+
let t3;
|
|
70
|
+
if ($[7] !== container || $[8] !== enabled || $[9] !== orderToken || $[10] !== orientation || $[11] !== selectedKey) {
|
|
71
|
+
t3 = [
|
|
72
|
+
container,
|
|
123
73
|
enabled,
|
|
124
74
|
orientation,
|
|
125
|
-
|
|
75
|
+
selectedKey,
|
|
76
|
+
orderToken
|
|
126
77
|
];
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
|
|
132
|
-
|
|
78
|
+
$[7] = container;
|
|
79
|
+
$[8] = enabled;
|
|
80
|
+
$[9] = orderToken;
|
|
81
|
+
$[10] = orientation;
|
|
82
|
+
$[11] = selectedKey;
|
|
83
|
+
$[12] = t3;
|
|
84
|
+
} else t3 = $[12];
|
|
85
|
+
useLayoutEffect$1(t2, t3);
|
|
133
86
|
return enabled ? style : null;
|
|
134
87
|
}
|
|
135
88
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tab-indicator.js","names":["
|
|
1
|
+
{"version":3,"file":"use-tab-indicator.js","names":["useEffectEvent","useState","getLayoutScale","useLayoutEffect","Key","IndicatorStyle","start","size","IndicatorOrientation","useTabIndicator","container","selectedKey","enabled","t0","orderToken","$","_c","orientation","undefined","style","setStyle","t1","container_0","selectedTab","querySelector","isVertical","containerRect","getBoundingClientRect","tabRect","tabSize","height","width","scale","offset","top","left","scroll","scrollTop","scrollLeft","prev","measure","t2","observer","ResizeObserver","observe","box","child","children","disconnect","t3","_c"],"sources":["../../../../src/components/navigation/Tabs/use-tab-indicator.ts"],"sourcesContent":["import { useEffectEvent, useState } from 'react';\n\nimport { getLayoutScale } from '../../../utils/layout-scale';\nimport { useLayoutEffect } from '../../../utils/react/useLayoutEffect';\n\nimport type { Key } from '@react-types/shared';\n\n// =============================================================================\n// Types\n// =============================================================================\n\n/**\n * Axis-agnostic indicator geometry.\n * For horizontal orientation: `start` is `left`, `size` is `width`.\n * For vertical orientation: `start` is `top`, `size` is `height`.\n */\nexport interface IndicatorStyle {\n start: number;\n size: number;\n}\n\nexport type IndicatorOrientation = 'horizontal' | 'vertical';\n\n// =============================================================================\n// Hook\n// =============================================================================\n\n/**\n * Hook to track and animate tab indicator position.\n *\n * Calculates the start position and size of the selection indicator\n * along the orientation axis. Returns null if disabled (e.g., for\n * non-default/narrow tab types).\n *\n * @param container - The tab list element. An element rather than a ref, so a\n * list that is replaced by a new one is watched in its place.\n * @param selectedKey - Currently selected tab key\n * @param enabled - Whether the indicator should be shown\n * @param orientation - Axis along which the indicator moves\n * @param orderToken - Optional token that changes when tab order changes (triggers recalculation)\n * @returns Indicator style (`start`, `size`) or null if disabled/not ready\n */\nexport function useTabIndicator(\n container: HTMLElement | null,\n selectedKey: Key | null,\n enabled: boolean,\n orientation: IndicatorOrientation = 'horizontal',\n orderToken?: string,\n): IndicatorStyle | null {\n const [style, setStyle] = useState<IndicatorStyle | null>(null);\n\n // Forget the place while off: the selection may change meanwhile, and the\n // indicator must not reappear under the old tab before it is measured.\n if (!enabled && style) setStyle(null);\n\n const measure = useEffectEvent((container: HTMLElement) => {\n const selectedTab = container.querySelector<HTMLElement>(\n '[aria-selected=\"true\"]',\n );\n\n if (selectedKey == null || !selectedTab) {\n setStyle(null);\n return;\n }\n\n const isVertical = orientation === 'vertical';\n const containerRect = container.getBoundingClientRect();\n const tabRect = selectedTab.getBoundingClientRect();\n const tabSize = isVertical ? tabRect.height : tabRect.width;\n\n // Only update if dimensions are valid (element has been painted)\n if (tabSize <= 0) return;\n\n // Rects are in screen pixels; the indicator is laid out in the list's own.\n const scale = getLayoutScale(container, orientation);\n const offset = isVertical\n ? tabRect.top - containerRect.top\n : tabRect.left - containerRect.left;\n const scroll = isVertical ? container.scrollTop : container.scrollLeft;\n const start = offset / scale + scroll;\n const size = tabSize / scale;\n\n // Most reports leave the selected tab where it was (a tab after it, the\n // list's other axis), so keep the same object then.\n setStyle((prev) =>\n prev?.start === start && prev.size === size ? prev : { start, size },\n );\n });\n\n // The selected tab's place depends on the list's size and on the size and\n // order of every tab in it. So measure whenever one of them changes: a title\n // that loads after the tab is selected, a renamed tab, a tab before it that\n // grows, the list becoming visible. A new selection or tab order observes\n // afresh, and the observer's first report measures it.\n useLayoutEffect(() => {\n if (!enabled || !container) return;\n\n const observer = new ResizeObserver(() => measure(container));\n\n // The border box, so the list's own padding, which moves every tab, counts.\n observer.observe(container, { box: 'border-box' });\n\n for (const child of container.children) {\n // Skip the indicator, the one child without a tab: its own transition\n // moves nothing.\n if (child.querySelector('[role=\"tab\"]')) observer.observe(child);\n }\n\n return () => observer.disconnect();\n }, [container, enabled, orientation, selectedKey, orderToken]);\n\n return enabled ? style : null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0CA,SAAOS,gBAAAC,WAAAC,aAAAC,SAAAC,IAAAC,YAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAIL,MAAAC,cAAAJ,OAAAK,KAAAA,IAAA,eAAAL;CAGA,MAAA,CAAAM,OAAAC,YAA0BnB,SAAgC,IAAI;CAI9D,IAAI,CAACW,WAADO,OAAmBC,SAAS,IAAI;CAAE,IAAAC;CAAA,IAAAN,EAAA,OAAAE,eAAAF,EAAA,OAAAJ,aAAA;EAEPU,MAAAC,gBAAA;GAC7B,MAAAC,cAAoBb,YAASc,cAC3B,0BACF;GAEA,IAAIb,eAAe,QAAf,CAAwBY,aAAW;IACrCH,SAAS,IAAI;IAAC;GAAA;GAIhB,MAAAK,aAAmBR,gBAAgB;GACnC,MAAAS,gBAAsBhB,YAASiB,sBAAuB;GACtD,MAAAC,UAAgBL,YAAWI,sBAAuB;GAClD,MAAAE,UAAgBJ,aAAaG,QAAOE,SAAUF,QAAOG;GAGrD,IAAIF,WAAW,GAAC;GAGhB,MAAAG,QAAc9B,eAAeQ,aAAWO,WAAW;GACnD,MAAAgB,SAAeR,aACXG,QAAOM,MAAOR,cAAaQ,MAC3BN,QAAOO,OAAQT,cAAaS;GAChC,MAAAC,SAAeX,aAAaf,YAAS2B,YAAa3B,YAAS4B;GAC3D,MAAAhC,QAAc2B,SAASD,QAAQI;GAC/B,MAAA7B,OAAasB,UAAUG;GAIvBZ,UAASmB,SACPA,MAAIjC,UAAYA,SAASiC,KAAIhC,SAAUA,OAAvCgC,OAAA;IAAAjC;IAAAC;GAAmE,CACrE;EAAC;EACFQ,EAAA,KAAAE;EAAAF,EAAA,KAAAJ;EAAAI,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAhCD,MAAAyB,UAAgBxC,eAAeqB,EAgC9B;CAAE,IAAAoB;CAAA,IAAA1B,EAAA,OAAAL,aAAAK,EAAA,OAAAH,WAAAG,EAAA,OAAAyB,SAAA;EAOaC,WAAA;GACd,IAAI,CAAC7B,WAAD,CAAaF,WAAS;GAE1B,MAAAgC,WAAiB,IAAIC,qBAAqBH,QAAQ9B,SAAS,CAAC;GAG5DgC,SAAQE,QAASlC,WAAW,EAAAmC,KAAO,aAAa,CAAC;GAEjD,KAAK,MAAAC,SAAepC,UAASqC,UAG3B,IAAID,MAAKtB,cAAe,gBAAc,GAAGkB,SAAQE,QAASE,KAAK;GAChE,aAEYJ,SAAQM,WAAY;EAAC;EACnCjC,EAAA,KAAAL;EAAAK,EAAA,KAAAH;EAAAG,EAAA,KAAAyB;EAAAzB,EAAA,KAAA0B;CAAA,OAAAA,KAAA1B,EAAA;CAAA,IAAAkC;CAAA,IAAAlC,EAAA,OAAAL,aAAAK,EAAA,OAAAH,WAAAG,EAAA,OAAAD,cAAAC,EAAA,QAAAE,eAAAF,EAAA,QAAAJ,aAAA;EAAEsC,KAAA;GAACvC;GAAWE;GAASK;GAAaN;GAAaG;EAAU;EAACC,EAAA,KAAAL;EAAAK,EAAA,KAAAH;EAAAG,EAAA,KAAAD;EAAAC,EAAA,MAAAE;EAAAF,EAAA,MAAAJ;EAAAI,EAAA,MAAAkC;CAAA,OAAAA,KAAAlC,EAAA;CAf7DZ,kBAAgBsC,IAebQ,EAA0D;CAAC,OAEvDrC,UAAAO,QAAA;AAAsB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { Text as _Text } from "../../content/Text.js";
|
|
3
3
|
import { Title as _Title } from "../../content/Title.js";
|
|
4
4
|
import { Card } from "../../content/Card/Card.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { useProviderProps } from "../../../provider.js";
|
|
3
3
|
import { CalendarPanel } from "./CalendarPanel.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { CALENDAR_CELL_STYLES } from "./styled.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { mergeStyles, tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { getWeekNumber } from "../../fields/DatePicker/period.js";
|
|
3
3
|
import { CalendarCell } from "./CalendarCell.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { Title as _Title } from "../../content/Title.js";
|
|
3
3
|
import { Space } from "../../layout/Space.js";
|
|
4
4
|
import { Button } from "../../actions/Button/Button.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { CalendarElement } from "./styled.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { useProviderProps } from "../../../provider.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { getQuarter } from "../../fields/DatePicker/period.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { CALENDAR_CELL_STYLES } from "./styled.js";
|
|
3
3
|
import { mergeStyles, tasty } from "@tenphi/tasty";
|
|
4
4
|
import { useLayoutEffect, useRef } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { useProviderProps } from "../../../provider.js";
|
|
3
3
|
import { CalendarPanel } from "./CalendarPanel.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { Icon } from "../../../icons/Icon.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { mergeStyles, tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { wrapIcon } from "../../../icons/wrap-icon.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/other/NoDataIcon/NoDataIcon.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { Paragraph } from "../../content/Paragraph.js";
|
|
4
4
|
import { Title as _Title } from "../../content/Title.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { AlertDialogZone } from "./AlertDialogZone.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { Portal } from "../../portal/Portal.js";
|
|
3
3
|
import { AlertDialog as _AlertDialog } from "./AlertDialog.js";
|
|
4
4
|
import { DialogContainer } from "../Dialog/DialogContainer.js";
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentBaseProps } from "../../../utils/react/componentBaseProps.js";
|
|
3
|
+
import { BaseStyleProps, BlockStyleProps, DimensionStyleProps, Styles } from "@tenphi/tasty";
|
|
3
4
|
import { ReactElement } from "react";
|
|
4
5
|
import { AriaDialogProps } from "react-aria";
|
|
5
6
|
//#region src/components/overlays/Dialog/Dialog.d.ts
|
|
6
|
-
export interface CubeDialogProps extends Omit<
|
|
7
|
+
export interface CubeDialogProps extends Omit<ComponentBaseProps, 'role'>, AriaDialogProps, BaseStyleProps, BlockStyleProps, Omit<DimensionStyleProps, 'width'> {
|
|
7
8
|
/**
|
|
8
9
|
* The dialog's preferred width, one value (`520px`, `65x`, `600`). It keeps
|
|
9
10
|
* the type's maximum, so the dialog still fits a phone, and replaces
|
|
10
|
-
* `$min-dialog-size`. To clamp the width yourself, set `styles.width`.
|
|
11
|
+
* `$min-dialog-size`. To clamp the width yourself, set `styles.width`. A
|
|
12
|
+
* content keyword such as `max-content` suits a popover only: a dialog that
|
|
13
|
+
* is a query container would shrink to its padding.
|
|
11
14
|
*/
|
|
12
15
|
width?: string | number;
|
|
13
16
|
/** The size of the dialog */
|
|
@@ -23,6 +26,16 @@ export interface CubeDialogProps extends Omit<BaseProps, 'role'>, AriaDialogProp
|
|
|
23
26
|
closeIcon?: ReactElement;
|
|
24
27
|
closeButtonStyles?: Styles;
|
|
25
28
|
role?: 'dialog' | 'alertdialog';
|
|
29
|
+
/**
|
|
30
|
+
* Whether the dialog is the `dialog` query container
|
|
31
|
+
* (`container: dialog / inline-size`), so its content can respond to its
|
|
32
|
+
* width: `@(dialog, w < 400px)`, or `collapseState` on a `Button`. On by
|
|
33
|
+
* default, except in a popover, which sizes to its content, also when its
|
|
34
|
+
* trigger's `mobileType` shows it as a tray or modal on a phone: a container
|
|
35
|
+
* ignores its content's width, so a dialog sized by its content shrinks to
|
|
36
|
+
* its padding.
|
|
37
|
+
*/
|
|
38
|
+
isQueryContainer?: boolean;
|
|
26
39
|
}
|
|
27
40
|
/**
|
|
28
41
|
* Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { SlotProvider } from "../../../utils/react/Slots.js";
|
|
5
|
+
import { pickBaseCustomizationProps } from "../../../utils/react/pickBaseCustomizationProps.js";
|
|
5
6
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
6
7
|
import { useOpenTransitionContext } from "../Modal/OpenTransitionContext.js";
|
|
7
8
|
import { trapsFocus, useDialogContext } from "./context.js";
|
|
@@ -32,6 +33,10 @@ const DialogElement = tasty({
|
|
|
32
33
|
fill: "#surface",
|
|
33
34
|
pointerEvents: "auto",
|
|
34
35
|
outline: 0,
|
|
36
|
+
container: {
|
|
37
|
+
"": false,
|
|
38
|
+
"query-container": "dialog / inline-size"
|
|
39
|
+
},
|
|
35
40
|
position: {
|
|
36
41
|
"": "relative",
|
|
37
42
|
"type=panel": "absolute"
|
|
@@ -45,7 +50,6 @@ const DialogElement = tasty({
|
|
|
45
50
|
"": "$min-dialog-size $dialog-size $dialog-width-limit",
|
|
46
51
|
"type=fullscreen": "$dialog-max-size $dialog-max-size",
|
|
47
52
|
"type=fullscreenTakeover": "100dvw 100dvw",
|
|
48
|
-
"type=panel": "auto",
|
|
49
53
|
"custom-width": "initial $dialog-size $dialog-width-limit"
|
|
50
54
|
},
|
|
51
55
|
height: {
|
|
@@ -175,9 +179,10 @@ const Dialog = forwardRef(function Dialog(props, ref) {
|
|
|
175
179
|
return t3;
|
|
176
180
|
});
|
|
177
181
|
const DialogContent = forwardRef(function DialogContent(props, ref) {
|
|
178
|
-
let { type = "modal", requestDismiss, ...contextProps } = useDialogContext();
|
|
179
|
-
let { qa, children, size = "M", isDismissable = type === "popover" ? void 0 : contextProps.isDismissable, onDismiss = contextProps.onClose, closeIcon, closeButtonStyles, width, tokens, style, ...otherProps } = props;
|
|
182
|
+
let { type = "modal", requestedType, requestDismiss, ...contextProps } = useDialogContext();
|
|
183
|
+
let { qa, children, size = "M", isDismissable = type === "popover" ? void 0 : contextProps.isDismissable, onDismiss = contextProps.onClose, closeIcon, closeButtonStyles, width, tokens, style, isQueryContainer, ...otherProps } = props;
|
|
180
184
|
size = sizeMap[size.toUpperCase()] || size;
|
|
185
|
+
const isContainer = isQueryContainer ?? (requestedType ?? type) !== "popover";
|
|
181
186
|
const styles = extractStyles(otherProps, STYLES_LIST);
|
|
182
187
|
const { t } = useI18n();
|
|
183
188
|
let domRef = useObjectRef(ref);
|
|
@@ -293,6 +298,7 @@ const DialogContent = forwardRef(function DialogContent(props, ref) {
|
|
|
293
298
|
buttonGroup: { styles: { flow: "row-reverse" } }
|
|
294
299
|
};
|
|
295
300
|
return /* @__PURE__ */ jsxs(DialogElement, {
|
|
301
|
+
...pickBaseCustomizationProps(props),
|
|
296
302
|
ref: domRef,
|
|
297
303
|
"data-id": "Dialog",
|
|
298
304
|
"data-qa": qa || "Dialog",
|
|
@@ -309,7 +315,9 @@ const DialogContent = forwardRef(function DialogContent(props, ref) {
|
|
|
309
315
|
}),
|
|
310
316
|
mods: {
|
|
311
317
|
dismissable: isDismissable,
|
|
312
|
-
"custom-width": width != null
|
|
318
|
+
"custom-width": width != null,
|
|
319
|
+
"query-container": isContainer,
|
|
320
|
+
...props.mods
|
|
313
321
|
},
|
|
314
322
|
tokens: {
|
|
315
323
|
"$dialog-size": width == null ? `${sizePxMap[size] || sizePxMap.small}px` : typeof width === "number" ? `${width}px` : width,
|