@cube-dev/ui-kit 0.0.0-canary-0b79a39 → 0.0.0-canary-c02e70f
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 +6 -0
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +23 -21
- package/dist/components/GlobalStyles.js.map +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Banner/Banner.js.map +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +128 -66
- package/dist/components/actions/ButtonSplit/ButtonSplit.js.map +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +451 -280
- package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +57 -93
- 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/ItemActionsWrapper.js.map +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +49 -69
- package/dist/components/actions/Menu/Menu.js.map +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js.map +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +44 -60
- 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.js +39 -65
- package/dist/components/content/InlineInput/InlineInput.js.map +1 -1
- package/dist/components/content/Item/Item.js +208 -263
- package/dist/components/content/Item/Item.js.map +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +70 -145
- package/dist/components/content/ItemBadge/ItemBadge.js.map +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 +39 -18
- package/dist/components/content/Layout/LayoutContainer.js.map +1 -1
- package/dist/components/content/Layout/LayoutContent.js +100 -48
- package/dist/components/content/Layout/LayoutContent.js.map +1 -1
- package/dist/components/content/Layout/LayoutContext.js +211 -95
- package/dist/components/content/Layout/LayoutContext.js.map +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/LayoutFooter.js.map +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 +240 -123
- package/dist/components/content/Layout/LayoutPane.js.map +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/LayoutPanelHeader.js.map +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/hooks/useTinyScrollbar.js.map +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +28 -48
- package/dist/components/content/Result/Result.js.map +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +9 -17
- 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/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +68 -105
- package/dist/components/content/Tree/use-checkbox-tree.js.map +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +106 -138
- 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/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-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-order.js +30 -31
- package/dist/components/data/TableBase/use-column-order.js.map +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 +38 -42
- package/dist/components/data/TableBase/use-table-sort.js.map +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +19 -57
- package/dist/components/data/TableBase/use-table-sorts.js.map +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +55 -64
- package/dist/components/data/TableBase/use-table-tree-state.js.map +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/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.js +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +32 -38
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js.map +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +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.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js.map +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js.map +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js.map +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.js +738 -1139
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/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/ColorPanel.js.map +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/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/Form/Field.js +10 -15
- package/dist/components/form/Form/Field.js.map +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.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/react.js.map +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 +129 -48
- package/dist/components/layout/Panel.js.map +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 +227 -347
- package/dist/components/navigation/Pagination/Pagination.js.map +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js.map +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js.map +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js.map +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-editing.js.map +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 +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js.map +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +497 -515
- package/dist/components/other/Calendar/CalendarPanel.js.map +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js.map +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +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/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/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/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 +266 -161
- package/dist/components/overlays/Notifications/OverlayContainer.js.map +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 +18 -9
- package/dist/components/overlays/Notifications/use-persistent-notifications.js.map +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 +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +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/useFormatter.js.map +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.js +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/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/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/programmaticFocus.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useKeySymbols.js.map +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/usePopoverSync.js.map +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/CreateComponent.md +3 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c02e70f | 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 { LoadingIcon } from "../../../icons/LoadingIcon.js";
|
|
@@ -10,8 +10,9 @@ import { StyledDivider, StyledFooter, StyledHeader, StyledMenu } from "../Menu/s
|
|
|
10
10
|
import { MenuSection } from "../Menu/MenuSection.js";
|
|
11
11
|
import { _MenuTrigger } from "../Menu/MenuTrigger.js";
|
|
12
12
|
import { StyledCommandMenu, StyledEmptyState, StyledLoadingWrapper, StyledSearchInput } from "./styled.js";
|
|
13
|
+
import { c } from "react-compiler-runtime";
|
|
13
14
|
import { CONTAINER_STYLES, filterBaseProps } from "@tenphi/tasty";
|
|
14
|
-
import React, {
|
|
15
|
+
import React, { useRef, useState } from "react";
|
|
15
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
import { useFilter, useMenu } from "react-aria";
|
|
17
18
|
import { Section, useTreeState } from "react-stately";
|
|
@@ -19,8 +20,29 @@ import { useObjectRef, useSyncRef } from "@react-aria/utils";
|
|
|
19
20
|
|
|
20
21
|
//#region src/components/actions/CommandMenu/CommandMenu.tsx
|
|
21
22
|
function CommandMenu(props, ref) {
|
|
23
|
+
const $ = c(81);
|
|
22
24
|
const { t } = useI18n();
|
|
23
|
-
const { searchPlaceholder
|
|
25
|
+
const { searchPlaceholder: t0, searchValue: controlledSearchValue, onSearchChange, filter: customFilter, emptyLabel: t1, searchInputStyles, headerStyles, footerStyles, isLoading: t2, shouldFilter: t3, autoFocus: t4, size: t5, qa, styles, selectedKeys, defaultSelectedKeys, onSelectionChange, header, footer, ...restMenuProps } = props;
|
|
26
|
+
let t6;
|
|
27
|
+
if ($[0] !== t || $[1] !== t0) {
|
|
28
|
+
t6 = t0 === void 0 ? t("commandMenu.searchPlaceholder", "Search commands...") : t0;
|
|
29
|
+
$[0] = t;
|
|
30
|
+
$[1] = t0;
|
|
31
|
+
$[2] = t6;
|
|
32
|
+
} else t6 = $[2];
|
|
33
|
+
const searchPlaceholder = t6;
|
|
34
|
+
let t7;
|
|
35
|
+
if ($[3] !== t || $[4] !== t1) {
|
|
36
|
+
t7 = t1 === void 0 ? t("commandMenu.empty", "No commands found") : t1;
|
|
37
|
+
$[3] = t;
|
|
38
|
+
$[4] = t1;
|
|
39
|
+
$[5] = t7;
|
|
40
|
+
} else t7 = $[5];
|
|
41
|
+
const emptyLabel = t7;
|
|
42
|
+
const isLoading = t2 === void 0 ? false : t2;
|
|
43
|
+
const shouldFilter = t3 === void 0 ? true : t3;
|
|
44
|
+
const autoFocus = t4 === void 0 ? true : t4;
|
|
45
|
+
const size = t5 === void 0 ? "medium" : t5;
|
|
24
46
|
const domRef = useObjectRef(ref);
|
|
25
47
|
const searchInputRef = useRef(null);
|
|
26
48
|
const contextProps = useMenuContext();
|
|
@@ -28,91 +50,93 @@ function CommandMenu(props, ref) {
|
|
|
28
50
|
selectedKeys: selectedKeys ? new Set(selectedKeys) : void 0,
|
|
29
51
|
defaultSelectedKeys: defaultSelectedKeys ? new Set(defaultSelectedKeys) : void 0,
|
|
30
52
|
onSelectionChange: onSelectionChange ? (keys) => {
|
|
31
|
-
if (keys === "all") onSelectionChange(Array.from(treeState.collection.getKeys()).map(
|
|
32
|
-
else if (keys instanceof Set) onSelectionChange(Array.from(keys).map(
|
|
53
|
+
if (keys === "all") onSelectionChange(Array.from(treeState.collection.getKeys()).map(_temp));
|
|
54
|
+
else if (keys instanceof Set) onSelectionChange(Array.from(keys).map(_temp2));
|
|
33
55
|
else onSelectionChange([]);
|
|
34
56
|
} : void 0
|
|
35
57
|
});
|
|
36
58
|
const [internalSearchValue, setInternalSearchValue] = useState("");
|
|
37
59
|
const searchValue = controlledSearchValue ?? internalSearchValue;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
useMemo(() => customFilter || contains, [customFilter, contains]);
|
|
44
|
-
const enhancedFilter = useCallback((textValue, inputValue, item) => {
|
|
45
|
-
if (item?.forceMount) return true;
|
|
46
|
-
if (!shouldFilter) return true;
|
|
47
|
-
const searchWords = inputValue.trim().toLowerCase().split(/\s+/).filter((word) => word.length > 0);
|
|
48
|
-
if (searchWords.length === 0) return true;
|
|
49
|
-
const searchableTexts = [];
|
|
50
|
-
searchableTexts.push(textValue.toLowerCase());
|
|
51
|
-
if (item?.keywords && Array.isArray(item.keywords)) searchableTexts.push(...item.keywords.map((keyword) => keyword.toLowerCase()));
|
|
52
|
-
return searchWords.every((searchWord) => searchableTexts.some((text) => text.includes(searchWord)));
|
|
53
|
-
}, [shouldFilter]);
|
|
54
|
-
const collectionFilter = useCallback((nodes) => {
|
|
55
|
-
const term = searchValue.trim();
|
|
56
|
-
if (!term) return nodes;
|
|
57
|
-
if (term.toLowerCase().split(/\s+/).filter((word_0) => word_0.length > 0).length === 0) return nodes;
|
|
58
|
-
const filterNodes = (iter) => {
|
|
59
|
-
const result = [];
|
|
60
|
-
for (const node of iter) if (node.type === "section") {
|
|
61
|
-
const filteredChildren = filterNodes(node.childNodes);
|
|
62
|
-
if (filteredChildren.length) result.push({
|
|
63
|
-
...node,
|
|
64
|
-
childNodes: filteredChildren
|
|
65
|
-
});
|
|
66
|
-
} else if (enhancedFilter(node.textValue ?? String(node.rendered ?? ""), term, node.props)) result.push(node);
|
|
67
|
-
return result;
|
|
60
|
+
let t8;
|
|
61
|
+
if ($[6] !== controlledSearchValue || $[7] !== onSearchChange) {
|
|
62
|
+
t8 = (value) => {
|
|
63
|
+
if (controlledSearchValue === void 0) setInternalSearchValue(value);
|
|
64
|
+
onSearchChange?.(value);
|
|
68
65
|
};
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
$[6] = controlledSearchValue;
|
|
67
|
+
$[7] = onSearchChange;
|
|
68
|
+
$[8] = t8;
|
|
69
|
+
} else t8 = $[8];
|
|
70
|
+
const handleSearchChange = t8;
|
|
71
|
+
let t9;
|
|
72
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
73
|
+
t9 = { sensitivity: "base" };
|
|
74
|
+
$[9] = t9;
|
|
75
|
+
} else t9 = $[9];
|
|
76
|
+
const { contains } = useFilter(t9);
|
|
77
|
+
let t10;
|
|
78
|
+
if ($[10] !== shouldFilter) {
|
|
79
|
+
t10 = (textValue, inputValue, item) => {
|
|
80
|
+
if (item?.forceMount) return true;
|
|
81
|
+
if (!shouldFilter) return true;
|
|
82
|
+
const searchWords = inputValue.trim().toLowerCase().split(/\s+/).filter(_temp3);
|
|
83
|
+
if (searchWords.length === 0) return true;
|
|
84
|
+
const searchableTexts = [];
|
|
85
|
+
searchableTexts.push(textValue.toLowerCase());
|
|
86
|
+
if (item?.keywords && Array.isArray(item.keywords)) searchableTexts.push(...item.keywords.map(_temp4));
|
|
87
|
+
return searchWords.every((searchWord) => searchableTexts.some((text) => text.includes(searchWord)));
|
|
88
|
+
};
|
|
89
|
+
$[10] = shouldFilter;
|
|
90
|
+
$[11] = t10;
|
|
91
|
+
} else t10 = $[11];
|
|
92
|
+
const enhancedFilter = t10;
|
|
93
|
+
let t11;
|
|
94
|
+
if ($[12] !== enhancedFilter || $[13] !== searchValue) {
|
|
95
|
+
t11 = (nodes) => {
|
|
96
|
+
const term = searchValue.trim();
|
|
97
|
+
if (!term) return nodes;
|
|
98
|
+
if (term.toLowerCase().split(/\s+/).filter(_temp5).length === 0) return nodes;
|
|
99
|
+
const filterNodes = (iter) => {
|
|
100
|
+
const result = [];
|
|
101
|
+
for (const node of iter) if (node.type === "section") {
|
|
102
|
+
const filteredChildren = filterNodes(node.childNodes);
|
|
103
|
+
if (filteredChildren.length) result.push({
|
|
104
|
+
...node,
|
|
105
|
+
childNodes: filteredChildren
|
|
106
|
+
});
|
|
107
|
+
} else if (enhancedFilter(node.textValue ?? String(node.rendered ?? ""), term, node.props)) result.push(node);
|
|
108
|
+
return result;
|
|
109
|
+
};
|
|
110
|
+
return filterNodes(nodes);
|
|
111
|
+
};
|
|
112
|
+
$[12] = enhancedFilter;
|
|
113
|
+
$[13] = searchValue;
|
|
114
|
+
$[14] = t11;
|
|
115
|
+
} else t11 = $[14];
|
|
116
|
+
const collectionFilter = t11;
|
|
71
117
|
const treeState = useTreeState({
|
|
72
118
|
...completeProps,
|
|
73
119
|
filter: collectionFilter,
|
|
74
120
|
shouldUseVirtualFocus: true
|
|
75
121
|
});
|
|
76
122
|
const collectionItems = [...treeState.collection];
|
|
77
|
-
collectionItems.some(
|
|
123
|
+
collectionItems.some(_temp6);
|
|
78
124
|
const [focusedKey, setFocusedKey] = React.useState(null);
|
|
79
125
|
const focusedKeyRef = useRef(null);
|
|
80
|
-
const filteredCollectionItems =
|
|
81
|
-
const term_0 = searchValue.trim();
|
|
82
|
-
if (!term_0) return collectionItems;
|
|
83
|
-
if (term_0.toLowerCase().split(/\s+/).filter((word_1) => word_1.length > 0).length === 0) return collectionItems;
|
|
84
|
-
const filterNodes_0 = (items) => {
|
|
85
|
-
const result_0 = [];
|
|
86
|
-
[...items].forEach((item_1) => {
|
|
87
|
-
if (item_1.type === "section") {
|
|
88
|
-
const filteredChildren_0 = filterNodes_0(item_1.childNodes);
|
|
89
|
-
if (filteredChildren_0.length) result_0.push({
|
|
90
|
-
...item_1,
|
|
91
|
-
childNodes: filteredChildren_0
|
|
92
|
-
});
|
|
93
|
-
} else if (enhancedFilter(item_1.textValue ?? String(item_1.rendered ?? ""), term_0, item_1.props)) result_0.push(item_1);
|
|
94
|
-
});
|
|
95
|
-
return result_0;
|
|
96
|
-
};
|
|
97
|
-
return filterNodes_0(collectionItems);
|
|
98
|
-
}, [
|
|
99
|
-
collectionItems,
|
|
100
|
-
searchValue,
|
|
101
|
-
enhancedFilter
|
|
102
|
-
]);
|
|
126
|
+
const filteredCollectionItems = [...collectionFilter(collectionItems)];
|
|
103
127
|
const hasFilteredItems = filteredCollectionItems.length > 0;
|
|
104
|
-
const viewHasSections = filteredCollectionItems.some(
|
|
105
|
-
const findFirstSelectableItem =
|
|
128
|
+
const viewHasSections = filteredCollectionItems.some(_temp7);
|
|
129
|
+
const findFirstSelectableItem = () => {
|
|
106
130
|
const { selectionManager } = treeState;
|
|
107
|
-
const visit = (
|
|
108
|
-
for (const node_0 of
|
|
131
|
+
const visit = (items) => {
|
|
132
|
+
for (const node_0 of items) if (node_0?.type === "section") {
|
|
109
133
|
const childResult = visit(Array.from(node_0.childNodes ?? []));
|
|
110
134
|
if (childResult != null) return childResult;
|
|
111
135
|
} else if (node_0?.type === "item" && !selectionManager.isDisabled(node_0.key)) return node_0.key;
|
|
112
136
|
return null;
|
|
113
137
|
};
|
|
114
138
|
return visit(filteredCollectionItems);
|
|
115
|
-
}
|
|
139
|
+
};
|
|
116
140
|
const menuRef = useRef(null);
|
|
117
141
|
const { menuProps } = useMenu({
|
|
118
142
|
...completeProps,
|
|
@@ -120,230 +144,377 @@ function CommandMenu(props, ref) {
|
|
|
120
144
|
filter: collectionFilter,
|
|
121
145
|
shouldUseVirtualFocus: true
|
|
122
146
|
}, treeState, menuRef);
|
|
123
|
-
const renderedItems =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
item: item_3,
|
|
134
|
-
state: treeState,
|
|
135
|
-
styles: completeProps.sectionStyles,
|
|
136
|
-
itemStyles: completeProps.itemStyles,
|
|
137
|
-
headingStyles: completeProps.sectionHeadingStyles,
|
|
138
|
-
size
|
|
139
|
-
}, item_3.key));
|
|
140
|
-
isFirstSection = false;
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
let menuItem = /* @__PURE__ */ jsx(MenuItem, {
|
|
144
|
-
item: item_3,
|
|
147
|
+
const renderedItems = [];
|
|
148
|
+
let isFirstSection = true;
|
|
149
|
+
filteredCollectionItems.forEach((item_2) => {
|
|
150
|
+
if (item_2.type === "section") {
|
|
151
|
+
if (!isFirstSection) renderedItems.push(/* @__PURE__ */ jsx(StyledDivider, {
|
|
152
|
+
role: "separator",
|
|
153
|
+
"aria-orientation": "horizontal"
|
|
154
|
+
}, `divider-${String(item_2.key)}`));
|
|
155
|
+
renderedItems.push(/* @__PURE__ */ jsx(MenuSection, {
|
|
156
|
+
item: item_2,
|
|
145
157
|
state: treeState,
|
|
146
|
-
styles: completeProps.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return items_1;
|
|
154
|
-
}, [
|
|
155
|
-
filteredCollectionItems,
|
|
156
|
-
treeState,
|
|
157
|
-
completeProps.sectionStyles,
|
|
158
|
-
completeProps.itemStyles,
|
|
159
|
-
completeProps.sectionHeadingStyles
|
|
160
|
-
]);
|
|
161
|
-
React.useEffect(() => {
|
|
162
|
-
if (autoFocus && searchInputRef.current) {
|
|
163
|
-
const timeoutId = setTimeout(() => {
|
|
164
|
-
if (searchInputRef.current) searchInputRef.current.focus();
|
|
165
|
-
}, 0);
|
|
166
|
-
return () => clearTimeout(timeoutId);
|
|
167
|
-
}
|
|
168
|
-
}, [autoFocus]);
|
|
169
|
-
React.useEffect(() => {
|
|
170
|
-
if (autoFocus && contextProps.autoFocus && searchInputRef.current) {
|
|
171
|
-
const timeoutId_0 = setTimeout(() => {
|
|
172
|
-
if (searchInputRef.current) searchInputRef.current.focus();
|
|
173
|
-
}, 50);
|
|
174
|
-
return () => clearTimeout(timeoutId_0);
|
|
158
|
+
styles: completeProps.sectionStyles,
|
|
159
|
+
itemStyles: completeProps.itemStyles,
|
|
160
|
+
headingStyles: completeProps.sectionHeadingStyles,
|
|
161
|
+
size
|
|
162
|
+
}, item_2.key));
|
|
163
|
+
isFirstSection = false;
|
|
164
|
+
return;
|
|
175
165
|
}
|
|
176
|
-
|
|
166
|
+
let menuItem = /* @__PURE__ */ jsx(MenuItem, {
|
|
167
|
+
item: item_2,
|
|
168
|
+
state: treeState,
|
|
169
|
+
styles: completeProps.itemStyles,
|
|
170
|
+
size,
|
|
171
|
+
onAction: item_2.onAction
|
|
172
|
+
}, item_2.key);
|
|
173
|
+
if (item_2.props.wrapper) menuItem = item_2.props.wrapper(menuItem);
|
|
174
|
+
renderedItems.push(React.cloneElement(menuItem, { key: item_2.key }));
|
|
175
|
+
});
|
|
176
|
+
let t12;
|
|
177
|
+
let t13;
|
|
178
|
+
if ($[15] !== autoFocus) {
|
|
179
|
+
t12 = () => {
|
|
180
|
+
if (autoFocus && searchInputRef.current) {
|
|
181
|
+
const timeoutId = setTimeout(() => {
|
|
182
|
+
if (searchInputRef.current) searchInputRef.current.focus();
|
|
183
|
+
}, 0);
|
|
184
|
+
return () => clearTimeout(timeoutId);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
t13 = [autoFocus];
|
|
188
|
+
$[15] = autoFocus;
|
|
189
|
+
$[16] = t12;
|
|
190
|
+
$[17] = t13;
|
|
191
|
+
} else {
|
|
192
|
+
t12 = $[16];
|
|
193
|
+
t13 = $[17];
|
|
194
|
+
}
|
|
195
|
+
React.useEffect(t12, t13);
|
|
196
|
+
let t14;
|
|
197
|
+
let t15;
|
|
198
|
+
if ($[18] !== autoFocus || $[19] !== contextProps.autoFocus) {
|
|
199
|
+
t14 = () => {
|
|
200
|
+
if (autoFocus && contextProps.autoFocus && searchInputRef.current) {
|
|
201
|
+
const timeoutId_0 = setTimeout(() => {
|
|
202
|
+
if (searchInputRef.current) searchInputRef.current.focus();
|
|
203
|
+
}, 50);
|
|
204
|
+
return () => clearTimeout(timeoutId_0);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
t15 = [autoFocus, contextProps.autoFocus];
|
|
208
|
+
$[18] = autoFocus;
|
|
209
|
+
$[19] = contextProps.autoFocus;
|
|
210
|
+
$[20] = t14;
|
|
211
|
+
$[21] = t15;
|
|
212
|
+
} else {
|
|
213
|
+
t14 = $[20];
|
|
214
|
+
t15 = $[21];
|
|
215
|
+
}
|
|
216
|
+
React.useEffect(t14, t15);
|
|
177
217
|
const prevSearchValueRef = useRef("");
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
218
|
+
let t16;
|
|
219
|
+
if ($[22] !== findFirstSelectableItem || $[23] !== hasFilteredItems || $[24] !== searchValue || $[25] !== setFocusedKey || $[26] !== treeState) {
|
|
220
|
+
t16 = () => {
|
|
221
|
+
const currentSearchValue = searchValue.trim();
|
|
222
|
+
if (currentSearchValue !== prevSearchValueRef.current && currentSearchValue !== "") {
|
|
223
|
+
const firstSelectableKey = findFirstSelectableItem();
|
|
224
|
+
if (firstSelectableKey && hasFilteredItems) {
|
|
225
|
+
treeState.selectionManager.setFocusedKey(firstSelectableKey);
|
|
226
|
+
setFocusedKey(firstSelectableKey);
|
|
227
|
+
focusedKeyRef.current = firstSelectableKey;
|
|
228
|
+
} else {
|
|
229
|
+
treeState.selectionManager.setFocusedKey(null);
|
|
230
|
+
setFocusedKey(null);
|
|
231
|
+
focusedKeyRef.current = null;
|
|
232
|
+
}
|
|
190
233
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
234
|
+
prevSearchValueRef.current = currentSearchValue;
|
|
235
|
+
};
|
|
236
|
+
$[22] = findFirstSelectableItem;
|
|
237
|
+
$[23] = hasFilteredItems;
|
|
238
|
+
$[24] = searchValue;
|
|
239
|
+
$[25] = setFocusedKey;
|
|
240
|
+
$[26] = treeState;
|
|
241
|
+
$[27] = t16;
|
|
242
|
+
} else t16 = $[27];
|
|
243
|
+
let t17;
|
|
244
|
+
if ($[28] !== findFirstSelectableItem || $[29] !== hasFilteredItems || $[30] !== searchValue) {
|
|
245
|
+
t17 = [
|
|
246
|
+
searchValue,
|
|
247
|
+
findFirstSelectableItem,
|
|
248
|
+
hasFilteredItems
|
|
249
|
+
];
|
|
250
|
+
$[28] = findFirstSelectableItem;
|
|
251
|
+
$[29] = hasFilteredItems;
|
|
252
|
+
$[30] = searchValue;
|
|
253
|
+
$[31] = t17;
|
|
254
|
+
} else t17 = $[31];
|
|
255
|
+
React.useEffect(t16, t17);
|
|
256
|
+
const extractedStyles = extractStyles(props, CONTAINER_STYLES);
|
|
257
|
+
let t18;
|
|
258
|
+
if ($[32] !== searchValue) {
|
|
259
|
+
t18 = searchValue.trim();
|
|
260
|
+
$[32] = searchValue;
|
|
261
|
+
$[33] = t18;
|
|
262
|
+
} else t18 = $[33];
|
|
263
|
+
const showEmptyState = t18.length > 0 && !hasFilteredItems && !isLoading;
|
|
200
264
|
useSyncRef(contextProps, menuRef);
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
265
|
+
const t19 = !!footer;
|
|
266
|
+
const t20 = !!header;
|
|
267
|
+
const t21 = completeProps.mods?.popover;
|
|
268
|
+
const t22 = completeProps.mods?.tray;
|
|
269
|
+
let t23;
|
|
270
|
+
if ($[34] !== t19 || $[35] !== t20 || $[36] !== t21 || $[37] !== t22 || $[38] !== viewHasSections) {
|
|
271
|
+
t23 = {
|
|
205
272
|
sections: viewHasSections,
|
|
206
|
-
footer:
|
|
207
|
-
header:
|
|
208
|
-
popover:
|
|
209
|
-
tray:
|
|
273
|
+
footer: t19,
|
|
274
|
+
header: t20,
|
|
275
|
+
popover: t21,
|
|
276
|
+
tray: t22
|
|
210
277
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
if (searchValue) {
|
|
311
|
-
e_0.preventDefault();
|
|
312
|
-
handleSearchChange("");
|
|
313
|
-
}
|
|
278
|
+
$[34] = t19;
|
|
279
|
+
$[35] = t20;
|
|
280
|
+
$[36] = t21;
|
|
281
|
+
$[37] = t22;
|
|
282
|
+
$[38] = viewHasSections;
|
|
283
|
+
$[39] = t23;
|
|
284
|
+
} else t23 = $[39];
|
|
285
|
+
const mods = t23;
|
|
286
|
+
const T0 = StyledCommandMenu;
|
|
287
|
+
let t24;
|
|
288
|
+
if ($[40] !== props) {
|
|
289
|
+
t24 = filterBaseProps(props);
|
|
290
|
+
$[40] = props;
|
|
291
|
+
$[41] = t24;
|
|
292
|
+
} else t24 = $[41];
|
|
293
|
+
const t25 = t24;
|
|
294
|
+
const t26 = qa || "CommandMenu";
|
|
295
|
+
const t27 = mergeProps$1(extractedStyles, styles);
|
|
296
|
+
let t28;
|
|
297
|
+
if ($[42] !== header || $[43] !== headerStyles || $[44] !== size) {
|
|
298
|
+
t28 = header && /* @__PURE__ */ jsx(StyledHeader, {
|
|
299
|
+
role: "presentation",
|
|
300
|
+
"data-size": size,
|
|
301
|
+
styles: {
|
|
302
|
+
border: "none",
|
|
303
|
+
...headerStyles
|
|
304
|
+
},
|
|
305
|
+
children: header
|
|
306
|
+
});
|
|
307
|
+
$[42] = header;
|
|
308
|
+
$[43] = headerStyles;
|
|
309
|
+
$[44] = size;
|
|
310
|
+
$[45] = t28;
|
|
311
|
+
} else t28 = $[45];
|
|
312
|
+
const t29 = `${qa || "CommandMenu"}-menu`;
|
|
313
|
+
const t30 = focusedKey != null ? `${qa || "CommandMenu"}-menu-option-${focusedKey}` : void 0;
|
|
314
|
+
let t31;
|
|
315
|
+
if ($[46] !== handleSearchChange) {
|
|
316
|
+
t31 = (e) => handleSearchChange(e.target.value);
|
|
317
|
+
$[46] = handleSearchChange;
|
|
318
|
+
$[47] = t31;
|
|
319
|
+
} else t31 = $[47];
|
|
320
|
+
const t32 = (e_0) => {
|
|
321
|
+
if (e_0.key === "ArrowDown" || e_0.key === "ArrowUp") {
|
|
322
|
+
e_0.preventDefault();
|
|
323
|
+
const isArrowDown = e_0.key === "ArrowDown";
|
|
324
|
+
const { selectionManager: selectionManager_0 } = treeState;
|
|
325
|
+
const currentKey = focusedKeyRef.current || selectionManager_0.focusedKey;
|
|
326
|
+
const getVisibleItemKeys = () => {
|
|
327
|
+
const keys_0 = [];
|
|
328
|
+
const visit_0 = (items_0) => {
|
|
329
|
+
for (const node_1 of items_0) if (node_1?.type === "section") visit_0(Array.from(node_1.childNodes ?? []));
|
|
330
|
+
else if (node_1?.type === "item") keys_0.push(node_1.key);
|
|
331
|
+
};
|
|
332
|
+
visit_0(filteredCollectionItems);
|
|
333
|
+
return keys_0;
|
|
334
|
+
};
|
|
335
|
+
const findNextSelectableKey = (currentIndex, direction, visibleKeys) => {
|
|
336
|
+
const increment = direction === "forward" ? 1 : -1;
|
|
337
|
+
for (let i = currentIndex + increment; i >= 0 && i < visibleKeys.length; i = i + increment) {
|
|
338
|
+
const key_1 = visibleKeys[i];
|
|
339
|
+
if (!selectionManager_0.isDisabled(key_1)) return key_1;
|
|
340
|
+
}
|
|
341
|
+
return null;
|
|
342
|
+
};
|
|
343
|
+
const findFirstLastSelectableKey = (direction_0, visibleKeys_0) => {
|
|
344
|
+
const keysToCheck = direction_0 === "forward" ? visibleKeys_0 : [...visibleKeys_0].reverse();
|
|
345
|
+
for (const key_2 of keysToCheck) if (!selectionManager_0.isDisabled(key_2)) return key_2;
|
|
346
|
+
return null;
|
|
347
|
+
};
|
|
348
|
+
const visibleKeys_1 = getVisibleItemKeys();
|
|
349
|
+
if (visibleKeys_1.length === 0) return;
|
|
350
|
+
let nextKey;
|
|
351
|
+
const direction_1 = isArrowDown ? "forward" : "backward";
|
|
352
|
+
if (currentKey == null) nextKey = findFirstLastSelectableKey(direction_1, visibleKeys_1);
|
|
353
|
+
else {
|
|
354
|
+
const currentIndex_0 = visibleKeys_1.indexOf(currentKey);
|
|
355
|
+
if (currentIndex_0 === -1) nextKey = findFirstLastSelectableKey(direction_1, visibleKeys_1);
|
|
356
|
+
else {
|
|
357
|
+
nextKey = findNextSelectableKey(currentIndex_0, direction_1, visibleKeys_1);
|
|
358
|
+
if (nextKey == null) nextKey = findFirstLastSelectableKey(direction_1, visibleKeys_1);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (nextKey != null) {
|
|
362
|
+
selectionManager_0.setFocusedKey(nextKey);
|
|
363
|
+
setFocusedKey(nextKey);
|
|
364
|
+
focusedKeyRef.current = nextKey;
|
|
365
|
+
}
|
|
366
|
+
} else if (e_0.key === "Enter" || e_0.key === " " && !searchValue.trim()) {
|
|
367
|
+
const currentFocusedKey = focusedKey || treeState.selectionManager.focusedKey;
|
|
368
|
+
if (currentFocusedKey != null) {
|
|
369
|
+
e_0.preventDefault();
|
|
370
|
+
if (treeState.selectionManager.selectionMode !== "none") treeState.selectionManager.select(currentFocusedKey, e_0);
|
|
371
|
+
else {
|
|
372
|
+
const node_2 = treeState.collection.getItem(currentFocusedKey);
|
|
373
|
+
if (node_2) {
|
|
374
|
+
const onAction = completeProps.onAction;
|
|
375
|
+
if (onAction) onAction(currentFocusedKey);
|
|
376
|
+
if (node_2.props?.onAction) node_2.props.onAction(currentFocusedKey);
|
|
314
377
|
}
|
|
315
378
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
]
|
|
379
|
+
const { onClose, closeOnSelect } = contextProps;
|
|
380
|
+
if (onClose && closeOnSelect !== false) onClose();
|
|
381
|
+
}
|
|
382
|
+
} else if (e_0.key === "Escape") {
|
|
383
|
+
if (searchValue) {
|
|
384
|
+
e_0.preventDefault();
|
|
385
|
+
handleSearchChange("");
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
let t33;
|
|
390
|
+
if ($[48] !== searchInputStyles || $[49] !== searchPlaceholder || $[50] !== searchValue || $[51] !== size || $[52] !== t29 || $[53] !== t30 || $[54] !== t31 || $[55] !== t32) {
|
|
391
|
+
t33 = /* @__PURE__ */ jsx(StyledSearchInput, {
|
|
392
|
+
ref: searchInputRef,
|
|
393
|
+
type: "search",
|
|
394
|
+
placeholder: searchPlaceholder,
|
|
395
|
+
value: searchValue,
|
|
396
|
+
styles: searchInputStyles,
|
|
397
|
+
"data-size": size,
|
|
398
|
+
"aria-controls": t29,
|
|
399
|
+
role: "combobox",
|
|
400
|
+
"aria-expanded": "true",
|
|
401
|
+
"aria-haspopup": "listbox",
|
|
402
|
+
"aria-activedescendant": t30,
|
|
403
|
+
onChange: t31,
|
|
404
|
+
onKeyDown: t32
|
|
405
|
+
});
|
|
406
|
+
$[48] = searchInputStyles;
|
|
407
|
+
$[49] = searchPlaceholder;
|
|
408
|
+
$[50] = searchValue;
|
|
409
|
+
$[51] = size;
|
|
410
|
+
$[52] = t29;
|
|
411
|
+
$[53] = t30;
|
|
412
|
+
$[54] = t31;
|
|
413
|
+
$[55] = t32;
|
|
414
|
+
$[56] = t33;
|
|
415
|
+
} else t33 = $[56];
|
|
416
|
+
let t34;
|
|
417
|
+
if ($[57] !== isLoading) {
|
|
418
|
+
t34 = isLoading && /* @__PURE__ */ jsx(StyledLoadingWrapper, { children: /* @__PURE__ */ jsx(LoadingIcon, {
|
|
419
|
+
role: "progressbar",
|
|
420
|
+
"aria-label": "Loading commands",
|
|
421
|
+
"aria-hidden": false
|
|
422
|
+
}) });
|
|
423
|
+
$[57] = isLoading;
|
|
424
|
+
$[58] = t34;
|
|
425
|
+
} else t34 = $[58];
|
|
426
|
+
const t35 = !isLoading && !showEmptyState && /* @__PURE__ */ jsx(StyledMenu, {
|
|
427
|
+
...menuProps,
|
|
428
|
+
ref: menuRef,
|
|
429
|
+
id: `${qa || "CommandMenu"}-menu`,
|
|
430
|
+
"aria-label": "Command menu",
|
|
431
|
+
qa: "Menu",
|
|
432
|
+
"data-size": size,
|
|
433
|
+
mods,
|
|
434
|
+
styles: {
|
|
435
|
+
border: "none",
|
|
436
|
+
boxShadow: "none",
|
|
437
|
+
radius: 0,
|
|
438
|
+
padding: "0.5x"
|
|
439
|
+
},
|
|
440
|
+
children: renderedItems
|
|
346
441
|
});
|
|
442
|
+
let t36;
|
|
443
|
+
if ($[59] !== emptyLabel || $[60] !== isLoading || $[61] !== showEmptyState) {
|
|
444
|
+
t36 = !isLoading && showEmptyState && /* @__PURE__ */ jsx(StyledEmptyState, { children: emptyLabel });
|
|
445
|
+
$[59] = emptyLabel;
|
|
446
|
+
$[60] = isLoading;
|
|
447
|
+
$[61] = showEmptyState;
|
|
448
|
+
$[62] = t36;
|
|
449
|
+
} else t36 = $[62];
|
|
450
|
+
let t37;
|
|
451
|
+
if ($[63] !== footer || $[64] !== footerStyles || $[65] !== size) {
|
|
452
|
+
t37 = footer && /* @__PURE__ */ jsx(StyledFooter, {
|
|
453
|
+
role: "presentation",
|
|
454
|
+
"data-size": size,
|
|
455
|
+
styles: footerStyles,
|
|
456
|
+
children: footer
|
|
457
|
+
});
|
|
458
|
+
$[63] = footer;
|
|
459
|
+
$[64] = footerStyles;
|
|
460
|
+
$[65] = size;
|
|
461
|
+
$[66] = t37;
|
|
462
|
+
} else t37 = $[66];
|
|
463
|
+
let t38;
|
|
464
|
+
if ($[67] !== T0 || $[68] !== domRef || $[69] !== mods || $[70] !== size || $[71] !== t25 || $[72] !== t26 || $[73] !== t27 || $[74] !== t28 || $[75] !== t33 || $[76] !== t34 || $[77] !== t35 || $[78] !== t36 || $[79] !== t37) {
|
|
465
|
+
t38 = /* @__PURE__ */ jsxs(T0, {
|
|
466
|
+
...t25,
|
|
467
|
+
ref: domRef,
|
|
468
|
+
qa: t26,
|
|
469
|
+
"data-size": size,
|
|
470
|
+
mods,
|
|
471
|
+
styles: t27,
|
|
472
|
+
children: [
|
|
473
|
+
t28,
|
|
474
|
+
t33,
|
|
475
|
+
t34,
|
|
476
|
+
t35,
|
|
477
|
+
t36,
|
|
478
|
+
t37
|
|
479
|
+
]
|
|
480
|
+
});
|
|
481
|
+
$[67] = T0;
|
|
482
|
+
$[68] = domRef;
|
|
483
|
+
$[69] = mods;
|
|
484
|
+
$[70] = size;
|
|
485
|
+
$[71] = t25;
|
|
486
|
+
$[72] = t26;
|
|
487
|
+
$[73] = t27;
|
|
488
|
+
$[74] = t28;
|
|
489
|
+
$[75] = t33;
|
|
490
|
+
$[76] = t34;
|
|
491
|
+
$[77] = t35;
|
|
492
|
+
$[78] = t36;
|
|
493
|
+
$[79] = t37;
|
|
494
|
+
$[80] = t38;
|
|
495
|
+
} else t38 = $[80];
|
|
496
|
+
return t38;
|
|
497
|
+
}
|
|
498
|
+
function _temp7(item_1) {
|
|
499
|
+
return item_1.type === "section";
|
|
500
|
+
}
|
|
501
|
+
function _temp6(item_0) {
|
|
502
|
+
return item_0.type === "section";
|
|
503
|
+
}
|
|
504
|
+
function _temp5(word_0) {
|
|
505
|
+
return word_0.length > 0;
|
|
506
|
+
}
|
|
507
|
+
function _temp4(keyword) {
|
|
508
|
+
return keyword.toLowerCase();
|
|
509
|
+
}
|
|
510
|
+
function _temp3(word) {
|
|
511
|
+
return word.length > 0;
|
|
512
|
+
}
|
|
513
|
+
function _temp2(key_0) {
|
|
514
|
+
return String(key_0);
|
|
515
|
+
}
|
|
516
|
+
function _temp(key) {
|
|
517
|
+
return String(key);
|
|
347
518
|
}
|
|
348
519
|
const _CommandMenu = React.forwardRef(CommandMenu);
|
|
349
520
|
const __CommandMenu = Object.assign(_CommandMenu, {
|