@cube-dev/ui-kit 0.213.0 → 0.214.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 +26 -0
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/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.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuCollectionItem.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/use-action.d.ts +1 -1
- package/dist/components/actions/use-action.js +2 -2
- package/dist/components/actions/use-action.js.map +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 +36 -4
- package/dist/components/content/InfoBadge/InfoBadge.js.map +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/Item/ItemWithNativeLinks.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +55 -29
- package/dist/components/content/Tag/Tag.js.map +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/checked-keys.js +1 -1
- package/dist/components/content/Tree/rowId.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +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/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.js +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.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +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 +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterListBox/styled.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/FilterPicker/FilterTree.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBox/empty-row.js +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/RadioGroup/joined-styles.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.d.ts +26 -3
- package/dist/components/fields/TagInput/TagInput.js +340 -204
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +59 -34
- package/dist/components/fields/TagInput/TagList.js.map +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useSuffixSpace.js +62 -0
- package/dist/components/fields/TagInput/useSuffixSpace.js.map +1 -0
- 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.js +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.js +1 -1
- package/dist/components/fields/ToggleGroup/ToggleGroupItem.js +1 -1
- package/dist/components/fields/ToggleGroup/context.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/fields/option-origin-press.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/field-description.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/FormContext.js +1 -1
- package/dist/components/form/Form/FormElement.js +1 -1
- package/dist/components/form/Form/ModernFormRoot.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/store.js +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.js +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.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/NavTabs/NavTabs.d.ts +66 -0
- package/dist/components/navigation/NavTabs/NavTabs.js +369 -0
- package/dist/components/navigation/NavTabs/NavTabs.js.map +1 -0
- package/dist/components/navigation/NavTabs/index.d.ts +3 -0
- 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 +4 -49
- 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 +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/scroll-tab-into-strip.js +60 -0
- package/dist/components/navigation/Tabs/scroll-tab-into-strip.js.map +1 -0
- package/dist/components/navigation/Tabs/segmented-styles.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +66 -65
- package/dist/components/navigation/Tabs/styled.js.map +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +15 -6
- package/dist/components/navigation/Tabs/use-tab-indicator.js.map +1 -1
- package/dist/components/navigation/index.d.ts +3 -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.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/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/Dialog/use-retained-dialog-focus.js.map +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Modal/modal-containment.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +17 -14
- 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/context.js +1 -1
- package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +9 -1
- package/dist/eslint-plugin/defaults.generated.js.map +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +5 -3
- package/dist/i18n/locales/en-US/uikit.js +5 -3
- package/dist/i18n/locales/en-US/uikit.json.d.ts +8 -4
- package/dist/i18n/locales/es-ES/uikit.js +5 -3
- package/dist/i18n/locales/es-MX/uikit.js +5 -3
- package/dist/i18n/locales/fr-FR/uikit.js +5 -3
- package/dist/i18n/locales/it-IT/uikit.js +5 -3
- package/dist/i18n/locales/ja-JP/uikit.js +5 -3
- package/dist/i18n/locales/nb-NO/uikit.js +5 -3
- package/dist/i18n/locales/pt-BR/uikit.js +5 -3
- package/dist/i18n/locales/pt-PT/uikit.js +5 -3
- package/dist/i18n/locales/sv-SE/uikit.js +5 -3
- package/dist/i18n/locales/vi-VN/uikit.js +5 -3
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/namespace.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- 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 +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 +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/componentBaseProps.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/overlayKeyPropagation.js +1 -1
- package/dist/utils/react/pickBaseCustomizationProps.js +1 -1
- package/dist/utils/react/programmaticFocus.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/useOverlayPosition.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +3 -3
- package/harness/dev.harnesspm/patches/glaze-colors.patch.md +4 -0
- package/harness/dev.harnesspm/patches/tasty-usage.patch.md +3 -0
- package/harness/dev.harnesspm/rules/usage.md +12 -0
- package/harness/dev.harnesspm/scripts/colors.mjs +445 -0
- package/harness/plugin.json +29 -0
- package/package.json +17 -10
- package/{docs/components/Block.md → src/components/Block.docs.mdx} +7 -1
- package/{docs/components/CollectionItem.md → src/components/CollectionItem.docs.mdx} +12 -8
- package/{docs/components/GridProvider.md → src/components/GridProvider.docs.mdx} +4 -0
- package/{docs/components/Root.md → src/components/Root.docs.mdx} +6 -2
- package/{docs/components/actions/Action.md → src/components/actions/Action/Action.docs.mdx} +7 -1
- package/{docs/components/actions/Banner.md → src/components/actions/Banner/Banner.docs.mdx} +17 -3
- package/{docs/components/actions/Button.md → src/components/actions/Button/Button.docs.mdx} +19 -4
- package/{docs/components/actions/ButtonGroup.md → src/components/actions/ButtonGroup/ButtonGroup.docs.mdx} +6 -2
- package/{docs/components/actions/ButtonSplit.md → src/components/actions/ButtonSplit/ButtonSplit.docs.mdx} +18 -3
- package/{docs/components/actions/CommandMenu.md → src/components/actions/CommandMenu/CommandMenu.docs.mdx} +29 -17
- package/{docs/components/actions/ItemAction.md → src/components/actions/ItemAction/ItemAction.docs.mdx} +8 -1
- package/{docs/components/actions/ItemButton.md → src/components/actions/ItemButton/ItemButton.docs.mdx} +18 -9
- package/{docs/components/actions/Link.md → src/components/actions/Link/Link.docs.mdx} +11 -3
- package/{docs/components/actions/Menu.md → src/components/actions/Menu/Menu.docs.mdx} +27 -15
- package/{docs/components/actions/MenuTrigger.md → src/components/actions/Menu/MenuTrigger.docs.mdx} +5 -1
- package/{docs/components/actions/SubMenuTrigger.md → src/components/actions/Menu/SubMenuTrigger.docs.mdx} +5 -1
- package/{docs/components/actions/use-anchored-menu.md → src/components/actions/use-anchored-menu.docs.mdx} +9 -5
- package/{docs/components/actions/use-context-menu.md → src/components/actions/use-context-menu.docs.mdx} +9 -5
- package/{docs/components/content/ActiveZone.md → src/components/content/ActiveZone/ActiveZone.docs.mdx} +7 -1
- package/{docs/components/content/Alert.md → src/components/content/Alert/Alert.docs.mdx} +14 -1
- package/{docs/components/content/Avatar.md → src/components/content/Avatar/Avatar.docs.mdx} +7 -1
- package/{docs/components/content/Badge.md → src/components/content/Badge/Badge.docs.mdx} +23 -2
- package/{docs/components/content/Card.md → src/components/content/Card/Card.docs.mdx} +7 -1
- package/{docs/components/content/Content.md → src/components/content/Content.docs.mdx} +5 -1
- package/{docs/components/content/CopyPasteBlock.md → src/components/content/CopyPasteBlock/CopyPasteBlock.docs.mdx} +7 -1
- package/{docs/components/content/CopySnippet.md → src/components/content/CopySnippet/CopySnippet.docs.mdx} +7 -1
- package/{docs/components/content/Disclosure.md → src/components/content/Disclosure/Disclosure.docs.mdx} +34 -3
- package/{docs/components/content/Divider.md → src/components/content/Divider/Divider.docs.mdx} +12 -2
- package/{docs/components/content/Footer.md → src/components/content/Footer.docs.mdx} +5 -1
- package/{docs/components/content/Header.md → src/components/content/Header.docs.mdx} +5 -1
- package/{docs/components/content/HotKeys.md → src/components/content/HotKeys/HotKeys.docs.mdx} +41 -5
- package/{docs/components/content/InfoBadge.md → src/components/content/InfoBadge/InfoBadge.docs.mdx} +8 -2
- package/{docs/components/content/InlineInput.md → src/components/content/InlineInput/InlineInput.docs.mdx} +36 -3
- package/{docs/components/content/Item.md → src/components/content/Item/Item.docs.mdx} +31 -15
- package/{docs/components/content/ItemBadge.md → src/components/content/ItemBadge/ItemBadge.docs.mdx} +7 -1
- package/{docs/components/content/ItemCard.md → src/components/content/ItemCard/ItemCard.docs.mdx} +19 -6
- package/{docs/components/content/Layout.md → src/components/content/Layout/Layout.docs.mdx} +40 -6
- package/{docs/components/content/Paragraph.md → src/components/content/Paragraph.docs.mdx} +8 -2
- package/{docs/components/content/Placeholder.md → src/components/content/Placeholder/Placeholder.docs.mdx} +7 -1
- package/{docs/components/content/PrismCode.md → src/components/content/PrismCode/PrismCode.docs.mdx} +7 -1
- package/{docs/components/content/PrismDiffCode.md → src/components/content/PrismDiffCode/PrismDiffCode.docs.mdx} +7 -1
- package/{docs/components/content/Result.md → src/components/content/Result/Result.docs.mdx} +35 -4
- package/{docs/components/content/Skeleton.md → src/components/content/Skeleton/Skeleton.docs.mdx} +8 -2
- package/{docs/components/content/Tag.md → src/components/content/Tag/Tag.docs.mdx} +23 -2
- package/{docs/components/content/Text.md → src/components/content/Text.docs.mdx} +7 -1
- package/{docs/components/content/TextItem.md → src/components/content/TextItem/TextItem.docs.mdx} +30 -4
- package/{docs/components/content/Title.md → src/components/content/Title.docs.mdx} +5 -1
- package/{docs/components/content/Tree.md → src/components/content/Tree/Tree.docs.mdx} +28 -1
- package/{docs/components/data/DataTable.md → src/components/data/DataTable/DataTable.docs.mdx} +38 -6
- package/{docs/components/data/ItemTable.md → src/components/data/ItemTable/ItemTable.docs.mdx} +66 -5
- package/{docs/components/fields/Checkbox.md → src/components/fields/Checkbox/Checkbox.docs.mdx} +14 -6
- package/{docs/components/fields/ColorInput.md → src/components/fields/ColorInput/ColorInput.docs.mdx} +19 -7
- package/{docs/components/fields/ColorPicker.md → src/components/fields/ColorPicker/ColorPicker.docs.mdx} +22 -10
- package/{docs/components/fields/ColorSwatch.md → src/components/fields/ColorSwatch/ColorSwatch.docs.mdx} +17 -5
- package/{docs/components/fields/ColorSwatchGroup.md → src/components/fields/ColorSwatchGroup/ColorSwatchGroup.docs.mdx} +25 -7
- package/{docs/components/fields/ComboBox.md → src/components/fields/ComboBox/ComboBox.docs.mdx} +64 -7
- package/{docs/components/fields/CommandTextArea.md → src/components/fields/CommandTextArea/CommandTextArea.docs.mdx} +21 -13
- package/{docs/components/fields/DatePicker.md → src/components/fields/DatePicker/DatePicker.docs.mdx} +13 -5
- package/{docs/components/fields/PeriodPicker.md → src/components/fields/DatePicker/PeriodPicker.docs.mdx} +24 -5
- package/{docs/components/fields/FileInput.md → src/components/fields/FileInput/FileInput.docs.mdx} +16 -6
- package/{docs/components/fields/FilterListBox.md → src/components/fields/FilterListBox/FilterListBox.docs.mdx} +46 -10
- package/{docs/components/fields/FilterPicker.md → src/components/fields/FilterPicker/FilterPicker.docs.mdx} +57 -19
- package/{docs/components/fields/ListBox.md → src/components/fields/ListBox/ListBox.docs.mdx} +61 -11
- package/{docs/components/fields/NumberInput.md → src/components/fields/NumberInput/NumberInput.docs.mdx} +15 -7
- package/{docs/components/fields/PasswordInput.md → src/components/fields/PasswordInput/PasswordInput.docs.mdx} +15 -7
- package/{docs/components/fields/Picker.md → src/components/fields/Picker/Picker.docs.mdx} +53 -21
- package/{docs/components/fields/RadioGroup.md → src/components/fields/RadioGroup/RadioGroup.docs.mdx} +25 -15
- package/{docs/components/fields/SearchComboBox.md → src/components/fields/SearchComboBox/SearchComboBox.docs.mdx} +33 -14
- package/{docs/components/fields/SearchInput.md → src/components/fields/SearchInput/SearchInput.docs.mdx} +17 -7
- package/{docs/components/fields/Select.md → src/components/fields/Select/Select.docs.mdx} +55 -20
- package/{docs/components/fields/HueSlider.md → src/components/fields/Slider/HueSlider.docs.mdx} +24 -6
- package/{docs/components/fields/Slider.md → src/components/fields/Slider/Slider.docs.mdx} +22 -2
- package/{docs/components/fields/Switch.md → src/components/fields/Switch/Switch.docs.mdx} +26 -6
- package/{docs/components/fields/TagInput.md → src/components/fields/TagInput/TagInput.docs.mdx} +102 -19
- package/{docs/components/fields/TextArea.md → src/components/fields/TextArea/TextArea.docs.mdx} +19 -3
- package/{docs/components/fields/TextInput.md → src/components/fields/TextInput/TextInput.docs.mdx} +18 -8
- package/{docs/components/fields/TextInputMapper.md → src/components/fields/TextInputMapper/TextInputMapper.docs.mdx} +11 -2
- package/{docs/components/fields/ToggleGroup.md → src/components/fields/ToggleGroup/ToggleGroup.docs.mdx} +29 -12
- package/{docs/components/form/Field.md → src/components/form/Form/Field.docs.mdx} +16 -6
- package/{docs/components/form/Form.md → src/components/form/Form/Form.docs.mdx} +19 -6
- package/{docs/components/form/FormInstance.md → src/components/form/Form/FormInstance.docs.mdx} +9 -1
- package/src/components/form/Form/ModernForm.docs.mdx +6 -0
- package/{docs → src/components/form/Form}/modern-form-migration.md +1 -1
- package/{docs → src/components/form/Form}/modern-form-typecheck.md +1 -1
- package/{docs/components/helpers/DisplayTransition.md → src/components/helpers/DisplayTransition/DisplayTransition.docs.mdx} +15 -0
- package/{docs/components/helpers/IconSwitch.md → src/components/helpers/IconSwitch/IconSwitch.docs.mdx} +16 -1
- package/{docs/components/layout/Flex.md → src/components/layout/Flex.docs.mdx} +5 -1
- package/{docs/components/layout/Flow.md → src/components/layout/Flow.docs.mdx} +5 -1
- package/{docs/components/layout/Grid.md → src/components/layout/Grid.docs.mdx} +5 -1
- package/{docs/components/layout/Panel.md → src/components/layout/Panel.docs.mdx} +6 -2
- package/{docs/components/layout/Prefix.md → src/components/layout/Prefix.docs.mdx} +5 -1
- package/{docs/components/layout/ResizablePanel.md → src/components/layout/ResizablePanel.docs.mdx} +9 -2
- package/{docs/components/layout/Space.md → src/components/layout/Space.docs.mdx} +5 -1
- package/{docs/components/layout/Suffix.md → src/components/layout/Suffix.docs.mdx} +5 -1
- package/src/components/navigation/NavTabs/NavTabs.docs.mdx +217 -0
- package/{docs/components/navigation/Pagination.md → src/components/navigation/Pagination/Pagination.docs.mdx} +25 -4
- package/{docs/components/navigation/Tabs.md → src/components/navigation/Tabs/Tabs.docs.mdx} +94 -10
- package/{docs/components/organisms/StatsCard.md → src/components/organisms/StatsCard/StatsCard.docs.mdx} +6 -2
- package/{docs/components/other/Calendar.md → src/components/other/Calendar/Calendar.docs.mdx} +23 -5
- package/{docs/components/other/CubeLogo.md → src/components/other/CubeLogo/CubeLogo.docs.mdx} +7 -1
- package/{docs/components/other/NoDataIcon.md → src/components/other/NoDataIcon/NoDataIcon.docs.mdx} +9 -3
- package/{docs/components/overlays/AlertDialog.md → src/components/overlays/AlertDialog/AlertDialog.docs.mdx} +8 -2
- package/{docs/components/overlays/Dialog.md → src/components/overlays/Dialog/Dialog.docs.mdx} +11 -3
- package/{docs/components/overlays/DialogContainer.md → src/components/overlays/Dialog/DialogContainer.docs.mdx} +12 -5
- package/{docs/components/overlays/DialogForm.md → src/components/overlays/Dialog/DialogForm.docs.mdx} +21 -14
- package/{docs/components/overlays/DialogTrigger.md → src/components/overlays/Dialog/DialogTrigger.docs.mdx} +10 -5
- package/{docs/components/overlays/UseDialogContainer.md → src/components/overlays/Dialog/UseDialogContainer.docs.mdx} +7 -3
- package/{docs/components/overlays/Notifications.md → src/components/overlays/Notifications/Notifications.docs.mdx} +29 -6
- package/{docs/components/overlays/Toast.md → src/components/overlays/Toast/Toast.docs.mdx} +18 -2
- package/{docs/components/overlays/Tooltip.md → src/components/overlays/Tooltip/Tooltip.docs.mdx} +23 -6
- package/{docs/components/overlays/TooltipProvider.md → src/components/overlays/Tooltip/TooltipProvider.docs.mdx} +6 -2
- package/{docs/components/overlays/TooltipTrigger.md → src/components/overlays/Tooltip/TooltipTrigger.docs.mdx} +6 -2
- package/{docs/components/portal/Portal.md → src/components/portal/Portal.docs.mdx} +7 -1
- package/{docs/components/status/LoadingAnimation.md → src/components/status/LoadingAnimation/LoadingAnimation.docs.mdx} +8 -2
- package/{docs/components/status/Spin.md → src/components/status/Spin/Spin.docs.mdx} +7 -1
- package/{docs/BaseProperties.md → src/stories/BaseProperties.docs.mdx} +6 -2
- package/{docs/Colors.md → src/stories/Colors.docs.mdx} +23 -1
- package/{docs/ComplexLayout.md → src/stories/ComplexLayout.docs.mdx} +34 -1
- package/{docs/CreateComponent.md → src/stories/CreateComponent.docs.mdx} +6 -2
- package/{docs/FieldProperties.md → src/stories/FieldProperties.docs.mdx} +10 -6
- package/{docs/Introduction.md → src/stories/Introduction.docs.mdx} +10 -6
- package/{docs/RenderCache.md → src/stories/RenderCache.docs.mdx} +7 -0
- package/{docs/SimpleLayout.md → src/stories/SimpleLayout.docs.mdx} +26 -0
- package/{docs/Theming.md → src/stories/Theming.docs.mdx} +17 -3
- package/{docs/Typography.md → src/stories/Typography.docs.mdx} +15 -0
- package/{docs/Usage.md → src/stories/Usage.docs.mdx} +46 -37
- package/{docs/Utilities.md → src/stories/Utilities.docs.mdx} +4 -0
- package/docs/components/form/ModernForm.md +0 -294
- package/docs/glaze/contrast.mdx +0 -751
- package/docs/glaze/exporting.mdx +0 -635
- package/docs/glaze/getting-started.mdx +0 -487
- package/docs/glaze/hdr.mdx +0 -523
- package/docs/glaze/methodology.mdx +0 -979
- package/docs/glaze/migration.md +0 -542
- package/docs/glaze/mixes.mdx +0 -348
- package/docs/glaze/okhst.mdx +0 -692
- package/docs/glaze/reference/color-definitions.md +0 -552
- package/docs/glaze/reference/color-tokens.md +0 -421
- package/docs/glaze/reference/configuration.md +0 -532
- package/docs/glaze/reference/contrast.md +0 -279
- package/docs/glaze/reference/index.md +0 -225
- package/docs/glaze/reference/output.md +0 -714
- package/docs/glaze/reference/palette.md +0 -435
- package/docs/glaze/reference/theme.md +0 -332
- package/docs/glaze/reference/utilities.md +0 -646
- package/docs/glaze/schemes.mdx +0 -644
- package/docs/glaze/shadows-and-glows.mdx +0 -550
- package/docs/tasty/README.md +0 -42
- package/docs/tasty/adoption.md +0 -331
- package/docs/tasty/ai-agents.md +0 -259
- package/docs/tasty/comparison.md +0 -449
- package/docs/tasty/configuration.md +0 -957
- package/docs/tasty/debug.md +0 -333
- package/docs/tasty/design-system.md +0 -569
- package/docs/tasty/dsl.md +0 -1231
- package/docs/tasty/getting-started.md +0 -297
- package/docs/tasty/injector.md +0 -635
- package/docs/tasty/methodology.md +0 -673
- package/docs/tasty/migration-v3.md +0 -285
- package/docs/tasty/pipeline.md +0 -768
- package/docs/tasty/plugins.md +0 -333
- package/docs/tasty/react-api.md +0 -746
- package/docs/tasty/runtime-benchmarks.md +0 -388
- package/docs/tasty/ssr.md +0 -636
- package/docs/tasty/styles.md +0 -781
- package/docs/tasty/tasty-static.md +0 -700
- /package/{docs → src/components/form/Form}/modern-form-guide.md +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
import * as ThemingStories from './Theming.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={ThemingStories} />
|
|
6
|
+
|
|
1
7
|
# Theming
|
|
2
8
|
|
|
3
9
|
The whole palette is generated by [Glaze](https://github.com/tenphi/glaze) from a handful of seeds, one per **zone**: the accent, the base, and each of the four status themes. Those seeds are tunable at runtime — change one and every token re-resolves, in light, dark, and high-contrast schemes at once.
|
|
@@ -251,6 +257,8 @@ Two things worth noticing while you tune:
|
|
|
251
257
|
- The **neutral** surfaces carry saturation factors of 0.10–0.175, so they read as a faint tint of the brand hue. That is where the saturation seed is legible — the solid accents hide it.
|
|
252
258
|
- The **syntax** colors do not move at all — they are their own theme with their own seed, so neither the accent hue nor the saturation reaches them.
|
|
253
259
|
|
|
260
|
+
<Canvas of={ThemingStories.Playground} />
|
|
261
|
+
|
|
254
262
|
## Status themes
|
|
255
263
|
|
|
256
264
|
Each status theme is a Glaze `extend()` of the default theme with its own seed, so tuning one moves only its own `#<theme>-*` family.
|
|
@@ -269,6 +277,8 @@ Two consequences worth stating. A vivid status color under a muted palette gives
|
|
|
269
277
|
|
|
270
278
|
A muted seed _beside_ an accent color is not expressible, because the zone is seeded one way or the other: a color there leaves the inherited saturation at its default. Mute the status themes individually if you want that.
|
|
271
279
|
|
|
280
|
+
<Canvas of={ThemingStories.StatusThemes} />
|
|
281
|
+
|
|
272
282
|
## Contrast level
|
|
273
283
|
|
|
274
284
|
By default contrast is a two-tier switch: normal colors plus a separate high-contrast set, selected by `<html data-contrast="high">` or a `prefers-contrast: more` preference.
|
|
@@ -281,6 +291,8 @@ The one exception is level `100`: there the normal colors already _are_ the high
|
|
|
281
291
|
|
|
282
292
|
Because level `0` reproduces `'auto'` exactly, tier included, shipping the slider and defaulting it off costs a consumer nothing.
|
|
283
293
|
|
|
294
|
+
<Canvas of={ThemingStories.ContrastLevel} />
|
|
295
|
+
|
|
284
296
|
## Theme builder
|
|
285
297
|
|
|
286
298
|
The `Theme Builder` story puts the whole config behind controls and renders the result into a single region, with one line drawn through the middle of the page: **the left column is the theme, the two switches over the preview are the viewing conditions.** Everything on the left writes to the palette config and would ship with the product; **Light / Dark** and **Normal / High contrast** write nothing at all — the same theme renders in all four combinations, and moving between them is how you check a theme rather than how you change one.
|
|
@@ -293,7 +305,7 @@ Those headings are also why the field labels are bare. `Seeded by` and `Hue` app
|
|
|
293
305
|
|
|
294
306
|
The **contrast level** needs no on/off switch: level `0` and `'auto'` are output-identical, tier included, so the slider at rest _is_ the shipped palette.
|
|
295
307
|
|
|
296
|
-
Status themes are four chips on one line rather than eight sliders. Each chip is a `theme="current"` `Button` colored by its own theme with a [ColorSwatch](
|
|
308
|
+
Status themes are four chips on one line rather than eight sliders. Each chip is a `theme="current"` `Button` colored by its own theme with a [ColorSwatch](/docs/forms-colorswatch--docs) of its accent, so the group answers the question you actually have — do these four still read as four different things — at a glance; press one to open its hue and saturation. The hue is not printed on the chip: it belongs to the slider that sets it, and carrying it there cost the whole row, since `success — 157°` is wide enough that four of them have to stack.
|
|
297
309
|
|
|
298
310
|
**Reset**, **Export** and **JSON** sit at the top of the column, not the bottom. The one button you reach for when an experiment goes wrong should not be behind the controls that caused it. `Export` opens the config as a `setPaletteConfig()` call to copy; `JSON` downloads `palette.json` on the press, with no intermediate state worth a second click. Both carry the config _as written_ rather than the resolved one, so an inherited `base` stays inherited instead of being frozen to whatever the accent happened to be.
|
|
299
311
|
|
|
@@ -370,6 +382,8 @@ Notes:
|
|
|
370
382
|
|
|
371
383
|
`renderPaletteTokens()` is the same thing without the aliases and companion tokens, if you want only the Glaze palette.
|
|
372
384
|
|
|
385
|
+
<Canvas of={ThemingStories.ThemeBuilder} />
|
|
386
|
+
|
|
373
387
|
## Reading and reacting to the config
|
|
374
388
|
|
|
375
389
|
```tsx
|
|
@@ -457,5 +471,5 @@ invalidatePaletteTokens(); // only needed once the kit is already mounted
|
|
|
457
471
|
|
|
458
472
|
## See also
|
|
459
473
|
|
|
460
|
-
- [Colors](
|
|
461
|
-
- [Usage](
|
|
474
|
+
- [Colors](/docs/getting-started-colors--docs) — how to pair surfaces with foregrounds, and what each token family is for.
|
|
475
|
+
- [Usage](/docs/getting-started-usage--docs) — the full token reference.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
import * as TypographyStories from './Typography.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={TypographyStories} />
|
|
6
|
+
|
|
1
7
|
# Typography
|
|
2
8
|
|
|
3
9
|
There are many ways to create typography elements like text labels and headings. You can use complete components, presets or low-level styles to get exact text label you want.
|
|
@@ -6,12 +12,18 @@ There are many ways to create typography elements like text labels and headings.
|
|
|
6
12
|
|
|
7
13
|
### Presets
|
|
8
14
|
|
|
15
|
+
<Canvas of={TypographyStories.Presets} />
|
|
16
|
+
|
|
9
17
|
### Paragraphs
|
|
10
18
|
|
|
11
19
|
Paragraphs with gaps between them.
|
|
12
20
|
|
|
21
|
+
<Canvas of={TypographyStories.Paragraph} />
|
|
22
|
+
|
|
13
23
|
### Text labels
|
|
14
24
|
|
|
25
|
+
<Canvas of={TypographyStories.Text} />
|
|
26
|
+
|
|
15
27
|
### Links
|
|
16
28
|
|
|
17
29
|
Use `!` prefix to open link in new tab.
|
|
@@ -29,6 +41,8 @@ Use `!` prefix to open link in new tab.
|
|
|
29
41
|
);
|
|
30
42
|
```
|
|
31
43
|
|
|
44
|
+
<Canvas of={TypographyStories.ExternalLink} />
|
|
45
|
+
|
|
32
46
|
Use `@` prefix to navigate to the new page without using the Router.
|
|
33
47
|
|
|
34
48
|
```jsx
|
|
@@ -36,3 +50,4 @@ Use `@` prefix to navigate to the new page without using the Router.
|
|
|
36
50
|
<Link to="@/">Move to the Main Page</Link>;
|
|
37
51
|
```
|
|
38
52
|
|
|
53
|
+
<Canvas of={TypographyStories.LinkWithoutUsingRouter} />
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="Getting Started/Usage" />
|
|
4
|
+
|
|
1
5
|
# Usage Guide
|
|
2
6
|
|
|
3
7
|
This guide covers the design system foundations — tokens, presets, colors, units, and patterns — needed to build and maintain components in Cube UI Kit.
|
|
4
8
|
|
|
5
|
-
For styling engine internals see the [Tasty documentation](
|
|
9
|
+
For styling engine internals see the [Tasty documentation](https://github.com/tenphi/tasty/tree/main/docs). Agents in projects that use [harnesspm](https://www.npmjs.com/package/@tenphi/harnesspm) get these pages for the installed Tasty through UI Kit's harness.
|
|
6
10
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
11
|
+
- [React API](https://github.com/tenphi/tasty/blob/main/docs/react-api.md) — `tasty()` component creation, state mappings, sub-elements, variants, extending components, style functions.
|
|
12
|
+
- [Configuration](https://github.com/tenphi/tasty/blob/main/docs/configuration.md) — `configure()` options: tokens, recipes, custom units, style handlers, TypeScript module augmentation.
|
|
13
|
+
- [Style properties](https://github.com/tenphi/tasty/blob/main/docs/styles.md) — Complete reference for all enhanced style properties (`fill`, `flow`, `preset`, `border`, `radius`, `transition`, etc.).
|
|
14
|
+
- [Debug utilities](https://github.com/tenphi/tasty/blob/main/docs/debug.md) — `tastyDebug` runtime API for inspecting injected CSS and troubleshooting.
|
|
15
|
+
- [Injector](https://github.com/tenphi/tasty/blob/main/docs/injector.md) — Low-level style injector: `inject()`, `injectGlobal()`, deduplication, SSR.
|
|
16
|
+
- [Zero-runtime mode](https://github.com/tenphi/tasty/blob/main/docs/tasty-static.md) — Zero-runtime `tastyStatic()`, Babel plugin, Next.js/Vite integration.
|
|
13
17
|
|
|
14
18
|
## Navigation
|
|
15
19
|
|
|
16
|
-
Pass your router's `useHref` and `useNavigate` hooks through `Root`'s `navigation` adapter. `Menu.Item`, like `Button`, `ItemButton`, and `Link`, accepts `to` destinations. Its label and description expose native anchors for modified-click, middle-click and link context-menu commands; the complete row supports ordinary click and keyboard activation. Use `navigationOptions` for router options and `target`, `rel`, or `download` for native link behavior. Nested providers and overlays inherit the adapter unless they explicitly supply another one.
|
|
20
|
+
Pass your router's `useHref` and `useNavigate` hooks through `Root`'s `navigation` adapter. `Menu.Item`, like `Button`, `ItemButton`, and `Link`, accepts `to` destinations. Its label and description expose native anchors for modified-click, middle-click and link context-menu commands; the complete row supports ordinary click and keyboard activation. Use `navigationOptions` for router options and `target`, `rel`, or `download` for native link behavior. `NavTabs.Item` takes a `to` too, a route path or object, without those options. Nested providers and overlays inherit the adapter unless they explicitly supply another one.
|
|
17
21
|
|
|
18
22
|
## Overlay sizing
|
|
19
23
|
|
|
@@ -114,7 +118,7 @@ All color tokens use `#name` syntax in styles. Opacity variants use `#name.NN` (
|
|
|
114
118
|
|
|
115
119
|
The palette is generated by [`@tenphi/glaze`](https://github.com/tenphi/glaze) (see `src/tokens/palette.ts`). Every color token is emitted as a state map with `light`, `@dark`, and `@hc` (high-contrast) variants, so the entire UI Kit adapts to dark / high-contrast schemes automatically.
|
|
116
120
|
|
|
117
|
-
The seeds it is generated from — brand hue, saturation, per-status hues, `pastel`, `contrastLevel` — are tunable at runtime. See [Theming](
|
|
121
|
+
The seeds it is generated from — brand hue, saturation, per-status hues, `pastel`, `contrastLevel` — are tunable at runtime. See [Theming](/docs/getting-started-theming--docs).
|
|
118
122
|
|
|
119
123
|
### Color Schemes
|
|
120
124
|
|
|
@@ -214,7 +218,7 @@ In the `default` theme these tokens are unprefixed (`#accent-surface`). In color
|
|
|
214
218
|
|
|
215
219
|
Each colored theme (`primary`, `purple`, `success`, `danger`, `warning`, `note`) also provides its own tinted `<theme>-surface` (banner / chip background) and `<theme>-surface-text` (banner text).
|
|
216
220
|
|
|
217
|
-
The hues below are the _defaults_; each is tunable at runtime (see [Theming](
|
|
221
|
+
The hues below are the _defaults_; each is tunable at runtime (see [Theming](/docs/getting-started-theming--docs)).
|
|
218
222
|
|
|
219
223
|
| Group | Default hue | Purpose |
|
|
220
224
|
| -------------------------- | ----------- | ----------------------------- |
|
|
@@ -249,33 +253,36 @@ To theme a _region_ instead of the document — a theme preview, or a dark panel
|
|
|
249
253
|
</Block>
|
|
250
254
|
```
|
|
251
255
|
|
|
252
|
-
Full contract, caveats and a live playground: [Theming](
|
|
256
|
+
Full contract, caveats and a live playground: [Theming](/docs/getting-started-theming--docs).
|
|
253
257
|
|
|
254
258
|
### Legacy Aliases
|
|
255
259
|
|
|
256
260
|
The previous token names continue to work as aliases (defined at the bottom of `src/tokens/colors.ts`). New code should prefer the Glaze tokens, but existing components do not need to be migrated:
|
|
257
261
|
|
|
258
|
-
| Legacy
|
|
259
|
-
|
|
|
260
|
-
| `#text`
|
|
261
|
-
| `#dark` / `#dark-01`
|
|
262
|
-
| `#dark-02`
|
|
263
|
-
| `#dark-03`
|
|
264
|
-
| `#dark-04`
|
|
265
|
-
| `#dark-05`
|
|
266
|
-
| `#minor`
|
|
267
|
-
| `#shadow`
|
|
268
|
-
| `#light`
|
|
269
|
-
| `#dark-bg`
|
|
270
|
-
|
|
|
271
|
-
|
|
|
272
|
-
|
|
|
273
|
-
|
|
|
274
|
-
| `#<
|
|
275
|
-
| `#<
|
|
276
|
-
| `#<
|
|
277
|
-
| `#<
|
|
278
|
-
|
|
|
262
|
+
| Legacy | Resolves to |
|
|
263
|
+
| --- | --- |
|
|
264
|
+
| `#text` | `#surface-text-soft` |
|
|
265
|
+
| `#dark` / `#dark-01` | `#surface-text` |
|
|
266
|
+
| `#dark-02` | `#surface-text-soft` |
|
|
267
|
+
| `#dark-03` | `#surface-text-soft-2` |
|
|
268
|
+
| `#dark-04` | `#placeholder` |
|
|
269
|
+
| `#dark-05` | `#border` |
|
|
270
|
+
| `#minor` | `#surface-text-soft.65` |
|
|
271
|
+
| `#shadow` | `#shadow-md` |
|
|
272
|
+
| `#light` | `#surface-3` |
|
|
273
|
+
| `#dark-bg` | `#surface-2` |
|
|
274
|
+
| `#<theme>` | `#<theme>-accent-surface` |
|
|
275
|
+
| `#<theme>-text` | `#<theme>-accent-text` |
|
|
276
|
+
| `#<theme>-text-soft` | `#<theme>-accent-text-soft` |
|
|
277
|
+
| `#<theme>-bg` | `#<theme>-surface` |
|
|
278
|
+
| `#<theme>-icon` | `#<theme>-accent-icon` |
|
|
279
|
+
| `#<theme>-hover` | `#<theme>-accent-surface-hover` |
|
|
280
|
+
| `#<theme>-desaturated` (all but `purple`) | `#<theme>-accent-surface-2` |
|
|
281
|
+
| `#<theme>-disabled` | `#disabled` |
|
|
282
|
+
| `#purple-01` / `#purple-02` / `#purple-03` | `#purple-accent-surface` / `-2` / `-3` |
|
|
283
|
+
| `#purple-04` | `#purple-surface` |
|
|
284
|
+
|
|
285
|
+
`<theme>` is `primary`, `purple`, `success`, `danger`, `warning` or `note`; the `purple-*` tokens are the legacy name of the `primary-*` ones and resolve to the same colors.
|
|
279
286
|
|
|
280
287
|
`#white`, `#black`, and `#clear` are not defined in the palette — `#white` and `#black` are tasty's built-in named colors, and `#clear` is an alias for `transparent`.
|
|
281
288
|
|
|
@@ -410,7 +417,7 @@ Component themes are set via the `theme` prop or `theme=name` modifier:
|
|
|
410
417
|
|
|
411
418
|
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
419
|
|
|
413
|
-
Use `className` and inline `style` when a third-party integration needs to attach its own CSS. The [base properties guide](
|
|
420
|
+
Use `className` and inline `style` when a third-party integration needs to attach its own CSS. The [base properties guide](/docs/getting-started-base-properties--docs) explains the component-specific roles of `theme` and `title`.
|
|
414
421
|
|
|
415
422
|
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:
|
|
416
423
|
|
|
@@ -418,7 +425,7 @@ The package's `tasty.config.ts` lists the other components as `protectedComponen
|
|
|
418
425
|
- style props other than the ones that place or size the component (`width`, `height`, `gridArea`, `margin`, `inset`, …). Containers (`Card`, `Panel`, `ResizablePanel`, `Content`, `Header`, `Footer`, `Alert`, `Result`, `Skeleton`, and `Layout` and `GridLayout` with their sub-components) also keep the ones that lay out their content: `display`, `padding`, `gap`, `flow`, `place*`, `align*`, `justify*`, `grid*`, `overflow`, `scrollbar`, `textAlign`, and `container` for container queries. A container that draws no fill and no border of its own (`Layout`, `GridLayout`, `Panel`, `ResizablePanel`, `Content`, `Header` and `Footer`) also keeps `fill` and `border`. `Layout`'s sections (`Layout.Content`, `Header`, `Footer`, `Toolbar`, `Block`, `Flex`, `Grid`, `Center` and `Container`) keep `fill`, but not `border`: the border that separates stacked sections is UI Kit's. `Placeholder` keeps `radius`, the shape of what it stands in for. Root `styles` that sets only allowed props passes too;
|
|
419
426
|
- `tasty()` wrappers that restyle a protected component, and wrappers of those wrappers.
|
|
420
427
|
|
|
421
|
-
On an input, the style props that place or size it act on its outer element: the field wrapper when it renders (see [Field properties](
|
|
428
|
+
On an input, the style props that place or size it act on its outer element: the field wrapper when it renders (see [Field properties](/docs/getting-started-field-properties--docs)), the input itself otherwise. Its `styles` always style the input, so a root `styles` that only sizes it passes the rule but sizes the input inside the field, not the field. To size the input alone, beside a side label for example, use its `controlWidth` prop. Input components take no other style props.
|
|
422
429
|
|
|
423
430
|
A component's own prop that shares a name with a style passes, such as a field's `direction` and `filter`, a text field's `resize`, `ColorSwatch`'s `color` or `AlertDialog`'s `content`.
|
|
424
431
|
|
|
@@ -450,6 +457,8 @@ An intended override takes a disable comment with its reason on the line before
|
|
|
450
457
|
|
|
451
458
|
With this rule on, `tasty/no-styles-prop` can stay off, so the primitives keep their `styles`.
|
|
452
459
|
|
|
460
|
+
In a project that uses [harnesspm](https://www.npmjs.com/package/@tenphi/harnesspm), installing the plugin also gives agents its harness through UI Kit's: a rule to lint the styles they change, a page for every `tasty/*` rule, `tasty-lint:check`, and a hook that lints each file they edit. Trust `@tenphi/eslint-plugin-tasty` in `harnesspm.json` to turn on the tool and the hook. They run the plugin through ESLint's API, so they need `eslint` installed, also in a project that lints with Oxlint.
|
|
461
|
+
|
|
453
462
|
The same `extends` gives the plugin's other rules the names UI Kit defines: its tokens, presets and recipes, and the `@dark`, `@hc`, `@mobile` and `@reduced-motion` state aliases. `tasty/valid-color-token`, `tasty/valid-custom-property`, `tasty/valid-preset`, `tasty/valid-recipe`, `tasty/valid-state-key` and `tasty/no-unknown-state-alias` then report only names that don't exist. The tokens include the ones a component's docs offer you, to read inside that component or set on it, such as a dialog's `$dialog-padding-h` or a layout's `$content-padding`. A component's other custom properties are internal and can change, so the rules report them too. List what your app defines itself, in its own `configure()` or `tokens`, in its own config, which adds to the lists it extends:
|
|
454
463
|
|
|
455
464
|
```ts
|
|
@@ -600,14 +609,14 @@ const form = Form.useController<{ email: string | null }>({
|
|
|
600
609
|
|
|
601
610
|
Inputs subscribe to their own values and errors. For other reactive UI, use `Form.useValue(form, path)` for one value, `Form.useFieldState(form, path)` for field metadata, or a selector for derived state. `<Form.Subscribe>` keeps an inline region's subscription separate from its parent. Keep imperative getters in handlers and effects.
|
|
602
611
|
|
|
603
|
-
[Modern Form](
|
|
612
|
+
[Modern Form](/docs/forms-modernform--docs) explains which API to choose for server data, nullable values, nested fields, conditional sections, cross-field and remote validation, errors, and external actions. Use that guide for implementation recipes and the [migration checklist](https://github.com/cube-js/cube-ui-kit/blob/main/docs/modern-form-migration.md) when converting an existing form.
|
|
604
613
|
|
|
605
614
|
### Legacy forms
|
|
606
615
|
|
|
607
|
-
`Form.useForm()` and roots without a modern controller keep the legacy backend. `DialogForm` also supports modern controllers; `Form.Item` remains legacy-only. See [FormInstance (legacy)](
|
|
616
|
+
`Form.useForm()` and roots without a modern controller keep the legacy backend. `DialogForm` also supports modern controllers; `Form.Item` remains legacy-only. See [FormInstance (legacy)](/docs/forms-forminstance--docs) for legacy instance methods, defaults, and dot notation.
|
|
608
617
|
|
|
609
618
|
### Shared field integration
|
|
610
619
|
|
|
611
|
-
Built-in inputs have field support; they do not need a `Field` wrapper. Modern `name` and `field` bindings, and legacy string `name` bindings, connect through `useFieldProps`. Custom controls use that hook and `wrapWithField`. [Field Properties](
|
|
620
|
+
Built-in inputs have field support; they do not need a `Field` wrapper. Modern `name` and `field` bindings, and legacy string `name` bindings, connect through `useFieldProps`. Custom controls use that hook and `wrapWithField`. [Field Properties](/docs/getting-started-field-properties--docs) documents shared labels, validation, state, and presentation props.
|
|
612
621
|
|
|
613
622
|
Fields render their chrome when there is something to show: a label, a form binding, or a description, message, field styles or props, or `isHidden`, and on `TextInput`, `TextArea`, `PasswordInput` and `NumberInput` a `validate`. A field with none of them renders only the control. Use `isBare` for an inline control with no room for its chrome, or when a parent owns the field layout and feedback; a supplied label remains accessible but visually hidden. `isBare={false}` renders the chrome anyway. Message content never chooses whether the wrapper exists. `errorMessage={null}` suppresses error text and its fallback while preserving the description and invalid state.
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
# Modern Form: choose the API for the job
|
|
2
|
-
|
|
3
|
-
For a new modern form, start with `Form.useController<Model>()`, bind inputs with `name="email"` or a nested tuple such as `name={['user', 'email']}`, and submit through `<Form onSubmit={...}>` and `<Form.Submit>`. Add subscriptions only where other UI needs to read form state. The input components already subscribe to their own values and errors. `field={form.field(path)}` is an optional alternative when you want model-checked paths, input value compatibility checks, or inferred custom-validator types.
|
|
4
|
-
|
|
5
|
-
**The modern implementation is recommended for new forms.** UI Kit also ships a legacy implementation for compatibility. Existing `Form.useForm()` forms and roots without a modern controller use the legacy backend. Follow the [migration checklist](https://github.com/cube-js/cube-ui-kit/blob/main/docs/modern-form-migration.md) when converting one. `DialogForm` also accepts a modern controller and is recommended for new dialog forms; it preserves the legacy implementation when no modern controller is supplied.
|
|
6
|
-
|
|
7
|
-
Recipes: [API choices](#pick-one-binding-and-one-owner-for-each-concern), [reactive UI](#read-a-value-show-status-or-reveal-a-section), [server data](#load-server-data-refresh-defaults-or-discard-edits), [programmatic edits](#edit-values-from-an-event-handler), [validation](#validate-simple-rules-sibling-fields-or-an-api-response), [conditional fields and wizards](#hide-fields-use-nested-data-or-build-a-wizard), [submission](#submit-display-server-errors-and-reset), and [custom controls](#implement-a-reusable-custom-control).
|
|
8
|
-
|
|
9
|
-
## Start with an ordinary edit form
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
import { Form, Switch, TextInput } from '@cube-dev/ui-kit';
|
|
13
|
-
import type { FormValues } from '@cube-dev/ui-kit';
|
|
14
|
-
|
|
15
|
-
interface Profile {
|
|
16
|
-
email: string | null;
|
|
17
|
-
notifications: boolean | null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function ProfileForm({
|
|
21
|
-
initialProfile,
|
|
22
|
-
save,
|
|
23
|
-
}: {
|
|
24
|
-
initialProfile: Profile;
|
|
25
|
-
save: (values: FormValues<Profile>, signal: AbortSignal) => Promise<void>;
|
|
26
|
-
}) {
|
|
27
|
-
const form = Form.useController<Profile>({ defaultValues: initialProfile });
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<Form form={form} onSubmit={(values, { signal }) => save(values, signal)}>
|
|
31
|
-
<TextInput
|
|
32
|
-
name="email"
|
|
33
|
-
rules={[{ type: 'email', message: 'Enter a valid email' }]}
|
|
34
|
-
label="Email"
|
|
35
|
-
isRequired
|
|
36
|
-
/>
|
|
37
|
-
<Switch name="notifications" label="Notifications" />
|
|
38
|
-
<Form.SubmitError />
|
|
39
|
-
<Form.Submit>Save</Form.Submit>
|
|
40
|
-
<Form.Reset>Reset</Form.Reset>
|
|
41
|
-
</Form>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
The model describes possible values, including API `null`s. A text input displays `null` as empty and a switch displays it as unchecked; neither writes that display fallback into the form. Editing uses the control's normal change payload, and reset restores the nullable default. `FormValues<Model>` describes readonly, potentially incomplete data: registration and validation do not prove that every model property is present. Map to your API's request type explicitly where it requires complete data.
|
|
47
|
-
|
|
48
|
-
`defaultValues` initializes this controller once. A later `initialProfile` prop does not overwrite edits. Use the loading commands below, or remount the form with a record key when switching records should start a new editing session. Modern roots do not accept `defaultValues`.
|
|
49
|
-
|
|
50
|
-
## Pick one binding and one owner for each concern
|
|
51
|
-
|
|
52
|
-
| Concern | Start here | Use the alternative when… |
|
|
53
|
-
| --- | --- | --- |
|
|
54
|
-
| Connect an input | `name="email"` for a literal name, or `name={['user', 'email']}` for a nested modern path | `field={form.field(path, options)}` adds model-checked paths, input value compatibility, and validator inference. Neither binding requires the other. |
|
|
55
|
-
| Locate the controller | Use the controller you created, or pass it as a prop | `Form.useControllerContext<Model>()` avoids prop threading in a descendant. It reads context without subscribing. |
|
|
56
|
-
| Configure a field | With `name`, put `rules`, dependencies, and retention on the input | With `field`, put these options and typed `validate` on the descriptor. Avoid configuring the same option in both places. |
|
|
57
|
-
| Present a field | Input props such as `label`, `description`, `isRequired` | `rules: [{ required: true }]` is useful when required validation needs a custom message or no visible required marker. |
|
|
58
|
-
| Handle submit/change/failure | Callbacks on the owning `<Form>` | Hook callbacks let a controller own behavior independently of a root, or provide defaults to a wrapper. Choose one location per callback. |
|
|
59
|
-
| Initialize values | Controller `defaultValues` | Field `defaultValue` supplies a fallback for a reusable field missing from the controller's data. |
|
|
60
|
-
|
|
61
|
-
`Form.Submit`, `Form.Reset`, and `Form.SubmitError` are aliases of the exported `SubmitButton`, `ResetButton`, and `SubmitError` components. This guide uses the `Form.*` names consistently; importing a standalone name does not select a different implementation.
|
|
62
|
-
|
|
63
|
-
`name` uses the surrounding form, or an explicit `form={form}` outside it. Tuple names accept string and numeric segments and readonly arrays; inline tuples do not need memoization. Names are not checked against the surrounding controller's model because React context cannot infer its type. Tuple names require a modern controller; legacy forms retain string names and dot notation.
|
|
64
|
-
|
|
65
|
-
A descriptor is pure configuration, so creating it inline is expected. It neither reads state nor registers a field; the mounted input registers after commit. It supplies the controller and path even outside the root, so adding `form` or `name` to the same input is unnecessary. If both are present, the descriptor wins. Descriptor options override only matching options they supply. In particular, descriptor `rules` or `validate` replaces input-level `rules`; put built-in rules and a custom validator together on the descriptor to run both.
|
|
66
|
-
|
|
67
|
-
Controller values and defaults take precedence over field defaults, including explicit `null` and `undefined`. Root callbacks override the corresponding hook callback while mounted; omitted or undefined root callbacks fall back to the hook callback. Business callbacks update after every committed render. Defaults, `errorPolicy`, and diagnostic handlers are creation options; update values through commands and override error policy per field when needed.
|
|
68
|
-
|
|
69
|
-
Use one owning root per controller. Omitted `form` props use context; explicitly passing `form={undefined}` detaches an input. Legacy roots and `FormScopeMask` hide the surrounding modern context.
|
|
70
|
-
|
|
71
|
-
## Read a value, show status, or reveal a section
|
|
72
|
-
|
|
73
|
-
| UI needs | Use | Why it exists |
|
|
74
|
-
| --- | --- | --- |
|
|
75
|
-
| One field's value | `Form.useValue(form, path)` | Checked path and inferred value without writing a selector. |
|
|
76
|
-
| A field's value, errors, or metadata | `Form.useFieldState(form, path)` | Checked path with typed value/default, errors, status, dirty, touched, and active state. |
|
|
77
|
-
| A derived result or form-wide flag | `Form.useSelector(form, selector)` | General selection, such as `state.isDirty` or `state.canReset`. |
|
|
78
|
-
| A small inline region that reacts independently | `<Form.Subscribe form={form} selector={...}>` | Keeps the subscription in that subtree without extracting a component. |
|
|
79
|
-
| A value in an event handler or effect | `form.getValue(path)` / `form.getValues()` | One-time imperative read; it does not subscribe React. |
|
|
80
|
-
|
|
81
|
-
The value and field-state hooks are conveniences over selectors. The choice between a hook and `Subscribe` is where rerenders should happen: hooks rerender their component, while `Subscribe` rerenders its children region. Creating a controller does not subscribe its owner. Prefer a leaf component for reusable reactive UI:
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
function EmailPreview() {
|
|
85
|
-
const form = Form.useControllerContext<Profile>();
|
|
86
|
-
const email = Form.useValue(form, 'email');
|
|
87
|
-
return <output>{email ?? 'No email set'}</output>;
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Use `Subscribe` for a conditional section directly inside the form:
|
|
92
|
-
|
|
93
|
-
```tsx
|
|
94
|
-
<Form.Subscribe form={form} selector={(state) => state.values.notifications}>
|
|
95
|
-
{(enabled) =>
|
|
96
|
-
enabled ? <TextInput field={form.field('email')} label="Email" /> : null
|
|
97
|
-
}
|
|
98
|
-
</Form.Subscribe>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
These are alternative placements of the email input, not an instruction to mount it twice. Pass `form` to `Subscribe` for inferred model types. It can also use modern context when `form` is omitted, but React context cannot infer the ancestor's model. The generic on `useControllerContext<Profile>()` is your assertion that the ancestor uses `Profile`.
|
|
102
|
-
|
|
103
|
-
Selectors and equality functions must be pure. Select a primitive or a stable snapshot branch; allocating a fresh object compares unequal under the default `Object.is`. Supply `isEqual` when such an object should compare by its contents. `useFieldState` can return `undefined` before a path is tracked. Getter reads in JSX will not stay current. Plain objects and arrays in snapshots are deeply readonly and potentially incomplete; use commands for writes. Date-control values retain their methods; treat them and other non-plain values as immutable.
|
|
104
|
-
|
|
105
|
-
## Load server data, refresh defaults, or discard edits
|
|
106
|
-
|
|
107
|
-
Most forms need only initialization, adoption for incoming data, and reset for a new editing session. The other modes let integrations change the reset baseline independently of user interaction.
|
|
108
|
-
|
|
109
|
-
| Situation | Command | Effect |
|
|
110
|
-
| --- | --- | --- |
|
|
111
|
-
| Data is available before mounting | `Form.useController({ defaultValues })` | Seeds values and the reset baseline once. |
|
|
112
|
-
| A response arrives while the user may be typing | `adoptDefaultValues(response, { when: 'untouched' })` | Replaces the baseline and adopts untouched fields, preserving touched values. This is the default adoption policy. |
|
|
113
|
-
| Refresh fields that still match their previous defaults | `adoptDefaultValues(response, { when: 'clean' })` | Preserves dirty values, including programmatic edits; touched-but-clean fields can refresh. |
|
|
114
|
-
| Discard edits and start from a different record | `reset({ values: response })` | Replaces baseline and values, clears interaction/errors, and cancels pending submission. |
|
|
115
|
-
| Discard edits using the existing baseline | `reset()` / `<Form.Reset>` | Restores defaults and clears interaction/errors. |
|
|
116
|
-
| Change what Reset will restore without changing the draft | `setDefaultValues(response)` | Replaces only the baseline; dirtiness is recomputed against it. |
|
|
117
|
-
|
|
118
|
-
All defaults commands replace the baseline object; omitted keys are removed from it. Adoption also starts from the incoming object, then restores protected paths. It is not a partial patch. Use `setValue` or `setValues` for edits to current data.
|
|
119
|
-
|
|
120
|
-
### Advanced defaults policies
|
|
121
|
-
|
|
122
|
-
Use these only when the ordinary adoption or reset behavior above does not fit the interaction:
|
|
123
|
-
|
|
124
|
-
| Situation | Command | Effect |
|
|
125
|
-
| --- | --- | --- |
|
|
126
|
-
| Protect both touched and dirty fields | `adoptDefaultValues(response, { when: 'untouched', preserveDirty: true })` | Adds dirty-value protection to the touched check. |
|
|
127
|
-
| Replace values but keep touched state and submission state | `adoptDefaultValues(response, { when: 'always' })` | Replaces values and baseline; invalidates affected field validation. |
|
|
128
|
-
| Replace values and clear field interaction, keeping submission state | `setDefaultValues(response, { currentValues: 'replace' })` | Replaces values and baseline; clears touched/field validation, but does not cancel submission or clear its error. |
|
|
129
|
-
|
|
130
|
-
### Asynchronous loading
|
|
131
|
-
|
|
132
|
-
For asynchronous loading, protect both user edits and request ordering:
|
|
133
|
-
|
|
134
|
-
```tsx
|
|
135
|
-
useEffect(() => {
|
|
136
|
-
const request = new AbortController();
|
|
137
|
-
void load(request.signal)
|
|
138
|
-
.then((profile) => {
|
|
139
|
-
if (!request.signal.aborted) {
|
|
140
|
-
setLoadError(undefined);
|
|
141
|
-
form.adoptDefaultValues(profile, { when: 'untouched' });
|
|
142
|
-
}
|
|
143
|
-
})
|
|
144
|
-
.catch((error: unknown) => {
|
|
145
|
-
if (!request.signal.aborted) setLoadError(error);
|
|
146
|
-
});
|
|
147
|
-
return () => request.abort();
|
|
148
|
-
}, [form, load]);
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Here `load` is a stable loader for the current record and `setLoadError` is local UI state; import `useEffect` from React. Gate editing on loading if a partially loaded record must never be submitted. When switching records, remount or reset the editing session: adopting an unrelated record while preserving old edits would mix the two.
|
|
152
|
-
|
|
153
|
-
## Edit values from an event handler
|
|
154
|
-
|
|
155
|
-
Use `setValue(path, value)` for one path and `setValues(partial)` for several top-level keys. Nested objects supplied to `setValues` replace those objects; use tuple paths to update an individual nested leaf. Neither command changes the reset baseline.
|
|
156
|
-
|
|
157
|
-
```tsx
|
|
158
|
-
<button
|
|
159
|
-
type="button"
|
|
160
|
-
onClick={() => form.setValue('notifications', true, { source: 'user' })}
|
|
161
|
-
>
|
|
162
|
-
Enable notifications
|
|
163
|
-
</button>
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
`source: 'user'` defaults to touching the field and notifying `onValuesChange` when values change. Programmatic writes default to neither; override `touch` and `notify` explicitly when needed. `validate` defaults to `auto`; use `always` to force validation or `never` to invalidate without revalidating. `onValuesChange(values, change)` receives retained values and `{ names, source, kind }`. Use it for user-edit integrations such as a debounced draft saver; decide separately whether programmatic writes should trigger that saver. Defaults adoption, value replacement, and reset also notify this callback when they report changed paths; filter `change.kind` or `change.source` if only direct edits should be saved.
|
|
167
|
-
|
|
168
|
-
`batch(() => { ... })` combines synchronous commands into one publication. It is useful for several tuple writes; it is not a rollback transaction and must not wrap async work. `subscribe(listener)` is for imperative integrations that need every publication; React UI should use the hooks above and observers must call the returned unsubscribe function.
|
|
169
|
-
|
|
170
|
-
## Validate simple rules, sibling fields, or an API response
|
|
171
|
-
|
|
172
|
-
| Validation case | Start here |
|
|
173
|
-
| --- | --- |
|
|
174
|
-
| Required field with a visible marker | Input `isRequired`; it adds required validation too. |
|
|
175
|
-
| Email, length, range, pattern, or enum | Input `rules` using the built-in constraints, or descriptor `rules` when using `field`. They skip an empty value (`''`, `undefined`, `null`; an empty array is not one), so an optional field passes while empty; add `required` to reject one. |
|
|
176
|
-
| Custom domain check | Descriptor `validate(value, context)` for an inferred field value and checked reads. |
|
|
177
|
-
| Several custom rules or existing shared rule objects | `rules: [{ validator(rule, value, context) { ... } }]`; use `ModernValidationRule` for strict modern rule typing. |
|
|
178
|
-
| Validation depends on another form value | `dependsOn: ['password']`, or nested tuples such as `dependsOn: [['account', 'password']]`. |
|
|
179
|
-
| Validation captures props or other external values | `deps: [organizationId, checkName]`. Include changing functions too. |
|
|
180
|
-
| An integration explicitly versions function behavior | `rulesKey: revision`; ordinary forms can leave it out. |
|
|
181
|
-
|
|
182
|
-
`deps` and `dependsOn` deliberately have separate jobs. A string in `deps` is an external value; the same string in `dependsOn` names a form field. Use both when a validator reads both sources. `rulesKey` is an advanced function revision, not another place to list ordinary dependencies.
|
|
183
|
-
|
|
184
|
-
A password confirmation can declare its sibling dependency even when an early return skips the read:
|
|
185
|
-
|
|
186
|
-
```tsx
|
|
187
|
-
<TextInput
|
|
188
|
-
field={form.field('confirmation', {
|
|
189
|
-
dependsOn: ['password'],
|
|
190
|
-
validate: (value, { getValue }) => {
|
|
191
|
-
if (!value) return;
|
|
192
|
-
return value === getValue('password') ? undefined : 'Passwords must match';
|
|
193
|
-
},
|
|
194
|
-
})}
|
|
195
|
-
label="Confirm password"
|
|
196
|
-
type="password"
|
|
197
|
-
isRequired
|
|
198
|
-
/>
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
This example uses a controller whose model contains `password` and `confirmation`. A declared dependency change revalidates fields that were already validated or validating, unless the write requests `validate: 'never'`. Reads through validator `getValue`/`getValues` use one captured snapshot and cancel in-flight work if that data changes; reads alone do not schedule another run.
|
|
202
|
-
|
|
203
|
-
For a remote check, pass the cancellation signal and declare captured inputs:
|
|
204
|
-
|
|
205
|
-
```tsx
|
|
206
|
-
<TextInput
|
|
207
|
-
field={form.field('name', {
|
|
208
|
-
deps: [organizationId, checkName],
|
|
209
|
-
validateTrigger: 'onChange',
|
|
210
|
-
validationDelay: 200,
|
|
211
|
-
validate: async (value, { signal }) => {
|
|
212
|
-
if (!value) return;
|
|
213
|
-
const available = await checkName(organizationId, value, signal);
|
|
214
|
-
return available ? undefined : 'Name is already in use';
|
|
215
|
-
},
|
|
216
|
-
})}
|
|
217
|
-
label="Name"
|
|
218
|
-
isRequired
|
|
219
|
-
/>
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
Here the model contains a string `name`, and `checkName` returns `Promise<boolean>`. A validator succeeds by returning `undefined`, `null`, or an empty string. Return a ReactNode error, or throw/reject, to fail. Adapt legacy validators that resolve data objects; those are failures in the modern contract. Superseded results cannot overwrite current errors even if the validator ignores its signal.
|
|
223
|
-
|
|
224
|
-
Automatic validation honors `validateTrigger` and `validationDelay`. An `auto` write revalidates on-change fields and fields already showing errors; otherwise on-blur fields wait for blur. Explicit `form.validate()` and submission validate immediately; `form.validate(['email'])` selects a literal path, and `form.validate([['rows', 0, 'email']])` selects a nested path. Inspect `{ isValid, stale, fields }` before advancing a wizard step. Validation covers active fields only. `errorPolicy: 'first' | 'all'` controls rule-error collection, with `first` as the default.
|
|
225
|
-
|
|
226
|
-
Rule constraints and function source are compared automatically so equivalent inline validators do not restart pending work. Captures require `deps`; different functions with identical source, including bound/native functions, also need an explicit dependency or revision. `rulesKey` skips function-source comparison only; constraints such as `min`, `pattern`, and `required` are still compared. Update the key or dependencies when function behavior changes. `deps` alone retains source comparison.
|
|
227
|
-
|
|
228
|
-
## Hide fields, use nested data, or build a wizard
|
|
229
|
-
|
|
230
|
-
Unmounting the last input at a path removes it from `activeValues` immediately and retains its draft by default. Remounting restores that draft. Use `field={form.field('details', { preserve: false })}` when leaving a section should discard its current value. Cleanup removes the value, but its default baseline remains available to reset. Visually hiding an input while leaving it mounted does not unregister it.
|
|
231
|
-
|
|
232
|
-
| Payload | How to choose it | Validation |
|
|
233
|
-
| --- | --- | --- |
|
|
234
|
-
| Mounted fields | `<Form>` / `form.submit()` defaults | Active registered fields only. |
|
|
235
|
-
| All retained data, including hidden sections | `<Form submitValues="all">` or `form.submit({ include: 'all' })` | Still only active registered fields. |
|
|
236
|
-
|
|
237
|
-
For a wizard, validate a step before unmounting it and choose `submitValues="all"` if previous steps belong in the final payload. That does not revalidate unmounted steps. If final submission must validate every step against the latest data, keep the relevant inputs mounted or perform whole-payload validation explicitly. A form with no active fields is invalid.
|
|
238
|
-
|
|
239
|
-
Bind nested leaves directly with `name={['rows', index, 'email']}`. The optional typed equivalent is `field={form.field(['rows', index, 'email'])}`. A string such as `'user.email'` is one literal key, not dot notation. Numeric indices and numeric string segments address the same path. Removing an array path does not shift the other indices. Registering a parent object makes its complete value active; register leaf paths when only selected children belong in the active payload. Descriptor and controller-command literal paths are checked against the model; `name` accepts dynamic paths without those checks. The declaration surface requires TypeScript 5.4 or newer.
|
|
240
|
-
|
|
241
|
-
`getValues()` / `state.values` contains all retained data; `getActiveValues()` / `state.activeValues` contains registered paths. Dirty/touched metadata includes retained fields, while validity concerns active fields.
|
|
242
|
-
|
|
243
|
-
## Submit, display server errors, and reset
|
|
244
|
-
|
|
245
|
-
Use `<Form.Submit>` for normal submission, including Enter in the form. It handles loading and stays enabled after validation errors so users can request feedback again. `disableOnInvalid` opts into disabling it on invalid state. Use `form.submit()` for a workflow controlled from an event handler; inspect its result (`submitted`, `invalid`, `failed`, `ignored`, or `stale`) before continuing. Choose the payload independently for each call: imperative `submit()` defaults to active values even if the root has `submitValues="all"`.
|
|
246
|
-
|
|
247
|
-
To place actions or errors outside the root, pass the controller:
|
|
248
|
-
|
|
249
|
-
```tsx
|
|
250
|
-
<Form.Submit form={form}>Save</Form.Submit>
|
|
251
|
-
<Form.Reset form={form}>Reset</Form.Reset>
|
|
252
|
-
<Form.SubmitError form={form} />
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
An explicit-controller Submit targets that controller's owning form even inside another DOM form. Return or await the request in `onSubmit(values, { signal, include })`; concurrent submissions are ignored. Throwing or rejecting sets `submitError`, which `Form.SubmitError` displays with a safe generic fallback. Supply `renderError` to format application errors. Ordinary edits keep that error; another submit or reset clears it.
|
|
256
|
-
|
|
257
|
-
Use `setFieldErrors('email', ['Email is already registered'])` for a server error attached to an input and `clearFieldErrors('email')` to clear it. `setSubmitError` / `clearSubmitError` manage a form-level failure. `onSubmitFailed` receives `{ status: 'invalid', errors }` for field validation or `{ status: 'failed', error }` for a rejected submit callback; field validation does not set `submitError`.
|
|
258
|
-
|
|
259
|
-
`Form.Reset` is enabled when `state.canReset` is true: edits, touched/validation state, or a submit error can be cleared, and no submission is running. Use that selector for a custom reset UI. Direct `form.reset()` can also cancel an active submission; unmounting the owning root cancels it too. Action buttons preserve `onPress`; use `onClick` and `event.preventDefault()` to cancel their action. Root `onReset` can cancel before reset runs; `onResetCapture` is reserved for internal reset handling.
|
|
260
|
-
|
|
261
|
-
Native forms with `action`/`method` use browser submission and bypass the controller's submit pipeline. Use that path only when the browser should own the request.
|
|
262
|
-
|
|
263
|
-
## Implement a reusable custom control
|
|
264
|
-
|
|
265
|
-
Use the same field integration as built-in inputs: `FieldBaseProps<Value>`, `useFieldProps`, then `wrapWithField`. Map the control's value/event API and forward the generated id, blur, disabled, read-only, and invalid state to the interactive element. Include `null | undefined` in the accepted model type when empty values are supported and normalize only for display. Do not spread controller props onto a DOM element.
|
|
266
|
-
|
|
267
|
-
The [compiled CustomControl example](https://github.com/cube-js/cube-ui-kit/blob/main/typecheck/consumer/modern-form-examples.tsx) shows the complete pattern. The [component creation guide](https://cube-ui-kit.vercel.app/?path=/docs/getting-started-create-component--docs) explains the shared field wrapper. `Form.Item` / `Field` belongs to the legacy backend; it is not a second way to connect a modern custom input.
|
|
268
|
-
|
|
269
|
-
For SSR, seed the controller with the same serializable defaults on server and client. Initial hydration uses the creation snapshot before subscribers catch up with client state. Each mounted creator owns its controller; no manual disposal is needed.
|
|
270
|
-
|
|
271
|
-
## Use a form in a dialog
|
|
272
|
-
|
|
273
|
-
`DialogForm` selects the same implementation as `Form`: pass a modern controller for new dialogs. Create the controller above the dialog when its draft should survive unmounts, seed defaults in the creation hook, and put save callbacks on the root.
|
|
274
|
-
|
|
275
|
-
```tsx
|
|
276
|
-
function EditProfileDialog({ initialProfile, save }) {
|
|
277
|
-
const form = Form.useController<{ email: string | null }>({ defaultValues: initialProfile });
|
|
278
|
-
return (
|
|
279
|
-
<DialogTrigger>
|
|
280
|
-
<Button>Edit profile</Button>
|
|
281
|
-
<DialogForm form={form} title="Edit profile" onSubmit={(values, { signal }) => save(values, signal)}>
|
|
282
|
-
<TextInput name="email" label="Email" isRequired />
|
|
283
|
-
<Form.SubmitError />
|
|
284
|
-
</DialogForm>
|
|
285
|
-
</DialogTrigger>
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
The dialog closes only after successful submission, including `form.submit()` and controller-configured callbacks. Validation or save errors keep it open. Closing cancels pending submission; late responses cannot close a reopened session. By default, ending the session resets values. Use `preserve` to retain the draft in a controller owned outside the dialog. `preserve` does not keep an unmounted controller alive.
|
|
291
|
-
|
|
292
|
-
While a field the user edited differs from its default, Escape, a click outside and the close button ask "Discard changes?" first. That holds for a `<Form>` you place in a `Dialog` yourself too: the root reports its edits to the `DialogTrigger` or `DialogContainer` that owns the dialog, with no wiring. A value set from code is not an edit, nor is a field typed into and cleared back to an empty default (`''` over `undefined` or `null`), though `isDirty` still reports it. A successful submit saves what it carried, so a dialog that stays open after saving (to show a created key, say) closes at once until the user types again. Set `confirmDismiss={false}` on the trigger or container when backing out loses nothing. See [Unsaved edits](https://cube-ui-kit.vercel.app/?path=/docs/overlays-dialogtrigger--docs#unsaved-edits).
|
|
293
|
-
|
|
294
|
-
See the [DialogForm reference](https://cube-ui-kit.vercel.app/?path=/docs/overlays-dialogform--docs) for custom actions, container lifecycle, and legacy behavior.
|