@cube-dev/ui-kit 0.212.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 +22 -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 +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/Item/ItemWithNativeLinks.js +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 +4 -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.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +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 +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 +3 -2
- package/dist/components/overlays/Dialog/Dialog.js +5 -2
- 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 +4 -3
- 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/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 +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 +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +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.js +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 +2 -0
- package/docs/components/GridProvider.md +1 -1
- 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/package.json +1 -1
package/dist/utils/random.js
CHANGED
package/dist/utils/range.js
CHANGED
|
@@ -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 { useRef } from "react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/utils/react/RenderCache.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 { mergeProps } from "./mergeProps.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { Children, cloneElement, createContext, useContext } from "react";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import { BaseProps, BasePropsWithoutChildren, filterBaseProps } from "@tenphi/tasty";
|
|
3
|
+
//#region src/utils/react/componentBaseProps.d.ts
|
|
4
|
+
type ComponentOwnedProp = 'element' | 'theme' | 'title';
|
|
5
|
+
export type ComponentBaseProps = Omit<BaseProps, ComponentOwnedProp>;
|
|
6
|
+
export type ComponentBasePropsWithoutChildren = Omit<BasePropsWithoutChildren, ComponentOwnedProp>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=componentBaseProps.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
|
+
import { filterBaseProps } from "@tenphi/tasty";
|
|
3
|
+
//#region src/utils/react/componentBaseProps.ts
|
|
4
|
+
/** Keep Tasty's slot name and incidental DOM or theme attributes off component roots. */
|
|
5
|
+
function omitComponentOwnedProps(props) {
|
|
6
|
+
const { element: _element, theme: _theme, title: _title, ...rest } = props;
|
|
7
|
+
return rest;
|
|
8
|
+
}
|
|
9
|
+
function filterComponentBaseProps(props, options) {
|
|
10
|
+
return filterBaseProps(omitComponentOwnedProps(props), options);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { filterComponentBaseProps, omitComponentOwnedProps };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=componentBaseProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentBaseProps.js","names":["filterBaseProps","BaseProps","BasePropsWithoutChildren","ComponentOwnedProp","ComponentBaseProps","Omit","ComponentBasePropsWithoutChildren","omitComponentOwnedProps","props","T","Partial","Record","element","_element","theme","_theme","title","_title","rest","filterComponentBaseProps","Parameters","options","O"],"sources":["../../../src/utils/react/componentBaseProps.ts"],"sourcesContent":["import { filterBaseProps } from '@tenphi/tasty';\n\nimport type { BaseProps, BasePropsWithoutChildren } from '@tenphi/tasty';\n\ntype ComponentOwnedProp = 'element' | 'theme' | 'title';\n\nexport type ComponentBaseProps = Omit<BaseProps, ComponentOwnedProp>;\nexport type ComponentBasePropsWithoutChildren = Omit<\n BasePropsWithoutChildren,\n ComponentOwnedProp\n>;\n\n/** Keep Tasty's slot name and incidental DOM or theme attributes off component roots. */\nexport function omitComponentOwnedProps<T extends object>(\n props: T & Partial<Record<ComponentOwnedProp, unknown>>,\n): Omit<T, ComponentOwnedProp> {\n const { element: _element, theme: _theme, title: _title, ...rest } = props;\n\n return rest;\n}\n\nexport function filterComponentBaseProps<\n T extends object,\n O extends Parameters<typeof filterBaseProps>[1] = undefined,\n>(props: T, options?: O) {\n return filterBaseProps(omitComponentOwnedProps<T>(props), options);\n}\n"],"mappings":";;;;AAaA,SAAgBO,wBACdC,OAC6B;CAC7B,MAAM,EAAEI,SAASC,UAAUC,OAAOC,QAAQC,OAAOC,QAAQ,GAAGC,SAASV;CAErE,OAAOU;AACT;AAEA,SAAgBC,yBAGdX,OAAUa,SAAa;CACvB,OAAOrB,gBAAgBO,wBAA2BC,KAAK,GAAGa,OAAO;AACnE"}
|
|
@@ -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 "./chain.js";
|
|
3
3
|
import { useLayoutEffect } from "./useLayoutEffect.js";
|
|
4
4
|
import { mergeProps } from "./mergeProps.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 { useLayoutEffect as useLayoutEffect$1 } from "./useLayoutEffect.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { 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
|
//#region src/utils/react/nullableValue.ts
|
|
3
3
|
function castNullableStringValue(props, emptyValue = "") {
|
|
4
4
|
return castNullableField(props, ["value", "defaultValue"], "string", (v) => String(v), emptyValue);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
|
+
//#region src/utils/react/pickBaseCustomizationProps.ts
|
|
3
|
+
/** Customization props that can sit under a control's DOM and event wiring. */
|
|
4
|
+
function pickBaseCustomizationProps(props) {
|
|
5
|
+
const { qaVal, className, style, tokens } = props;
|
|
6
|
+
return {
|
|
7
|
+
qaVal,
|
|
8
|
+
className,
|
|
9
|
+
style,
|
|
10
|
+
tokens
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { pickBaseCustomizationProps };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=pickBaseCustomizationProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pickBaseCustomizationProps.js","names":["ComponentBaseProps","BaseCustomizationProps","Pick","pickBaseCustomizationProps","props","qaVal","className","style","tokens"],"sources":["../../../src/utils/react/pickBaseCustomizationProps.ts"],"sourcesContent":["import type { ComponentBaseProps } from './componentBaseProps';\n\ntype BaseCustomizationProps = Pick<\n ComponentBaseProps,\n 'qaVal' | 'className' | 'style' | 'tokens'\n>;\n\n/** Customization props that can sit under a control's DOM and event wiring. */\nexport function pickBaseCustomizationProps(\n props: BaseCustomizationProps,\n): BaseCustomizationProps {\n const { qaVal, className, style, tokens } = props;\n\n return { qaVal, className, style, tokens };\n}\n"],"mappings":";;;AAQA,SAAgBG,2BACdC,OACwB;CACxB,MAAM,EAAEC,OAAOC,WAAWC,OAAOC,WAAWJ;CAE5C,OAAO;EAAEC;EAAOC;EAAWC;EAAOC;CAAO;AAC3C"}
|
|
@@ -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 { useEvent } from "../../_internal/hooks/use-event.js";
|
|
3
3
|
import { isDevEnv } from "../is-dev-env.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 { useLayoutEffect as useLayoutEffect$1 } from "./useLayoutEffect.js";
|
|
3
3
|
import { useCallback, useRef, useState } from "react";
|
|
4
4
|
//#region src/utils/react/useBufferedValue.ts
|
|
@@ -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 React, { createContext, useCallback, useContext, useEffect, useMemo, useRef } from "react";
|
|
4
4
|
//#region src/utils/react/useEventBus.ts
|
|
@@ -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 { useLayoutEffect as useLayoutEffect$1 } from "./useLayoutEffect.js";
|
|
3
3
|
import "react/compiler-runtime";
|
|
4
4
|
import { useEffect, 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 * as React$1 from "react";
|
|
3
3
|
//#region src/utils/react/useLayoutEffect.tsx
|
|
4
4
|
const useLayoutEffect$1 = typeof window !== "undefined" ? React$1.useLayoutEffect : React$1.useEffect;
|
|
@@ -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 { useEvent } from "../../_internal/hooks/use-event.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useSyncExternalStore } 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 { useEvent } from "../../_internal/hooks/use-event.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { getEventTarget, nodeContains } from "@react-aria/utils";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.213.0 | Cube Dev Team */
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useEffect, useEffectEvent } from "react";
|
|
4
|
+
import { useOverlayPosition } from "react-aria";
|
|
5
|
+
//#region src/utils/react/useOverlayPosition.ts
|
|
6
|
+
/**
|
|
7
|
+
* React Aria's `useOverlayPosition`, which also re-places the overlay whenever
|
|
8
|
+
* it changes size while open: a menu that gains an item, a list that filters,
|
|
9
|
+
* a calendar that shows a sixth week.
|
|
10
|
+
*
|
|
11
|
+
* React Aria does observe the overlay's size, but it attaches that observer
|
|
12
|
+
* only once, when the hook first runs, and only if the overlay is already in
|
|
13
|
+
* the DOM then. A trigger that outlives its overlay (every kit overlay but the
|
|
14
|
+
* tooltip) runs the hook before the overlay exists, so no observer attached,
|
|
15
|
+
* and an open overlay that grew kept its old place, past the edge of the
|
|
16
|
+
* screen. This observer attaches on every opening instead.
|
|
17
|
+
*/
|
|
18
|
+
function useOverlayPosition$1(props) {
|
|
19
|
+
const $ = c(9);
|
|
20
|
+
const position = useOverlayPosition(props);
|
|
21
|
+
const { overlayRef, isOpen: t0 } = props;
|
|
22
|
+
const isOpen = t0 === void 0 ? true : t0;
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[0] !== position) {
|
|
25
|
+
t1 = () => {
|
|
26
|
+
position.updatePosition();
|
|
27
|
+
};
|
|
28
|
+
$[0] = position;
|
|
29
|
+
$[1] = t1;
|
|
30
|
+
} else t1 = $[1];
|
|
31
|
+
const onResize = useEffectEvent(t1);
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[2] !== isOpen || $[3] !== onResize || $[4] !== overlayRef) {
|
|
34
|
+
t2 = () => {
|
|
35
|
+
const overlay = overlayRef.current;
|
|
36
|
+
if (!isOpen || !overlay || typeof ResizeObserver === "undefined") return;
|
|
37
|
+
let observed = overlay;
|
|
38
|
+
let frame = 0;
|
|
39
|
+
const observer = new ResizeObserver(() => {
|
|
40
|
+
cancelAnimationFrame(frame);
|
|
41
|
+
frame = requestAnimationFrame(() => {
|
|
42
|
+
const current = overlayRef.current;
|
|
43
|
+
if (current && current !== observed) {
|
|
44
|
+
observer.unobserve(observed);
|
|
45
|
+
observer.observe(current);
|
|
46
|
+
observed = current;
|
|
47
|
+
}
|
|
48
|
+
onResize();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
observer.observe(overlay);
|
|
52
|
+
return () => {
|
|
53
|
+
cancelAnimationFrame(frame);
|
|
54
|
+
observer.disconnect();
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
$[2] = isOpen;
|
|
58
|
+
$[3] = onResize;
|
|
59
|
+
$[4] = overlayRef;
|
|
60
|
+
$[5] = t2;
|
|
61
|
+
} else t2 = $[5];
|
|
62
|
+
let t3;
|
|
63
|
+
if ($[6] !== isOpen || $[7] !== overlayRef) {
|
|
64
|
+
t3 = [isOpen, overlayRef];
|
|
65
|
+
$[6] = isOpen;
|
|
66
|
+
$[7] = overlayRef;
|
|
67
|
+
$[8] = t3;
|
|
68
|
+
} else t3 = $[8];
|
|
69
|
+
useEffect(t2, t3);
|
|
70
|
+
return position;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { useOverlayPosition$1 as useOverlayPosition };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=useOverlayPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOverlayPosition.js","names":["useEffect","useEffectEvent","useOverlayPosition","useAriaOverlayPosition","AriaPositionProps","PositionAria","props","$","_c","position","overlayRef","isOpen","t0","undefined","t1","updatePosition","onResize","t2","overlay","current","ResizeObserver","observed","frame","observer","cancelAnimationFrame","requestAnimationFrame","unobserve","observe","disconnect","t3","useOverlayPosition","_c","useAriaOverlayPosition"],"sources":["../../../src/utils/react/useOverlayPosition.ts"],"sourcesContent":["import { useEffect, useEffectEvent } from 'react';\n// oxlint-disable-next-line no-restricted-imports -- this is the wrapper the restriction points to\nimport { useOverlayPosition as useAriaOverlayPosition } from 'react-aria';\n\nimport type { AriaPositionProps, PositionAria } from 'react-aria';\n\n/**\n * React Aria's `useOverlayPosition`, which also re-places the overlay whenever\n * it changes size while open: a menu that gains an item, a list that filters,\n * a calendar that shows a sixth week.\n *\n * React Aria does observe the overlay's size, but it attaches that observer\n * only once, when the hook first runs, and only if the overlay is already in\n * the DOM then. A trigger that outlives its overlay (every kit overlay but the\n * tooltip) runs the hook before the overlay exists, so no observer attached,\n * and an open overlay that grew kept its old place, past the edge of the\n * screen. This observer attaches on every opening instead.\n */\nexport function useOverlayPosition(props: AriaPositionProps): PositionAria {\n const position = useAriaOverlayPosition(props);\n const { overlayRef, isOpen = true } = props;\n\n const onResize = useEffectEvent(() => {\n position.updatePosition();\n });\n\n // The overlay mounts in the commit that opens it, so it is in the ref by\n // the time this runs.\n useEffect(() => {\n const overlay = overlayRef.current;\n\n if (!isOpen || !overlay || typeof ResizeObserver === 'undefined') return;\n\n let observed: Element = overlay;\n let frame = 0;\n\n // Re-placing the overlay changes its size again, and changing an observed\n // size inside the observer's callback reports a ResizeObserver loop as a\n // window error. So re-place on the next frame, once per frame.\n const observer = new ResizeObserver(() => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n const current = overlayRef.current;\n\n // A `Portal` renders inline until its own effect finds its root, then\n // moves the overlay there as a new element (removing the old one\n // fires this observer): follow the element the ref holds now.\n if (current && current !== observed) {\n observer.unobserve(observed);\n observer.observe(current);\n observed = current;\n }\n\n onResize();\n });\n });\n\n observer.observe(overlay);\n\n return () => {\n cancelAnimationFrame(frame);\n observer.disconnect();\n };\n }, [isOpen, overlayRef]);\n\n return position;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,SAAOE,qBAAAI,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACL,MAAAC,WAAiBN,mBAAuBG,KAAK;CAC7C,MAAA,EAAAI,YAAAC,QAAAC,OAAsCN;CAAlB,MAAAK,SAAAC,OAAAC,KAAAA,IAAA,OAAAD;CAAa,IAAAE;CAAA,IAAAP,EAAA,OAAAE,UAAA;EAEDK,WAAA;GAC9BL,SAAQM,eAAgB;EAAC;EAC1BR,EAAA,KAAAE;EAAAF,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAFD,MAAAS,WAAiBf,eAAea,EAE/B;CAAE,IAAAG;CAAA,IAAAV,EAAA,OAAAI,UAAAJ,EAAA,OAAAS,YAAAT,EAAA,OAAAG,YAAA;EAIOO,WAAA;GACR,MAAAC,UAAgBR,WAAUS;GAE1B,IAAI,CAACR,UAAD,CAAYO,WAAW,OAAOE,mBAAmB,aAAW;GAEhE,IAAAC,WAAwBH;GACxB,IAAAI,QAAY;GAKZ,MAAAC,WAAiB,IAAIH,qBAAe;IAClCI,qBAAqBF,KAAK;IAC1BA,QAAQG,4BAAsB;KAC5B,MAAAN,UAAgBT,WAAUS;KAK1B,IAAIA,WAAWA,YAAYE,UAAQ;MACjCE,SAAQG,UAAWL,QAAQ;MAC3BE,SAAQI,QAASR,OAAO;MACxBE,WAAWF;KAAH;KAGVH,SAAS;IAAC,CACX;GAbI,CAcN;GAEDO,SAAQI,QAAST,OAAO;GAAC,aAElB;IACLM,qBAAqBF,KAAK;IAC1BC,SAAQK,WAAY;GAAC;EACtB;EACFrB,EAAA,KAAAI;EAAAJ,EAAA,KAAAS;EAAAT,EAAA,KAAAG;EAAAH,EAAA,KAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAsB;CAAA,IAAAtB,EAAA,OAAAI,UAAAJ,EAAA,OAAAG,YAAA;EAAEmB,KAAA,CAAClB,QAAQD,UAAU;EAACH,EAAA,KAAAI;EAAAJ,EAAA,KAAAG;EAAAH,EAAA,KAAAsB;CAAA,OAAAA,KAAAtB,EAAA;CAnCvBP,UAAUiB,IAmCPY,EAAoB;CAAC,OAEjBpB;AAAQ"}
|
|
@@ -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 { EventBusContext, useEventBus } from "./useEventBus.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useContext, useEffect, useEffectEvent, 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 { Fragment, isValidElement } from "react";
|
|
3
3
|
//#region src/utils/react/wrapNodeIfPlain.ts
|
|
4
4
|
function wrapNodeIfPlain(children, render) {
|
package/dist/utils/selection.js
CHANGED
package/dist/utils/styles.js
CHANGED
package/dist/utils/tree.js
CHANGED
package/dist/utils/warnings.js
CHANGED
package/dist/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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/version.ts
|
|
3
|
-
const VERSION = "0.
|
|
3
|
+
const VERSION = "0.213.0";
|
|
4
4
|
const TASTY_VERSION = "3.18.0";
|
|
5
5
|
if (typeof window !== "undefined") {
|
|
6
6
|
const version = VERSION;
|
package/docs/BaseProperties.md
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
# Base Properties
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
UI Kit components share base properties for styling, accessibility and testing. Each component’s props define which properties it supports and where they apply.
|
|
4
4
|
|
|
5
5
|
## Core Properties
|
|
6
6
|
|
|
7
7
|
- **`qa`** `string` — Data attribute for e2e testing (`data-qa`)
|
|
8
8
|
- **`qaVal`** `string` — Value for the qa attribute
|
|
9
|
-
- **`style`** `CSSProperties` — Inline styles
|
|
10
9
|
- **`styles`** `Styles` — Tasty styles object
|
|
11
10
|
- **`css`** `string` — Raw CSS string
|
|
12
11
|
- **`mods`** `Mods` — State modifiers for conditional styling
|
|
13
12
|
- **`tokens`** `Tokens` — Custom-property values, applied as inline custom properties on the element
|
|
14
|
-
- **`theme`** `string` — Renders `data-theme`. Components with their own `theme` prop, such as `Button`, `Alert` and `ItemAction`, give it their own meaning
|
|
15
13
|
- **`breakpoints`** — Responsive breakpoint configuration
|
|
16
14
|
- **`hidden`** `boolean` — Hide the element
|
|
17
15
|
- **`isHidden`** `boolean` — Hide the element
|
|
18
16
|
- **`disabled`** `boolean` — Disabled state
|
|
19
17
|
- **`isChecked`** `boolean` — Renders `data-checked`, which the `checked` modifier resolves against in `styles`
|
|
20
|
-
- **`element`** `string` — Override the rendered element name for sub-element targeting
|
|
21
18
|
- **`block`** `boolean` — Display as block
|
|
22
19
|
- **`inline`** `boolean` — Display as inline
|
|
23
20
|
|
|
21
|
+
## Component-specific properties
|
|
22
|
+
|
|
23
|
+
Use `theme` where the component documents an appearance variant, such as `Button`, `Alert`, `Select` or `ColorPicker`. Use `title` where it is a content prop, such as on `Layout.Header` or `Tabs.Tab`. For a control’s name or hint, use its label, description or tooltip API. Tasty’s `element` names a slot when authoring a styled element.
|
|
24
|
+
|
|
25
|
+
## Third-party integrations
|
|
26
|
+
|
|
27
|
+
`className` and inline `style` are available on component roots that expose them. Use them for integrations that supply a class or CSS style object. For ordinary UI Kit customization, use component props, `tokens`, `mods` and supported Tasty style props.
|
|
28
|
+
|
|
24
29
|
## Style Properties
|
|
25
30
|
|
|
26
31
|
Style properties allow direct styling without using the `styles` prop. They are defined in `@tenphi/tasty` and exposed via `styleProps` on components.
|
package/docs/CreateComponent.md
CHANGED
|
@@ -25,22 +25,29 @@ Forward consumer styles to the element that owns them. DialogContainer's `styles
|
|
|
25
25
|
|
|
26
26
|
## Core Concepts
|
|
27
27
|
|
|
28
|
-
### 1. Base Properties
|
|
28
|
+
### 1. Base Properties for Component Roots
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
For a component that owns its slots and appearance, use the kit’s `ComponentBaseProps` (or `ComponentBasePropsWithoutChildren`) and `filterComponentBaseProps`. Add a component-level `theme` or `title` only when the component gives it a defined meaning. Keep `className` and `style` available for third-party integrations.
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
import {
|
|
33
|
+
import { tasty } from '@tenphi/tasty';
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
import {
|
|
36
|
+
type ComponentBaseProps,
|
|
37
|
+
filterComponentBaseProps,
|
|
38
|
+
} from '../../../utils/react/componentBaseProps';
|
|
39
|
+
|
|
40
|
+
const MyElement = tasty({});
|
|
41
|
+
|
|
42
|
+
interface MyComponentProps extends ComponentBaseProps {
|
|
36
43
|
customProp?: string;
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
function MyComponent(props: MyComponentProps) {
|
|
40
47
|
return (
|
|
41
|
-
<
|
|
48
|
+
<MyElement {...filterComponentBaseProps(props, { eventProps: true })}>
|
|
42
49
|
{props.children}
|
|
43
|
-
</
|
|
50
|
+
</MyElement>
|
|
44
51
|
);
|
|
45
52
|
}
|
|
46
53
|
```
|
|
@@ -441,7 +448,7 @@ For input components that need to integrate with forms, see the [Field documenta
|
|
|
441
448
|
|
|
442
449
|
## Best Practices
|
|
443
450
|
|
|
444
|
-
1. **
|
|
451
|
+
1. **Choose the supported base properties**: Use `ComponentBaseProps` and `filterComponentBaseProps` for component-owned roots
|
|
445
452
|
|
|
446
453
|
2. **Provide appropriate style properties**: Choose the right combination of style property sets for your component's needs
|
|
447
454
|
|
|
@@ -485,7 +492,7 @@ function Connection({ roomId, connect, notify, theme }) {
|
|
|
485
492
|
|
|
486
493
|
When creating a new component, consider:
|
|
487
494
|
|
|
488
|
-
- [ ] Base properties
|
|
495
|
+
- [ ] Base properties match the component API and are forwarded to the correct root
|
|
489
496
|
- [ ] Appropriate style property sets
|
|
490
497
|
- [ ] Modifier (`mods`) support for state-based styling
|
|
491
498
|
- [ ] Additional style properties for inner elements
|
package/docs/Theming.md
CHANGED
|
@@ -135,6 +135,8 @@ Sizing those two the same is a mistake worth naming, because this palette made i
|
|
|
135
135
|
|
|
136
136
|
They are APCA rather than WCAG on purpose. A single WCAG ratio means two different things depending on the scheme: measured across twelve hues, a fill sitting exactly at 3:1 comes out at Lc 56 in light but only Lc 23 in dark. That is why light brands kept getting crushed while dark ones sailed through the same rule. **A consequence to state plainly: the emitted fill can sit below WCAG 3:1.** `#0EA5E9` renders at 2.77:1 against a white page and is correct there — the Lc is the guarantee, not the ratio.
|
|
137
137
|
|
|
138
|
+
**The brand text keeps the brand's tone too, and so it can sit below WCAG AA.** Links (`#accent-text-soft` at rest, `#accent-text` on hover) and the selected labels of `outline`, `outline-2` and `clear` items solve against **APCA Lc 60** at rest and **Lc 75** on hover. Those floors are low on purpose: a customer who seeds the palette with a brand color expects to see that color in its links, and a higher floor would darken a light brand's link away from it. The cost is the ratio. In light mode at normal contrast, a bright brand's links measure about 4.0–4.4:1 on white and its selected labels about 3.4–4.4:1 on their fills, below the 4.5:1 of WCAG AA. Hover, keyboard focus, dark and both high-contrast variants measure above 4.5:1. The palette with no color seed solves the same text against a WCAG floor and meets AA everywhere. When AA matters more than the exact tone, seed a darker shade of the brand. The selected labels sit on fills darker than white, so the seed needs about 6:1 on white rather than 4.5:1: `#4f46e5` (6.3:1) passes everywhere, while `#0b6bcb` (5.3:1) still leaves its `outline` and `outline-2` labels at 4.4:1 and 4.1:1.
|
|
139
|
+
|
|
138
140
|
High contrast does **not** escalate the page floor. It is a request for separation over brand, but not for separation from the page: the same fill carries the label, and driving it off the page drives the label off it. The shipped ladder makes the same trade and lands the other side of it, ending up with _less_ page separation in high contrast than in normal, because it darkens the fill toward its label. What does escalate is the label cap, which searches the high-contrast variants too.
|
|
139
141
|
|
|
140
142
|
**`pastel` caps chroma.** The flat, hue-independent ceiling is what makes pastel even across hues, and it sits below where a saturated color would land, so under it a color seed can never resolve to itself: `#EF4444` renders `#c47069`. Under pastel the color contributes its hue and its tone; turn pastel off to get its chroma too.
|
package/docs/Usage.md
CHANGED
|
@@ -410,6 +410,8 @@ Component themes are set via the `theme` prop or `theme=name` modifier:
|
|
|
410
410
|
|
|
411
411
|
Most components are a design contract: customize them through their own props (`type`, `theme`, `size`, …), `tokens` and `mods` rather than by restyling them. The layout and typography primitives (`Element`, `Block`, `Flex`, `Flow`, `Grid`, `Space`, `Prefix`, `Suffix`, `Text`, `TextItem`, `Title`, `Paragraph`, `Typography`, `ButtonGroup` and `Button.Group`), the `Action` base and the icons (including `IconSwitch`) are the exception: their `styles` are their API.
|
|
412
412
|
|
|
413
|
+
Use `className` and inline `style` when a third-party integration needs to attach its own CSS. The [base properties guide](./BaseProperties.md) explains the component-specific roles of `theme` and `title`.
|
|
414
|
+
|
|
413
415
|
The package's `tasty.config.ts` lists the other components as `protectedComponents`, and `tasty/no-protected-restyle` from `@tenphi/eslint-plugin-tasty` 1.12.0 or newer reports a restyle of one in your code:
|
|
414
416
|
|
|
415
417
|
- instance `styles`, and every `*Styles` prop such as `inputStyles`;
|
|
@@ -24,7 +24,7 @@ Provides CSS custom properties for responsive grid column calculations. Children
|
|
|
24
24
|
|
|
25
25
|
### Base Properties
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Pass `tokens` to set custom properties on the grid provider. Its grid width, column count and gap tokens remain available to children.
|
|
28
28
|
|
|
29
29
|
### Style Defaults
|
|
30
30
|
|
|
@@ -58,11 +58,13 @@ These properties allow direct style application without using the `styles` prop:
|
|
|
58
58
|
|
|
59
59
|
The `mods` property accepts the following modifiers you can override:
|
|
60
60
|
|
|
61
|
-
| Modifier
|
|
62
|
-
|
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
61
|
+
| Modifier | Type | Description |
|
|
62
|
+
| --------- | --------- | ----------------------------------------------- |
|
|
63
|
+
| `columns` | `boolean` | Set by `columns`: the swatches wrap into a grid |
|
|
64
|
+
| `invalid` | `boolean` | The field is invalid |
|
|
65
|
+
| `valid` | `boolean` | The field is valid |
|
|
66
|
+
|
|
67
|
+
Each swatch carries **`selected`**, **`focused`** and **`disabled`**; style them through `swatchStyles`.
|
|
66
68
|
|
|
67
69
|
## ColorSwatch
|
|
68
70
|
|
|
@@ -22,6 +22,15 @@ If the control is not a field — a toolbar that swaps which view is on screen,
|
|
|
22
22
|
| yes | no | `Radio.Group type="button"` |
|
|
23
23
|
| no | — | `Tabs` (with `type="radio"` when the radio look was wanted) |
|
|
24
24
|
|
|
25
|
+
A radio group always has exactly one option selected once the user picks one, and a radio can't be unchecked. For a row of joined buttons, what can be selected decides the component:
|
|
26
|
+
|
|
27
|
+
| What can be selected? | Use |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Exactly one option, always | `Radio.Group type="button"` |
|
|
30
|
+
| One option or none | [ToggleGroup](./ToggleGroup.md) |
|
|
31
|
+
| Several options | [ToggleGroup](./ToggleGroup.md) with `selectionMode="multiple"` |
|
|
32
|
+
| Nothing: a row of actions | [Button.Split](../actions/ButtonSplit.md) |
|
|
33
|
+
|
|
25
34
|
## Component
|
|
26
35
|
|
|
27
36
|
---
|
|
@@ -101,6 +110,7 @@ The `mods` property accepts the following modifiers you can override:
|
|
|
101
110
|
- **`horizontal`** `boolean` — Whether the radio group is oriented horizontally
|
|
102
111
|
- **`tabs`** `boolean` — Whether the radio group uses tabs styling
|
|
103
112
|
- **`segmented`** `boolean` — Set with `tabs`: the segmented control look, shared with `Tabs type="radio"`, applies to it. Each `Radio` in the group carries it too
|
|
113
|
+
- **`joined`** `boolean` — Set for `type="button"`: the joined look, shared with [ToggleGroup](./ToggleGroup.md), applies to it. The buttons share their borders, the selected one is raised above its neighbours, and the group isolates its stacking so that raise stays inside it. Each `Radio` in the group carries it too
|
|
104
114
|
- **`inside-form`** `boolean` — Whether the radio group is inside a form field
|
|
105
115
|
- **`side-label`** `boolean` — Whether the label is positioned at the side
|
|
106
116
|
- **`fill-width`** `boolean` — Set when the group's style props size its field's width (`width`, `inlineSize`, `flex*`); the group then fills it
|
|
@@ -140,6 +150,8 @@ Controls the size of all radio buttons in the group:
|
|
|
140
150
|
- `large` - Large size
|
|
141
151
|
- `xlarge` - Extra large size
|
|
142
152
|
|
|
153
|
+
In button mode an `xsmall` button is at least 26px wide: its neighbours cover one border width of each side, and what is left is the 24px target WCAG 2.5.8 asks for.
|
|
154
|
+
|
|
143
155
|
**Size Mapping in Tabs Mode:** When `type="tabs"`, sizes are automatically mapped to maintain visual consistency:
|
|
144
156
|
|
|
145
157
|
- `large` → `medium` (a 40px control, t3m text)
|
|
@@ -392,3 +404,4 @@ This component supports all [Field properties](../../FieldProperties.md) when us
|
|
|
392
404
|
- CheckboxGroup - For selecting multiple related options
|
|
393
405
|
- [Select](./Select.md) - For single selection from many options
|
|
394
406
|
- [Switch](./Switch.md) - For binary on/off choices
|
|
407
|
+
- [ToggleGroup](./ToggleGroup.md) - For a joined row of buttons where one option or none, or several, can be on
|