@cube-dev/ui-kit 0.190.7 → 0.190.8
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 +8 -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.d.ts +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.d.ts +2 -2
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Action/Action.js.map +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.d.ts +2 -2
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.d.ts +18 -5
- package/dist/components/actions/CommandMenu/CommandMenu.js +207 -197
- package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.d.ts +2 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js.map +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.d.ts +3 -3
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js.map +1 -1
- package/dist/components/actions/Link/Link.d.ts +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.d.ts +20 -5
- package/dist/components/actions/Menu/Menu.js +51 -41
- package/dist/components/actions/Menu/Menu.js.map +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js.map +1 -1
- package/dist/components/actions/Menu/MenuSection.js +2 -3
- package/dist/components/actions/Menu/MenuSection.js.map +1 -1
- package/dist/components/actions/Menu/MenuTrigger.d.ts +42 -3
- package/dist/components/actions/Menu/MenuTrigger.js +22 -22
- package/dist/components/actions/Menu/MenuTrigger.js.map +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +4 -4
- package/dist/components/actions/Menu/SubMenuTrigger.js.map +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.d.ts +2 -2
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/context.js.map +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/Menu/styled.js.map +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/index.d.ts +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.d.ts +4 -5
- package/dist/components/actions/use-action.js +3 -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 +2 -2
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js.map +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.d.ts +964 -6
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.d.ts +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +69 -67
- package/dist/components/content/Disclosure/Disclosure.js.map +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.d.ts +2 -2
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js.map +1 -1
- package/dist/components/content/Item/Item.d.ts +3 -3
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/Item/Item.js.map +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.d.ts +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.d.ts +2 -2
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.d.ts +14 -14
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.d.ts +2 -2
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/TextItem/TextItem.js.map +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/TreeNode.js.map +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.d.ts +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/content/use-auto-tooltip.js.map +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/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 +3 -2
- package/dist/components/data/TableBase/TableHeaderCell.js.map +1 -1
- package/dist/components/data/TableBase/TableRow.js +2 -2
- package/dist/components/data/TableBase/TableRow.js.map +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.d.ts +2 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-menu.js.map +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.d.ts +3 -1
- package/dist/components/data/TableBase/styled.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-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-tree-state.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.d.ts +7 -14
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.d.ts +4 -2
- package/dist/components/fields/Checkbox/CheckboxGroup.js +7 -7
- package/dist/components/fields/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +34 -29
- package/dist/components/fields/ColorInput/ColorInput.js.map +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/ComboBox.js.map +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.d.ts +10 -5
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js.map +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +3 -3
- package/dist/components/fields/DatePicker/DateInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/fields/DatePicker/DatePicker.js +4 -4
- package/dist/components/fields/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +8 -5
- package/dist/components/fields/DatePicker/DatePickerInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.d.ts +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +76 -72
- package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.d.ts +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +357 -323
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.d.ts +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +3 -3
- package/dist/components/fields/DatePicker/PeriodPicker.d.ts +6 -5
- package/dist/components/fields/DatePicker/PeriodPicker.js +6 -5
- package/dist/components/fields/DatePicker/PeriodPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.d.ts +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +3 -3
- package/dist/components/fields/DatePicker/TimeInput.d.ts +3 -3
- package/dist/components/fields/DatePicker/TimeInput.js +10 -5
- package/dist/components/fields/DatePicker/TimeInput.js.map +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.d.ts +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +3 -3
- package/dist/components/fields/DatePicker/YearPicker.d.ts +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +3 -3
- package/dist/components/fields/DatePicker/index.d.ts +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/props.js.map +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.d.ts +2 -6
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js.map +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.d.ts +1 -1
- package/dist/components/fields/ListBox/ListBox.js +5 -10
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +125 -93
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
- package/dist/components/fields/ListBoxPopover/index.d.ts +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.d.ts +48 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.d.ts +6 -3
- package/dist/components/fields/NumberInput/NumberInput.js +98 -59
- package/dist/components/fields/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -3
- package/dist/components/fields/NumberInput/StepButton.js.map +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.d.ts +5 -2
- package/dist/components/fields/PasswordInput/PasswordInput.js +7 -7
- package/dist/components/fields/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.d.ts +596 -17
- package/dist/components/fields/RadioGroup/Radio.js +114 -111
- package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.d.ts +5 -3
- package/dist/components/fields/RadioGroup/RadioGroup.js +8 -8
- package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.d.ts +5 -3
- package/dist/components/fields/SearchInput/SearchInput.js +2 -2
- package/dist/components/fields/SearchInput/SearchInput.js.map +1 -1
- package/dist/components/fields/Select/Select.d.ts +5 -4
- package/dist/components/fields/Select/Select.js +3 -3
- package/dist/components/fields/Select/Select.js.map +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.d.ts +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.d.ts +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.d.ts +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js.map +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.d.ts +3 -7
- package/dist/components/fields/Switch/Switch.js +7 -7
- package/dist/components/fields/Switch/Switch.js.map +1 -1
- package/dist/components/fields/TagInput/TagInput.js +2 -2
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useTagError.js +1 -1
- package/dist/components/fields/TextArea/TextArea.d.ts +11 -3
- package/dist/components/fields/TextArea/TextArea.js +7 -8
- package/dist/components/fields/TextArea/TextArea.js.map +1 -1
- package/dist/components/fields/TextInput/TextInput.d.ts +10 -3
- package/dist/components/fields/TextInput/TextInput.js +7 -8
- package/dist/components/fields/TextInput/TextInput.js.map +1 -1
- package/dist/components/fields/TextInput/TextInputBase.d.ts +7 -5
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/fields/index.d.ts +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ModernFormRoot.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.d.ts +2 -2
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js.map +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.d.ts +2 -2
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js.map +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.d.ts +2 -2
- 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/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/Board/Board.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +1 -1
- package/dist/components/layout/Board/board-context.js +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +387 -379
- 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.d.ts +2 -2
- package/dist/components/navigation/Tabs/Tabs.js +2 -2
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/navigation/Tabs/TabsAction.d.ts +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +50 -45
- package/dist/components/other/Calendar/CalendarGrid.js.map +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +2 -2
- package/dist/components/other/Calendar/CalendarHeader.js.map +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/RangeCalendar.js.map +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.d.ts +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.d.ts +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +25 -24
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/Modal.js.map +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.d.ts +1 -2
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js.map +1 -1
- package/dist/components/overlays/Modal/Popover.d.ts +2 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Popover.js.map +1 -1
- package/dist/components/overlays/Modal/Tray.d.ts +2 -2
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Tray.js.map +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Modal/index.d.ts +1 -1
- package/dist/components/overlays/Modal/types.d.ts +2 -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 +2 -5
- 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 +2 -5
- package/dist/components/overlays/Tooltip/TooltipTrigger.js.map +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/overlays/Tooltip/context.js.map +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 +11 -6
- package/dist/components/shared/DraggableCollection.js.map +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/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 +18 -18
- package/dist/index.js +3 -3
- 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/navigationAdapter.default.js +1 -1
- package/dist/shared/form.d.ts +4 -21
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/escapePropagation.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/mapProps.js.map +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.d.ts +2 -2
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/nullableValue.js.map +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 +12 -1
- package/dist/utils/react/useOverlayEscapeGuard.js.map +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/package.json +15 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.190.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.190.8 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { castNullableNumberValue } from "../../../utils/react/nullableValue.js";
|
|
4
4
|
import { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
@@ -8,7 +8,7 @@ import { c } from "react-compiler-runtime";
|
|
|
8
8
|
import { tasty } from "@tenphi/tasty";
|
|
9
9
|
import { forwardRef, useRef } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { mergeProps, useLocale, useNumberField } from "react-aria";
|
|
11
|
+
import { mergeProps, useKeyboard, useLocale, useNumberField } from "react-aria";
|
|
12
12
|
import { useNumberFieldState } from "react-stately";
|
|
13
13
|
|
|
14
14
|
//#region src/components/fields/NumberInput/NumberInput.tsx
|
|
@@ -21,16 +21,16 @@ const StepperContainer = tasty({ styles: {
|
|
|
21
21
|
placeSelf: "stretch",
|
|
22
22
|
margin: "(.5x - 1bw) left"
|
|
23
23
|
} });
|
|
24
|
-
function NumberInput(
|
|
25
|
-
const $ = c(
|
|
24
|
+
function NumberInput(rawProps, ref) {
|
|
25
|
+
const $ = c(48);
|
|
26
26
|
let t0;
|
|
27
|
-
if ($[0] !==
|
|
28
|
-
t0 = castNullableNumberValue(
|
|
29
|
-
$[0] =
|
|
27
|
+
if ($[0] !== rawProps) {
|
|
28
|
+
t0 = castNullableNumberValue(rawProps);
|
|
29
|
+
$[0] = rawProps;
|
|
30
30
|
$[1] = t0;
|
|
31
31
|
} else t0 = $[1];
|
|
32
|
-
|
|
33
|
-
props = useFieldProps(
|
|
32
|
+
rawProps = t0;
|
|
33
|
+
const props = useFieldProps(rawProps);
|
|
34
34
|
let hideStepper;
|
|
35
35
|
let inputRef;
|
|
36
36
|
let otherProps;
|
|
@@ -75,18 +75,53 @@ function NumberInput(props, ref) {
|
|
|
75
75
|
const state = useNumberFieldState(t1);
|
|
76
76
|
const localInputRef = useRef(null);
|
|
77
77
|
inputRef = inputRef ?? localInputRef;
|
|
78
|
-
const { groupProps, labelProps, inputProps, incrementButtonProps, decrementButtonProps } = useNumberField(props, state, inputRef);
|
|
79
78
|
let t2;
|
|
80
|
-
if ($[12] !==
|
|
81
|
-
t2 =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
if ($[12] !== props) {
|
|
80
|
+
t2 = {
|
|
81
|
+
...props,
|
|
82
|
+
onKeyDown: void 0,
|
|
83
|
+
onKeyUp: void 0
|
|
84
|
+
};
|
|
85
|
+
$[12] = props;
|
|
86
|
+
$[13] = t2;
|
|
87
|
+
} else t2 = $[13];
|
|
88
|
+
const { groupProps, labelProps, inputProps, incrementButtonProps, decrementButtonProps } = useNumberField(t2, state, inputRef);
|
|
87
89
|
let t3;
|
|
88
|
-
if ($[
|
|
89
|
-
t3 =
|
|
90
|
+
if ($[14] !== inputProps || $[15] !== props) {
|
|
91
|
+
t3 = (event) => {
|
|
92
|
+
inputProps.onKeyDown?.(event);
|
|
93
|
+
event.defaultPrevented = event.isDefaultPrevented();
|
|
94
|
+
if (event.key !== "Enter") event.continuePropagation();
|
|
95
|
+
props.onKeyDown?.(event);
|
|
96
|
+
};
|
|
97
|
+
$[14] = inputProps;
|
|
98
|
+
$[15] = props;
|
|
99
|
+
$[16] = t3;
|
|
100
|
+
} else t3 = $[16];
|
|
101
|
+
let t4;
|
|
102
|
+
if ($[17] !== props.isDisabled || $[18] !== props.onKeyUp || $[19] !== t3) {
|
|
103
|
+
t4 = {
|
|
104
|
+
isDisabled: props.isDisabled,
|
|
105
|
+
onKeyDown: t3,
|
|
106
|
+
onKeyUp: props.onKeyUp
|
|
107
|
+
};
|
|
108
|
+
$[17] = props.isDisabled;
|
|
109
|
+
$[18] = props.onKeyUp;
|
|
110
|
+
$[19] = t3;
|
|
111
|
+
$[20] = t4;
|
|
112
|
+
} else t4 = $[20];
|
|
113
|
+
const { keyboardProps } = useKeyboard(t4);
|
|
114
|
+
let t5;
|
|
115
|
+
if ($[21] !== labelProps || $[22] !== userLabelProps) {
|
|
116
|
+
t5 = mergeProps$1(labelProps, userLabelProps);
|
|
117
|
+
$[21] = labelProps;
|
|
118
|
+
$[22] = userLabelProps;
|
|
119
|
+
$[23] = t5;
|
|
120
|
+
} else t5 = $[23];
|
|
121
|
+
const mergedLabelProps = t5;
|
|
122
|
+
let t6;
|
|
123
|
+
if ($[24] !== decrementButtonProps || $[25] !== incrementButtonProps || $[26] !== otherProps || $[27] !== props.isDisabled || $[28] !== showStepper) {
|
|
124
|
+
t6 = showStepper ? /* @__PURE__ */ jsxs(StepperContainer, { children: [/* @__PURE__ */ jsx(StepButton, {
|
|
90
125
|
isDisabled: props.isDisabled,
|
|
91
126
|
direction: "up",
|
|
92
127
|
...incrementButtonProps,
|
|
@@ -97,54 +132,58 @@ function NumberInput(props, ref) {
|
|
|
97
132
|
...decrementButtonProps,
|
|
98
133
|
size: otherProps.size
|
|
99
134
|
})] }) : void 0;
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[20] = t3;
|
|
106
|
-
} else t3 = $[20];
|
|
107
|
-
const steppers = t3;
|
|
108
|
-
const t4 = otherProps;
|
|
109
|
-
let t5;
|
|
110
|
-
if ($[21] !== inputProps || $[22] !== props.id || $[23] !== userInputProps) {
|
|
111
|
-
t5 = mergeProps$1(mergeProps(inputProps, { id: props.id }), { "data-input-type": "numberinput" }, userInputProps);
|
|
112
|
-
$[21] = inputProps;
|
|
113
|
-
$[22] = props.id;
|
|
114
|
-
$[23] = userInputProps;
|
|
115
|
-
$[24] = t5;
|
|
116
|
-
} else t5 = $[24];
|
|
117
|
-
let t6;
|
|
118
|
-
if ($[25] !== props.suffixPosition || $[26] !== showStepper || $[27] !== steppers || $[28] !== suffix) {
|
|
119
|
-
t6 = showStepper ? props.suffixPosition === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [suffix, steppers] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [steppers, suffix] }) : suffix;
|
|
120
|
-
$[25] = props.suffixPosition;
|
|
121
|
-
$[26] = showStepper;
|
|
122
|
-
$[27] = steppers;
|
|
123
|
-
$[28] = suffix;
|
|
135
|
+
$[24] = decrementButtonProps;
|
|
136
|
+
$[25] = incrementButtonProps;
|
|
137
|
+
$[26] = otherProps;
|
|
138
|
+
$[27] = props.isDisabled;
|
|
139
|
+
$[28] = showStepper;
|
|
124
140
|
$[29] = t6;
|
|
125
141
|
} else t6 = $[29];
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
142
|
+
const steppers = t6;
|
|
143
|
+
const t7 = otherProps;
|
|
144
|
+
let t8;
|
|
145
|
+
if ($[30] !== inputProps || $[31] !== keyboardProps || $[32] !== props.id || $[33] !== userInputProps) {
|
|
146
|
+
t8 = mergeProps$1(mergeProps({
|
|
147
|
+
...inputProps,
|
|
148
|
+
...keyboardProps
|
|
149
|
+
}, { id: props.id }), { "data-input-type": "numberinput" }, userInputProps);
|
|
150
|
+
$[30] = inputProps;
|
|
151
|
+
$[31] = keyboardProps;
|
|
152
|
+
$[32] = props.id;
|
|
153
|
+
$[33] = userInputProps;
|
|
154
|
+
$[34] = t8;
|
|
155
|
+
} else t8 = $[34];
|
|
156
|
+
let t9;
|
|
157
|
+
if ($[35] !== props.suffixPosition || $[36] !== showStepper || $[37] !== steppers || $[38] !== suffix) {
|
|
158
|
+
t9 = showStepper ? props.suffixPosition === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [suffix, steppers] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [steppers, suffix] }) : suffix;
|
|
159
|
+
$[35] = props.suffixPosition;
|
|
160
|
+
$[36] = showStepper;
|
|
161
|
+
$[37] = steppers;
|
|
162
|
+
$[38] = suffix;
|
|
163
|
+
$[39] = t9;
|
|
164
|
+
} else t9 = $[39];
|
|
165
|
+
let t10;
|
|
166
|
+
if ($[40] !== groupProps || $[41] !== inputRef || $[42] !== mergedLabelProps || $[43] !== otherProps || $[44] !== ref || $[45] !== t8 || $[46] !== t9) {
|
|
167
|
+
t10 = /* @__PURE__ */ jsx(StyledTextInputBase, {
|
|
168
|
+
...t7,
|
|
130
169
|
ref,
|
|
131
170
|
labelProps: mergedLabelProps,
|
|
132
|
-
inputProps:
|
|
171
|
+
inputProps: t8,
|
|
133
172
|
inputRef,
|
|
134
173
|
wrapperProps: groupProps,
|
|
135
174
|
suffixPosition: "after",
|
|
136
|
-
suffix:
|
|
175
|
+
suffix: t9
|
|
137
176
|
});
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
} else
|
|
147
|
-
return
|
|
177
|
+
$[40] = groupProps;
|
|
178
|
+
$[41] = inputRef;
|
|
179
|
+
$[42] = mergedLabelProps;
|
|
180
|
+
$[43] = otherProps;
|
|
181
|
+
$[44] = ref;
|
|
182
|
+
$[45] = t8;
|
|
183
|
+
$[46] = t9;
|
|
184
|
+
$[47] = t10;
|
|
185
|
+
} else t10 = $[47];
|
|
186
|
+
return t10;
|
|
148
187
|
}
|
|
149
188
|
/**
|
|
150
189
|
* NumberFields allow users to enter a number and increment or decrement the value using stepper buttons.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.js","names":["tasty","ForwardedRef","forwardRef","RefObject","useRef","AriaNumberFieldProps","mergeProps","mergeAriaProps","useLocale","useNumberField","useNumberFieldState","castNullableNumberValue","WithNullableValue","useFieldProps","CubeTextInputBaseProps","TextInputBase","StepButton","FieldBaseProps","TextFieldKeyboardProps","CubeNumberInputProps","Omit","field","hideStepper","StyledTextInputBase","inputStyles","textAlign","StepperContainer","styles","display","gridColumns","gridRows","flow","placeSelf","margin","NumberInput","props","ref","$","_c","t0","inputRef","otherProps","suffix","userInputProps","userLabelProps","t1","t2","value","defaultValue","onChange","t3","labelProps","t4","inputProps","t5","t6","showStepper","locale","state","localInputRef","groupProps","incrementButtonProps","decrementButtonProps","HTMLInputElement","mergedLabelProps","isDisabled","size","undefined","steppers","id","suffixPosition","t7","_NumberInput","cubeInputType","displayName"],"sources":["../../../../src/components/fields/NumberInput/NumberInput.tsx"],"sourcesContent":["import { tasty } from '@tenphi/tasty';\nimport { ForwardedRef, forwardRef, RefObject, useRef } from 'react';\nimport {\n AriaNumberFieldProps,\n mergeProps as mergeAriaProps,\n useLocale,\n useNumberField,\n} from 'react-aria';\nimport { useNumberFieldState } from 'react-stately';\n\nimport { mergeProps } from '../../../utils/react';\nimport {\n castNullableNumberValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { useFieldProps } from '../../form';\nimport { CubeTextInputBaseProps, TextInputBase } from '../TextInput';\n\nimport { StepButton } from './StepButton';\n\nimport type {\n FieldBaseProps,\n TextFieldKeyboardProps,\n} from '../../../shared/form';\n\nexport interface CubeNumberInputProps\n extends Omit<\n CubeTextInputBaseProps,\n 'defaultValue' | 'value' | 'onChange' | 'field'\n >,\n Omit<AriaNumberFieldProps, 'validate' | 'form' | 'name'>,\n // Declared directly: both `Omit`s above are over types that are, or extend,\n // an in-repo `any`, which erases the members they would otherwise carry.\n TextFieldKeyboardProps {\n field?: FieldBaseProps<number | null | undefined>['field'];\n /** Whether or to hide stepper */\n hideStepper?: boolean;\n}\n\nconst StyledTextInputBase = tasty(TextInputBase, {\n inputStyles: {\n textAlign: 'right',\n },\n});\n\nconst StepperContainer = tasty({\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: '1sf 1sf',\n flow: 'column',\n placeSelf: 'stretch',\n margin: '(.5x - 1bw) left',\n },\n});\n\nfunction NumberInput(\n props: WithNullableValue<CubeNumberInputProps>,\n ref: ForwardedRef<HTMLElement>,\n) {\n props = castNullableNumberValue(props);\n props = useFieldProps(props);\n\n let {\n hideStepper,\n suffix,\n value,\n defaultValue,\n onChange,\n inputRef,\n labelProps: userLabelProps,\n inputProps: userInputProps,\n ...otherProps\n } = props;\n let showStepper = !hideStepper;\n let { locale } = useLocale();\n let state = useNumberFieldState({ ...props, locale });\n let localInputRef = useRef<HTMLInputElement>(null);\n\n inputRef = inputRef ?? localInputRef;\n\n let {\n groupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useNumberField(props, state, inputRef as RefObject<HTMLInputElement>);\n\n // Merge user-provided labelProps with aria labelProps\n const mergedLabelProps = mergeProps(labelProps, userLabelProps);\n\n const steppers = showStepper ? (\n <StepperContainer>\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"up\"\n {...incrementButtonProps}\n size={otherProps.size}\n />\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"down\"\n {...decrementButtonProps}\n size={otherProps.size}\n />\n </StepperContainer>\n ) : undefined;\n\n return (\n <StyledTextInputBase\n {...otherProps}\n ref={ref}\n labelProps={mergedLabelProps}\n inputProps={mergeProps(\n // `useNumberField` seeds its input id once. Merging the current id\n // through react-aria's own `mergeProps` updates that seed, so the\n // input, its label and the steppers' `aria-controls` follow the id\n // when the form binding changes after mount.\n mergeAriaProps(inputProps, { id: props.id }),\n { 'data-input-type': 'numberinput' },\n userInputProps,\n )}\n inputRef={inputRef}\n wrapperProps={groupProps}\n suffixPosition=\"after\"\n suffix={\n showStepper ? (\n props.suffixPosition === 'before' ? (\n <>\n {suffix}\n {steppers}\n </>\n ) : (\n <>\n {steppers}\n {suffix}\n </>\n )\n ) : (\n suffix\n )\n }\n />\n );\n}\n\n/**\n * NumberFields allow users to enter a number and increment or decrement the value using stepper buttons.\n */\nconst _NumberInput = forwardRef(NumberInput);\n\n(_NumberInput as any).cubeInputType = 'Number';\n\n_NumberInput.displayName = 'NumberInput';\n\nexport { _NumberInput as NumberInput };\nexport type { AriaNumberFieldProps };\n"],"mappings":";;;;;;;;;;;;;;AAuCA,MAAMuB,sBAAsBvB,MAAMe,eAAe,EAC/CS,aAAa,EACXC,WAAW,SACb,EACD,CAAC;AAEF,MAAMC,mBAAmB1B,MAAM,EAC7B2B,QAAQ;CACNC,SAAS;CACTC,aAAa;CACbC,UAAU;CACVC,MAAM;CACNC,WAAW;CACXC,QAAQ;CACV,EACD,CAAC;AAEF,SAAAC,YAAAC,OAAAC,KAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAA,IAAAC;AAAA,KAAAF,EAAA,OAAAF,OAAA;AAIUI,OAAA5B,wBAAwBwB,MAAM;AAAAE,IAAA,KAAAF;AAAAE,IAAA,KAAAE;OAAAA,MAAAF,EAAA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,MAAAF,MAAAmC;AAAAjC,IAAA,MAAAmB;AAAAnB,IAAA,MAAA+B;AAAA/B,IAAA,MAAAK;AAAAL,IAAA,MAAAkB;OAAAA,MAAAlB,EAAA;CAAA,IAAAkC;AAAA,KAAAlC,EAAA,QAAAuB,cAAAvB,EAAA,QAAAG,YAAAH,EAAA,QAAA2B,oBAAA3B,EAAA,QAAAI,cAAAJ,EAAA,QAAAD,OAAAC,EAAA,QAAAiB,MAAAjB,EAAA,QAAAkB,IAAA;AA/BLgB,OAAA,oBAAC;GAAmB,GACd9B;GACCL;GACO4B,YAAAA;GACA,YAAAV;GASFd;GACIoB,cAAAA;GACC,gBAAA;GAEb,QAAAL;IAgBF;AAAAlB,IAAA,MAAAuB;AAAAvB,IAAA,MAAAG;AAAAH,IAAA,MAAA2B;AAAA3B,IAAA,MAAAI;AAAAJ,IAAA,MAAAD;AAAAC,IAAA,MAAAiB;AAAAjB,IAAA,MAAAkB;AAAAlB,IAAA,MAAAkC;OAAAA,MAAAlC,EAAA;AAAA,QAjCFkC;;;;;AAwCJ,MAAMC,eAAetE,WAAWgC,YAAY;AAE5C,AAACsC,aAAqBC,gBAAgB;AAEtCD,aAAaE,cAAc"}
|
|
1
|
+
{"version":3,"file":"NumberInput.js","names":["tasty","ForwardedRef","forwardRef","KeyboardEvent","RefObject","useRef","AriaNumberFieldProps","mergeProps","mergeAriaProps","useKeyboard","useLocale","useNumberField","useNumberFieldState","castNullableNumberValue","WithNullableValue","useFieldProps","CubeTextInputBaseProps","TextInputBase","StepButton","TextInputDOMEvents","FieldBaseProps","TextFieldKeyboardProps","CubeNumberInputProps","Omit","field","hideStepper","StyledTextInputBase","inputStyles","textAlign","StepperContainer","styles","display","gridColumns","gridRows","flow","placeSelf","margin","NumberInput","rawProps","ref","$","_c","t0","props","inputRef","otherProps","suffix","userInputProps","userLabelProps","t1","t2","value","defaultValue","onChange","t3","labelProps","t4","inputProps","t5","t6","showStepper","locale","state","localInputRef","onKeyDown","undefined","onKeyUp","groupProps","incrementButtonProps","decrementButtonProps","HTMLInputElement","event","defaultPrevented","isDefaultPrevented","key","continuePropagation","isDisabled","keyboardProps","mergedLabelProps","size","steppers","t8","id","t9","suffixPosition","t10","_NumberInput","cubeInputType","displayName"],"sources":["../../../../src/components/fields/NumberInput/NumberInput.tsx"],"sourcesContent":["import { tasty } from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n KeyboardEvent,\n RefObject,\n useRef,\n} from 'react';\nimport {\n AriaNumberFieldProps,\n mergeProps as mergeAriaProps,\n useKeyboard,\n useLocale,\n useNumberField,\n} from 'react-aria';\nimport { useNumberFieldState } from 'react-stately';\n\nimport { mergeProps } from '../../../utils/react';\nimport {\n castNullableNumberValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { useFieldProps } from '../../form';\nimport { CubeTextInputBaseProps, TextInputBase } from '../TextInput';\n\nimport { StepButton } from './StepButton';\n\nimport type { TextInputDOMEvents } from '@react-types/shared';\nimport type {\n FieldBaseProps,\n TextFieldKeyboardProps,\n} from '../../../shared/form';\n\nexport interface CubeNumberInputProps\n extends Omit<\n CubeTextInputBaseProps,\n | 'defaultValue'\n | 'value'\n | 'onChange'\n | 'field'\n | 'validate'\n | 'onFocus'\n | 'onBlur'\n | keyof TextInputDOMEvents\n >,\n Omit<\n AriaNumberFieldProps,\n 'form' | 'name' | 'errorMessage' | 'onKeyDown' | 'onKeyUp'\n >,\n TextFieldKeyboardProps {\n field?: FieldBaseProps<number | null | undefined>['field'];\n /** Whether or to hide stepper */\n hideStepper?: boolean;\n}\n\nconst StyledTextInputBase = tasty(TextInputBase, {\n inputStyles: {\n textAlign: 'right',\n },\n});\n\nconst StepperContainer = tasty({\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: '1sf 1sf',\n flow: 'column',\n placeSelf: 'stretch',\n margin: '(.5x - 1bw) left',\n },\n});\n\nfunction NumberInput(\n rawProps: WithNullableValue<CubeNumberInputProps>,\n ref: ForwardedRef<HTMLElement>,\n) {\n rawProps = castNullableNumberValue(rawProps);\n let props = useFieldProps(rawProps);\n\n let {\n hideStepper,\n suffix,\n value,\n defaultValue,\n onChange,\n inputRef,\n labelProps: userLabelProps,\n inputProps: userInputProps,\n ...otherProps\n } = props;\n let showStepper = !hideStepper;\n let { locale } = useLocale();\n let state = useNumberFieldState({ ...props, locale });\n let localInputRef = useRef<HTMLInputElement>(null);\n\n inputRef = inputRef ?? localInputRef;\n\n let {\n groupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useNumberField(\n { ...props, onKeyDown: undefined, onKeyUp: undefined },\n state,\n inputRef as RefObject<HTMLInputElement>,\n );\n // Keep native commits and user callbacks inside one Aria event wrapper so\n // continuePropagation can still undo the native shortcut's propagation stop.\n let { keyboardProps } = useKeyboard({\n isDisabled: props.isDisabled,\n onKeyDown: (event) => {\n inputProps.onKeyDown?.(event as KeyboardEvent<HTMLInputElement>);\n event.defaultPrevented = event.isDefaultPrevented();\n // NumberInput historically lets every key except Enter reach ancestors.\n if (event.key !== 'Enter') event.continuePropagation();\n props.onKeyDown?.(event);\n },\n onKeyUp: props.onKeyUp,\n });\n\n // Merge user-provided labelProps with aria labelProps\n const mergedLabelProps = mergeProps(labelProps, userLabelProps);\n\n const steppers = showStepper ? (\n <StepperContainer>\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"up\"\n {...incrementButtonProps}\n size={otherProps.size}\n />\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"down\"\n {...decrementButtonProps}\n size={otherProps.size}\n />\n </StepperContainer>\n ) : undefined;\n\n return (\n <StyledTextInputBase\n {...otherProps}\n ref={ref}\n labelProps={mergedLabelProps}\n inputProps={mergeProps(\n // `useNumberField` seeds its input id once. Merging the current id\n // through react-aria's own `mergeProps` updates that seed, so the\n // input, its label and the steppers' `aria-controls` follow the id\n // when the form binding changes after mount.\n mergeAriaProps({ ...inputProps, ...keyboardProps }, { id: props.id }),\n { 'data-input-type': 'numberinput' },\n userInputProps,\n )}\n inputRef={inputRef}\n wrapperProps={groupProps}\n suffixPosition=\"after\"\n suffix={\n showStepper ? (\n props.suffixPosition === 'before' ? (\n <>\n {suffix}\n {steppers}\n </>\n ) : (\n <>\n {steppers}\n {suffix}\n </>\n )\n ) : (\n suffix\n )\n }\n />\n );\n}\n\n/**\n * NumberFields allow users to enter a number and increment or decrement the value using stepper buttons.\n */\nconst _NumberInput = forwardRef(NumberInput);\n\n(_NumberInput as any).cubeInputType = 'Number';\n\n_NumberInput.displayName = 'NumberInput';\n\nexport { _NumberInput as NumberInput };\nexport type { AriaNumberFieldProps };\n"],"mappings":";;;;;;;;;;;;;;AAuDA,MAAM0B,sBAAsB1B,MAAMiB,eAAe,EAC/CU,aAAa,EACXC,WAAW,SACb,EACD,CAAC;AAEF,MAAMC,mBAAmB7B,MAAM,EAC7B8B,QAAQ;CACNC,SAAS;CACTC,aAAa;CACbC,UAAU;CACVC,MAAM;CACNC,WAAW;CACXC,QAAQ;CACV,EACD,CAAC;AAEF,SAAAC,YAAAC,UAAAC,KAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAA,IAAAC;AAAA,KAAAF,EAAA,OAAAF,UAAA;AAIaI,OAAA7B,wBAAwByB,SAAS;AAAAE,IAAA,KAAAF;AAAAE,IAAA,KAAAE;OAAAA,MAAAF,EAAA;AAA5CF,YAAWA;CACX,MAAAK,QAAY5B,cAAcuB,SAAS;CAAC,IAAAb;CAAA,IAAAmB;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;AAAA,KAAAR,EAAA,OAAAG,OAAA;EAEpC,IAAA,EAAAlB,aAAAwB,IAAAH,QAAAI,IAAAC,OAAAC,cAAAC,UAAAT,UAAAU,IAAAC,YAAAC,IAAAC,YAAAC,IAAA,GAAAC,OAUIhB;AAVJlB,gBAAAwB;AAAAH,WAAAI;AAAAN,aAAAU;AAAAN,mBAAAQ;AAAAT,mBAAAW;AAAAb,eAAAc;AAUUnB,I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AAACiD,aAAqBC,gBAAgB;AAEtCD,aAAaE,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.190.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.190.8 | Cube Dev Team */
|
|
2
2
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
3
3
|
import { Button } from "../../actions/Button/Button.js";
|
|
4
4
|
import { DirectionIcon } from "../../../icons/DirectionIcon.js";
|
|
@@ -8,7 +8,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
|
|
9
9
|
//#region src/components/fields/NumberInput/StepButton.tsx
|
|
10
10
|
const StepButtonElement = tasty(Button, {
|
|
11
|
-
preventDefault: true,
|
|
12
11
|
type: "clear",
|
|
13
12
|
styles: {
|
|
14
13
|
width: "($local-size * 1.25)",
|
|
@@ -69,7 +68,6 @@ function StepButton(props) {
|
|
|
69
68
|
let t6;
|
|
70
69
|
if ($[9] !== label || $[10] !== props || $[11] !== t3 || $[12] !== t5) {
|
|
71
70
|
t6 = /* @__PURE__ */ jsx(StepButtonElement, {
|
|
72
|
-
preventDefault: true,
|
|
73
71
|
type: "clear",
|
|
74
72
|
mods: t3,
|
|
75
73
|
"aria-label": label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepButton.js","names":["Styles","tasty","useI18n","CaretDownIcon","CaretUpIcon","DirectionIcon","Button","StepButtonElement","
|
|
1
|
+
{"version":3,"file":"StepButton.js","names":["Styles","tasty","useI18n","CaretDownIcon","CaretUpIcon","DirectionIcon","Button","StepButtonElement","type","styles","width","height","radius","down","padding","$size","Icon","StepButton","props","$","_c","t","t0","direction","label","t1","t2","t3","up","t4","Symbol","for","fontSize","t5","t6"],"sources":["../../../../src/components/fields/NumberInput/StepButton.tsx"],"sourcesContent":["import { Styles, tasty } from '@tenphi/tasty';\n\nimport { useI18n } from '../../../i18n';\nimport { CaretDownIcon } from '../../../icons/CaretDownIcon';\nimport { CaretUpIcon } from '../../../icons/CaretUpIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { Button } from '../../actions/Button/Button';\n\nconst StepButtonElement = tasty(Button, {\n type: 'clear',\n styles: {\n width: '($local-size * 1.25)',\n height: 'auto',\n radius: {\n '': '0 (1r - 1bw) 0 0',\n down: '0 0 (1r - 1bw) 0',\n },\n padding: 0,\n\n $size: 'inherit',\n '$local-size': '(($size - 2bw) / 2)',\n\n Icon: {\n width: 'auto',\n height: 'auto',\n },\n },\n});\n\n/**\n * Buttons for NumberField.\n */\nexport function StepButton(props) {\n const { t } = useI18n();\n\n const label =\n props.direction === 'up'\n ? t('numberInput.stepUp', 'Step up')\n : t('numberInput.stepDown', 'Step down');\n\n return (\n <StepButtonElement\n type=\"clear\"\n mods={{\n up: props.direction === 'up',\n down: props.direction === 'down',\n }}\n aria-label={label}\n {...props}\n >\n <DirectionIcon\n to={props.direction}\n styles={{ fontSize: '$local-size' }}\n />\n </StepButtonElement>\n );\n}\n"],"mappings":";;;;;;;;;AAQA,MAAMO,oBAAoBN,MAAMK,QAAQ;CACtCE,MAAM;CACNC,QAAQ;EACNC,OAAO;EACPC,QAAQ;EACRC,QAAQ;GACN,IAAI;GACJC,MAAM;GACP;EACDC,SAAS;EAETC,OAAO;EACP,eAAe;EAEfC,MAAM;GACJN,OAAO;GACPC,QAAQ;GACV;EACF;CACD,CAAC;;;;AAKF,SAAOM,WAAAC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CACL,MAAA,EAAAC,MAAcnB,SAAS;CAAC,IAAAoB;AAAA,KAAAH,EAAA,OAAAD,MAAAK,aAAAJ,EAAA,OAAAE,GAAA;AAGtBC,OAAAJ,MAAKK,cAAe,OAChBF,EAAE,sBAAsB,UACc,GAAtCA,EAAE,wBAAwB,YAAY;AAAAF,IAAA,KAAAD,MAAAK;AAAAJ,IAAA,KAAAE;AAAAF,IAAA,KAAAG;OAAAA,MAAAH,EAAA;CAH5C,MAAAK,QACEF;CAQQ,MAAAG,KAAAP,MAAKK,cAAe;CAClB,MAAAG,KAAAR,MAAKK,cAAe;CAAM,IAAAI;AAAA,KAAAR,EAAA,OAAAM,MAAAN,EAAA,OAAAO,IAAA;AAF5BC,OAAA;GAAAC,IACAH;GAAwBZ,MACtBa;GACP;AAAAP,IAAA,KAAAM;AAAAN,IAAA,KAAAO;AAAAP,IAAA,KAAAQ;OAAAA,MAAAR,EAAA;CAAA,IAAAU;AAAA,KAAAV,EAAA,OAAAW,OAAAC,IAAA,4BAAA,EAAA;AAMSF,OAAA,EAAAG,UAAY,eAAe;AAAAb,IAAA,KAAAU;OAAAA,MAAAV,EAAA;CAAA,IAAAc;AAAA,KAAAd,EAAA,OAAAD,MAAAK,WAAA;AAFrCU,OAAA,oBAAC;GACK,IAAAf,MAAKK;GACD,QAAAM;IACR;AAAAV,IAAA,KAAAD,MAAAK;AAAAJ,IAAA,KAAAc;OAAAA,MAAAd,EAAA;CAAA,IAAAe;AAAA,KAAAf,EAAA,OAAAK,SAAAL,EAAA,QAAAD,SAAAC,EAAA,QAAAQ,MAAAR,EAAA,QAAAc,IAAA;AAZJC,OAAA,oBAAC;GACM,MAAA;GACC,MAAAP;GAIMH,cAAAA;GAAK,GACbN;aAEJe;IAIkB;AAAAd,IAAA,KAAAK;AAAAL,IAAA,MAAAD;AAAAC,IAAA,MAAAQ;AAAAR,IAAA,MAAAc;AAAAd,IAAA,MAAAe;OAAAA,MAAAf,EAAA;AAAA,QAbpBe"}
|
|
@@ -4,15 +4,18 @@ import { WithNullableValue } from "../../../utils/react/nullableValue.js";
|
|
|
4
4
|
import { CubeBufferedValueProps, CubeTextInputBaseProps } from "../TextInput/TextInputBase.js";
|
|
5
5
|
import "../TextInput/index.js";
|
|
6
6
|
import * as react from "react";
|
|
7
|
+
import { AriaTextFieldProps } from "react-aria";
|
|
7
8
|
|
|
8
9
|
//#region src/components/fields/PasswordInput/PasswordInput.d.ts
|
|
9
|
-
interface CubePasswordInputProps extends WithNullableValue<CubeTextInputBaseProps
|
|
10
|
+
interface CubePasswordInputProps extends WithNullableValue<Omit<CubeTextInputBaseProps, 'validate'>>, CubeBufferedValueProps, TextFieldKeyboardProps {
|
|
11
|
+
validate?: AriaTextFieldProps['validate'];
|
|
12
|
+
}
|
|
10
13
|
/**
|
|
11
14
|
* PasswordInputs are password inputs that allow users to input passwords or code entries
|
|
12
15
|
* with a keyboard. Various decorations can be displayed around the field to
|
|
13
16
|
* communicate the entry requirements.
|
|
14
17
|
*/
|
|
15
|
-
declare const _PasswordInput: react.ForwardRefExoticComponent<
|
|
18
|
+
declare const _PasswordInput: react.ForwardRefExoticComponent<CubePasswordInputProps & react.RefAttributes<HTMLElement>>;
|
|
16
19
|
//#endregion
|
|
17
20
|
export { CubePasswordInputProps, _PasswordInput };
|
|
18
21
|
//# sourceMappingURL=PasswordInput.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.190.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.190.8 | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";
|
|
@@ -16,16 +16,16 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
16
16
|
import { useTextField } from "react-aria";
|
|
17
17
|
|
|
18
18
|
//#region src/components/fields/PasswordInput/PasswordInput.tsx
|
|
19
|
-
function PasswordInput(
|
|
19
|
+
function PasswordInput(rawProps, ref) {
|
|
20
20
|
const $ = c(39);
|
|
21
21
|
const { t } = useI18n();
|
|
22
22
|
let t0;
|
|
23
|
-
if ($[0] !==
|
|
24
|
-
t0 = castNullableStringValue(
|
|
25
|
-
$[0] =
|
|
23
|
+
if ($[0] !== rawProps) {
|
|
24
|
+
t0 = castNullableStringValue(rawProps);
|
|
25
|
+
$[0] = rawProps;
|
|
26
26
|
$[1] = t0;
|
|
27
27
|
} else t0 = $[1];
|
|
28
|
-
|
|
28
|
+
rawProps = t0;
|
|
29
29
|
let t1;
|
|
30
30
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
31
|
t1 = {
|
|
@@ -34,7 +34,7 @@ function PasswordInput(props, ref) {
|
|
|
34
34
|
};
|
|
35
35
|
$[2] = t1;
|
|
36
36
|
} else t1 = $[2];
|
|
37
|
-
props = useFieldProps(
|
|
37
|
+
const props = useFieldProps(rawProps, t1);
|
|
38
38
|
const [type, setType] = useState("password");
|
|
39
39
|
const { labelProps: userLabelProps, inputProps: userInputProps, suffix, multiLine, inputRef: propsInputRef, form, isBuffered, ...rest } = props;
|
|
40
40
|
const localInputRef = useRef(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.js","names":["ForwardedRef","forwardRef","useRef","useState","useTextField","useI18n","EyeIcon","EyeInvisibleIcon","chain","mergeProps","useBufferedValue","castNullableStringValue","WithNullableValue","ItemAction","ItemActionProvider","useFieldProps","CubeBufferedValueProps","CubeTextInputBaseProps","TextInputBase","TextFieldKeyboardProps","CubePasswordInputProps","PasswordInput","
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","names":["ForwardedRef","forwardRef","RefObject","useRef","useState","AriaTextFieldProps","useTextField","useI18n","EyeIcon","EyeInvisibleIcon","chain","mergeProps","useBufferedValue","castNullableStringValue","WithNullableValue","ItemAction","ItemActionProvider","useFieldProps","CubeBufferedValueProps","CubeTextInputBaseProps","TextInputBase","TextFieldKeyboardProps","CubePasswordInputProps","Omit","validate","PasswordInput","rawProps","ref","$","_c","t","t0","t1","Symbol","for","defaultValidationTrigger","valuePropsMapper","_temp","props","type","setType","labelProps","userLabelProps","inputProps","userInputProps","suffix","multiLine","inputRef","propsInputRef","form","isBuffered","rest","localInputRef","buffered","value","onChange","isDisabled","isReadOnly","t2","t3","t4","onBlur","reset","t5","HTMLInputElement","t6","mergedLabelProps","t7","_temp2","toggleType","t8","t9","t10","t11","t12","t13","wrappedSuffix","t14","t15","paddingRight","t16","type_0","toString","_PasswordInput","cubeInputType","displayName"],"sources":["../../../../src/components/fields/PasswordInput/PasswordInput.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef, RefObject, useRef, useState } from 'react';\nimport { AriaTextFieldProps, useTextField } from 'react-aria';\n\nimport { useI18n } from '../../../i18n';\nimport { EyeIcon } from '../../../icons/EyeIcon';\nimport { EyeInvisibleIcon } from '../../../icons/EyeInvisibleIcon';\nimport { chain, mergeProps, useBufferedValue } from '../../../utils/react';\nimport {\n castNullableStringValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { ItemAction, ItemActionProvider } from '../../actions';\nimport { useFieldProps } from '../../form';\nimport {\n CubeBufferedValueProps,\n CubeTextInputBaseProps,\n TextInputBase,\n} from '../TextInput';\n\nimport type { TextFieldKeyboardProps } from '../../../shared/form';\n\nexport interface CubePasswordInputProps\n extends WithNullableValue<Omit<CubeTextInputBaseProps, 'validate'>>,\n CubeBufferedValueProps,\n TextFieldKeyboardProps {\n validate?: AriaTextFieldProps['validate'];\n}\n\nfunction PasswordInput(\n rawProps: CubePasswordInputProps,\n ref: ForwardedRef<HTMLElement>,\n) {\n const { t } = useI18n();\n\n rawProps = castNullableStringValue(rawProps);\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onBlur',\n valuePropsMapper: ({ value, onChange }) => ({\n value: value?.toString() ?? '',\n onChange,\n }),\n });\n\n let [type, setType] = useState('password');\n let {\n labelProps: userLabelProps,\n inputProps: userInputProps,\n suffix,\n multiLine,\n inputRef: propsInputRef,\n // The form instance, not the DOM `form` id `useTextField` forwards.\n form,\n isBuffered,\n ...rest\n } = props;\n let localInputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n let inputRef = propsInputRef ?? localInputRef;\n\n // Hold the typed text locally until the controlled value catches up — see `useBufferedValue`.\n let buffered = useBufferedValue(rest.value, rest.onChange, {\n isBuffered,\n isDisabled: rest.isDisabled,\n isReadOnly: rest.isReadOnly,\n });\n\n let { labelProps, inputProps } = useTextField(\n {\n ...rest,\n value: buffered.value,\n onChange: buffered.onChange,\n onBlur: chain(rest.onBlur, buffered.reset),\n type,\n },\n inputRef as RefObject<HTMLInputElement | null>,\n );\n\n // Merge user-provided labelProps with aria labelProps\n const mergedLabelProps = mergeProps(labelProps, userLabelProps);\n\n const toggleType = () => {\n setType((type) => (type === 'password' ? 'text' : 'password'));\n };\n\n const wrappedSuffix = (\n <>\n {suffix}\n {/*\n The disabled state travels through the provider rather than as a prop on\n the action. Both disable it, but the provider marks the state as\n INHERITED from the field, and `current` paints from the colour it\n inherits — which a disabled field has already faded — so a second fade\n would multiply the two down to roughly a tenth opacity. No `type` is\n passed, so the `context` mod stays off and the toggle keeps its margins.\n */}\n <ItemActionProvider isDisabled={rest.isDisabled}>\n <ItemAction\n // No `type` — the default `current` type inherits the input's own text\n // color, so the toggle follows the field's theme, validation state and\n // disabled state rather than staying opaque against faded text.\n tooltip={t('passwordInput.toggleMasking', 'Toggle masking')}\n icon={type === 'password' ? <EyeInvisibleIcon /> : <EyeIcon />}\n onPress={toggleType}\n />\n </ItemActionProvider>\n </>\n );\n\n return (\n <TextInputBase\n ref={ref}\n labelProps={mergedLabelProps}\n inputProps={mergeProps(\n inputProps,\n { 'data-input-type': 'passwordinput' },\n userInputProps,\n )}\n inputRef={inputRef}\n inputStyles={{ paddingRight: '4x' }}\n type={type}\n suffixPosition=\"after\"\n suffix={wrappedSuffix}\n multiLine={multiLine}\n {...rest}\n />\n );\n}\n\n/**\n * PasswordInputs are password inputs that allow users to input passwords or code entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nconst _PasswordInput = forwardRef(PasswordInput);\n\n(_PasswordInput as any).cubeInputType = 'Text';\n_PasswordInput.displayName = 'PasswordInput';\n\nexport { _PasswordInput as PasswordInput };\n"],"mappings":";;;;;;;;;;;;;;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AAAgD;AAAAhD,IAAA,MAAAoD;OAAAA,OAAApD,EAAA;AAAA,QAfFoD;;;;;;;AAhFJ,SAAAZ,OAAAa,QAAA;AAAA,QAoDuB1C,WAAS,aAAT,SAAA;;AApDvB,SAAAF,MAAAN,IAAA;CASuB,MAAA,EAAAuB,OAAAC,aAAAxB;AAAmB,QAAM;EAAAuB,OACnCA,OAAK4B,UAAkB,IAAvB;EAAuB3B;EAE/B;;AA4FL,MAAM4B,iBAAiBlF,WAAWwB,cAAc;AAEhD,AAAC0D,eAAuBC,gBAAgB;AACxCD,eAAeE,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.190.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.190.8 | Cube Dev Team */
|
|
2
2
|
import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
4
4
|
import { _Text } from "../../content/Text.js";
|