@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.js","names":["useRef","useDraggableItem","useDropIndicator","useTreeItem","mergeProps","mergeRefs","Key","Node","ReactNode","Ref","DraggableCollectionState","DroppableCollectionState","TreeState","TableTreeNode","TableRowTreeProps","state","T","node","entry","isVirtualized","TableRowProps","rowKey","rowProps","Record","height","measureRef","HTMLTableRowElement","rowRef","index","dragState","dropState","tree","children","treeItemAria","ReturnType","Row","props","$","_c","extra","t0","t1","undefined","t2","t3","DraggableRow","key","dragResult","onRef","target","type","dropPosition","isDropTarget","isOnTarget","dragProps","isDragging","t4","t5","t6","TreeRow","length","hasChildItems","level","siblingCount","siblingIndex","next","TableRow","TableRowDropIndicatorProps","columnCount","TableRowDropIndicator","ref","dropIndicatorProps","isHidden","Math","max"],"sources":["../../../../src/components/data/TableBase/TableRow.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { useDraggableItem, useDropIndicator, useTreeItem } from 'react-aria';\n\nimport { mergeProps, mergeRefs } from '../../../utils/react';\n\nimport type { Key, Node } from '@react-types/shared';\nimport type { ReactNode, Ref } from 'react';\nimport type {\n DraggableCollectionState,\n DroppableCollectionState,\n TreeState,\n} from 'react-stately';\nimport type { TableTreeNode } from './table-tree';\n\nexport interface TableRowTreeProps<T = any> {\n state: TreeState<TableTreeNode<T>>;\n node: Node<TableTreeNode<T>>;\n entry: TableTreeNode<T>;\n isVirtualized: boolean;\n}\n\nexport interface TableRowProps<T = any> {\n rowKey: Key;\n /** Everything the renderer already computed: mods, ARIA, handlers. */\n rowProps: Record<string, any>;\n height?: number;\n /** Set on the virtualized path so the virtualizer can measure the row. */\n measureRef?: Ref<HTMLTableRowElement>;\n /** Internal React Aria row ref in tree mode. */\n rowRef?: Ref<HTMLTableRowElement>;\n index?: number;\n dragState?: DraggableCollectionState;\n dropState?: DroppableCollectionState;\n tree?: TableRowTreeProps<T>;\n children:\n | ReactNode\n | ((treeItemAria: ReturnType<typeof useTreeItem> | undefined) => ReactNode);\n}\n\nfunction Row(\n props: TableRowProps & {\n extra?: Record<string, any>;\n rowRef?: Ref<HTMLTableRowElement>;\n },\n) {\n const { rowProps, height, measureRef, rowRef, index, extra, children } =\n props;\n\n return (\n <tr\n {...rowProps}\n {...extra}\n ref={mergeRefs(measureRef, rowRef)}\n data-index={index}\n style={height != null ? { height } : undefined}\n >\n {typeof children === 'function' ? children(undefined) : children}\n </tr>\n );\n}\n\n/**\n * A row inside a collection that accepts drags.\n *\n * Split from the plain row so the drag hooks can be called unconditionally —\n * they are hooks, and whether a table is draggable is a prop.\n */\nfunction DraggableRow(props: TableRowProps) {\n const { rowKey, dragState, dropState } = props;\n\n const dragResult = useDraggableItem(\n { key: rowKey },\n dragState as DraggableCollectionState,\n );\n\n /**\n * Whether a drop would land *on* this row.\n *\n * `useDropIndicator` rather than asking `dropState.isDropTarget` directly:\n * the state object's identity never changes as the pointer moves, so a plain\n * read is computed once and never updates. The hook subscribes, which is what\n * makes the highlight follow the cursor.\n */\n const onRef = useRef<HTMLDivElement>(null);\n const { isDropTarget: isOnTarget } = useDropIndicator(\n { target: { type: 'item', key: rowKey, dropPosition: 'on' } },\n dropState as DroppableCollectionState,\n onRef,\n );\n\n return (\n <Row\n {...props}\n extra={{\n ...mergeProps(props.rowProps, dragResult.dragProps),\n 'data-draggable': '',\n 'data-dragging': dragResult.isDragging ? '' : undefined,\n 'data-drop-target': isOnTarget ? '' : undefined,\n }}\n />\n );\n}\n\nfunction TreeRow<T>(props: TableRowProps<T>) {\n const { tree } = props;\n const rowRef = useRef<HTMLTableRowElement>(null);\n const treeItemAria = useTreeItem(\n {\n node: tree!.node,\n hasChildItems: tree!.entry.children.length > 0,\n isVirtualized: tree!.isVirtualized,\n },\n tree!.state,\n rowRef,\n );\n\n const rowProps = mergeProps(treeItemAria.rowProps, props.rowProps);\n\n // Table geometry and ItemTable selection are separate from React Aria's\n // internal focus-only selection manager, so the renderer's values win.\n if (props.rowProps['aria-rowindex'] !== undefined) {\n rowProps['aria-rowindex'] = props.rowProps['aria-rowindex'];\n }\n if (props.rowProps['aria-selected'] !== undefined) {\n rowProps['aria-selected'] = props.rowProps['aria-selected'];\n }\n rowProps['aria-level'] = tree!.entry.level + 1;\n rowProps['aria-posinset'] = tree!.entry.siblingIndex + 1;\n rowProps['aria-setsize'] = tree!.entry.siblingCount;\n\n const children =\n typeof props.children === 'function'\n ? props.children(treeItemAria)\n : props.children;\n const next = { ...props, rowProps, rowRef, children };\n\n return props.dragState && props.dropState ? (\n <DraggableRow {...next} />\n ) : (\n <Row {...next} />\n );\n}\n\nexport function TableRow<T>(props: TableRowProps<T>) {\n if (props.tree) return <TreeRow {...props} />;\n\n return props.dragState && props.dropState ? (\n <DraggableRow {...props} />\n ) : (\n <Row {...props} />\n );\n}\n\nexport interface TableRowDropIndicatorProps {\n rowKey: Key;\n dropPosition: 'before' | 'after';\n dropState: DroppableCollectionState;\n columnCount: number;\n}\n\n/**\n * The line showing where a dragged row would land.\n *\n * Its own `<tr>`, because a native table cannot hold an arbitrary element\n * between two rows — the same shape `ListBox` uses with `<li>`. It renders\n * nothing at all unless a drag is in flight, so the table's normal structure is\n * untouched the rest of the time.\n */\nexport function TableRowDropIndicator(props: TableRowDropIndicatorProps) {\n const { rowKey, dropPosition, dropState, columnCount } = props;\n const ref = useRef<HTMLDivElement>(null);\n const { dropIndicatorProps, isHidden, isDropTarget } = useDropIndicator(\n { target: { type: 'item', key: rowKey, dropPosition } },\n dropState,\n ref,\n );\n\n if (isHidden) return null;\n\n return (\n <tr data-element=\"DropIndicatorRow\">\n <td data-element=\"DropIndicatorCell\" colSpan={Math.max(columnCount, 1)}>\n <div\n {...dropIndicatorProps}\n ref={ref}\n data-element=\"DropIndicator\"\n data-drop-target={isDropTarget ? '' : undefined}\n />\n </td>\n </tr>\n );\n}\n"],"mappings":";;;;;;;;;AAuCA,SAAAmC,IAAAC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAME,MAAA,EAAAhB,UAAAE,QAAAC,YAAAE,QAAAC,OAAAW,OAAAP,aACEI;CAAM,IAAAI;AAAA,KAAAH,EAAA,OAAAZ,cAAAY,EAAA,OAAAV,QAAA;AAMCa,OAAAnC,UAAUoB,YAAYE,OAAO;AAAAU,IAAA,KAAAZ;AAAAY,IAAA,KAAAV;AAAAU,IAAA,KAAAG;OAAAA,MAAAH,EAAA;CAAA,IAAAI;AAAA,KAAAJ,EAAA,OAAAb,QAAA;AAE3BiB,OAAAjB,UAAU,OAAV,EAAAA,QAAuC,GAAvCkB;AAAuCL,IAAA,KAAAb;AAAAa,IAAA,KAAAI;OAAAA,MAAAJ,EAAA;CAAA,IAAAM;AAAA,KAAAN,EAAA,OAAAL,UAAA;AAE7CW,OAAA,OAAOX,aAAa,aAAaA,SAASU,OAAqB,GAA/DV;AAA+DK,IAAA,KA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EAAA;CADzD,MAAA,EAAAkC,oBAAAC,UAAApB,iBAAuDlD,iBACrDsC,IACAV,WACAwC,IACD;AAED,KAAIE,SAAQ,QAAS;CAI6B,MAAA/B,KAAAgC,KAAIC,IAAKN,aAAa,EAAE;CAKhD,MAAAzB,KAAAS,eAAA,KAAAV;CAA6B,IAAAE;AAAA,KAAAP,EAAA,OAAAkC,sBAAAlC,EAAA,OAAAM,IAAA;AAJjDC,OAAA,oBAAA;GAKE,GAJI2B;GACCD;GACQ,gBAAA;GACK,oBAAA3B;IAClB;AAAAN,IAAA,KAAAkC;AAAAlC,IAAA,KAAAM;AAAAN,IAAA,KAAAO;OAAAA,MAAAP,EAAA;CAAA,IAAAmB;AAAA,KAAAnB,EAAA,OAAAI,MAAAJ,EAAA,OAAAO,IAAA;AAPNY,OAAA,oBAAA;GAAiB,gBAAA;aACf,oBAAA;IAAiB,gBAAA;IAA6B,SAAAf;cAC5CG;KAOJ;IAAK;AAAAP,IAAA,KAAAI;AAAAJ,IAAA,KAAAO;AAAAP,IAAA,KAAAmB;OAAAA,MAAAnB,EAAA;AAAA,QATLmB"}
|
|
1
|
+
{"version":3,"file":"TableRow.js","names":["useRef","useDraggableItem","useDropIndicator","useTreeItem","mergeProps","mergeRefs","Key","Node","ReactNode","Ref","DraggableCollectionState","DroppableCollectionState","TreeState","TableTreeNode","TableRowTreeProps","state","T","node","entry","isVirtualized","TableRowProps","rowKey","rowProps","Record","height","measureRef","HTMLTableRowElement","rowRef","index","dragState","dropState","tree","children","treeItemAria","ReturnType","Row","props","$","_c","extra","t0","t1","undefined","t2","t3","DraggableRow","key","dragResult","onRef","target","type","dropPosition","isDropTarget","isOnTarget","dragProps","isDragging","t4","t5","t6","TreeRow","length","hasChildItems","treeItemOptions","level","siblingCount","siblingIndex","next","TableRow","TableRowDropIndicatorProps","columnCount","TableRowDropIndicator","ref","dropIndicatorProps","isHidden","Math","max"],"sources":["../../../../src/components/data/TableBase/TableRow.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { useDraggableItem, useDropIndicator, useTreeItem } from 'react-aria';\n\nimport { mergeProps, mergeRefs } from '../../../utils/react';\n\nimport type { Key, Node } from '@react-types/shared';\nimport type { ReactNode, Ref } from 'react';\nimport type {\n DraggableCollectionState,\n DroppableCollectionState,\n TreeState,\n} from 'react-stately';\nimport type { TableTreeNode } from './table-tree';\n\nexport interface TableRowTreeProps<T = any> {\n state: TreeState<TableTreeNode<T>>;\n node: Node<TableTreeNode<T>>;\n entry: TableTreeNode<T>;\n isVirtualized: boolean;\n}\n\nexport interface TableRowProps<T = any> {\n rowKey: Key;\n /** Everything the renderer already computed: mods, ARIA, handlers. */\n rowProps: Record<string, any>;\n height?: number;\n /** Set on the virtualized path so the virtualizer can measure the row. */\n measureRef?: Ref<HTMLTableRowElement>;\n /** Internal React Aria row ref in tree mode. */\n rowRef?: Ref<HTMLTableRowElement>;\n index?: number;\n dragState?: DraggableCollectionState;\n dropState?: DroppableCollectionState;\n tree?: TableRowTreeProps<T>;\n children:\n | ReactNode\n | ((treeItemAria: ReturnType<typeof useTreeItem> | undefined) => ReactNode);\n}\n\nfunction Row(\n props: TableRowProps & {\n extra?: Record<string, any>;\n rowRef?: Ref<HTMLTableRowElement>;\n },\n) {\n const { rowProps, height, measureRef, rowRef, index, extra, children } =\n props;\n\n return (\n <tr\n {...rowProps}\n {...extra}\n ref={mergeRefs(measureRef, rowRef)}\n data-index={index}\n style={height != null ? { height } : undefined}\n >\n {typeof children === 'function' ? children(undefined) : children}\n </tr>\n );\n}\n\n/**\n * A row inside a collection that accepts drags.\n *\n * Split from the plain row so the drag hooks can be called unconditionally —\n * they are hooks, and whether a table is draggable is a prop.\n */\nfunction DraggableRow(props: TableRowProps) {\n const { rowKey, dragState, dropState } = props;\n\n const dragResult = useDraggableItem(\n { key: rowKey },\n dragState as DraggableCollectionState,\n );\n\n /**\n * Whether a drop would land *on* this row.\n *\n * `useDropIndicator` rather than asking `dropState.isDropTarget` directly:\n * the state object's identity never changes as the pointer moves, so a plain\n * read is computed once and never updates. The hook subscribes, which is what\n * makes the highlight follow the cursor.\n */\n const onRef = useRef<HTMLDivElement>(null);\n const { isDropTarget: isOnTarget } = useDropIndicator(\n { target: { type: 'item', key: rowKey, dropPosition: 'on' } },\n dropState as DroppableCollectionState,\n onRef,\n );\n\n return (\n <Row\n {...props}\n extra={{\n ...mergeProps(props.rowProps, dragResult.dragProps),\n 'data-draggable': '',\n 'data-dragging': dragState!.isDragging(rowKey) ? '' : undefined,\n 'data-drop-target': isOnTarget ? '' : undefined,\n }}\n />\n );\n}\n\nfunction TreeRow<T>(props: TableRowProps<T>) {\n const { tree } = props;\n const rowRef = useRef<HTMLTableRowElement>(null);\n const treeItemOptions = {\n node: tree!.node,\n hasChildItems: tree!.entry.children.length > 0,\n isVirtualized: tree!.isVirtualized,\n };\n const treeItemAria = useTreeItem(treeItemOptions, tree!.state, rowRef);\n\n const rowProps = mergeProps(treeItemAria.rowProps, props.rowProps);\n\n // Table geometry and ItemTable selection are separate from React Aria's\n // internal focus-only selection manager, so the renderer's values win.\n if (props.rowProps['aria-rowindex'] !== undefined) {\n rowProps['aria-rowindex'] = props.rowProps['aria-rowindex'];\n }\n if (props.rowProps['aria-selected'] !== undefined) {\n rowProps['aria-selected'] = props.rowProps['aria-selected'];\n }\n rowProps['aria-level'] = tree!.entry.level + 1;\n rowProps['aria-posinset'] = tree!.entry.siblingIndex + 1;\n rowProps['aria-setsize'] = tree!.entry.siblingCount;\n\n const children =\n typeof props.children === 'function'\n ? props.children(treeItemAria)\n : props.children;\n const next = { ...props, rowProps, rowRef, children };\n\n return props.dragState && props.dropState ? (\n <DraggableRow {...next} />\n ) : (\n <Row {...next} />\n );\n}\n\nexport function TableRow<T>(props: TableRowProps<T>) {\n if (props.tree) return <TreeRow {...props} />;\n\n return props.dragState && props.dropState ? (\n <DraggableRow {...props} />\n ) : (\n <Row {...props} />\n );\n}\n\nexport interface TableRowDropIndicatorProps {\n rowKey: Key;\n dropPosition: 'before' | 'after';\n dropState: DroppableCollectionState;\n columnCount: number;\n}\n\n/**\n * The line showing where a dragged row would land.\n *\n * Its own `<tr>`, because a native table cannot hold an arbitrary element\n * between two rows — the same shape `ListBox` uses with `<li>`. It renders\n * nothing at all unless a drag is in flight, so the table's normal structure is\n * untouched the rest of the time.\n */\nexport function TableRowDropIndicator(props: TableRowDropIndicatorProps) {\n const { rowKey, dropPosition, dropState, columnCount } = props;\n const ref = useRef<HTMLDivElement>(null);\n const { dropIndicatorProps, isHidden, isDropTarget } = useDropIndicator(\n { target: { type: 'item', key: rowKey, dropPosition } },\n dropState,\n ref,\n );\n\n if (isHidden) return null;\n\n return (\n <tr data-element=\"DropIndicatorRow\">\n <td data-element=\"DropIndicatorCell\" colSpan={Math.max(columnCount, 1)}>\n <div\n {...dropIndicatorProps}\n ref={ref}\n data-element=\"DropIndicator\"\n data-drop-target={isDropTarget ? '' : undefined}\n />\n </td>\n </tr>\n );\n}\n"],"mappings":";;;;;;;;;AAuCA,SAAAmC,IAAAC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAME,MAAA,EAAAhB,UAAAE,QAAAC,YAAAE,QAAAC,OAAAW,OAAAP,aACEI;CAAM,IAAAI;AAAA,KAAAH,EAAA,OAAAZ,cAAAY,EAAA,OAAAV,QAAA;AAMCa,OAAAnC,UAAUoB,YAAYE,OAAO;AAAAU,IAAA,KAAAZ;AAAAY,IAAA,KAAAV;AAAAU,IAAA,KAAAG;OAAAA,MAAAH,EAAA;CAAA,IAAAI;AAAA,KAAAJ,EAAA,OAAAb,QAAA;AAE3BiB,OAAAjB,UAAU,OAAV,EAAAA,QAAuC,GAAvCkB;AAAuCL,IAAA,KAAAb;AAAAa,IAAA,KAAAI;OAAAA,MAAAJ,EAAA;CAAA,IAAAM;AAAA,KAAAN,EAAA,OAAAL,UAAA;AAE7CW,OAAA,OAAOX,aAAa,aAAaA,SAASU,OAAqB,GAA/DV;AAA+DK,IAAA,KAAAL;AAAAK,IAAA,KAAAM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AA;CADzD,MAAA,EAAAmC,oBAAAC,UAAArB,iBAAuDlD,iBACrDsC,IACAV,WACAyC,IACD;AAED,KAAIE,SAAQ,QAAS;CAI6B,MAAAhC,KAAAiC,KAAIC,IAAKN,aAAa,EAAE;CAKhD,MAAA1B,KAAAS,eAAA,KAAAV;CAA6B,IAAAE;AAAA,KAAAP,EAAA,OAAAmC,sBAAAnC,EAAA,OAAAM,IAAA;AAJjDC,OAAA,oBAAA;GAKE,GAJI4B;GACCD;GACQ,gBAAA;GACK,oBAAA5B;IAClB;AAAAN,IAAA,KAAAmC;AAAAnC,IAAA,KAAAM;AAAAN,IAAA,KAAAO;OAAAA,MAAAP,EAAA;CAAA,IAAAmB;AAAA,KAAAnB,EAAA,OAAAI,MAAAJ,EAAA,OAAAO,IAAA;AAPNY,OAAA,oBAAA;GAAiB,gBAAA;aACf,oBAAA;IAAiB,gBAAA;IAA6B,SAAAf;cAC5CG;KAOJ;IAAK;AAAAP,IAAA,KAAAI;AAAAJ,IAAA,KAAAO;AAAAP,IAAA,KAAAmB;OAAAA,MAAAnB,EAAA;AAAA,QATLmB"}
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { TooltipProvider } from "../../overlays/Tooltip/TooltipProvider.js";
|
|
4
4
|
import { TextItem } from "../../content/TextItem/TextItem.js";
|
|
@@ -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 { c } from "react-compiler-runtime";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
@@ -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 { ArrowNarrowDownIcon } from "../../../icons/ArrowNarrowDownIcon.js";
|
|
3
3
|
import { ArrowNarrowUpIcon } from "../../../icons/ArrowNarrowUpIcon.js";
|
|
4
4
|
import { TableHeaderItem } from "./styled.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import "./types.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
//#region src/components/data/TableBase/column-menu.d.ts
|
|
6
7
|
/**
|
|
@@ -30,7 +31,7 @@ type CubeColumnMenuSortKey = (typeof COLUMN_MENU_SORT_KEYS)[number];
|
|
|
30
31
|
*
|
|
31
32
|
* Hand-written keys still work — this is a convenience, not the only route.
|
|
32
33
|
*/
|
|
33
|
-
declare function columnSortMenu(keys?: readonly CubeColumnMenuSortKey[]):
|
|
34
|
+
declare function columnSortMenu(keys?: readonly CubeColumnMenuSortKey[]): react_jsx_runtime0.JSX.Element[];
|
|
34
35
|
//#endregion
|
|
35
36
|
export { COLUMN_MENU_SORT_KEYS, CubeColumnMenuSortKey, columnSortMenu };
|
|
36
37
|
//# sourceMappingURL=column-menu.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 { __Menu } from "../../actions/Menu/Menu.js";
|
|
3
3
|
import { normalizeMenuAction } from "./row-menu.js";
|
|
4
4
|
import { Children, cloneElement, isValidElement } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-menu.js","names":["Children","cloneElement","isValidElement","Menu","normalizeMenuAction","ReactElement","ReactNode","CubeTableSortDirection","COLUMN_MENU_SORT_KEYS","const","CubeColumnMenuSortKey","isColumnMenuSortKey","key","includes","COLUMN_MENU_SORT_DIRECTION","Record","CubeColumnMenuContext","isSortable","sort","disallowSortRemoval","labels","MenuItemLikeProps","children","isDisabled","isSortKeyRedundant","ctx","processColumnMenuItems","result","forEach","child","push","element","childProps","props","columnSortMenu","keys","map"],"sources":["../../../../src/components/data/TableBase/column-menu.tsx"],"sourcesContent":["import { Children, cloneElement, isValidElement } from 'react';\n\nimport { Menu } from '../../actions/Menu';\n\nimport { normalizeMenuAction } from './row-menu';\n\nimport type { ReactElement, ReactNode } from 'react';\nimport type { CubeTableSortDirection } from './types';\n\n/**\n * Menu keys the table itself honours.\n *\n * Sorting is the only capability the table owns, so it is the only thing that\n * can be a reserved key. `pin` and `hide` deliberately are not: `column.pin` and\n * `column.isHidden` are read-only declarative inputs with no controlled state\n * behind them, and reserving those keys would fix an API in string literals\n * before the state that backs it exists. They stay ordinary consumer keys and\n * are reported through `onColumnMenuAction` like anything else.\n */\nexport const COLUMN_MENU_SORT_KEYS = [\n 'sort-asc',\n 'sort-desc',\n 'clear-sort',\n] as const;\n\nexport type CubeColumnMenuSortKey = (typeof COLUMN_MENU_SORT_KEYS)[number];\n\nexport function isColumnMenuSortKey(key: string): key is CubeColumnMenuSortKey {\n return (COLUMN_MENU_SORT_KEYS as readonly string[]).includes(key);\n}\n\n/** The direction a reserved key asks for. `clear-sort` asks for none. */\nexport const COLUMN_MENU_SORT_DIRECTION: Record<\n CubeColumnMenuSortKey,\n CubeTableSortDirection | null\n> = {\n 'sort-asc': 'asc',\n 'sort-desc': 'desc',\n 'clear-sort': null,\n};\n\nexport interface CubeColumnMenuContext {\n isSortable: boolean;\n /** This column's current direction, or `null` when it is unsorted. */\n sort: CubeTableSortDirection | null;\n disallowSortRemoval: boolean;\n /** Default labels, so `TableView` owns the i18n lookup and this stays pure. */\n labels: Record<CubeColumnMenuSortKey, string>;\n}\n\ninterface MenuItemLikeProps {\n children?: ReactNode;\n isDisabled?: boolean;\n}\n\n/**\n * Whether a reserved key would do nothing if pressed.\n *\n * Redundancy is signalled by disabling the item rather than by ticking the\n * active one. A tick would mean `isSelected`, which `MenuItem` only honours when\n * the whole `Menu` runs at `selectionMode !== 'none'` (`MenuItem.tsx:43`) — and\n * switching the menu into a selection mode would turn the consumer's own items\n * into radios too, and could be overridden from `menuProps`. Disabling is local\n * to the item and cannot leak.\n */\nfunction isSortKeyRedundant(\n key: CubeColumnMenuSortKey,\n ctx: CubeColumnMenuContext,\n): boolean {\n if (!ctx.isSortable) return true;\n\n if (key === 'clear-sort') {\n return ctx.sort == null || ctx.disallowSortRemoval;\n }\n\n return ctx.sort === COLUMN_MENU_SORT_DIRECTION[key];\n}\n\n/**\n * Fills in default labels and disabled state for the reserved sort keys.\n *\n * `Children.forEach` rather than `Children.toArray`, because `toArray` rewrites\n * every key with a `.$` prefix — which breaks `selectedKeys` matching inside\n * `Menu`. Same reason `TabButton` does it this way.\n *\n * A label or an `isDisabled` the consumer wrote always wins; this only supplies\n * what was left out, so `<Menu.Item key=\"sort-asc\" />` is the short form and\n * `<Menu.Item key=\"sort-asc\">Oldest first</Menu.Item>` still says what it says.\n */\nexport function processColumnMenuItems(\n children: ReactNode,\n ctx: CubeColumnMenuContext,\n): ReactNode {\n const result: ReactNode[] = [];\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n result.push(child);\n\n return;\n }\n\n const element = child as ReactElement<MenuItemLikeProps>;\n const childProps = element.props;\n const key = element.key == null ? null : normalizeMenuAction(element.key);\n\n if (key != null && isColumnMenuSortKey(key)) {\n result.push(\n cloneElement(element, {\n children: childProps.children ?? ctx.labels[key],\n isDisabled: childProps.isDisabled ?? isSortKeyRedundant(key, ctx),\n }),\n );\n\n return;\n }\n\n // A `Menu.Section` holds the items; recurse so a reserved key inside one is\n // still resolved. Guarded on a non-text child so an ordinary item whose\n // label happens to be an element is not walked for no reason.\n if (\n childProps.children != null &&\n typeof childProps.children !== 'string' &&\n typeof childProps.children !== 'number'\n ) {\n result.push(\n cloneElement(element, {\n children: processColumnMenuItems(childProps.children, ctx),\n }),\n );\n\n return;\n }\n\n result.push(child);\n });\n\n // `Children.forEach` preserves order, and each entry keeps the key it was\n // written with — so React still reconciles these by key, not by index.\n return result;\n}\n\n/**\n * The reserved sort items, ready to drop into `header.menu`.\n *\n * ```tsx\n * header: { menu: <>{columnSortMenu()}<Menu.Item key=\"pin\">Pin</Menu.Item></> }\n * ```\n *\n * Exists because `Menu.Item` requires `children` — it comes from react-stately's\n * `ItemProps` — so `<Menu.Item key=\"sort-asc\" />` does not typecheck, and a\n * consumer filling the label in by hand would hardcode one language and lose the\n * translated one the table supplies. Passing `null` satisfies the type and reads\n * as \"the table fills this in\", which `processColumnMenuItems` then does.\n *\n * Hand-written keys still work — this is a convenience, not the only route.\n */\nexport function columnSortMenu(\n keys: readonly CubeColumnMenuSortKey[] = COLUMN_MENU_SORT_KEYS,\n)
|
|
1
|
+
{"version":3,"file":"column-menu.js","names":["Children","cloneElement","isValidElement","Menu","normalizeMenuAction","ReactElement","ReactNode","CubeTableSortDirection","COLUMN_MENU_SORT_KEYS","const","CubeColumnMenuSortKey","isColumnMenuSortKey","key","includes","COLUMN_MENU_SORT_DIRECTION","Record","CubeColumnMenuContext","isSortable","sort","disallowSortRemoval","labels","MenuItemLikeProps","children","isDisabled","isSortKeyRedundant","ctx","processColumnMenuItems","result","forEach","child","push","element","childProps","props","columnSortMenu","keys","map"],"sources":["../../../../src/components/data/TableBase/column-menu.tsx"],"sourcesContent":["import { Children, cloneElement, isValidElement } from 'react';\n\nimport { Menu } from '../../actions/Menu';\n\nimport { normalizeMenuAction } from './row-menu';\n\nimport type { ReactElement, ReactNode } from 'react';\nimport type { CubeTableSortDirection } from './types';\n\n/**\n * Menu keys the table itself honours.\n *\n * Sorting is the only capability the table owns, so it is the only thing that\n * can be a reserved key. `pin` and `hide` deliberately are not: `column.pin` and\n * `column.isHidden` are read-only declarative inputs with no controlled state\n * behind them, and reserving those keys would fix an API in string literals\n * before the state that backs it exists. They stay ordinary consumer keys and\n * are reported through `onColumnMenuAction` like anything else.\n */\nexport const COLUMN_MENU_SORT_KEYS = [\n 'sort-asc',\n 'sort-desc',\n 'clear-sort',\n] as const;\n\nexport type CubeColumnMenuSortKey = (typeof COLUMN_MENU_SORT_KEYS)[number];\n\nexport function isColumnMenuSortKey(key: string): key is CubeColumnMenuSortKey {\n return (COLUMN_MENU_SORT_KEYS as readonly string[]).includes(key);\n}\n\n/** The direction a reserved key asks for. `clear-sort` asks for none. */\nexport const COLUMN_MENU_SORT_DIRECTION: Record<\n CubeColumnMenuSortKey,\n CubeTableSortDirection | null\n> = {\n 'sort-asc': 'asc',\n 'sort-desc': 'desc',\n 'clear-sort': null,\n};\n\nexport interface CubeColumnMenuContext {\n isSortable: boolean;\n /** This column's current direction, or `null` when it is unsorted. */\n sort: CubeTableSortDirection | null;\n disallowSortRemoval: boolean;\n /** Default labels, so `TableView` owns the i18n lookup and this stays pure. */\n labels: Record<CubeColumnMenuSortKey, string>;\n}\n\ninterface MenuItemLikeProps {\n children?: ReactNode;\n isDisabled?: boolean;\n}\n\n/**\n * Whether a reserved key would do nothing if pressed.\n *\n * Redundancy is signalled by disabling the item rather than by ticking the\n * active one. A tick would mean `isSelected`, which `MenuItem` only honours when\n * the whole `Menu` runs at `selectionMode !== 'none'` (`MenuItem.tsx:43`) — and\n * switching the menu into a selection mode would turn the consumer's own items\n * into radios too, and could be overridden from `menuProps`. Disabling is local\n * to the item and cannot leak.\n */\nfunction isSortKeyRedundant(\n key: CubeColumnMenuSortKey,\n ctx: CubeColumnMenuContext,\n): boolean {\n if (!ctx.isSortable) return true;\n\n if (key === 'clear-sort') {\n return ctx.sort == null || ctx.disallowSortRemoval;\n }\n\n return ctx.sort === COLUMN_MENU_SORT_DIRECTION[key];\n}\n\n/**\n * Fills in default labels and disabled state for the reserved sort keys.\n *\n * `Children.forEach` rather than `Children.toArray`, because `toArray` rewrites\n * every key with a `.$` prefix — which breaks `selectedKeys` matching inside\n * `Menu`. Same reason `TabButton` does it this way.\n *\n * A label or an `isDisabled` the consumer wrote always wins; this only supplies\n * what was left out, so `<Menu.Item key=\"sort-asc\" />` is the short form and\n * `<Menu.Item key=\"sort-asc\">Oldest first</Menu.Item>` still says what it says.\n */\nexport function processColumnMenuItems(\n children: ReactNode,\n ctx: CubeColumnMenuContext,\n): ReactNode {\n const result: ReactNode[] = [];\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n result.push(child);\n\n return;\n }\n\n const element = child as ReactElement<MenuItemLikeProps>;\n const childProps = element.props;\n const key = element.key == null ? null : normalizeMenuAction(element.key);\n\n if (key != null && isColumnMenuSortKey(key)) {\n result.push(\n cloneElement(element, {\n children: childProps.children ?? ctx.labels[key],\n isDisabled: childProps.isDisabled ?? isSortKeyRedundant(key, ctx),\n }),\n );\n\n return;\n }\n\n // A `Menu.Section` holds the items; recurse so a reserved key inside one is\n // still resolved. Guarded on a non-text child so an ordinary item whose\n // label happens to be an element is not walked for no reason.\n if (\n childProps.children != null &&\n typeof childProps.children !== 'string' &&\n typeof childProps.children !== 'number'\n ) {\n result.push(\n cloneElement(element, {\n children: processColumnMenuItems(childProps.children, ctx),\n }),\n );\n\n return;\n }\n\n result.push(child);\n });\n\n // `Children.forEach` preserves order, and each entry keeps the key it was\n // written with — so React still reconciles these by key, not by index.\n return result;\n}\n\n/**\n * The reserved sort items, ready to drop into `header.menu`.\n *\n * ```tsx\n * header: { menu: <>{columnSortMenu()}<Menu.Item key=\"pin\">Pin</Menu.Item></> }\n * ```\n *\n * Exists because `Menu.Item` requires `children` — it comes from react-stately's\n * `ItemProps` — so `<Menu.Item key=\"sort-asc\" />` does not typecheck, and a\n * consumer filling the label in by hand would hardcode one language and lose the\n * translated one the table supplies. Passing `null` satisfies the type and reads\n * as \"the table fills this in\", which `processColumnMenuItems` then does.\n *\n * Hand-written keys still work — this is a convenience, not the only route.\n */\nexport function columnSortMenu(\n keys: readonly C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OF;;;;;;;;;;;;;;;;;AAkBT,SAAgBO,eACdC,OAAyC3B,uBACzC;AACA,QAAO2B,KAAKC,KAAKxB,QAAQ,oBAAC,OAAK,kBAAgB,QAANA,IAAuB,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import "../../content/Item/index.js";
|
|
3
3
|
import "../../../data/item-themes.js";
|
|
4
4
|
import "../../overlays/Tooltip/split-trigger-props.js";
|
|
5
|
+
import "../../actions/index.js";
|
|
5
6
|
import "../../../index.js";
|
|
6
7
|
import { Styles } from "@tenphi/tasty";
|
|
7
|
-
import "react";
|
|
8
|
+
import "react";
|
|
9
|
+
import "react-aria";
|
|
@@ -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 { _Item } from "../../content/Item/Item.js";
|
|
3
3
|
import { Action } from "../../actions/Action/Action.js";
|
|
4
4
|
import { keyframes, tasty } from "@tenphi/tasty";
|
|
@@ -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
|
//#region src/components/data/TableBase/table-tree.ts
|
|
3
3
|
/** Build identity and parent/child indexes without modifying consumer rows. */
|
|
4
4
|
function buildTableTree(rows, getChildren, getKey) {
|
|
Binary file
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
4
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { useState } from "react";
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useDebouncedValue } from "../../../_internal/hooks/use-debounced-value.js";
|
|
4
4
|
import { getColumnText } from "./use-table-columns.js";
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { RowCollection } from "./RowCollection.js";
|
|
4
4
|
import { useCallback, useMemo, useRef } from "react";
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { getColumnText, getColumnValue } from "./use-table-columns.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { sortRows } from "./use-table-sort.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
@@ -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 { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { c } from "react-compiler-runtime";
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { FieldBaseProps, ToggleSelectionProps } from "../../../shared/form.js";
|
|
3
3
|
import "../../../shared/index.js";
|
|
4
4
|
import { CubeTooltipProviderProps } from "../../overlays/Tooltip/TooltipProvider.js";
|
|
5
|
-
import { WithNullableValue } from "../../../utils/react/nullableValue.js";
|
|
6
5
|
import { CubeCheckboxGroupProps, _CheckboxGroup } from "./CheckboxGroup.js";
|
|
7
6
|
import { BaseProps, ContainerStyleProps, Styles } from "@tenphi/tasty";
|
|
8
7
|
import * as react from "react";
|
|
@@ -10,16 +9,7 @@ import { AriaCheckboxProps, useCheckbox } from "react-aria";
|
|
|
10
9
|
import * as _react_types_shared0 from "@react-types/shared";
|
|
11
10
|
|
|
12
11
|
//#region src/components/fields/Checkbox/Checkbox.d.ts
|
|
13
|
-
interface CubeCheckboxProps extends BaseProps, ContainerStyleProps, AriaCheckboxProps, ToggleSelectionProps, FieldBaseProps<boolean | null | undefined> {
|
|
14
|
-
/**
|
|
15
|
-
* The form instance. Redeclared so that it wins over react-aria's DOM
|
|
16
|
-
* `form: string` attribute when a consumer resolves react-aria's types for
|
|
17
|
-
* real; `Omit<AriaCheckboxProps, 'form'>` would erase every other prop
|
|
18
|
-
* in-repo, where those types resolve to `any` (see tsconfig.json).
|
|
19
|
-
*/
|
|
20
|
-
form?: FieldBaseProps['form'];
|
|
21
|
-
/** Field name; modern forms also accept nested tuple paths. */
|
|
22
|
-
name?: FieldBaseProps['name'];
|
|
12
|
+
interface CubeCheckboxProps extends BaseProps, ContainerStyleProps, Omit<AriaCheckboxProps, 'form' | 'name'>, ToggleSelectionProps, FieldBaseProps<boolean | null | undefined> {
|
|
23
13
|
inputStyles?: Styles;
|
|
24
14
|
isIndeterminate?: boolean;
|
|
25
15
|
value?: string;
|
|
@@ -32,12 +22,15 @@ interface CubeCheckboxProps extends BaseProps, ContainerStyleProps, AriaCheckbox
|
|
|
32
22
|
tooltip?: string | Omit<CubeTooltipProviderProps, 'children'>;
|
|
33
23
|
}
|
|
34
24
|
declare let __Checkbox: react.ForwardRefExoticComponent<Omit<CubeCheckboxProps, "isSelected" | "defaultSelected"> & {
|
|
35
|
-
isSelected?:
|
|
36
|
-
defaultSelected?:
|
|
25
|
+
isSelected?: any;
|
|
26
|
+
defaultSelected?: any;
|
|
37
27
|
} & react.RefAttributes<_react_types_shared0.FocusableRefValue<HTMLElement, HTMLElement>>> & {
|
|
38
28
|
Group: typeof _CheckboxGroup;
|
|
39
29
|
} & {
|
|
40
|
-
Group: react.ForwardRefExoticComponent<Omit<
|
|
30
|
+
Group: react.ForwardRefExoticComponent<Omit<CubeCheckboxGroupProps, "value" | "defaultValue"> & {
|
|
31
|
+
value?: any;
|
|
32
|
+
defaultValue?: any;
|
|
33
|
+
} & react.RefAttributes<unknown>>;
|
|
41
34
|
};
|
|
42
35
|
//#endregion
|
|
43
36
|
export { type AriaCheckboxProps, CubeCheckboxProps, __Checkbox, useCheckbox };
|
|
@@ -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 } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useFocus as useFocus$1 } from "../../../utils/react/interactions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["useFocusableRef","IconCheck","IconMinus","BaseProps","CONTAINER_STYLES","ContainerStyleProps","Element","filterBaseProps","Styles","tasty","forwardRef","ReactElement","useContext","useMemo","useRef","AriaCheckboxProps","useCheckbox","useCheckboxGroupItem","useHover","useToggleState","Icon","FieldBaseProps","ToggleSelectionProps","mergeProps","useFocus","castNullableIsSelected","WithNullableSelected","extractStyles","useAutoTooltip","getValidationMods","INLINE_LABEL_STYLES","LABEL_STYLES","resolveValidationProps","useFieldProps","wrapWithField","HiddenInput","mergeTooltipFocusProps","splitTooltipTriggerProps","TooltipFocusProps","CheckboxGroup","CheckboxGroupContext","FocusableRef","CubeTooltipProviderProps","CubeCheckboxProps","form","name","inputStyles","isIndeterminate","value","tooltip","Omit","CheckboxWrapperElement","as","qa","styles","position","display","placeItems","placeContent","gap","flow","preset","cursor","width","color","CheckboxElement","radius","fill","disabled","border","invalid","valid","height","outline","focused","outlineOffset","transition","Checkbox","allProps","ref","groupState","originalProps","props","defaultValidationTrigger","valuePropsMapper","onChange","isSelected","unsafe__isDisabled","isDisabled","insideForm","isRequired","children","label","isInvalid","isValid","labelProps","labelStyles","labelPosition","isHidden","otherProps","isFocused","focusProps","hoverProps","isHovered","inputRef","domRef","renderWithTooltip","toggleState","inputProps","undefined","trim","markIcon","key","console","warn","mods","checked","indeterminate","hovered","renderCheckbox","tooltipFocusProps","checkboxField","tooltipTriggerProps","tooltipRef","pointerProps","element","HTMLLabelElement","current","HTMLElement","_Checkbox","cubeInputType","__Checkbox","Object","assign","Group","displayName"],"sources":["../../../../src/components/fields/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useFocusableRef } from '@react-spectrum/utils';\nimport { IconCheck, IconMinus } from '@tabler/icons-react';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n Element,\n filterBaseProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport { forwardRef, ReactElement, useContext, useMemo, useRef } from 'react';\nimport {\n AriaCheckboxProps,\n useCheckbox,\n useCheckboxGroupItem,\n useHover,\n} from 'react-aria';\nimport { useToggleState } from 'react-stately';\n\nimport { Icon } from '../../../icons/Icon';\nimport { FieldBaseProps, ToggleSelectionProps } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport {\n castNullableIsSelected,\n WithNullableSelected,\n} from '../../../utils/react/nullableValue';\nimport { extractStyles } from '../../../utils/styles';\nimport { useAutoTooltip } from '../../content/use-auto-tooltip';\nimport {\n getValidationMods,\n INLINE_LABEL_STYLES,\n LABEL_STYLES,\n resolveValidationProps,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { HiddenInput } from '../../HiddenInput';\nimport {\n mergeTooltipFocusProps,\n splitTooltipTriggerProps,\n TooltipFocusProps,\n} from '../../overlays/Tooltip/split-trigger-props';\n\nimport { CheckboxGroup } from './CheckboxGroup';\nimport { CheckboxGroupContext } from './context';\n\nimport type { FocusableRef } from '@react-types/shared';\nimport type { CubeTooltipProviderProps } from '../../overlays/Tooltip/TooltipProvider';\n\nexport interface CubeCheckboxProps\n extends BaseProps,\n ContainerStyleProps,\n AriaCheckboxProps,\n ToggleSelectionProps,\n FieldBaseProps<boolean | null | undefined> {\n /**\n * The form instance. Redeclared so that it wins over react-aria's DOM\n * `form: string` attribute when a consumer resolves react-aria's types for\n * real; `Omit<AriaCheckboxProps, 'form'>` would erase every other prop\n * in-repo, where those types resolve to `any` (see tsconfig.json).\n */\n form?: FieldBaseProps['form'];\n /** Field name; modern forms also accept nested tuple paths. */\n name?: FieldBaseProps['name'];\n inputStyles?: Styles;\n isIndeterminate?: boolean;\n value?: string;\n /**\n * The checkbox's own tooltip, shown on hover over the box and its inline\n * label — also while the checkbox is disabled — and on keyboard focus. A string, or `TooltipProvider` props\n * (`title`, `placement`, …). The info badge next to a field label is\n * `labelTooltip`.\n */\n tooltip?: string | Omit<CubeTooltipProviderProps, 'children'>;\n}\n\nconst CheckboxWrapperElement = tasty({\n as: 'label',\n qa: 'CheckboxWrapper',\n styles: {\n position: 'relative',\n display: 'flex',\n placeItems: 'center start',\n placeContent: 'baseline',\n gap: '1x',\n flow: 'row',\n preset: 'default',\n cursor: '$pointer',\n width: 'max max-content',\n color: '#dark-02',\n },\n});\n\nconst CheckboxElement = tasty({\n styles: {\n display: 'grid',\n placeItems: 'center',\n radius: '.5r',\n fill: {\n '': '#surface',\n 'checked | indeterminate': '#primary',\n 'invalid & !checked': '#surface',\n 'invalid & checked': '#danger',\n 'valid & !checked': '#surface',\n 'valid & checked': '#success',\n disabled: '#dark.12',\n },\n // The check / minus icon is always rendered inside the box, so the\n // default color must be transparent when the checkbox is neither\n // checked nor indeterminate — otherwise the white stroke shows through\n // the dark `#surface` fill in dark schemes (it used to be hidden\n // accidentally by the legacy white-on-white `fill: '#white'`).\n color: {\n '': '#clear',\n 'checked | indeterminate': '#white',\n },\n border: {\n '': '#dark.30',\n invalid: '#danger',\n valid: '#success',\n 'disabled | ((indeterminate | checked) & !invalid & !valid)': '#clear',\n },\n width: '(2x - 2bw)',\n height: '(2x - 2bw)',\n outline: {\n '': '#primary-text.0',\n focused: '1bw #primary-text',\n },\n outlineOffset: 1,\n transition: 'theme',\n },\n});\n\nfunction Checkbox(\n allProps: WithNullableSelected<CubeCheckboxProps>,\n ref: FocusableRef,\n) {\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n\n const originalProps = castNullableIsSelected(allProps);\n\n const props = useFieldProps(originalProps, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n isSelected: value ?? false,\n isIndeterminate: false,\n onChange: onChange,\n }),\n unsafe__isDisabled: !!groupState,\n });\n\n let {\n qa,\n isIndeterminate = false,\n isDisabled = false,\n insideForm,\n isRequired,\n children,\n label,\n isInvalid,\n isValid,\n labelProps,\n labelStyles,\n labelPosition,\n inputStyles,\n isHidden,\n form,\n tooltip,\n // Pulled out so it stays off the `<label>` spread below. The Aria hooks read\n // it from `props` directly; `filterBaseProps` already dropped it at runtime,\n // but it typed as a DOM `FormEventHandler` there, which it is not.\n onChange,\n ...otherProps\n } = props;\n\n let styles: Styles = extractStyles(props, CONTAINER_STYLES);\n\n labelStyles = useMemo(\n () => ({\n ...(!groupState ? LABEL_STYLES : INLINE_LABEL_STYLES),\n ...labelStyles,\n }),\n [groupState, labelStyles],\n );\n\n let { isFocused, focusProps } = useFocus(true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n let inputRef = useRef(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n // Triggered by the wrapper rather than the input, so a disabled checkbox —\n // whose input ignores the pointer — still shows it.\n let { renderWithTooltip } = useAutoTooltip({ tooltip, children: null });\n\n const toggleState = useToggleState(props);\n\n // React Aria writes `form` onto the input as the id of its `<form>`, so the\n // form instance would render as `form=\"[object Object]\"` and detach it.\n let { inputProps } = groupState\n ? useCheckboxGroupItem(\n {\n ...props,\n form: undefined,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).\n value: props.value || '',\n // Only pass isRequired and the validation state to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n isInvalid: resolveValidationProps(originalProps).isInvalid,\n },\n groupState,\n inputRef,\n )\n : useCheckbox(\n {\n ...props,\n form: undefined,\n ...(typeof label === 'string' && label.trim()\n ? { 'aria-label': label }\n : {}),\n },\n toggleState,\n inputRef,\n );\n\n let markIcon = isIndeterminate ? (\n <Icon size={12} stroke={3}>\n <IconMinus />\n </Icon>\n ) : (\n <Icon size={12} stroke={3}>\n <IconCheck />\n </Icon>\n );\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(\n `CubeUIKit: ${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`,\n );\n }\n }\n if (props.value == null) {\n console.warn(\n 'CubeUIKit: A <Checkbox> element within a <CheckboxGroup> requires a `value` property.',\n );\n }\n }\n\n const mods = {\n checked: inputProps.checked,\n indeterminate: isIndeterminate,\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n hovered: isHovered,\n focused: isFocused,\n 'side-label': labelPosition === 'side',\n 'inside-form': insideForm,\n };\n\n // The input, where keyboard focus lands, takes the tooltip's focus-side\n // trigger props; the wrapper keeps the hover side and positions the tooltip.\n const renderCheckbox = (tooltipFocusProps?: TooltipFocusProps) => (\n <>\n <HiddenInput\n qa={qa || 'Checkbox'}\n data-input-type=\"checkbox\"\n {...mergeTooltipFocusProps(\n mergeProps(inputProps, focusProps),\n tooltipFocusProps,\n )}\n ref={inputRef}\n />\n <CheckboxElement data-element=\"Input\" mods={mods} styles={inputStyles}>\n {markIcon}\n </CheckboxElement>\n </>\n );\n\n if (!groupState) {\n const checkboxField = renderWithTooltip(\n (tooltipTriggerProps, tooltipRef) => {\n const { pointerProps, focusProps: tooltipFocusProps } =\n splitTooltipTriggerProps(tooltipTriggerProps);\n\n return (\n // `styles` is forwarded here as well as in the in-group branch\n // below — it used to be extracted from props and then dropped on\n // this path, so `<Checkbox styles={{ … }}>` outside a group was a\n // silent no-op.\n <CheckboxWrapperElement\n styles={styles}\n isHidden={isHidden}\n mods={mods}\n {...pointerProps}\n ref={tooltipRef}\n >\n {renderCheckbox(tooltipFocusProps)}\n {children ? (\n // Same element and preset as the in-group branch. This path used\n // to force children through `<Text nowrap>`: `white-space:\n // nowrap` inherits, so a label longer than a few words — or any\n // custom node with two lines in it — could not wrap at all, and\n // the label also missed the preset a grouped one picks up.\n <Element\n styles={INLINE_LABEL_STYLES}\n mods={{\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n }}\n >\n {children}\n </Element>\n ) : null}\n </CheckboxWrapperElement>\n );\n },\n 'top',\n );\n\n // `tooltip` is the checkbox's own here, not a legacy label badge.\n // `renderWithTooltip` is typed for any node; here it returns an element.\n return wrapWithField(checkboxField as ReactElement, domRef, {\n ...props,\n tooltip: undefined,\n });\n }\n\n return renderWithTooltip((tooltipTriggerProps, tooltipRef) => {\n const { pointerProps, focusProps: tooltipFocusProps } =\n splitTooltipTriggerProps(tooltipTriggerProps);\n\n return (\n <CheckboxWrapperElement\n styles={styles}\n isHidden={isHidden}\n {...mergeProps(hoverProps, pointerProps)}\n {...filterBaseProps(otherProps)}\n ref={\n tooltipRef\n ? // Written only when React attaches the node, never during render.\n (element: HTMLLabelElement | null) => {\n (domRef as { current: HTMLElement | null }).current = element;\n (tooltipRef as { current: HTMLElement | null }).current =\n element;\n }\n : domRef\n }\n >\n {renderCheckbox(tooltipFocusProps)}\n {label ?? children ? (\n <Element\n styles={labelStyles}\n mods={{\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n }}\n {...(labelProps ? filterBaseProps(labelProps) : undefined)}\n >\n {label ?? children}\n </Element>\n ) : null}\n </CheckboxWrapperElement>\n );\n }, 'top');\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\n\n(_Checkbox as any).cubeInputType = 'Checkbox';\nlet __Checkbox = Object.assign(\n _Checkbox as typeof _Checkbox & { Group: typeof CheckboxGroup },\n { Group: CheckboxGroup },\n);\n\n__Checkbox.displayName = 'Checkbox';\n\nexport { __Checkbox as Checkbox };\nexport type { AriaCheckboxProps };\nexport { useCheckbox };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8EA,MAAMmD,yBAAyB1C,MAAM;CACnC2C,IAAI;CACJC,IAAI;CACJC,QAAQ;EACNC,UAAU;EACVC,SAAS;EACTC,YAAY;EACZC,cAAc;EACdC,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,OAAO;EACT;CACD,CAAC;AAEF,MAAMC,kBAAkBxD,MAAM,EAC5B6C,QAAQ;CACNE,SAAS;CACTC,YAAY;CACZS,QAAQ;CACRC,MAAM;EACJ,IAAI;EACJ,2BAA2B;EAC3B,sBA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ACE4C;GACJiB;GACN,GAAIS;GACJ,KAAKD;cAEJJ,eAAeC,oBAAkB,EACjC7B,WAMC,oBAAC;IACC,QAAQ7D;IACR,MAAM;KACJ,GAAGD,kBAAkB;MAAEgE;MAAWC;MAAS,CAAC;KAC5C1B,UAAUoB;KACX;IAEAG;KACO,GACR;IACkB;IAG5B,MACD,EAImDc,QAAQ;EAC1D,GAAGvB;EACHjC,SAAS4D;EACV,CAAC;AAGJ,QAAOH,mBAAmBgB,uBAAqBC,iBAAe;EAC5D,MAAM,EAAEC,cAAAA,gBAAcvB,YAAYmB,wBAChCnF,yBAAyBqF,sBAAoB;AAE/C,SACE,qBAAC;GACSpE;GACE4C;GACV,GAAI3E,aAAW+E,YAAYsB,eAAa;GACxC,GAAIrH,gBAAgB4F,WAAW;GAC/B,KACEwB,gBAEKE,YAAqC;AACpC,IAACpB,OAA2CsB,UAAUF;AACtD,IAACF,aAA+CI,UAC9CF;OAEJpB;cAGLc,eAAeC,oBAAkB,EACjC5B,SAASD,WACR,oBAAC;IACC,QAAQK;IACR,MAAM;KACJ,GAAGnE,kBAAkB;MAAEgE;MAAWC;MAAS,CAAC;KAC5C1B,UAAUoB;KACX;IACD,GAAKO,aAAaxF,gBAAgBwF,WAAW,GAAGc;cAE/CjB,SAASD;KACF,GACR;IACmB;IAE1B,MAAM;;;;;;AAOX,IAAIsC,YAAYvH,WAAWmE,SAAS;AAEpC,AAACoD,UAAkBC,gBAAgB;AACnC,IAAIC,aAAaC,OAAOC,OACtBJ,WACA,EAAEK,OAAO/F,gBACX,CAAC;AAED4F,WAAWI,cAAc"}
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["useFocusableRef","IconCheck","IconMinus","BaseProps","CONTAINER_STYLES","ContainerStyleProps","Element","filterBaseProps","Styles","tasty","forwardRef","ReactElement","useContext","useMemo","useRef","AriaCheckboxProps","useCheckbox","useCheckboxGroupItem","useHover","useToggleState","Icon","FieldBaseProps","ToggleSelectionProps","mergeProps","useFocus","castNullableIsSelected","WithNullableSelected","extractStyles","useAutoTooltip","getValidationMods","INLINE_LABEL_STYLES","LABEL_STYLES","resolveValidationProps","useFieldProps","wrapWithField","HiddenInput","mergeTooltipFocusProps","splitTooltipTriggerProps","TooltipFocusProps","CheckboxGroup","CheckboxGroupContext","FocusableRef","CubeTooltipProviderProps","CubeCheckboxProps","Omit","inputStyles","isIndeterminate","value","tooltip","CheckboxWrapperElement","as","qa","styles","position","display","placeItems","placeContent","gap","flow","preset","cursor","width","color","CheckboxElement","radius","fill","disabled","border","invalid","valid","height","outline","focused","outlineOffset","transition","Checkbox","allProps","ref","groupState","originalProps","props","defaultValidationTrigger","valuePropsMapper","onChange","isSelected","unsafe__isDisabled","isDisabled","insideForm","isRequired","children","label","isInvalid","isValid","labelProps","labelStyles","labelPosition","isHidden","form","otherProps","isFocused","focusProps","hoverProps","isHovered","inputRef","domRef","renderWithTooltip","toggleState","inputProps","undefined","trim","markIcon","key","console","warn","mods","checked","indeterminate","hovered","renderCheckbox","tooltipFocusProps","checkboxField","tooltipTriggerProps","tooltipRef","pointerProps","element","HTMLLabelElement","current","HTMLElement","_Checkbox","cubeInputType","__Checkbox","Object","assign","Group","displayName"],"sources":["../../../../src/components/fields/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useFocusableRef } from '@react-spectrum/utils';\nimport { IconCheck, IconMinus } from '@tabler/icons-react';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n Element,\n filterBaseProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport { forwardRef, ReactElement, useContext, useMemo, useRef } from 'react';\nimport {\n AriaCheckboxProps,\n useCheckbox,\n useCheckboxGroupItem,\n useHover,\n} from 'react-aria';\nimport { useToggleState } from 'react-stately';\n\nimport { Icon } from '../../../icons/Icon';\nimport { FieldBaseProps, ToggleSelectionProps } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport {\n castNullableIsSelected,\n WithNullableSelected,\n} from '../../../utils/react/nullableValue';\nimport { extractStyles } from '../../../utils/styles';\nimport { useAutoTooltip } from '../../content/use-auto-tooltip';\nimport {\n getValidationMods,\n INLINE_LABEL_STYLES,\n LABEL_STYLES,\n resolveValidationProps,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { HiddenInput } from '../../HiddenInput';\nimport {\n mergeTooltipFocusProps,\n splitTooltipTriggerProps,\n TooltipFocusProps,\n} from '../../overlays/Tooltip/split-trigger-props';\n\nimport { CheckboxGroup } from './CheckboxGroup';\nimport { CheckboxGroupContext } from './context';\n\nimport type { FocusableRef } from '@react-types/shared';\nimport type { CubeTooltipProviderProps } from '../../overlays/Tooltip/TooltipProvider';\n\nexport interface CubeCheckboxProps\n extends BaseProps,\n ContainerStyleProps,\n Omit<AriaCheckboxProps, 'form' | 'name'>,\n ToggleSelectionProps,\n FieldBaseProps<boolean | null | undefined> {\n inputStyles?: Styles;\n isIndeterminate?: boolean;\n value?: string;\n /**\n * The checkbox's own tooltip, shown on hover over the box and its inline\n * label — also while the checkbox is disabled — and on keyboard focus. A string, or `TooltipProvider` props\n * (`title`, `placement`, …). The info badge next to a field label is\n * `labelTooltip`.\n */\n tooltip?: string | Omit<CubeTooltipProviderProps, 'children'>;\n}\n\nconst CheckboxWrapperElement = tasty({\n as: 'label',\n qa: 'CheckboxWrapper',\n styles: {\n position: 'relative',\n display: 'flex',\n placeItems: 'center start',\n placeContent: 'baseline',\n gap: '1x',\n flow: 'row',\n preset: 'default',\n cursor: '$pointer',\n width: 'max max-content',\n color: '#dark-02',\n },\n});\n\nconst CheckboxElement = tasty({\n styles: {\n display: 'grid',\n placeItems: 'center',\n radius: '.5r',\n fill: {\n '': '#surface',\n 'checked | indeterminate': '#primary',\n 'invalid & !checked': '#surface',\n 'invalid & checked': '#danger',\n 'valid & !checked': '#surface',\n 'valid & checked': '#success',\n disabled: '#dark.12',\n },\n // The check / minus icon is always rendered inside the box, so the\n // default color must be transparent when the checkbox is neither\n // checked nor indeterminate — otherwise the white stroke shows through\n // the dark `#surface` fill in dark schemes (it used to be hidden\n // accidentally by the legacy white-on-white `fill: '#white'`).\n color: {\n '': '#clear',\n 'checked | indeterminate': '#white',\n },\n border: {\n '': '#dark.30',\n invalid: '#danger',\n valid: '#success',\n 'disabled | ((indeterminate | checked) & !invalid & !valid)': '#clear',\n },\n width: '(2x - 2bw)',\n height: '(2x - 2bw)',\n outline: {\n '': '#primary-text.0',\n focused: '1bw #primary-text',\n },\n outlineOffset: 1,\n transition: 'theme',\n },\n});\n\nfunction Checkbox(\n allProps: WithNullableSelected<CubeCheckboxProps>,\n ref: FocusableRef,\n) {\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n\n const originalProps = castNullableIsSelected(allProps);\n\n const props = useFieldProps(originalProps, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n isSelected: value ?? false,\n isIndeterminate: false,\n onChange: onChange,\n }),\n unsafe__isDisabled: !!groupState,\n });\n\n let {\n qa,\n isIndeterminate = false,\n isDisabled = false,\n insideForm,\n isRequired,\n children,\n label,\n isInvalid,\n isValid,\n labelProps,\n labelStyles,\n labelPosition,\n inputStyles,\n isHidden,\n form,\n tooltip,\n // Pulled out so it stays off the `<label>` spread below. The Aria hooks read\n // it from `props` directly; `filterBaseProps` already dropped it at runtime,\n // but it typed as a DOM `FormEventHandler` there, which it is not.\n onChange,\n ...otherProps\n } = props;\n\n let styles: Styles = extractStyles(props, CONTAINER_STYLES);\n\n labelStyles = useMemo(\n () => ({\n ...(!groupState ? LABEL_STYLES : INLINE_LABEL_STYLES),\n ...labelStyles,\n }),\n [groupState, labelStyles],\n );\n\n let { isFocused, focusProps } = useFocus(true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n let inputRef = useRef(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n // Triggered by the wrapper rather than the input, so a disabled checkbox —\n // whose input ignores the pointer — still shows it.\n let { renderWithTooltip } = useAutoTooltip({ tooltip, children: null });\n\n const toggleState = useToggleState(props);\n\n // React Aria writes `form` onto the input as the id of its `<form>`, so the\n // form instance would render as `form=\"[object Object]\"` and detach it.\n let { inputProps } = groupState\n ? useCheckboxGroupItem(\n {\n ...props,\n form: undefined,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).\n value: props.value || '',\n // Only pass isRequired and the validation state to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n isInvalid: resolveValidationProps(originalProps).isInvalid,\n },\n groupState,\n inputRef,\n )\n : useCheckbox(\n {\n ...props,\n form: undefined,\n ...(typeof label === 'string' && label.trim()\n ? { 'aria-label': label }\n : {}),\n },\n toggleState,\n inputRef,\n );\n\n let markIcon = isIndeterminate ? (\n <Icon size={12} stroke={3}>\n <IconMinus />\n </Icon>\n ) : (\n <Icon size={12} stroke={3}>\n <IconCheck />\n </Icon>\n );\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(\n `CubeUIKit: ${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`,\n );\n }\n }\n if (props.value == null) {\n console.warn(\n 'CubeUIKit: A <Checkbox> element within a <CheckboxGroup> requires a `value` property.',\n );\n }\n }\n\n const mods = {\n checked: inputProps.checked,\n indeterminate: isIndeterminate,\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n hovered: isHovered,\n focused: isFocused,\n 'side-label': labelPosition === 'side',\n 'inside-form': insideForm,\n };\n\n // The input, where keyboard focus lands, takes the tooltip's focus-side\n // trigger props; the wrapper keeps the hover side and positions the tooltip.\n const renderCheckbox = (tooltipFocusProps?: TooltipFocusProps) => (\n <>\n <HiddenInput\n qa={qa || 'Checkbox'}\n data-input-type=\"checkbox\"\n {...mergeTooltipFocusProps(\n mergeProps(inputProps, focusProps),\n tooltipFocusProps,\n )}\n ref={inputRef}\n />\n <CheckboxElement data-element=\"Input\" mods={mods} styles={inputStyles}>\n {markIcon}\n </CheckboxElement>\n </>\n );\n\n if (!groupState) {\n const checkboxField = renderWithTooltip(\n (tooltipTriggerProps, tooltipRef) => {\n const { pointerProps, focusProps: tooltipFocusProps } =\n splitTooltipTriggerProps(tooltipTriggerProps);\n\n return (\n // `styles` is forwarded here as well as in the in-group branch\n // below — it used to be extracted from props and then dropped on\n // this path, so `<Checkbox styles={{ … }}>` outside a group was a\n // silent no-op.\n <CheckboxWrapperElement\n styles={styles}\n isHidden={isHidden}\n mods={mods}\n {...pointerProps}\n ref={tooltipRef}\n >\n {renderCheckbox(tooltipFocusProps)}\n {children ? (\n // Same element and preset as the in-group branch. This path used\n // to force children through `<Text nowrap>`: `white-space:\n // nowrap` inherits, so a label longer than a few words — or any\n // custom node with two lines in it — could not wrap at all, and\n // the label also missed the preset a grouped one picks up.\n <Element\n styles={INLINE_LABEL_STYLES}\n mods={{\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n }}\n >\n {children}\n </Element>\n ) : null}\n </CheckboxWrapperElement>\n );\n },\n 'top',\n );\n\n // `tooltip` is the checkbox's own here, not a legacy label badge.\n // `renderWithTooltip` is typed for any node; here it returns an element.\n return wrapWithField(checkboxField as ReactElement, domRef, {\n ...props,\n tooltip: undefined,\n });\n }\n\n return renderWithTooltip((tooltipTriggerProps, tooltipRef) => {\n const { pointerProps, focusProps: tooltipFocusProps } =\n splitTooltipTriggerProps(tooltipTriggerProps);\n\n return (\n <CheckboxWrapperElement\n styles={styles}\n isHidden={isHidden}\n {...mergeProps(hoverProps, pointerProps)}\n {...filterBaseProps(otherProps)}\n ref={\n tooltipRef\n ? // Written only when React attaches the node, never during render.\n (element: HTMLLabelElement | null) => {\n (domRef as { current: HTMLElement | null }).current = element;\n (tooltipRef as { current: HTMLElement | null }).current =\n element;\n }\n : domRef\n }\n >\n {renderCheckbox(tooltipFocusProps)}\n {label ?? children ? (\n <Element\n styles={labelStyles}\n mods={{\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n }}\n {...(labelProps ? filterBaseProps(labelProps) : undefined)}\n >\n {label ?? children}\n </Element>\n ) : null}\n </CheckboxWrapperElement>\n );\n }, 'top');\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\n\n(_Checkbox as any).cubeInputType = 'Checkbox';\nlet __Checkbox = Object.assign(\n _Checkbox as typeof _Checkbox & { Group: typeof CheckboxGroup },\n { Group: CheckboxGroup },\n);\n\n__Checkbox.displayName = 'Checkbox';\n\nexport { __Checkbox as Checkbox };\nexport type { AriaCheckboxProps };\nexport { useCheckbox };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAMiD,yBAAyBxC,MAAM;CACnCyC,IAAI;CACJC,IAAI;CACJC,QAAQ;EACNC,UAAU;EACVC,SAAS;EACTC,YAAY;EACZC,cAAc;EACdC,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,OAAO;EACT;CACD,CAAC;AAEF,MAAMC,kBAAkBtD,MAAM,EAC5B2C,QAAQ;CACNE,SAAS;CACTC,YAAY;CACZS,QAAQ;CACRC,MAAM;EACJ,IAAI;EACJ,2BAA2B;EAC3B,sBAAsB;EACtB,qBAAqB;EACrB,oBAAoB;EACpB,mBAAmB;EACnBC,UAAU;EACX;CAMDJ,OAAO;EACL,IAAI;EACJ,2BAA2B;EAC5B;CACDK,QAAQ;EACN,IAAI;EACJC,SAAS;EACTC,OAAO;EACP,8DAA8D;EAC/D;CACDR,OAAO;CACPS,QAAQ;CACRC,SAAS;EACP,IAAI;EACJC,SAAS;EACV;CACDC,eAAe;CACfC,YAAY;CACd,EACD,CAAC;AAEF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AAmBgB,uBAAqBC,iBAAe;EAC5D,MAAM,EAAEC,cAAAA,gBAAcvB,YAAYmB,wBAChClF,yBAAyBoF,sBAAoB;AAE/C,SACE,qBAAC;GACSrE;GACE4C;GACV,GAAIzE,aAAW8E,YAAYsB,eAAa;GACxC,GAAIpH,gBAAgB2F,WAAW;GAC/B,KACEwB,gBAEKE,YAAqC;AACpC,IAACpB,OAA2CsB,UAAUF;AACtD,IAACF,aAA+CI,UAC9CF;OAEJpB;cAGLc,eAAeC,oBAAkB,EACjC7B,SAASD,WACR,oBAAC;IACC,QAAQK;IACR,MAAM;KACJ,GAAGjE,kBAAkB;MAAE8D;MAAWC;MAAS,CAAC;KAC5C1B,UAAUoB;KACX;IACD,GAAKO,aAAatF,gBAAgBsF,WAAW,GAAGe;cAE/ClB,SAASD;KACF,GACR;IACmB;IAE1B,MAAM;;;;;;AAOX,IAAIuC,YAAYtH,WAAWiE,SAAS;AAEpC,AAACqD,UAAkBC,gBAAgB;AACnC,IAAIC,aAAaC,OAAOC,OACtBJ,WACA,EAAEK,OAAO9F,gBACX,CAAC;AAED2F,WAAWI,cAAc"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { FieldBaseProps } from "../../../shared/form.js";
|
|
3
3
|
import "../../../shared/index.js";
|
|
4
|
-
import { WithNullableValue } from "../../../utils/react/nullableValue.js";
|
|
5
4
|
import { BaseProps, ContainerStyleProps, Styles } from "@tenphi/tasty";
|
|
6
5
|
import * as react from "react";
|
|
7
6
|
import { AriaCheckboxGroupProps } from "react-aria";
|
|
@@ -15,7 +14,10 @@ interface CubeCheckboxGroupProps extends BaseProps, Omit<AriaCheckboxGroupProps,
|
|
|
15
14
|
* Checkbox groups allow users to select a single option from a list of mutually exclusive options.
|
|
16
15
|
* All possible options are exposed up front for users to compare.
|
|
17
16
|
*/
|
|
18
|
-
declare const _CheckboxGroup: react.ForwardRefExoticComponent<Omit<
|
|
17
|
+
declare const _CheckboxGroup: react.ForwardRefExoticComponent<Omit<CubeCheckboxGroupProps, "value" | "defaultValue"> & {
|
|
18
|
+
value?: any;
|
|
19
|
+
defaultValue?: any;
|
|
20
|
+
} & react.RefAttributes<unknown>>;
|
|
19
21
|
//#endregion
|
|
20
22
|
export { CubeCheckboxGroupProps, _CheckboxGroup };
|
|
21
23
|
//# sourceMappingURL=CheckboxGroup.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 { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { castNullableArrayValue } from "../../../utils/react/nullableValue.js";
|
|
@@ -31,15 +31,15 @@ const CheckGroupElement = tasty({
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
function CheckboxGroup(
|
|
34
|
+
function CheckboxGroup(rawProps, ref) {
|
|
35
35
|
const $ = c(29);
|
|
36
36
|
let t0;
|
|
37
|
-
if ($[0] !==
|
|
38
|
-
t0 = castNullableArrayValue(
|
|
39
|
-
$[0] =
|
|
37
|
+
if ($[0] !== rawProps) {
|
|
38
|
+
t0 = castNullableArrayValue(rawProps);
|
|
39
|
+
$[0] = rawProps;
|
|
40
40
|
$[1] = t0;
|
|
41
41
|
} else t0 = $[1];
|
|
42
|
-
|
|
42
|
+
rawProps = t0;
|
|
43
43
|
let t1;
|
|
44
44
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
45
45
|
t1 = {
|
|
@@ -48,7 +48,7 @@ function CheckboxGroup(props, ref) {
|
|
|
48
48
|
};
|
|
49
49
|
$[2] = t1;
|
|
50
50
|
} else t1 = $[2];
|
|
51
|
-
props = useFieldProps(
|
|
51
|
+
const props = useFieldProps(rawProps, t1);
|
|
52
52
|
const { id, isDisabled, isRequired, necessityIndicator, label, extra, isInvalid, isValid, children, orientation: t2, message, description, labelStyles, labelProps: baseLabelProps, labelSuffix, inputStyles, form, ...otherProps } = props;
|
|
53
53
|
const orientation = t2 === void 0 ? "vertical" : t2;
|
|
54
54
|
const domRef = useObjectRef(ref);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","names":["useObjectRef","BaseProps","CONTAINER_STYLES","ContainerStyleProps","Styles","tasty","forwardRef","AriaCheckboxGroupProps","useCheckboxGroup","useCheckboxGroupState","FieldBaseProps","mergeProps","castNullableArrayValue","WithNullableValue","extractStyles","FormScopeMask","useFieldProps","wrapWithField","CheckboxGroupContext","CheckGroupElement","qa","styles","display","placeItems","placeContent","flow","horizontal","gap","CubeCheckboxGroupProps","Omit","orientation","inputStyles","CheckboxGroup","
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","names":["useObjectRef","BaseProps","CONTAINER_STYLES","ContainerStyleProps","Styles","tasty","forwardRef","AriaCheckboxGroupProps","useCheckboxGroup","useCheckboxGroupState","FieldBaseProps","mergeProps","castNullableArrayValue","WithNullableValue","extractStyles","FormScopeMask","useFieldProps","wrapWithField","CheckboxGroupContext","CheckGroupElement","qa","styles","display","placeItems","placeContent","flow","horizontal","gap","CubeCheckboxGroupProps","Omit","orientation","inputStyles","CheckboxGroup","rawProps","ref","$","_c","t0","t1","Symbol","for","defaultValidationTrigger","valuePropsMapper","_temp","props","id","isDisabled","isRequired","necessityIndicator","label","extra","isInvalid","isValid","children","t2","message","description","labelStyles","labelProps","baseLabelProps","labelSuffix","form","otherProps","undefined","domRef","state","t3","groupProps","t4","t5","t6","t7","t8","t9","radioGroup","t10","fieldProps","value","onChange","_CheckboxGroup","cubeInputType","displayName"],"sources":["../../../../src/components/fields/Checkbox/CheckboxGroup.tsx"],"sourcesContent":["import { useObjectRef } from '@react-aria/utils';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport { forwardRef } from 'react';\nimport { AriaCheckboxGroupProps, useCheckboxGroup } from 'react-aria';\nimport { useCheckboxGroupState } from 'react-stately';\n\nimport { FieldBaseProps } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport {\n castNullableArrayValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { extractStyles } from '../../../utils/styles';\nimport { FormScopeMask, useFieldProps, wrapWithField } from '../../form';\n\nimport { CheckboxGroupContext } from './context';\n\nconst CheckGroupElement = tasty({\n qa: 'CheckboxGroup',\n styles: {\n display: 'flex',\n placeItems: 'start',\n placeContent: 'start',\n flow: {\n '': 'column',\n horizontal: 'row wrap',\n },\n gap: {\n '': '1x',\n horizontal: '1x 2x',\n },\n },\n});\n\nexport interface CubeCheckboxGroupProps\n extends BaseProps,\n Omit<AriaCheckboxGroupProps, 'errorMessage' | 'form' | 'name'>,\n FieldBaseProps<readonly string[] | null | undefined>,\n ContainerStyleProps {\n orientation?: 'vertical' | 'horizontal';\n inputStyles?: Styles;\n}\n\nfunction CheckboxGroup(\n rawProps: WithNullableValue<CubeCheckboxGroupProps>,\n ref,\n) {\n rawProps = castNullableArrayValue(rawProps);\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n value: value != null ? value : [],\n onChange: onChange,\n }),\n });\n\n let {\n id,\n isDisabled,\n isRequired,\n necessityIndicator,\n label,\n extra,\n isInvalid,\n isValid,\n children,\n orientation = 'vertical',\n message,\n description,\n labelStyles,\n labelProps: baseLabelProps,\n labelSuffix,\n inputStyles,\n form,\n ...otherProps\n } = props;\n let domRef = useObjectRef(ref);\n\n let styles = extractStyles(otherProps, CONTAINER_STYLES);\n\n let state = useCheckboxGroupState(props);\n // React Aria hands `form` to every item's input as the id of its `<form>`,\n // so the form instance would render as `form=\"[object Object]\"` on each.\n let { groupProps, labelProps } = useCheckboxGroup(\n { ...props, form: undefined },\n state,\n );\n\n let radioGroup = (\n <CheckGroupElement\n id={id}\n styles={inputStyles}\n mods={{\n horizontal: orientation === 'horizontal',\n }}\n >\n <FormScopeMask\n value={{\n isDisabled,\n isInvalid,\n isValid,\n }}\n >\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n </FormScopeMask>\n </CheckGroupElement>\n );\n\n return wrapWithField(radioGroup, domRef, {\n ...props,\n fieldProps: groupProps,\n labelProps: mergeProps(baseLabelProps, labelProps),\n });\n}\n\n/**\n * Checkbox groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _CheckboxGroup = forwardRef(CheckboxGroup);\n\n(_CheckboxGroup as any).cubeInputType = 'CheckboxGroup';\n_CheckboxGroup.displayName = 'CheckboxGroup';\n\nexport { _CheckboxGroup as CheckboxGroup };\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAMmB,oBAAoBd,MAAM;CAC9Be,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,YAAY;EACZC,cAAc;EACdC,MAAM;GACJ,IAAI;GACJC,YAAY;GACb;EACDC,KAAK;GACH,IAAI;GACJD,YAAY;GACd;EACF;CACD,CAAC;AAWF,SAAAM,cAAAC,UAAAC,KAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAA,IAAAC;AAAA,KAAAF,EAAA,OAAAF,UAAA;AAIaI,OAAAzB,uBAAuBqB,SAAS;AAAAE,IAAA,KAAAF;AAAAE,IAAA,KAAAE;OAAAA,MAAAF,EAAA;AAA3CF,YAAWA;CAAH,IAAAK;AAAA,KAAAH,EAAA,OAAAI,OAAAC,IAAA,4BAAA,EAAA;AAC4BF,OAAA;GAAAG,0BACR;GAAUC,kBAClBC;GAInB;AAAAR,IAAA,KAAAG;OAAAA,MAAAH,EAAA;CAND,MAAAS,QAAY5B,cAAciB,UAAUK,GAMlC;CAEF,MAAA,EAAAO,IAAAC,YAAAC,YAAAC,oBAAAC,OAAAC,OAAAC,WAAAC,SAAAC,UAAAvB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