@cube-dev/ui-kit 0.0.0-canary-8292376 → 0.0.0-canary-50fa86a
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/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuCollectionItem.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/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/Disclosure/Disclosure.js +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 +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/Item/ItemWithNativeLinks.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +14 -39
- package/dist/components/content/Tree/Tree.js.map +1 -1
- package/dist/components/content/Tree/TreeNode.js +7 -8
- 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 +2 -10
- package/dist/components/content/Tree/tree-index.js.map +1 -1
- package/dist/components/content/Tree/types.d.ts +1 -21
- package/dist/components/content/Tree/use-checkbox-tree.js +123 -17
- 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 +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 +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableRowLink.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/TreeGridTable.js +1 -1
- package/dist/components/data/TableBase/column-header.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-styles.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-menu.js +1 -1
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-column-window.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +3 -1
- 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.d.ts +3 -2
- package/dist/components/fields/ComboBox/ComboBox.js +10 -3
- package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/fields/ComboBox/comboBoxOptions.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +3 -2
- 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 +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 +56 -3
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.d.ts +1 -27
- package/dist/components/fields/FilterPicker/FilterPicker.js +6 -66
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +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 +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +3 -1
- package/dist/components/fields/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +3 -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/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.d.ts +6 -2
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +4 -3
- package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +51 -47
- package/dist/components/fields/SearchInput/SearchInput.js.map +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +39 -29
- package/dist/components/fields/Slider/RangeSlider.js.map +1 -1
- package/dist/components/fields/Slider/Slider.js +60 -64
- package/dist/components/fields/Slider/Slider.js.map +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.d.ts +2 -0
- package/dist/components/fields/TagInput/TagInput.js +11 -8
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +1 -1
- package/dist/components/fields/TagInput/useTagError.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +3 -1
- package/dist/components/fields/TextArea/TextArea.js.map +1 -1
- package/dist/components/fields/TextInput/TextInput.js +3 -1
- package/dist/components/fields/TextInput/TextInput.js.map +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/displayed-validation.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/fields/option-origin-press.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/field-description.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ModernFormRoot.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/store.js +1 -1
- package/dist/components/form/Form/modern/validation.js +1 -1
- package/dist/components/form/Form/modern/values.js +1 -1
- package/dist/components/form/Form/reset-unbound-controls.js +1 -1
- package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/field-chrome.js +1 -1
- package/dist/components/form/legacy-tooltip.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/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 +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-open-sync.js +1 -1
- package/dist/components/overlays/Dialog/use-retained-dialog-focus.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Modal/modal-containment.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +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/namespace.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.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/navigation-url.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/providers/use-navigation.js +1 -1
- package/dist/shared/form.d.ts +3 -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/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/overlayKeyPropagation.js +44 -7
- package/dist/utils/react/overlayKeyPropagation.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 +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/docs/components/content/Tree.md +4 -5
- package/docs/components/fields/ColorInput.md +1 -1
- package/docs/components/fields/ComboBox.md +1 -1
- package/docs/components/fields/CommandTextArea.md +2 -2
- package/docs/components/fields/FilterPicker.md +1 -67
- package/docs/components/fields/NumberInput.md +2 -2
- package/docs/components/fields/PasswordInput.md +5 -5
- package/docs/components/fields/SearchComboBox.md +1 -1
- package/docs/components/fields/SearchInput.md +1 -1
- package/docs/components/fields/TagInput.md +1 -1
- package/docs/components/fields/TextArea.md +8 -5
- package/docs/components/fields/TextInput.md +8 -5
- package/package.json +1 -1
- package/dist/components/content/Tree/checked-keys.js +0 -158
- package/dist/components/content/Tree/checked-keys.js.map +0 -1
- package/dist/components/content/Tree/rowId.js +0 -16
- package/dist/components/content/Tree/rowId.js.map +0 -1
- package/dist/components/fields/FilterListBox/styled.js +0 -66
- package/dist/components/fields/FilterListBox/styled.js.map +0 -1
- package/dist/components/fields/FilterPicker/FilterTree.js +0 -413
- package/dist/components/fields/FilterPicker/FilterTree.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterPicker.js","names":["CollectionChildren","FocusableRefValue","BASE_STYLES","BasePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","filterBaseProps","OUTER_STYLES","OuterStyleProps","Styles","tasty","ForwardedRef","forwardRef","ReactElement","ReactNode","RefObject","useEffect","useMemo","useRef","useState","FocusScope","Key","mergeProps","Placement","useLabel","Section","BaseSection","ListState","useListState","useEvent","useWarn","useI18n","CloseIcon","DirectionIcon","LoadingIcon","isTextOnly","allowOverlayKeysToPropagate","processSelectionArray","extractStyles","mergeStyleLayers","CubeItemButtonProps","ItemAction","ItemButton","CubeItemProps","Text","deriveCheckedSets","toOrderedKeys","buildTreeIndex","getTreeNodeText","getValidationIcon","getValidationTheme","useFieldProps","wrapWithField","Dialog","DialogTrigger","CubeFilterListBoxProps","FilterListBox","ListBox","TriggerActions","TriggerIcon","FilterTree","KeyboardEvent","RAKeyboardEvent","FieldBaseProps","CubeTreeNodeData","ItemWithKey","key","id","textValue","children","CubeFilterPickerProps","Omit","T","Pick","placeholder","size","listBoxStyles","popoverStyles","triggerStyles","isCheckable","shouldFlip","placement","targetRef","HTMLElement","containerPadding","triggerTooltip","triggerDescription","renderSummary","args","selectedLabels","selectedKeys","selectedLabel","selectedKey","selectionMode","listStateRef","mods","Record","isClearable","clearLabel","onClear","actions","isLoadingItems","sortSelectedToTop","onOpenChange","isOpen","treeData","expandedKeys","defaultExpandedKeys","onExpand","PROP_STYLES","getTreeSummaryLabels","index","ReturnType","checked","Set","labels","node","byKey","parentKey","parentOf","get","has","push","FilterPickerWrapper","qa","styles","display","flow","gridRows","placeContent","placeItems","FilterPicker","inputProps","ref","t","props","valuePropsMapper","value","onChange","fieldProps","isMultiple","onSelectionChange","Array","isArray","label","ariaLabel","ariaDescribedBy","extra","icon","rightIcon","prefix","suffix","hotkeys","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","isLoading","message","externalMods","description","descriptionPlacement","type","theme","shape","labelSuffix","shouldFocusWrap","defaultSelectedKey","defaultSelectedKeys","disabledKeys","focusOnHover","showSelectAll","selectAllLabel","items","header","footer","headerStyles","footerStyles","allowsCustomValue","allValueProps","customValueProps","newCustomValueProps","searchPlaceholder","autoFocus","filter","emptyLabel","searchInputStyles","searchInputRef","listStyles","optionStyles","sectionStyles","headingStyles","listGap","listRef","disallowEmptySelection","shouldUseVirtualFocus","onEscape","onOptionClick","searchValue","onSearchChange","sortSelectedToTopProp","isReorderable","onReorder","form","otherProps","sortSelectedToTopExplicit","undefined","internalSelectedKey","setInternalSelectedKey","internalSelectedKeys","setInternalSelectedKeys","isPopoverOpen","setIsPopoverOpen","cachedItemsOrder","triggerRef","HTMLButtonElement","labelProps","triggerLabelProps","labelElementType","pickerAriaLabel","String","trim","triggerWidthRef","current","isControlledSingle","isControlledMultiple","effectiveSelectedKey","effectiveSelectedKeys","localCollectionState","labelMap","keyMap","lm","Map","km","traverse","nodes","Iterable","strKey","set","childNodes","collection","mappedSelectedKey","mappedSelectedKeys","const","map","k","treeIndex","treeCheckedKeys","keys","treeSelectedKeys","internalExpandedKeys","setInternalExpandedKeys","handleExpand","from","values","selectedKeyStrs","hasSelection","length","latestSelectionRef","single","multiple","selectionsWhenClosed","handleOpenChange","UNSAFE_getDOMNode","offsetWidth","keyboardProps","onKeyDown","e","preventDefault","clearValue","focus","finalItems","selectedSet","addSelected","add","forEach","getItemKey","obj","item","sortArray","arr","selectedArr","unselectedArr","sortedChildren","itemsArray","sorted","triggerContent","join","showClearButton","isReadOnly","validationIcon","paintedTheme","hasCustomRightIcon","triggerRightIcon","hasTriggerActions","triggerActions","pressed","triggerElement","handleSelectionChange","selection","normalized","handleEscape","handleOptionClick","filterPickerField","eventProps","width","popover","Item","Action","Object","defineProperty","enumerable","configurable","Text","TriggerIcon","ItemButton","BaseSection"],"sources":["../../../../src/components/fields/FilterPicker/FilterPicker.tsx"],"sourcesContent":["import { CollectionChildren, FocusableRefValue } from '@react-types/shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n filterBaseProps,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { FocusScope, Key, mergeProps, Placement, useLabel } from 'react-aria';\nimport { Section as BaseSection, ListState, useListState } from 'react-stately';\n\nimport { useEvent } from '../../../_internal';\nimport { useWarn } from '../../../_internal/hooks/use-warn';\nimport { useI18n } from '../../../i18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { isTextOnly } from '../../../utils/react/isTextOnly';\nimport { allowOverlayKeysToPropagate } from '../../../utils/react/overlayKeyPropagation';\nimport { processSelectionArray } from '../../../utils/selection';\nimport { extractStyles, mergeStyleLayers } from '../../../utils/styles';\nimport { CubeItemButtonProps, ItemAction, ItemButton } from '../../actions';\nimport { CubeItemProps } from '../../content/Item';\nimport { Text } from '../../content/Text';\nimport {\n deriveCheckedSets,\n toOrderedKeys,\n} from '../../content/Tree/checked-keys';\nimport { buildTreeIndex, getTreeNodeText } from '../../content/Tree/tree-index';\nimport {\n getValidationIcon,\n getValidationTheme,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { Dialog } from '../../overlays/Dialog/Dialog';\nimport { DialogTrigger } from '../../overlays/Dialog/DialogTrigger';\nimport {\n CubeFilterListBoxProps,\n FilterListBox,\n} from '../FilterListBox/FilterListBox';\nimport { ListBox } from '../ListBox';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport { FilterTree } from './FilterTree';\n\nimport type { KeyboardEvent as RAKeyboardEvent } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\nimport type { CubeTreeNodeData } from '../../content/Tree/types';\n\ninterface ItemWithKey {\n key?: string | number;\n id?: string | number;\n textValue?: string;\n children?: ItemWithKey[];\n [key: string]: unknown;\n}\n\nexport interface CubeFilterPickerProps<T>\n extends\n Omit<CubeFilterListBoxProps<T>, 'size' | 'shape' | 'children'>,\n // `tooltip` is the trigger's, and on a picker the trigger's is spelled\n // `triggerTooltip`; the label's info badge is `labelTooltip`.\n Omit<CubeItemProps, 'children' | 'size' | 'tooltip'>,\n BasePropsWithoutChildren,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n FieldBaseProps<\n string | number | readonly (string | number)[] | null | undefined\n >,\n Pick<\n CubeItemButtonProps,\n | 'type'\n | 'theme'\n | 'icon'\n | 'rightIcon'\n | 'prefix'\n | 'suffix'\n | 'hotkeys'\n | 'shape'\n > {\n /** The options, or a render function over `items`. Required unless `treeData` is set. */\n children?: CollectionChildren<T>;\n /** Accessible name for the picker trigger when there is no visible label. */\n 'aria-label'?: string;\n /** Ids of elements that also describe the trigger, beside the field's own description and message. */\n 'aria-describedby'?: string;\n /** Placeholder text when no selection is made */\n placeholder?: string;\n /** Size of the picker component */\n size?: 'small' | 'medium' | 'large';\n /** Custom styles for the list box popover */\n listBoxStyles?: Styles;\n /** Custom styles for the popover container */\n popoverStyles?: Styles;\n /** Custom styles for the trigger button */\n triggerStyles?: Styles;\n /** Whether to show checkboxes for multiple selection mode */\n isCheckable?: boolean;\n /** Whether to flip the popover placement */\n shouldFlip?: boolean;\n /**\n * Placement of the popover relative to the trigger.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n * @default 'bottom start'\n */\n placement?: Placement;\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Forwarded to `DialogTrigger`, so the anchor also becomes what outside-click\n * dismissal treats as the trigger. The popover's `minWidth` stays tied to the\n * trigger button, not to this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Tooltip for the trigger button (separate from `labelTooltip`) */\n triggerTooltip?: CubeItemProps['tooltip'];\n /** Description for the trigger button (separate from field description) */\n triggerDescription?: CubeItemProps['description'];\n\n /**\n * Custom renderer for the summary shown inside the trigger when there is a selection.\n *\n * For `selectionMode=\"multiple\"` the function receives:\n * - `selectedLabels`: array of labels of the selected items.\n * - `selectedKeys`: array of keys of the selected items or \"all\".\n *\n * For `selectionMode=\"single\"` the function receives:\n * - `selectedLabel`: label of the selected item.\n * - `selectedKey`: key of the selected item.\n *\n * The function should return a `ReactNode` that will be rendered inside the trigger.\n * Set to `false` to hide the summary text completely.\n */\n renderSummary?:\n | ((args: {\n selectedLabels?: string[];\n selectedKeys?: 'all' | (string | number)[];\n selectedLabel?: string;\n selectedKey?: string | number | null;\n selectionMode?: 'single' | 'multiple';\n }) => ReactNode)\n | false;\n\n /** Ref to access internal ListBox state (from FilterListBox) */\n listStateRef?: RefObject<ListState<T>>;\n /** Additional modifiers for styling the FilterPicker */\n mods?: Record<string, boolean>;\n /** Whether the filter picker is clearable using a clear button in the rightIcon slot */\n isClearable?: boolean;\n /** Accessible name for the built-in clear button. Defaults to a localized \"Clear value\". */\n clearLabel?: string;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n /**\n * Custom actions rendered inside the trigger, to the left of the built-in\n * clear button and dropdown caret. Use `FilterPicker.Action` so they match the\n * trigger's size and theme.\n *\n * Pressing one runs its handler without opening or closing the popover —\n * including while the popover is open. Actions follow the trigger's disabled\n * state but NOT `isReadOnly`, since a read-only field can still host an\n * action that does not change the value; pass `isDisabled` yourself for one\n * that does.\n */\n actions?: ReactNode;\n /**\n * Whether items are currently loading. Shows a loading spinner in the search\n * input suffix inside the popover. Unlike `isLoading`, this does NOT disable\n * the trigger.\n */\n isLoadingItems?: boolean;\n /**\n * Sort selected items to the top when the popover opens.\n * Only works when using the `items` prop (data-driven mode).\n * Ignored when using JSX children.\n * @default true when items are provided, false when using JSX children\n */\n sortSelectedToTop?: boolean;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n\n /**\n * Tree-shaped options. When set, the popover shows a checkable `Tree` in\n * place of the list, and `items` and `children` are not used.\n *\n * Tree mode is always multiple selection. The value (`selectedKeys`) is\n * every fully checked key, parents included: checking a parent checks its\n * children, and a parent with only some children checked is half-checked.\n * The cascade runs over the whole tree, so a search never unchecks the\n * nodes it hides. A press on a row toggles its checkbox. Disable a node\n * with its own `isDisabled`, not `disabledKeys`.\n *\n * The search keeps a node that matches with its whole subtree, and the\n * ancestors of deeper matches with only their matching branches, opened.\n * The default summary lists the topmost checked nodes.\n */\n treeData?: CubeTreeNodeData[];\n /** Expanded nodes in tree mode (controlled). A search expands on its own and restores these when cleared. */\n expandedKeys?: string[];\n /** Initially expanded nodes in tree mode (uncontrolled). */\n defaultExpandedKeys?: string[];\n /** Called when the user expands or collapses a node in tree mode, outside a search. */\n onExpand?: (expandedKeys: string[]) => void;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\n/**\n * Tree mode's summary: the topmost checked nodes, since a checked parent\n * stands for its children. Keys the tree lacks are listed as they are.\n */\nfunction getTreeSummaryLabels(\n index: ReturnType<typeof buildTreeIndex>,\n checked: Set<string>,\n): string[] {\n const labels: string[] = [];\n\n for (const [key, node] of index.byKey) {\n const parentKey = index.parentOf.get(key);\n if (!checked.has(key) || (parentKey != null && checked.has(parentKey))) {\n continue;\n }\n labels.push(getTreeNodeText(node));\n }\n\n for (const key of checked) {\n if (!index.byKey.has(key)) labels.push(key);\n }\n\n return labels;\n}\n\nconst FilterPickerWrapper = tasty({\n qa: 'FilterPicker',\n styles: {\n display: 'inline-grid',\n flow: 'column',\n gridRows: '1sf',\n placeContent: 'stretch',\n placeItems: 'stretch',\n },\n});\n\nexport const FilterPicker = forwardRef(function FilterPicker<T extends object>(\n inputProps: CubeFilterPickerProps<T>,\n ref: ForwardedRef<HTMLElement>,\n) {\n const { t } = useI18n();\n\n const props = useFieldProps(inputProps, {\n valuePropsMapper: ({ value, onChange }) => {\n const fieldProps: Record<string, unknown> = {};\n const isMultiple =\n inputProps.selectionMode === 'multiple' || !!inputProps.treeData;\n\n if (isMultiple) {\n fieldProps.selectedKeys = value || [];\n } else {\n fieldProps.selectedKey = value ?? null;\n }\n\n fieldProps.onSelectionChange = (key: Key | null | 'all' | Key[]) => {\n if (isMultiple) {\n if (key === 'all') {\n onChange('all');\n } else {\n onChange(key ? (Array.isArray(key) ? key : [key]) : []);\n }\n } else {\n onChange(Array.isArray(key) ? key[0] : key);\n }\n };\n\n return fieldProps;\n },\n });\n\n let {\n qa,\n label,\n 'aria-label': ariaLabel,\n // The field's description and message describe the trigger, which is the\n // control, not the wrapper the rest of these props land on.\n 'aria-describedby': ariaDescribedBy,\n extra,\n id,\n icon,\n rightIcon,\n prefix,\n suffix,\n actions,\n hotkeys,\n triggerTooltip,\n triggerDescription,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n message,\n mods: externalMods,\n description,\n descriptionPlacement,\n placeholder,\n size = 'medium',\n styles,\n listBoxStyles,\n popoverStyles,\n type = 'outline',\n theme = 'default',\n shape,\n labelSuffix,\n shouldFocusWrap,\n children,\n shouldFlip = true,\n placement = 'bottom start',\n targetRef,\n containerPadding = 8,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n selectionMode = 'single',\n listStateRef,\n focusOnHover,\n showSelectAll,\n selectAllLabel = t('picker.all', 'All'),\n items,\n header,\n footer,\n headerStyles,\n footerStyles,\n triggerStyles,\n allowsCustomValue,\n renderSummary,\n isCheckable,\n allValueProps,\n customValueProps,\n newCustomValueProps,\n searchPlaceholder,\n autoFocus,\n filter,\n emptyLabel,\n searchInputStyles,\n searchInputRef,\n listStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n listGap,\n listRef,\n disallowEmptySelection,\n shouldUseVirtualFocus,\n onEscape,\n onOptionClick,\n isClearable,\n clearLabel,\n isLoadingItems,\n searchValue,\n onSearchChange,\n sortSelectedToTop: sortSelectedToTopProp,\n onOpenChange,\n isReorderable,\n onReorder,\n form,\n treeData,\n expandedKeys,\n defaultExpandedKeys,\n onExpand,\n ...otherProps\n } = props;\n\n // Tree mode is multiple selection, whatever `selectionMode` says.\n if (treeData) selectionMode = 'multiple';\n\n const sortSelectedToTopExplicit = sortSelectedToTopProp !== undefined;\n const sortSelectedToTop = sortSelectedToTopProp ?? (items ? true : false);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n useWarn(isCheckable === false && selectionMode === 'single', {\n key: ['filterpicker-checkable-single-mode'],\n args: [\n 'CubeUIKit: isCheckable=false is not recommended in single selection mode as it may confuse users about selection behavior.',\n ],\n });\n\n useWarn(sortSelectedToTopExplicit && sortSelectedToTop && !items, {\n key: ['filterpicker-sort-selected-to-top-children'],\n args: [\n 'FilterPicker: sortSelectedToTop only works with the items prop. Sorting will be skipped when using JSX children.',\n ],\n });\n\n // Internal selection state (uncontrolled scenario)\n const [internalSelectedKey, setInternalSelectedKey] = useState<Key | null>(\n defaultSelectedKey ?? null,\n );\n const [internalSelectedKeys, setInternalSelectedKeys] = useState<\n 'all' | Key[]\n >(defaultSelectedKeys ?? []);\n\n // Popover state — used as controlled prop for DialogTrigger\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n const cachedItemsOrder = useRef<T[] | null>(null);\n const triggerRef = useRef<FocusableRefValue<HTMLButtonElement>>(null);\n const { labelProps, fieldProps: triggerLabelProps } = useLabel({\n id: props.id,\n label,\n labelElementType: 'span',\n 'aria-label':\n ariaLabel ?? (!label ? t('picker.pickerAriaLabel', 'Picker') : undefined),\n 'aria-labelledby': props['aria-labelledby'],\n });\n const pickerAriaLabel =\n `${ariaLabel ?? (isTextOnly(label) ? String(label ?? '') : '')} ${t('picker.pickerAriaLabel', 'Picker')}`.trim();\n\n // Measured lazily on popover open instead of on every render\n const triggerWidthRef = useRef<number | undefined>(undefined);\n\n useEffect(() => {\n cachedItemsOrder.current = null;\n }, [items]);\n\n const isControlledSingle = selectedKey !== undefined;\n const isControlledMultiple = selectedKeys !== undefined;\n\n const effectiveSelectedKey = isControlledSingle\n ? selectedKey\n : internalSelectedKey;\n const effectiveSelectedKeys = isControlledMultiple\n ? selectedKeys\n : internalSelectedKeys;\n\n // Collection for label extraction (shared with FilterListBox via _internalCollection)\n const localCollectionState = useListState({\n children: children as any,\n items: items as any,\n selectionMode: 'none' as any,\n });\n\n // Build Maps for O(1) label and key lookups from the collection\n const { labelMap, keyMap } = useMemo(() => {\n const lm = new Map<string, string>();\n const km = new Map<string, Key>();\n\n const traverse = (nodes: Iterable<any>) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n const strKey = String(node.key);\n lm.set(strKey, node.textValue || strKey);\n km.set(strKey, node.key);\n } else if (node.childNodes) {\n traverse(node.childNodes);\n }\n }\n };\n\n traverse(localCollectionState.collection);\n return { labelMap: lm, keyMap: km };\n }, [localCollectionState.collection]);\n\n // O(1) key mapping via Map (replaces O(n) iteration per key)\n const mappedSelectedKey = useMemo(() => {\n if (selectionMode !== 'single' || effectiveSelectedKey == null) return null;\n const strKey = String(effectiveSelectedKey);\n return keyMap.get(strKey) ?? effectiveSelectedKey;\n }, [selectionMode, effectiveSelectedKey, keyMap]);\n\n const mappedSelectedKeys = useMemo(() => {\n if (selectionMode !== 'multiple') return undefined;\n if (effectiveSelectedKeys === 'all') return 'all' as const;\n if (Array.isArray(effectiveSelectedKeys)) {\n return effectiveSelectedKeys.map((k) => {\n const strKey = String(k);\n return keyMap.get(strKey) ?? k;\n });\n }\n return effectiveSelectedKeys;\n }, [selectionMode, effectiveSelectedKeys, keyMap]);\n\n const treeIndex = useMemo(\n () => (treeData ? buildTreeIndex(treeData) : null),\n [treeData],\n );\n\n // Tree mode's value as the tree reads it: `'all'` checks every node.\n const treeCheckedKeys = useMemo(\n () =>\n effectiveSelectedKeys === 'all'\n ? [...(treeIndex?.byKey.keys() ?? [])]\n : (effectiveSelectedKeys ?? []).map(String),\n [effectiveSelectedKeys, treeIndex],\n );\n\n // Every key the value checks, conducted over the whole tree, in tree\n // order: what the tree shows and what `renderSummary` receives.\n const treeSelectedKeys = useMemo(\n () =>\n treeData && treeIndex\n ? toOrderedKeys(\n treeIndex,\n deriveCheckedSets(treeData, treeIndex, treeCheckedKeys).checked,\n )\n : null,\n [treeData, treeIndex, treeCheckedKeys],\n );\n\n // The user's expansion, held here rather than in the popover, so it\n // outlives closing it.\n const [internalExpandedKeys, setInternalExpandedKeys] = useState<string[]>(\n defaultExpandedKeys ?? [],\n );\n const handleExpand = (keys: string[]) => {\n if (expandedKeys === undefined) setInternalExpandedKeys(keys);\n onExpand?.(keys);\n };\n\n // Memoized label extraction using the labelMap\n const selectedLabels = useMemo(() => {\n if (treeIndex && treeSelectedKeys) {\n return getTreeSummaryLabels(treeIndex, new Set(treeSelectedKeys));\n }\n\n if (selectionMode === 'multiple' && effectiveSelectedKeys === 'all') {\n return Array.from(labelMap.values());\n }\n\n const selectedKeyStrs =\n selectionMode === 'multiple' && effectiveSelectedKeys !== 'all'\n ? (effectiveSelectedKeys || []).map(String)\n : effectiveSelectedKey != null\n ? [String(effectiveSelectedKey)]\n : [];\n\n return selectedKeyStrs.map((k) => labelMap.get(k) ?? k);\n }, [\n treeIndex,\n treeSelectedKeys,\n selectionMode,\n effectiveSelectedKey,\n effectiveSelectedKeys,\n labelMap,\n ]);\n\n const hasSelection = selectedLabels.length > 0;\n\n // Refs for tracking selection state synchronously\n const latestSelectionRef = useRef<{\n single: string | null;\n multiple: 'all' | string[];\n }>({\n single: effectiveSelectedKey != null ? String(effectiveSelectedKey) : null,\n multiple:\n effectiveSelectedKeys === 'all'\n ? 'all'\n : (effectiveSelectedKeys ?? []).map(String),\n });\n\n useEffect(() => {\n latestSelectionRef.current = {\n single:\n effectiveSelectedKey != null ? String(effectiveSelectedKey) : null,\n multiple:\n effectiveSelectedKeys === 'all'\n ? 'all'\n : (effectiveSelectedKeys ?? []).map(String),\n };\n }, [effectiveSelectedKey, effectiveSelectedKeys]);\n\n const selectionsWhenClosed = useRef<{\n single: string | null;\n multiple: 'all' | string[];\n }>({ single: null, multiple: [] });\n\n useEffect(() => {\n if (!isPopoverOpen) {\n selectionsWhenClosed.current = {\n single:\n effectiveSelectedKey != null ? String(effectiveSelectedKey) : null,\n multiple:\n effectiveSelectedKeys === 'all'\n ? 'all'\n : (effectiveSelectedKeys ?? []).map(String),\n };\n }\n }, [effectiveSelectedKey, effectiveSelectedKeys, isPopoverOpen]);\n\n // ---------------------------------------------------------------------------\n // Popover lifecycle — all effects moved out of the inline renderTrigger\n // function so they have a stable component identity and don't tear\n // down/setup on every parent re-render.\n // DialogTrigger is controlled via isOpen/onOpenChange.\n // ---------------------------------------------------------------------------\n\n const handleOpenChange = useEvent((isOpen: boolean) => {\n if (isOpen === isPopoverOpen) return;\n\n if (isOpen) {\n triggerWidthRef.current =\n triggerRef?.current?.UNSAFE_getDOMNode()?.offsetWidth;\n }\n setIsPopoverOpen(isOpen);\n if (!isOpen) {\n selectionsWhenClosed.current = { ...latestSelectionRef.current };\n cachedItemsOrder.current = null;\n onSearchChange?.('');\n }\n onOpenChange?.(isOpen);\n });\n\n // Popover sync is handled by the inner `DialogTrigger` (type=\"popover\").\n\n // Keyboard handler for arrow keys to open popover\n // Deliberately NOT `useKeyboard`. `ItemButton` already runs whatever\n // `onKeyDown` it is given through `useFocusable`'s own `useKeyboard`, and a\n // second wrapper here would leave `continuePropagation()` releasing only the\n // inner one while the outer still stopped the event — `Escape` reached the\n // trigger and died there (CUB-4839). Handed over plain, this IS the outer\n // wrapper's handler, so the opt-out applies to the event that travels.\n const keyboardProps = {\n onKeyDown: (e: RAKeyboardEvent) => {\n allowOverlayKeysToPropagate(e);\n\n if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !isPopoverOpen) {\n e.preventDefault();\n handleOpenChange(true);\n\n return;\n }\n },\n };\n\n // Clear handler\n const clearValue = useEvent(() => {\n if (selectionMode === 'multiple') {\n if (!isControlledMultiple) {\n setInternalSelectedKeys([]);\n }\n onSelectionChange?.([]);\n } else {\n if (!isControlledSingle) {\n setInternalSelectedKey(null);\n }\n onSelectionChange?.(null);\n }\n\n handleOpenChange(false);\n triggerRef?.current?.focus?.();\n props.onClear?.();\n\n return false;\n });\n\n // ---------------------------------------------------------------------------\n // Sorting\n // ---------------------------------------------------------------------------\n\n // Ref values (selectionsWhenClosed.current) are read synchronously inside\n // the memo body; isPopoverOpen changing triggers recomputation at the right\n // time (the ref is updated before the next render).\n const finalItems = useMemo(() => {\n if (!items) return items;\n if (!sortSelectedToTop) return items;\n if (!isPopoverOpen) return items;\n if (cachedItemsOrder.current) return cachedItemsOrder.current;\n\n const selectedSet = new Set<string>();\n\n const addSelected = (key: Key) => {\n if (key != null) selectedSet.add(String(key));\n };\n\n if (selectionMode === 'multiple') {\n if (selectionsWhenClosed.current.multiple === 'all') {\n return items;\n }\n (selectionsWhenClosed.current.multiple as string[]).forEach(addSelected);\n } else {\n if (selectionsWhenClosed.current.single != null) {\n addSelected(selectionsWhenClosed.current.single);\n }\n }\n\n if (selectedSet.size === 0) {\n return items;\n }\n\n const getItemKey = (obj: unknown): string | undefined => {\n if (obj == null || typeof obj !== 'object') return undefined;\n\n const item = obj as ItemWithKey;\n if (item.key != null) return String(item.key);\n if (item.id != null) return String(item.id);\n return undefined;\n };\n\n const sortArray = (arr: unknown[]): unknown[] => {\n const selectedArr: unknown[] = [];\n const unselectedArr: unknown[] = [];\n\n arr.forEach((obj) => {\n const item = obj as ItemWithKey;\n if (obj && Array.isArray(item.children)) {\n const sortedChildren = sortArray(item.children);\n unselectedArr.push({ ...item, children: sortedChildren });\n } else {\n const key = getItemKey(obj);\n if (key && selectedSet.has(key)) {\n selectedArr.push(obj);\n } else {\n unselectedArr.push(obj);\n }\n }\n });\n\n return [...selectedArr, ...unselectedArr];\n };\n\n const itemsArray = Array.isArray(items)\n ? items\n : Array.from(items as Iterable<unknown>);\n const sorted = sortArray(itemsArray) as T[];\n\n cachedItemsOrder.current = sorted;\n\n return sorted;\n }, [items, sortSelectedToTop, selectionMode, isPopoverOpen]);\n\n // ---------------------------------------------------------------------------\n // Trigger content\n // ---------------------------------------------------------------------------\n\n const triggerContent = useMemo((): ReactNode => {\n if (typeof renderSummary === 'function') {\n if (selectionMode === 'single') {\n return renderSummary({\n selectedLabel: selectedLabels[0],\n selectedKey: effectiveSelectedKey ?? null,\n selectedLabels,\n selectedKeys: effectiveSelectedKeys,\n selectionMode: 'single',\n });\n }\n\n return renderSummary({\n selectedLabels,\n selectedKeys: treeSelectedKeys ?? effectiveSelectedKeys,\n selectionMode: 'multiple',\n });\n } else if (renderSummary === false) {\n return null;\n }\n\n if (!hasSelection) {\n return <Text.Placeholder>{placeholder}</Text.Placeholder>;\n } else if (selectionMode === 'single') {\n return selectedLabels[0] || null;\n } else if (effectiveSelectedKeys === 'all') {\n return selectAllLabel;\n } else {\n return selectedLabels.join(', ') || null;\n }\n }, [\n renderSummary,\n selectionMode,\n selectedLabels,\n effectiveSelectedKey,\n effectiveSelectedKeys,\n treeSelectedKeys,\n hasSelection,\n placeholder,\n selectAllLabel,\n ]);\n\n const showClearButton =\n isClearable && hasSelection && !isDisabled && !props.isReadOnly;\n\n const validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // The same expression the trigger is painted with, not the raw `theme` — see\n // `Picker` for why validation has to be applied here too.\n const paintedTheme = getValidationTheme(theme, { isInvalid, isValid });\n //\n // It reaches the trailing actions through `ItemButton`'s wrapper, which is\n // what provides `ItemActionContext` for a run rendered outside the button —\n // so passing it as the trigger's `theme` is all that is needed.\n\n if (validationIcon) {\n suffix = (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }\n\n // A caller's `rightIcon` keeps the `rightIcon` slot — see `Picker` for why.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon ? (\n isLoading ? (\n <LoadingIcon />\n ) : (\n rightIcon\n )\n ) : undefined;\n\n // With a caller's own `rightIcon` the built-in control moves into that slot,\n // leaving the run with whatever the caller passed — possibly nothing. `null`\n // rather than nothing at all: the run stays in the markup, so the trigger does\n // not restructure if actions arrive later, but the row stops counting it as\n // end content. That is what keeps an icon-only trigger with `rightIcon={null}`\n // square, as it was before the run existed.\n const hasTriggerActions = !hasCustomRightIcon || !!actions;\n\n // Everything trailing that is NOT the caller's own icon goes into the actions\n // run — a sibling of the `<button>`, so the clear button is no longer nested\n // inside one. See `TriggerActions`.\n const triggerActions = (\n <TriggerActions\n actions={actions}\n builtIn={\n hasCustomRightIcon ? null : isLoading ? (\n <TriggerIcon>\n <LoadingIcon />\n </TriggerIcon>\n ) : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"FilterPickerClearButton\"\n // See `Select`: `ItemAction` names itself from `aria-label` or a\n // string `tooltip`, and warns for neither.\n aria-label={\n clearLabel ?? t('filterPicker.clearValue', 'Clear value')\n }\n // No explicit `type`/`theme` — see `Picker`: the default `current`\n // type inherits the trigger's text color, which already carries\n // validation state.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : (\n <TriggerIcon>\n <DirectionIcon to={isPopoverOpen ? 'top' : 'bottom'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n // Trigger element — plain JSX with no hooks.\n // The element type (ItemButton) is stable so React can reconcile efficiently.\n const triggerElement = (\n <ItemButton\n ref={triggerRef as any}\n data-popover-trigger\n qa={qa || 'FilterPicker'}\n type={type}\n theme={paintedTheme}\n size={size}\n shape={shape}\n isDisabled={isDisabled || isLoading}\n data-input-type=\"filterpicker\"\n mods={{\n placeholder: !hasSelection,\n ...externalMods,\n }}\n icon={icon}\n rightIcon={triggerRightIcon}\n actions={hasTriggerActions ? triggerActions : null}\n prefix={prefix}\n suffix={suffix}\n hotkeys={hotkeys}\n tooltip={triggerTooltip}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n styles={triggerStyles}\n {...keyboardProps}\n {...mergeProps(triggerLabelProps, { id })}\n aria-describedby={ariaDescribedBy}\n >\n {triggerContent}\n </ItemButton>\n );\n\n // ---------------------------------------------------------------------------\n // Selection change handler\n // ---------------------------------------------------------------------------\n\n const handleSelectionChange = useEvent((selection: any) => {\n if (selectionMode === 'single') {\n // With `disallowEmptySelection`, re-selecting the current item emits a\n // duplicate event (see `allowDuplicateSelectionEvents` below). Close the\n // popover but don't propagate the unchanged selection.\n if (\n disallowEmptySelection &&\n selection != null &&\n effectiveSelectedKey != null &&\n String(selection) === String(effectiveSelectedKey)\n ) {\n handleOpenChange(false);\n return;\n }\n\n if (!isControlledSingle) {\n setInternalSelectedKey(selection as Key | null);\n }\n } else {\n if (!isControlledMultiple) {\n let normalized: 'all' | Key[] = selection;\n\n if (selection === 'all') {\n normalized = 'all';\n } else if (Array.isArray(selection)) {\n normalized = processSelectionArray(selection);\n } else if (\n selection &&\n typeof selection === 'object' &&\n selection instanceof Set\n ) {\n normalized = processSelectionArray(selection as Set<Key>);\n }\n\n setInternalSelectedKeys(normalized);\n }\n }\n\n // Update latest selection ref synchronously\n if (selectionMode === 'single') {\n latestSelectionRef.current.single =\n selection != null ? String(selection) : null;\n } else {\n if (selection === 'all') {\n latestSelectionRef.current.multiple = 'all';\n } else if (Array.isArray(selection)) {\n latestSelectionRef.current.multiple = Array.from(\n new Set(processSelectionArray(selection)),\n );\n } else if (\n selection &&\n typeof selection === 'object' &&\n selection instanceof Set\n ) {\n latestSelectionRef.current.multiple = Array.from(\n new Set(processSelectionArray(selection as Set<Key>)),\n );\n } else {\n latestSelectionRef.current.multiple =\n selection === 'all'\n ? 'all'\n : Array.isArray(selection)\n ? selection.map(String)\n : [];\n }\n }\n\n onSelectionChange?.(selection);\n\n if (selectionMode === 'single') {\n handleOpenChange(false);\n }\n });\n\n // Stable callbacks for popover content (avoid inline closures that change every render)\n const handleEscape = useEvent(() => {\n handleOpenChange(false);\n });\n\n const handleOptionClick = useEvent((key: Key) => {\n if ((selectionMode === 'multiple' && isCheckable) || key === '__ALL__') {\n handleOpenChange(false);\n }\n });\n\n const filterPickerField = (\n <FilterPickerWrapper\n ref={ref}\n qa=\"FilterPickerWrapper\"\n styles={styles}\n {...filterBaseProps(otherProps, { eventProps: true })}\n >\n <DialogTrigger\n type=\"popover\"\n placement={placement}\n targetRef={targetRef}\n isOpen={isPopoverOpen}\n containerPadding={containerPadding}\n shouldFlip={shouldFlip}\n onOpenChange={handleOpenChange}\n >\n {triggerElement}\n {() => (\n <Dialog\n qa=\"FilterPickerOverlay\"\n aria-label={pickerAriaLabel}\n isDismissable={false}\n display=\"grid\"\n styles={mergeStyleLayers(\n {\n gridRows: '1sf',\n width: 'max($overlay-min-width, 30x) max-content 50vw',\n '$overlay-min-width': '30x',\n },\n popoverStyles,\n )}\n tokens={\n triggerWidthRef.current\n ? { '$overlay-min-width': `${triggerWidthRef.current}px` }\n : undefined\n }\n >\n <FocusScope restoreFocus>\n {treeData ? (\n <FilterTree\n autoFocus\n treeData={treeData}\n checkedKeys={treeCheckedKeys}\n expandedKeys={expandedKeys ?? internalExpandedKeys}\n aria-label={pickerAriaLabel}\n searchPlaceholder={searchPlaceholder}\n searchValue={searchValue}\n searchInputStyles={searchInputStyles}\n searchInputRef={searchInputRef}\n filter={filter}\n emptyLabel={emptyLabel}\n header={header}\n headerStyles={headerStyles}\n footer={footer}\n footerStyles={footerStyles}\n size={size === 'small' ? 'medium' : size}\n isDisabled={isDisabled}\n isLoadingItems={isLoadingItems}\n shouldFocusWrap={shouldFocusWrap}\n onExpand={handleExpand}\n onSearchChange={onSearchChange}\n onCheckedKeysChange={handleSelectionChange}\n onEscape={handleEscape}\n onCommit={handleEscape}\n />\n ) : (\n <FilterListBox\n isBare\n autoFocus\n items={items ? (finalItems as typeof props.items) : undefined}\n aria-label={pickerAriaLabel}\n _internalCollection={localCollectionState.collection}\n selectedKey={\n selectionMode === 'single' ? mappedSelectedKey : undefined\n }\n selectedKeys={\n selectionMode === 'multiple'\n ? mappedSelectedKeys\n : undefined\n }\n searchPlaceholder={searchPlaceholder}\n filter={filter}\n searchValue={searchValue}\n listStyles={listStyles}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n listGap={listGap}\n listRef={listRef}\n disallowEmptySelection={disallowEmptySelection}\n allowDuplicateSelectionEvents={\n selectionMode === 'single' && !!disallowEmptySelection\n }\n emptyLabel={emptyLabel}\n searchInputStyles={searchInputStyles}\n searchInputRef={searchInputRef}\n disabledKeys={disabledKeys}\n focusOnHover={focusOnHover}\n shouldFocusWrap={shouldFocusWrap}\n allowsCustomValue={allowsCustomValue}\n selectionMode={selectionMode}\n isInvalid={isInvalid}\n isValid={isValid}\n isDisabled={isDisabled}\n isLoading={isLoading}\n isLoadingItems={isLoadingItems}\n stateRef={listStateRef}\n isCheckable={isCheckable}\n mods={{\n popover: true,\n }}\n size={size === 'small' ? 'medium' : size}\n showSelectAll={showSelectAll}\n selectAllLabel={selectAllLabel}\n header={header}\n footer={footer}\n headerStyles={headerStyles}\n footerStyles={footerStyles}\n allValueProps={allValueProps}\n customValueProps={customValueProps}\n newCustomValueProps={newCustomValueProps}\n isReorderable={isReorderable}\n onSearchChange={onSearchChange}\n onReorder={onReorder}\n onEscape={handleEscape}\n onOptionClick={handleOptionClick}\n onSelectionChange={handleSelectionChange}\n >\n {\n (children\n ? (children as CollectionChildren<T>)\n : undefined) as CollectionChildren<T>\n }\n </FilterListBox>\n )}\n </FocusScope>\n </Dialog>\n )}\n </DialogTrigger>\n </FilterPickerWrapper>\n );\n\n return wrapWithField<Omit<CubeFilterPickerProps<T>, 'children'>>(\n filterPickerField,\n { ...props, labelProps: mergeProps(labelProps, props.labelProps) },\n );\n}) as unknown as (<T>(\n props: CubeFilterPickerProps<T> & { ref?: ForwardedRef<HTMLElement> },\n) => ReactElement) & {\n Item: typeof ListBox.Item;\n Section: typeof BaseSection;\n Action: typeof ItemAction;\n};\n\nFilterPicker.Item = ListBox.Item;\n\nFilterPicker.Section = BaseSection;\n\nFilterPicker.Action = ItemAction;\n\nObject.defineProperty(FilterPicker, 'cubeInputType', {\n value: 'FilterPicker',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmOA,MAAM8G,cAAc;CAAC,GAAG5G;CAAa,GAAGM;CAAc,GAAGH;AAAY;;;;;AAMrE,SAAS0G,qBACPC,OACAE,SACU;CACV,MAAME,SAAmB,CAAA;CAEzB,KAAK,MAAM,CAACjD,KAAKkD,SAASL,MAAMM,OAAO;EACrC,MAAMC,YAAYP,MAAMQ,SAASC,IAAItD,GAAG;EACxC,IAAI,CAAC+C,QAAQQ,IAAIvD,GAAG,KAAMoD,aAAa,QAAQL,QAAQQ,IAAIH,SAAS,GAClE;EAEFH,OAAOO,KAAK1E,gBAAgBoE,IAAI,CAAC;CACnC;CAEA,KAAK,MAAMlD,OAAO+C,SAChB,IAAI,CAACF,MAAMM,MAAMI,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A;MACxBmF;MACIzD;MACCmE;MACjB,UAAUsF;MACMrD;MAChB,qBAAqBmG;MACrB,UAAUG;MACV,UAAUA;KAAa,CAAA,IAGzB,oBAAC,eAAD;MACE,QAAA;MACA,WAAA;MACA,OAAOhI,QAASkG,aAAoCjE,KAAAA;MACpD,cAAYa;MACZ,qBAAqBS,qBAAqBY;MAC1C,aACErJ,kBAAkB,WAAWsJ,oBAAoBnC,KAAAA;MAEnD,cACEnH,kBAAkB,aACduJ,qBACApC,KAAAA;MAEaxB;MACXE;MACKc;MACDV;MACEC;MACCC;MACAC;MACNC;MACAC;MACeC;MACxB,+BACEvG,kBAAkB,YAAY,CAAC,CAACuG;MAEtBT;MACOC;MACHC;MACFlB;MACAC;MACGJ;MACEY;MACJvF;MACJ+D;MACFC;MACGC;MACDC;MACK1D;MAChB,UAAUP;MACGf;MACb,MAAM,EACJqO,SAAS,KACX;MACA,MAAMzO,SAAS,UAAU,WAAWA;MACrBkG;MACCC;MACRE;MACAC;MACMC;MACAC;MACCE;MACGC;MACGC;MACNoB;MACCF;MACLG;MACX,UAAUmG;MACV,eAAeC;MACf,mBAAmBJ;MAGhBvO,UAAAA,WACIA,WACD2I,KAAAA;KAEO,CAAA;IAEP,CAAA;GACN,CAAA,CAEG;;CACI,CAAA;CAGvB,OAAO5J,cACL6P,mBACA;EAAE,GAAG1K;EAAOmF,YAAYpM,WAAWoM,YAAYnF,MAAMmF,UAAU;CAAE,CACnE;AACF,CAAC;AAQDvF,aAAakL,OAAO5P,QAAQ4P;AAE5BlL,aAAa1G,UAAUC;AAEvByG,aAAamL,SAAS7Q;AAEtB8Q,OAAOC,eAAerL,cAAc,iBAAiB;CACnDM,OAAO;CACPgL,YAAY;CACZC,cAAc;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"FilterPicker.js","names":["CollectionChildren","FocusableRefValue","BASE_STYLES","BasePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","filterBaseProps","OUTER_STYLES","OuterStyleProps","Styles","tasty","ForwardedRef","forwardRef","ReactElement","ReactNode","RefObject","useEffect","useMemo","useRef","useState","FocusScope","Key","mergeProps","Placement","useLabel","Section","BaseSection","ListState","useListState","useEvent","useWarn","useI18n","CloseIcon","DirectionIcon","LoadingIcon","isTextOnly","allowOverlayKeysToPropagate","processSelectionArray","extractStyles","mergeStyleLayers","CubeItemButtonProps","ItemAction","ItemButton","CubeItemProps","Text","getValidationIcon","getValidationTheme","useFieldProps","wrapWithField","Dialog","DialogTrigger","CubeFilterListBoxProps","FilterListBox","ListBox","TriggerActions","TriggerIcon","KeyboardEvent","RAKeyboardEvent","FieldBaseProps","ItemWithKey","key","id","textValue","children","CubeFilterPickerProps","Omit","T","Pick","placeholder","size","listBoxStyles","popoverStyles","triggerStyles","isCheckable","shouldFlip","placement","targetRef","HTMLElement","containerPadding","triggerTooltip","triggerDescription","renderSummary","args","selectedLabels","selectedKeys","selectedLabel","selectedKey","selectionMode","listStateRef","mods","Record","isClearable","clearLabel","onClear","actions","isLoadingItems","sortSelectedToTop","onOpenChange","isOpen","PROP_STYLES","FilterPickerWrapper","qa","styles","display","flow","gridRows","placeContent","placeItems","FilterPicker","inputProps","ref","t","props","valuePropsMapper","value","onChange","fieldProps","onSelectionChange","Array","isArray","label","ariaLabel","ariaDescribedBy","extra","icon","rightIcon","prefix","suffix","hotkeys","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","isLoading","message","externalMods","description","descriptionPlacement","type","theme","shape","labelSuffix","shouldFocusWrap","defaultSelectedKey","defaultSelectedKeys","disabledKeys","focusOnHover","showSelectAll","selectAllLabel","items","header","footer","headerStyles","footerStyles","allowsCustomValue","allValueProps","customValueProps","newCustomValueProps","searchPlaceholder","autoFocus","filter","emptyLabel","searchInputStyles","searchInputRef","listStyles","optionStyles","sectionStyles","headingStyles","listGap","listRef","disallowEmptySelection","shouldUseVirtualFocus","onEscape","onOptionClick","searchValue","onSearchChange","sortSelectedToTopProp","isReorderable","onReorder","form","otherProps","sortSelectedToTopExplicit","undefined","internalSelectedKey","setInternalSelectedKey","internalSelectedKeys","setInternalSelectedKeys","isPopoverOpen","setIsPopoverOpen","cachedItemsOrder","triggerRef","HTMLButtonElement","labelProps","triggerLabelProps","labelElementType","pickerAriaLabel","String","trim","triggerWidthRef","current","isControlledSingle","isControlledMultiple","effectiveSelectedKey","effectiveSelectedKeys","localCollectionState","labelMap","keyMap","lm","Map","km","traverse","nodes","Iterable","node","strKey","set","childNodes","collection","mappedSelectedKey","get","mappedSelectedKeys","const","map","k","from","values","selectedKeyStrs","hasSelection","length","latestSelectionRef","single","multiple","selectionsWhenClosed","handleOpenChange","UNSAFE_getDOMNode","offsetWidth","keyboardProps","onKeyDown","e","preventDefault","clearValue","focus","finalItems","selectedSet","Set","addSelected","add","forEach","getItemKey","obj","item","sortArray","arr","selectedArr","unselectedArr","sortedChildren","push","has","itemsArray","sorted","triggerContent","join","showClearButton","isReadOnly","validationIcon","paintedTheme","hasCustomRightIcon","triggerRightIcon","hasTriggerActions","triggerActions","pressed","triggerElement","handleSelectionChange","selection","normalized","handleEscape","handleOptionClick","filterPickerField","eventProps","width","popover","Item","Action","Object","defineProperty","enumerable","configurable","Text","TriggerIcon","ItemButton","BaseSection"],"sources":["../../../../src/components/fields/FilterPicker/FilterPicker.tsx"],"sourcesContent":["import { CollectionChildren, FocusableRefValue } from '@react-types/shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n filterBaseProps,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { FocusScope, Key, mergeProps, Placement, useLabel } from 'react-aria';\nimport { Section as BaseSection, ListState, useListState } from 'react-stately';\n\nimport { useEvent } from '../../../_internal';\nimport { useWarn } from '../../../_internal/hooks/use-warn';\nimport { useI18n } from '../../../i18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { isTextOnly } from '../../../utils/react/isTextOnly';\nimport { allowOverlayKeysToPropagate } from '../../../utils/react/overlayKeyPropagation';\nimport { processSelectionArray } from '../../../utils/selection';\nimport { extractStyles, mergeStyleLayers } from '../../../utils/styles';\nimport { CubeItemButtonProps, ItemAction, ItemButton } from '../../actions';\nimport { CubeItemProps } from '../../content/Item';\nimport { Text } from '../../content/Text';\nimport {\n getValidationIcon,\n getValidationTheme,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { Dialog } from '../../overlays/Dialog/Dialog';\nimport { DialogTrigger } from '../../overlays/Dialog/DialogTrigger';\nimport {\n CubeFilterListBoxProps,\n FilterListBox,\n} from '../FilterListBox/FilterListBox';\nimport { ListBox } from '../ListBox';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport type { KeyboardEvent as RAKeyboardEvent } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\n\ninterface ItemWithKey {\n key?: string | number;\n id?: string | number;\n textValue?: string;\n children?: ItemWithKey[];\n [key: string]: unknown;\n}\n\nexport interface CubeFilterPickerProps<T>\n extends\n Omit<CubeFilterListBoxProps<T>, 'size' | 'shape'>,\n // `tooltip` is the trigger's, and on a picker the trigger's is spelled\n // `triggerTooltip`; the label's info badge is `labelTooltip`.\n Omit<CubeItemProps, 'children' | 'size' | 'tooltip'>,\n BasePropsWithoutChildren,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n FieldBaseProps<\n string | number | readonly (string | number)[] | null | undefined\n >,\n Pick<\n CubeItemButtonProps,\n | 'type'\n | 'theme'\n | 'icon'\n | 'rightIcon'\n | 'prefix'\n | 'suffix'\n | 'hotkeys'\n | 'shape'\n > {\n /** Accessible name for the picker trigger when there is no visible label. */\n 'aria-label'?: string;\n /** Ids of elements that also describe the trigger, beside the field's own description and message. */\n 'aria-describedby'?: string;\n /** Placeholder text when no selection is made */\n placeholder?: string;\n /** Size of the picker component */\n size?: 'small' | 'medium' | 'large';\n /** Custom styles for the list box popover */\n listBoxStyles?: Styles;\n /** Custom styles for the popover container */\n popoverStyles?: Styles;\n /** Custom styles for the trigger button */\n triggerStyles?: Styles;\n /** Whether to show checkboxes for multiple selection mode */\n isCheckable?: boolean;\n /** Whether to flip the popover placement */\n shouldFlip?: boolean;\n /**\n * Placement of the popover relative to the trigger.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n * @default 'bottom start'\n */\n placement?: Placement;\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Forwarded to `DialogTrigger`, so the anchor also becomes what outside-click\n * dismissal treats as the trigger. The popover's `minWidth` stays tied to the\n * trigger button, not to this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Tooltip for the trigger button (separate from `labelTooltip`) */\n triggerTooltip?: CubeItemProps['tooltip'];\n /** Description for the trigger button (separate from field description) */\n triggerDescription?: CubeItemProps['description'];\n\n /**\n * Custom renderer for the summary shown inside the trigger when there is a selection.\n *\n * For `selectionMode=\"multiple\"` the function receives:\n * - `selectedLabels`: array of labels of the selected items.\n * - `selectedKeys`: array of keys of the selected items or \"all\".\n *\n * For `selectionMode=\"single\"` the function receives:\n * - `selectedLabel`: label of the selected item.\n * - `selectedKey`: key of the selected item.\n *\n * The function should return a `ReactNode` that will be rendered inside the trigger.\n * Set to `false` to hide the summary text completely.\n */\n renderSummary?:\n | ((args: {\n selectedLabels?: string[];\n selectedKeys?: 'all' | (string | number)[];\n selectedLabel?: string;\n selectedKey?: string | number | null;\n selectionMode?: 'single' | 'multiple';\n }) => ReactNode)\n | false;\n\n /** Ref to access internal ListBox state (from FilterListBox) */\n listStateRef?: RefObject<ListState<T>>;\n /** Additional modifiers for styling the FilterPicker */\n mods?: Record<string, boolean>;\n /** Whether the filter picker is clearable using a clear button in the rightIcon slot */\n isClearable?: boolean;\n /** Accessible name for the built-in clear button. Defaults to a localized \"Clear value\". */\n clearLabel?: string;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n /**\n * Custom actions rendered inside the trigger, to the left of the built-in\n * clear button and dropdown caret. Use `FilterPicker.Action` so they match the\n * trigger's size and theme.\n *\n * Pressing one runs its handler without opening or closing the popover —\n * including while the popover is open. Actions follow the trigger's disabled\n * state but NOT `isReadOnly`, since a read-only field can still host an\n * action that does not change the value; pass `isDisabled` yourself for one\n * that does.\n */\n actions?: ReactNode;\n /**\n * Whether items are currently loading. Shows a loading spinner in the search\n * input suffix inside the popover. Unlike `isLoading`, this does NOT disable\n * the trigger.\n */\n isLoadingItems?: boolean;\n /**\n * Sort selected items to the top when the popover opens.\n * Only works when using the `items` prop (data-driven mode).\n * Ignored when using JSX children.\n * @default true when items are provided, false when using JSX children\n */\n sortSelectedToTop?: boolean;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nconst FilterPickerWrapper = tasty({\n qa: 'FilterPicker',\n styles: {\n display: 'inline-grid',\n flow: 'column',\n gridRows: '1sf',\n placeContent: 'stretch',\n placeItems: 'stretch',\n },\n});\n\nexport const FilterPicker = forwardRef(function FilterPicker<T extends object>(\n inputProps: CubeFilterPickerProps<T>,\n ref: ForwardedRef<HTMLElement>,\n) {\n const { t } = useI18n();\n\n const props = useFieldProps(inputProps, {\n valuePropsMapper: ({ value, onChange }) => {\n const fieldProps: Record<string, unknown> = {};\n\n if (inputProps.selectionMode === 'multiple') {\n fieldProps.selectedKeys = value || [];\n } else {\n fieldProps.selectedKey = value ?? null;\n }\n\n fieldProps.onSelectionChange = (key: Key | null | 'all' | Key[]) => {\n if (inputProps.selectionMode === 'multiple') {\n if (key === 'all') {\n onChange('all');\n } else {\n onChange(key ? (Array.isArray(key) ? key : [key]) : []);\n }\n } else {\n onChange(Array.isArray(key) ? key[0] : key);\n }\n };\n\n return fieldProps;\n },\n });\n\n let {\n qa,\n label,\n 'aria-label': ariaLabel,\n // The field's description and message describe the trigger, which is the\n // control, not the wrapper the rest of these props land on.\n 'aria-describedby': ariaDescribedBy,\n extra,\n id,\n icon,\n rightIcon,\n prefix,\n suffix,\n actions,\n hotkeys,\n triggerTooltip,\n triggerDescription,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n message,\n mods: externalMods,\n description,\n descriptionPlacement,\n placeholder,\n size = 'medium',\n styles,\n listBoxStyles,\n popoverStyles,\n type = 'outline',\n theme = 'default',\n shape,\n labelSuffix,\n shouldFocusWrap,\n children,\n shouldFlip = true,\n placement = 'bottom start',\n targetRef,\n containerPadding = 8,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n disabledKeys,\n onSelectionChange,\n selectionMode = 'single',\n listStateRef,\n focusOnHover,\n showSelectAll,\n selectAllLabel = t('picker.all', 'All'),\n items,\n header,\n footer,\n headerStyles,\n footerStyles,\n triggerStyles,\n allowsCustomValue,\n renderSummary,\n isCheckable,\n allValueProps,\n customValueProps,\n newCustomValueProps,\n searchPlaceholder,\n autoFocus,\n filter,\n emptyLabel,\n searchInputStyles,\n searchInputRef,\n listStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n listGap,\n listRef,\n disallowEmptySelection,\n shouldUseVirtualFocus,\n onEscape,\n onOptionClick,\n isClearable,\n clearLabel,\n isLoadingItems,\n searchValue,\n onSearchChange,\n sortSelectedToTop: sortSelectedToTopProp,\n onOpenChange,\n isReorderable,\n onReorder,\n form,\n ...otherProps\n } = props;\n\n const sortSelectedToTopExplicit = sortSelectedToTopProp !== undefined;\n const sortSelectedToTop = sortSelectedToTopProp ?? (items ? true : false);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n useWarn(isCheckable === false && selectionMode === 'single', {\n key: ['filterpicker-checkable-single-mode'],\n args: [\n 'CubeUIKit: isCheckable=false is not recommended in single selection mode as it may confuse users about selection behavior.',\n ],\n });\n\n useWarn(sortSelectedToTopExplicit && sortSelectedToTop && !items, {\n key: ['filterpicker-sort-selected-to-top-children'],\n args: [\n 'FilterPicker: sortSelectedToTop only works with the items prop. Sorting will be skipped when using JSX children.',\n ],\n });\n\n // Internal selection state (uncontrolled scenario)\n const [internalSelectedKey, setInternalSelectedKey] = useState<Key | null>(\n defaultSelectedKey ?? null,\n );\n const [internalSelectedKeys, setInternalSelectedKeys] = useState<\n 'all' | Key[]\n >(defaultSelectedKeys ?? []);\n\n // Popover state — used as controlled prop for DialogTrigger\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n const cachedItemsOrder = useRef<T[] | null>(null);\n const triggerRef = useRef<FocusableRefValue<HTMLButtonElement>>(null);\n const { labelProps, fieldProps: triggerLabelProps } = useLabel({\n id: props.id,\n label,\n labelElementType: 'span',\n 'aria-label':\n ariaLabel ?? (!label ? t('picker.pickerAriaLabel', 'Picker') : undefined),\n 'aria-labelledby': props['aria-labelledby'],\n });\n const pickerAriaLabel =\n `${ariaLabel ?? (isTextOnly(label) ? String(label ?? '') : '')} ${t('picker.pickerAriaLabel', 'Picker')}`.trim();\n\n // Measured lazily on popover open instead of on every render\n const triggerWidthRef = useRef<number | undefined>(undefined);\n\n useEffect(() => {\n cachedItemsOrder.current = null;\n }, [items]);\n\n const isControlledSingle = selectedKey !== undefined;\n const isControlledMultiple = selectedKeys !== undefined;\n\n const effectiveSelectedKey = isControlledSingle\n ? selectedKey\n : internalSelectedKey;\n const effectiveSelectedKeys = isControlledMultiple\n ? selectedKeys\n : internalSelectedKeys;\n\n // Collection for label extraction (shared with FilterListBox via _internalCollection)\n const localCollectionState = useListState({\n children: children as any,\n items: items as any,\n selectionMode: 'none' as any,\n });\n\n // Build Maps for O(1) label and key lookups from the collection\n const { labelMap, keyMap } = useMemo(() => {\n const lm = new Map<string, string>();\n const km = new Map<string, Key>();\n\n const traverse = (nodes: Iterable<any>) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n const strKey = String(node.key);\n lm.set(strKey, node.textValue || strKey);\n km.set(strKey, node.key);\n } else if (node.childNodes) {\n traverse(node.childNodes);\n }\n }\n };\n\n traverse(localCollectionState.collection);\n return { labelMap: lm, keyMap: km };\n }, [localCollectionState.collection]);\n\n // O(1) key mapping via Map (replaces O(n) iteration per key)\n const mappedSelectedKey = useMemo(() => {\n if (selectionMode !== 'single' || effectiveSelectedKey == null) return null;\n const strKey = String(effectiveSelectedKey);\n return keyMap.get(strKey) ?? effectiveSelectedKey;\n }, [selectionMode, effectiveSelectedKey, keyMap]);\n\n const mappedSelectedKeys = useMemo(() => {\n if (selectionMode !== 'multiple') return undefined;\n if (effectiveSelectedKeys === 'all') return 'all' as const;\n if (Array.isArray(effectiveSelectedKeys)) {\n return effectiveSelectedKeys.map((k) => {\n const strKey = String(k);\n return keyMap.get(strKey) ?? k;\n });\n }\n return effectiveSelectedKeys;\n }, [selectionMode, effectiveSelectedKeys, keyMap]);\n\n // Memoized label extraction using the labelMap\n const selectedLabels = useMemo(() => {\n if (selectionMode === 'multiple' && effectiveSelectedKeys === 'all') {\n return Array.from(labelMap.values());\n }\n\n const selectedKeyStrs =\n selectionMode === 'multiple' && effectiveSelectedKeys !== 'all'\n ? (effectiveSelectedKeys || []).map(String)\n : effectiveSelectedKey != null\n ? [String(effectiveSelectedKey)]\n : [];\n\n return selectedKeyStrs.map((k) => labelMap.get(k) ?? k);\n }, [selectionMode, effectiveSelectedKey, effectiveSelectedKeys, labelMap]);\n\n const hasSelection = selectedLabels.length > 0;\n\n // Refs for tracking selection state synchronously\n const latestSelectionRef = useRef<{\n single: string | null;\n multiple: 'all' | string[];\n }>({\n single: effectiveSelectedKey != null ? String(effectiveSelectedKey) : null,\n multiple:\n effectiveSelectedKeys === 'all'\n ? 'all'\n : (effectiveSelectedKeys ?? []).map(String),\n });\n\n useEffect(() => {\n latestSelectionRef.current = {\n single:\n effectiveSelectedKey != null ? String(effectiveSelectedKey) : null,\n multiple:\n effectiveSelectedKeys === 'all'\n ? 'all'\n : (effectiveSelectedKeys ?? []).map(String),\n };\n }, [effectiveSelectedKey, effectiveSelectedKeys]);\n\n const selectionsWhenClosed = useRef<{\n single: string | null;\n multiple: 'all' | string[];\n }>({ single: null, multiple: [] });\n\n useEffect(() => {\n if (!isPopoverOpen) {\n selectionsWhenClosed.current = {\n single:\n effectiveSelectedKey != null ? String(effectiveSelectedKey) : null,\n multiple:\n effectiveSelectedKeys === 'all'\n ? 'all'\n : (effectiveSelectedKeys ?? []).map(String),\n };\n }\n }, [effectiveSelectedKey, effectiveSelectedKeys, isPopoverOpen]);\n\n // ---------------------------------------------------------------------------\n // Popover lifecycle — all effects moved out of the inline renderTrigger\n // function so they have a stable component identity and don't tear\n // down/setup on every parent re-render.\n // DialogTrigger is controlled via isOpen/onOpenChange.\n // ---------------------------------------------------------------------------\n\n const handleOpenChange = useEvent((isOpen: boolean) => {\n if (isOpen === isPopoverOpen) return;\n\n if (isOpen) {\n triggerWidthRef.current =\n triggerRef?.current?.UNSAFE_getDOMNode()?.offsetWidth;\n }\n setIsPopoverOpen(isOpen);\n if (!isOpen) {\n selectionsWhenClosed.current = { ...latestSelectionRef.current };\n cachedItemsOrder.current = null;\n onSearchChange?.('');\n }\n onOpenChange?.(isOpen);\n });\n\n // Popover sync is handled by the inner `DialogTrigger` (type=\"popover\").\n\n // Keyboard handler for arrow keys to open popover\n // Deliberately NOT `useKeyboard`. `ItemButton` already runs whatever\n // `onKeyDown` it is given through `useFocusable`'s own `useKeyboard`, and a\n // second wrapper here would leave `continuePropagation()` releasing only the\n // inner one while the outer still stopped the event — `Escape` reached the\n // trigger and died there (CUB-4839). Handed over plain, this IS the outer\n // wrapper's handler, so the opt-out applies to the event that travels.\n const keyboardProps = {\n onKeyDown: (e: RAKeyboardEvent) => {\n allowOverlayKeysToPropagate(e);\n\n if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !isPopoverOpen) {\n e.preventDefault();\n handleOpenChange(true);\n\n return;\n }\n },\n };\n\n // Clear handler\n const clearValue = useEvent(() => {\n if (selectionMode === 'multiple') {\n if (!isControlledMultiple) {\n setInternalSelectedKeys([]);\n }\n onSelectionChange?.([]);\n } else {\n if (!isControlledSingle) {\n setInternalSelectedKey(null);\n }\n onSelectionChange?.(null);\n }\n\n handleOpenChange(false);\n triggerRef?.current?.focus?.();\n props.onClear?.();\n\n return false;\n });\n\n // ---------------------------------------------------------------------------\n // Sorting\n // ---------------------------------------------------------------------------\n\n // Ref values (selectionsWhenClosed.current) are read synchronously inside\n // the memo body; isPopoverOpen changing triggers recomputation at the right\n // time (the ref is updated before the next render).\n const finalItems = useMemo(() => {\n if (!items) return items;\n if (!sortSelectedToTop) return items;\n if (!isPopoverOpen) return items;\n if (cachedItemsOrder.current) return cachedItemsOrder.current;\n\n const selectedSet = new Set<string>();\n\n const addSelected = (key: Key) => {\n if (key != null) selectedSet.add(String(key));\n };\n\n if (selectionMode === 'multiple') {\n if (selectionsWhenClosed.current.multiple === 'all') {\n return items;\n }\n (selectionsWhenClosed.current.multiple as string[]).forEach(addSelected);\n } else {\n if (selectionsWhenClosed.current.single != null) {\n addSelected(selectionsWhenClosed.current.single);\n }\n }\n\n if (selectedSet.size === 0) {\n return items;\n }\n\n const getItemKey = (obj: unknown): string | undefined => {\n if (obj == null || typeof obj !== 'object') return undefined;\n\n const item = obj as ItemWithKey;\n if (item.key != null) return String(item.key);\n if (item.id != null) return String(item.id);\n return undefined;\n };\n\n const sortArray = (arr: unknown[]): unknown[] => {\n const selectedArr: unknown[] = [];\n const unselectedArr: unknown[] = [];\n\n arr.forEach((obj) => {\n const item = obj as ItemWithKey;\n if (obj && Array.isArray(item.children)) {\n const sortedChildren = sortArray(item.children);\n unselectedArr.push({ ...item, children: sortedChildren });\n } else {\n const key = getItemKey(obj);\n if (key && selectedSet.has(key)) {\n selectedArr.push(obj);\n } else {\n unselectedArr.push(obj);\n }\n }\n });\n\n return [...selectedArr, ...unselectedArr];\n };\n\n const itemsArray = Array.isArray(items)\n ? items\n : Array.from(items as Iterable<unknown>);\n const sorted = sortArray(itemsArray) as T[];\n\n cachedItemsOrder.current = sorted;\n\n return sorted;\n }, [items, sortSelectedToTop, selectionMode, isPopoverOpen]);\n\n // ---------------------------------------------------------------------------\n // Trigger content\n // ---------------------------------------------------------------------------\n\n const triggerContent = useMemo((): ReactNode => {\n if (typeof renderSummary === 'function') {\n if (selectionMode === 'single') {\n return renderSummary({\n selectedLabel: selectedLabels[0],\n selectedKey: effectiveSelectedKey ?? null,\n selectedLabels,\n selectedKeys: effectiveSelectedKeys,\n selectionMode: 'single',\n });\n }\n\n return renderSummary({\n selectedLabels,\n selectedKeys: effectiveSelectedKeys,\n selectionMode: 'multiple',\n });\n } else if (renderSummary === false) {\n return null;\n }\n\n if (!hasSelection) {\n return <Text.Placeholder>{placeholder}</Text.Placeholder>;\n } else if (selectionMode === 'single') {\n return selectedLabels[0] || null;\n } else if (effectiveSelectedKeys === 'all') {\n return selectAllLabel;\n } else {\n return selectedLabels.join(', ') || null;\n }\n }, [\n renderSummary,\n selectionMode,\n selectedLabels,\n effectiveSelectedKey,\n effectiveSelectedKeys,\n hasSelection,\n placeholder,\n selectAllLabel,\n ]);\n\n const showClearButton =\n isClearable && hasSelection && !isDisabled && !props.isReadOnly;\n\n const validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // The same expression the trigger is painted with, not the raw `theme` — see\n // `Picker` for why validation has to be applied here too.\n const paintedTheme = getValidationTheme(theme, { isInvalid, isValid });\n //\n // It reaches the trailing actions through `ItemButton`'s wrapper, which is\n // what provides `ItemActionContext` for a run rendered outside the button —\n // so passing it as the trigger's `theme` is all that is needed.\n\n if (validationIcon) {\n suffix = (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }\n\n // A caller's `rightIcon` keeps the `rightIcon` slot — see `Picker` for why.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon ? (\n isLoading ? (\n <LoadingIcon />\n ) : (\n rightIcon\n )\n ) : undefined;\n\n // With a caller's own `rightIcon` the built-in control moves into that slot,\n // leaving the run with whatever the caller passed — possibly nothing. `null`\n // rather than nothing at all: the run stays in the markup, so the trigger does\n // not restructure if actions arrive later, but the row stops counting it as\n // end content. That is what keeps an icon-only trigger with `rightIcon={null}`\n // square, as it was before the run existed.\n const hasTriggerActions = !hasCustomRightIcon || !!actions;\n\n // Everything trailing that is NOT the caller's own icon goes into the actions\n // run — a sibling of the `<button>`, so the clear button is no longer nested\n // inside one. See `TriggerActions`.\n const triggerActions = (\n <TriggerActions\n actions={actions}\n builtIn={\n hasCustomRightIcon ? null : isLoading ? (\n <TriggerIcon>\n <LoadingIcon />\n </TriggerIcon>\n ) : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"FilterPickerClearButton\"\n // See `Select`: `ItemAction` names itself from `aria-label` or a\n // string `tooltip`, and warns for neither.\n aria-label={\n clearLabel ?? t('filterPicker.clearValue', 'Clear value')\n }\n // No explicit `type`/`theme` — see `Picker`: the default `current`\n // type inherits the trigger's text color, which already carries\n // validation state.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : (\n <TriggerIcon>\n <DirectionIcon to={isPopoverOpen ? 'top' : 'bottom'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n // Trigger element — plain JSX with no hooks.\n // The element type (ItemButton) is stable so React can reconcile efficiently.\n const triggerElement = (\n <ItemButton\n ref={triggerRef as any}\n data-popover-trigger\n qa={qa || 'FilterPicker'}\n type={type}\n theme={paintedTheme}\n size={size}\n shape={shape}\n isDisabled={isDisabled || isLoading}\n data-input-type=\"filterpicker\"\n mods={{\n placeholder: !hasSelection,\n ...externalMods,\n }}\n icon={icon}\n rightIcon={triggerRightIcon}\n actions={hasTriggerActions ? triggerActions : null}\n prefix={prefix}\n suffix={suffix}\n hotkeys={hotkeys}\n tooltip={triggerTooltip}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n styles={triggerStyles}\n {...keyboardProps}\n {...mergeProps(triggerLabelProps, { id })}\n aria-describedby={ariaDescribedBy}\n >\n {triggerContent}\n </ItemButton>\n );\n\n // ---------------------------------------------------------------------------\n // Selection change handler\n // ---------------------------------------------------------------------------\n\n const handleSelectionChange = useEvent((selection: any) => {\n if (selectionMode === 'single') {\n // With `disallowEmptySelection`, re-selecting the current item emits a\n // duplicate event (see `allowDuplicateSelectionEvents` below). Close the\n // popover but don't propagate the unchanged selection.\n if (\n disallowEmptySelection &&\n selection != null &&\n effectiveSelectedKey != null &&\n String(selection) === String(effectiveSelectedKey)\n ) {\n handleOpenChange(false);\n return;\n }\n\n if (!isControlledSingle) {\n setInternalSelectedKey(selection as Key | null);\n }\n } else {\n if (!isControlledMultiple) {\n let normalized: 'all' | Key[] = selection;\n\n if (selection === 'all') {\n normalized = 'all';\n } else if (Array.isArray(selection)) {\n normalized = processSelectionArray(selection);\n } else if (\n selection &&\n typeof selection === 'object' &&\n selection instanceof Set\n ) {\n normalized = processSelectionArray(selection as Set<Key>);\n }\n\n setInternalSelectedKeys(normalized);\n }\n }\n\n // Update latest selection ref synchronously\n if (selectionMode === 'single') {\n latestSelectionRef.current.single =\n selection != null ? String(selection) : null;\n } else {\n if (selection === 'all') {\n latestSelectionRef.current.multiple = 'all';\n } else if (Array.isArray(selection)) {\n latestSelectionRef.current.multiple = Array.from(\n new Set(processSelectionArray(selection)),\n );\n } else if (\n selection &&\n typeof selection === 'object' &&\n selection instanceof Set\n ) {\n latestSelectionRef.current.multiple = Array.from(\n new Set(processSelectionArray(selection as Set<Key>)),\n );\n } else {\n latestSelectionRef.current.multiple =\n selection === 'all'\n ? 'all'\n : Array.isArray(selection)\n ? selection.map(String)\n : [];\n }\n }\n\n onSelectionChange?.(selection);\n\n if (selectionMode === 'single') {\n handleOpenChange(false);\n }\n });\n\n // Stable callbacks for popover content (avoid inline closures that change every render)\n const handleEscape = useEvent(() => {\n handleOpenChange(false);\n });\n\n const handleOptionClick = useEvent((key: Key) => {\n if ((selectionMode === 'multiple' && isCheckable) || key === '__ALL__') {\n handleOpenChange(false);\n }\n });\n\n const filterPickerField = (\n <FilterPickerWrapper\n ref={ref}\n qa=\"FilterPickerWrapper\"\n styles={styles}\n {...filterBaseProps(otherProps, { eventProps: true })}\n >\n <DialogTrigger\n type=\"popover\"\n placement={placement}\n targetRef={targetRef}\n isOpen={isPopoverOpen}\n containerPadding={containerPadding}\n shouldFlip={shouldFlip}\n onOpenChange={handleOpenChange}\n >\n {triggerElement}\n {() => (\n <Dialog\n qa=\"FilterPickerOverlay\"\n aria-label={pickerAriaLabel}\n isDismissable={false}\n display=\"grid\"\n styles={mergeStyleLayers(\n {\n gridRows: '1sf',\n width: 'max($overlay-min-width, 30x) max-content 50vw',\n '$overlay-min-width': '30x',\n },\n popoverStyles,\n )}\n tokens={\n triggerWidthRef.current\n ? { '$overlay-min-width': `${triggerWidthRef.current}px` }\n : undefined\n }\n >\n <FocusScope restoreFocus>\n <FilterListBox\n isBare\n autoFocus\n items={items ? (finalItems as typeof props.items) : undefined}\n aria-label={pickerAriaLabel}\n _internalCollection={localCollectionState.collection}\n selectedKey={\n selectionMode === 'single' ? mappedSelectedKey : undefined\n }\n selectedKeys={\n selectionMode === 'multiple' ? mappedSelectedKeys : undefined\n }\n searchPlaceholder={searchPlaceholder}\n filter={filter}\n searchValue={searchValue}\n listStyles={listStyles}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n listGap={listGap}\n listRef={listRef}\n disallowEmptySelection={disallowEmptySelection}\n allowDuplicateSelectionEvents={\n selectionMode === 'single' && !!disallowEmptySelection\n }\n emptyLabel={emptyLabel}\n searchInputStyles={searchInputStyles}\n searchInputRef={searchInputRef}\n disabledKeys={disabledKeys}\n focusOnHover={focusOnHover}\n shouldFocusWrap={shouldFocusWrap}\n allowsCustomValue={allowsCustomValue}\n selectionMode={selectionMode}\n isInvalid={isInvalid}\n isValid={isValid}\n isDisabled={isDisabled}\n isLoading={isLoading}\n isLoadingItems={isLoadingItems}\n stateRef={listStateRef}\n isCheckable={isCheckable}\n mods={{\n popover: true,\n }}\n size={size === 'small' ? 'medium' : size}\n showSelectAll={showSelectAll}\n selectAllLabel={selectAllLabel}\n header={header}\n footer={footer}\n headerStyles={headerStyles}\n footerStyles={footerStyles}\n allValueProps={allValueProps}\n customValueProps={customValueProps}\n newCustomValueProps={newCustomValueProps}\n isReorderable={isReorderable}\n onSearchChange={onSearchChange}\n onReorder={onReorder}\n onEscape={handleEscape}\n onOptionClick={handleOptionClick}\n onSelectionChange={handleSelectionChange}\n >\n {\n (children\n ? (children as CollectionChildren<T>)\n : undefined) as CollectionChildren<T>\n }\n </FilterListBox>\n </FocusScope>\n </Dialog>\n )}\n </DialogTrigger>\n </FilterPickerWrapper>\n );\n\n return wrapWithField<Omit<CubeFilterPickerProps<T>, 'children'>>(\n filterPickerField,\n { ...props, labelProps: mergeProps(labelProps, props.labelProps) },\n );\n}) as unknown as (<T>(\n props: CubeFilterPickerProps<T> & { ref?: ForwardedRef<HTMLElement> },\n) => ReactElement) & {\n Item: typeof ListBox.Item;\n Section: typeof BaseSection;\n Action: typeof ItemAction;\n};\n\nFilterPicker.Item = ListBox.Item;\n\nFilterPicker.Section = BaseSection;\n\nFilterPicker.Action = ItemAction;\n\nObject.defineProperty(FilterPicker, 'cubeInputType', {\n value: 'FilterPicker',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkMA,MAAMoG,cAAc;CAAC,GAAGlG;CAAa,GAAGM;CAAc,GAAGH;AAAY;AAErE,MAAMgG,sBAAsB1F,MAAM;CAChC2F,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,MAAM;EACNC,UAAU;EACVC,cAAc;EACdC,YAAY;CACd;AAC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AY,cAAA;KACV,UAAA,oBAAC,eAAD;MACE,QAAA;MACA,WAAA;MACA,OAAOjC,QAAS6F,aAAoC5D,KAAAA;MACpD,cAAYa;MACZ,qBAAqBS,qBAAqBa;MAC1C,aACEpI,kBAAkB,WAAWqI,oBAAoBpC,KAAAA;MAEnD,cACEjG,kBAAkB,aAAauI,qBAAqBtC,KAAAA;MAEnCxB;MACXE;MACKc;MACDV;MACEC;MACCC;MACAC;MACNC;MACAC;MACeC;MACxB,+BACErF,kBAAkB,YAAY,CAAC,CAACqF;MAEtBT;MACOC;MACHC;MACFlB;MACAC;MACGJ;MACEY;MACJrE;MACJ6C;MACFC;MACGC;MACDC;MACKxC;MAChB,UAAUP;MACGf;MACb,MAAM,EACJiN,SAAS,KACX;MACA,MAAMrN,SAAS,UAAU,WAAWA;MACrBgF;MACCC;MACRE;MACAC;MACMC;MACAC;MACCE;MACGC;MACGC;MACNoB;MACCF;MACLG;MACX,UAAUiG;MACV,eAAeC;MACf,mBAAmBJ;MAGhBnN,UAAAA,WACIA,WACDyH,KAAAA;KAEO,CAAA;IACL,CAAA;GACN,CAAA,CAEG;;CACI,CAAA;CAGvB,OAAOxI,cACLuO,mBACA;EAAE,GAAGvK;EAAOkF,YAAY5K,WAAW4K,YAAYlF,MAAMkF,UAAU;CAAE,CACnE;AACF,CAAC;AAQDtF,aAAa+K,OAAOtO,QAAQsO;AAE5B/K,aAAanF,UAAUC;AAEvBkF,aAAagL,SAASnP;AAEtBoP,OAAOC,eAAelL,cAAc,iBAAiB;CACnDM,OAAO;CACP6K,YAAY;CACZC,cAAc;AAChB,CAAC"}
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { FileInput as _FileInput } from "../FileInput/FileInput.js";
|
|
3
3
|
import { NumberInput as _NumberInput } from "../NumberInput/NumberInput.js";
|
|
4
4
|
import { PasswordInput as _PasswordInput } from "../PasswordInput/PasswordInput.js";
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { DraggableCollection } from "../../shared/DraggableCollection.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -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-50fa86a | 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 { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
//#region src/components/fields/ListBox/optionId.ts
|
|
3
3
|
/**
|
|
4
4
|
* The DOM id of the option with `key` in the listbox whose id is `listBoxId`,
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { mergeRefs as mergeRefs$1 } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
//#region src/components/fields/ListBoxPopover/listNavigation.ts
|
|
3
3
|
/**
|
|
4
4
|
* Walks a collection (possibly nested under sections) and collects the keys of
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-50fa86a | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
|
+
import { settleOverlayKey } from "../../../utils/react/overlayKeyPropagation.js";
|
|
4
5
|
import { castNullableNumberValue } from "../../../utils/react/nullableValue.js";
|
|
5
6
|
import { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
6
7
|
import { TextInputBase } from "../TextInput/TextInputBase.js";
|
|
@@ -108,6 +109,7 @@ function NumberInput(rawProps, ref) {
|
|
|
108
109
|
event.defaultPrevented = event.isDefaultPrevented();
|
|
109
110
|
if (event.key !== "Enter") event.continuePropagation();
|
|
110
111
|
props.onKeyDown?.(event);
|
|
112
|
+
if (event.isDefaultPrevented()) settleOverlayKey(event);
|
|
111
113
|
};
|
|
112
114
|
$[22] = inputProps;
|
|
113
115
|
$[23] = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.js","names":["tasty","ForwardedRef","forwardRef","KeyboardEvent","RefObject","useRef","AriaNumberFieldProps","mergeProps","mergeAriaProps","useKeyboard","useLocale","useNumberField","useNumberFieldState","useI18n","castNullableNumberValue","WithNullableValue","useFieldProps","useDisplayedValidation","CubeTextInputBaseProps","TextInputBase","StepButton","TextInputDOMEvents","FieldBaseProps","TextFieldKeyboardProps","CubeNumberInputProps","Omit","field","hideStepper","suffixPosition","StyledTextInputBase","inputStyles","textAlign","StepperContainer","styles","display","gridColumns","gridRows","flow","placeSelf","margin","NumberInput","rawProps","ref","$","_c","t","t0","t1","Symbol","for","showsValidateErrors","props","suffix","value","defaultValue","onChange","inputRef","labelProps","userLabelProps","inputProps","userInputProps","wrapperProps","otherProps","showStepper","locale","displayedValidation","t2","trackTouched","ariaProps","t3","state","localInputRef","t4","onKeyDown","undefined","onKeyUp","groupProps","ariaGroupProps","incrementButtonProps","decrementButtonProps","validation","HTMLInputElement","t5","fieldLabel","label","t6","incrementAriaLabel","stepUpLabel","t7","decrementAriaLabel","stepDownLabel","t8","event","defaultPrevented","isDefaultPrevented","key","continuePropagation","t9","isDisabled","keyboardProps","t10","mergedLabelProps","steppers","size","T0","t12","getDisplayedValidation","t13","id","t14","t15","_NumberInput","cubeInputType","displayName","_c","mergeProps","mergeAriaProps"],"sources":["../../../../src/components/fields/NumberInput/NumberInput.tsx"],"sourcesContent":["import { tasty } from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n KeyboardEvent,\n RefObject,\n useRef,\n} from 'react';\nimport {\n AriaNumberFieldProps,\n mergeProps as mergeAriaProps,\n useKeyboard,\n useLocale,\n useNumberField,\n} from 'react-aria';\nimport { useNumberFieldState } from 'react-stately';\n\nimport { useI18n } from '../../../i18n';\nimport { mergeProps } from '../../../utils/react';\nimport {\n castNullableNumberValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { useFieldProps } from '../../form';\nimport { useDisplayedValidation } from '../TextInput/displayed-validation';\nimport {\n CubeTextInputBaseProps,\n TextInputBase,\n} from '../TextInput/TextInputBase';\n\nimport { StepButton } from './StepButton';\n\nimport type { TextInputDOMEvents } from '@react-types/shared';\nimport type {\n FieldBaseProps,\n TextFieldKeyboardProps,\n} from '../../../shared/form';\n\nexport interface CubeNumberInputProps\n extends\n Omit<\n CubeTextInputBaseProps,\n | 'defaultValue'\n | 'value'\n | 'onChange'\n | 'field'\n | 'validate'\n | 'onFocus'\n | 'onBlur'\n | keyof TextInputDOMEvents\n >,\n Omit<\n AriaNumberFieldProps,\n 'form' | 'name' | 'errorMessage' | 'onKeyDown' | 'onKeyUp'\n >,\n TextFieldKeyboardProps {\n field?: FieldBaseProps<number | null | undefined>['field'];\n /** Whether or to hide stepper */\n hideStepper?: boolean;\n /**\n * Whether the suffix goes before or after the stepper buttons. Defaults to\n * `before`, so a unit sits next to the number. The validation and loading\n * icons always come before both.\n */\n suffixPosition?: 'before' | 'after';\n}\n\nconst StyledTextInputBase = tasty(TextInputBase, {\n inputStyles: {\n textAlign: 'right',\n },\n});\n\nconst StepperContainer = tasty({\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: '1sf 1sf',\n flow: 'column',\n placeSelf: 'stretch',\n margin: '(.5x - 1bw) left',\n },\n});\n\nfunction NumberInput(\n rawProps: WithNullableValue<CubeNumberInputProps>,\n ref: ForwardedRef<HTMLElement>,\n) {\n const { t } = useI18n();\n\n // `NaN` is the number field's own empty value.\n rawProps = castNullableNumberValue(rawProps);\n let props = useFieldProps(rawProps, { showsValidateErrors: true });\n\n let {\n hideStepper,\n suffix,\n value,\n defaultValue,\n onChange,\n inputRef,\n labelProps: userLabelProps,\n inputProps: userInputProps,\n wrapperProps,\n ...otherProps\n } = props;\n let showStepper = !hideStepper;\n let { locale } = useLocale();\n // The state commits typed text on blur and Enter, so its `onChange` is the\n // change `validate` sees.\n let displayedValidation = useDisplayedValidation();\n let ariaProps = displayedValidation.trackTouched(props);\n let state = useNumberFieldState({ ...ariaProps, locale });\n let localInputRef = useRef<HTMLInputElement>(null);\n\n inputRef = inputRef ?? localInputRef;\n\n let {\n groupProps: ariaGroupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n ...validation\n } = useNumberField(\n { ...ariaProps, onKeyDown: undefined, onKeyUp: undefined },\n state,\n inputRef as RefObject<HTMLInputElement>,\n );\n let groupProps = mergeProps(ariaGroupProps, wrapperProps);\n\n // React Aria names each stepper after the field: a text label goes into the\n // name, any other label is composed in through the `aria-labelledby` it sets.\n // The UI Kit strings take the label the same way, so they replace React\n // Aria's own without losing the field name. Without a text label the name\n // has to read on its own, so it has strings of its own rather than an\n // empty `{{label}}` slot.\n let fieldLabel =\n props['aria-label'] || (typeof props.label === 'string' ? props.label : '');\n let stepUpLabel =\n props.incrementAriaLabel ??\n (fieldLabel\n ? t('numberInput.stepUp', 'Increase {{label}}', { label: fieldLabel })\n : t('numberInput.increase', 'Increase'));\n let stepDownLabel =\n props.decrementAriaLabel ??\n (fieldLabel\n ? t('numberInput.stepDown', 'Decrease {{label}}', { label: fieldLabel })\n : t('numberInput.decrease', 'Decrease'));\n // Keep native commits and user callbacks inside one Aria event wrapper so\n // continuePropagation can still undo the native shortcut's propagation stop.\n let { keyboardProps } = useKeyboard({\n isDisabled: props.isDisabled,\n onKeyDown: (event) => {\n inputProps.onKeyDown?.(event as KeyboardEvent<HTMLInputElement>);\n event.defaultPrevented = event.isDefaultPrevented();\n // NumberInput historically lets every key except Enter reach ancestors.\n if (event.key !== 'Enter') event.continuePropagation();\n props.onKeyDown?.(event);\n },\n onKeyUp: props.onKeyUp,\n });\n\n // Merge user-provided labelProps with aria labelProps\n const mergedLabelProps = mergeProps(labelProps, userLabelProps);\n\n const steppers = showStepper ? (\n <StepperContainer>\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"up\"\n {...incrementButtonProps}\n aria-label={stepUpLabel}\n size={otherProps.size}\n />\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"down\"\n {...decrementButtonProps}\n aria-label={stepDownLabel}\n size={otherProps.size}\n />\n </StepperContainer>\n ) : undefined;\n\n return (\n <StyledTextInputBase\n {...otherProps}\n {...displayedValidation.getDisplayedValidation(otherProps, validation)}\n ref={ref}\n labelProps={mergedLabelProps}\n inputProps={mergeProps(\n // `useNumberField` seeds its input id once. Merging the current id\n // through react-aria's own `mergeProps` updates that seed, so the\n // input, its label and the steppers' `aria-controls` follow the id\n // when the form binding changes after mount.\n mergeAriaProps({ ...inputProps, ...keyboardProps }, { id: props.id }),\n { 'data-input-type': 'numberinput' },\n userInputProps,\n )}\n inputRef={inputRef}\n wrapperProps={groupProps}\n // The validation/loading icon always comes first; `suffixPosition`\n // places the suffix against the steppers instead.\n suffixPosition=\"after\"\n suffix={\n showStepper ? (\n props.suffixPosition === 'after' ? (\n <>\n {steppers}\n {suffix}\n </>\n ) : (\n <>\n {suffix}\n {steppers}\n </>\n )\n ) : (\n suffix\n )\n }\n />\n );\n}\n\n/**\n * NumberFields allow users to enter a number and increment or decrement the value using stepper buttons.\n */\nconst _NumberInput = forwardRef(NumberInput);\n\n(_NumberInput as any).cubeInputType = 'Number';\n\n_NumberInput.displayName = 'NumberInput';\n\nexport { _NumberInput as NumberInput };\nexport type { AriaNumberFieldProps };\n"],"mappings":";;;;;;;;;;;;;;;AAmEA,MAAM6B,sBAAsB7B,MAAMmB,eAAe,EAC/CW,aAAa,EACXC,WAAW,QACb,EACF,CAAC;AAED,MAAMC,mBAAmBhC,MAAM,EAC7BiC,QAAQ;CACNC,SAAS;CACTC,aAAa;CACbC,UAAU;CACVC,MAAM;CACNC,WAAW;CACXC,QAAQ;AACV,EACF,CAAC;AAED,SAAAC,YAAAC,UAAAC,KAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAIE,MAAA,EAAAC,MAAchC,QAAQ;CAAE,IAAAiC;CAAA,IAAAH,EAAA,OAAAF,UAAA;EAGbK,KAAAhC,wBAAwB2B,QAAQ;EAACE,EAAA,KAAAF;EAAAE,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAA5CF,WAAWA;CAAH,IAAAM;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A7D,EAAA,MAAAiC;EAAAjC,EAAA,MAAAa;EAAAb,EAAA,MAAA0D;EAAA1D,EAAA,MAAAmB;EAAAnB,EAAA,MAAAD;EAAAC,EAAA,MAAA8D;EAAA9D,EAAA,MAAAgE;EAAAhE,EAAA,MAAAkE;EAAAlE,EAAA,MAAAmE;CAAA,OAAAA,MAAAnE,EAAA;CAAA,OApCFmE;AAoCE;;;;AAON,MAAMC,eAAe7G,WAAWsC,WAAW;AAE3C,aAAsBwE,gBAAgB;AAEtCD,aAAaE,cAAc"}
|
|
1
|
+
{"version":3,"file":"NumberInput.js","names":["tasty","ForwardedRef","forwardRef","KeyboardEvent","RefObject","useRef","AriaNumberFieldProps","mergeProps","mergeAriaProps","useKeyboard","useLocale","useNumberField","useNumberFieldState","useI18n","castNullableNumberValue","WithNullableValue","settleOverlayKey","useFieldProps","useDisplayedValidation","CubeTextInputBaseProps","TextInputBase","StepButton","TextInputDOMEvents","FieldBaseProps","TextFieldKeyboardProps","CubeNumberInputProps","Omit","field","hideStepper","suffixPosition","StyledTextInputBase","inputStyles","textAlign","StepperContainer","styles","display","gridColumns","gridRows","flow","placeSelf","margin","NumberInput","rawProps","ref","$","_c","t","t0","t1","Symbol","for","showsValidateErrors","props","suffix","value","defaultValue","onChange","inputRef","labelProps","userLabelProps","inputProps","userInputProps","wrapperProps","otherProps","showStepper","locale","displayedValidation","t2","trackTouched","ariaProps","t3","state","localInputRef","t4","onKeyDown","undefined","onKeyUp","groupProps","ariaGroupProps","incrementButtonProps","decrementButtonProps","validation","HTMLInputElement","t5","fieldLabel","label","t6","incrementAriaLabel","stepUpLabel","t7","decrementAriaLabel","stepDownLabel","t8","event","defaultPrevented","isDefaultPrevented","key","continuePropagation","t9","isDisabled","keyboardProps","t10","mergedLabelProps","steppers","size","T0","t12","getDisplayedValidation","t13","id","t14","t15","_NumberInput","cubeInputType","displayName","_c","mergeProps","mergeAriaProps"],"sources":["../../../../src/components/fields/NumberInput/NumberInput.tsx"],"sourcesContent":["import { tasty } from '@tenphi/tasty';\nimport {\n ForwardedRef,\n forwardRef,\n KeyboardEvent,\n RefObject,\n useRef,\n} from 'react';\nimport {\n AriaNumberFieldProps,\n mergeProps as mergeAriaProps,\n useKeyboard,\n useLocale,\n useNumberField,\n} from 'react-aria';\nimport { useNumberFieldState } from 'react-stately';\n\nimport { useI18n } from '../../../i18n';\nimport { mergeProps } from '../../../utils/react';\nimport {\n castNullableNumberValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { settleOverlayKey } from '../../../utils/react/overlayKeyPropagation';\nimport { useFieldProps } from '../../form';\nimport { useDisplayedValidation } from '../TextInput/displayed-validation';\nimport {\n CubeTextInputBaseProps,\n TextInputBase,\n} from '../TextInput/TextInputBase';\n\nimport { StepButton } from './StepButton';\n\nimport type { TextInputDOMEvents } from '@react-types/shared';\nimport type {\n FieldBaseProps,\n TextFieldKeyboardProps,\n} from '../../../shared/form';\n\nexport interface CubeNumberInputProps\n extends\n Omit<\n CubeTextInputBaseProps,\n | 'defaultValue'\n | 'value'\n | 'onChange'\n | 'field'\n | 'validate'\n | 'onFocus'\n | 'onBlur'\n | keyof TextInputDOMEvents\n >,\n Omit<\n AriaNumberFieldProps,\n 'form' | 'name' | 'errorMessage' | 'onKeyDown' | 'onKeyUp'\n >,\n TextFieldKeyboardProps {\n field?: FieldBaseProps<number | null | undefined>['field'];\n /** Whether or to hide stepper */\n hideStepper?: boolean;\n /**\n * Whether the suffix goes before or after the stepper buttons. Defaults to\n * `before`, so a unit sits next to the number. The validation and loading\n * icons always come before both.\n */\n suffixPosition?: 'before' | 'after';\n}\n\nconst StyledTextInputBase = tasty(TextInputBase, {\n inputStyles: {\n textAlign: 'right',\n },\n});\n\nconst StepperContainer = tasty({\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: '1sf 1sf',\n flow: 'column',\n placeSelf: 'stretch',\n margin: '(.5x - 1bw) left',\n },\n});\n\nfunction NumberInput(\n rawProps: WithNullableValue<CubeNumberInputProps>,\n ref: ForwardedRef<HTMLElement>,\n) {\n const { t } = useI18n();\n\n // `NaN` is the number field's own empty value.\n rawProps = castNullableNumberValue(rawProps);\n let props = useFieldProps(rawProps, { showsValidateErrors: true });\n\n let {\n hideStepper,\n suffix,\n value,\n defaultValue,\n onChange,\n inputRef,\n labelProps: userLabelProps,\n inputProps: userInputProps,\n wrapperProps,\n ...otherProps\n } = props;\n let showStepper = !hideStepper;\n let { locale } = useLocale();\n // The state commits typed text on blur and Enter, so its `onChange` is the\n // change `validate` sees.\n let displayedValidation = useDisplayedValidation();\n let ariaProps = displayedValidation.trackTouched(props);\n let state = useNumberFieldState({ ...ariaProps, locale });\n let localInputRef = useRef<HTMLInputElement>(null);\n\n inputRef = inputRef ?? localInputRef;\n\n let {\n groupProps: ariaGroupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n ...validation\n } = useNumberField(\n { ...ariaProps, onKeyDown: undefined, onKeyUp: undefined },\n state,\n inputRef as RefObject<HTMLInputElement>,\n );\n let groupProps = mergeProps(ariaGroupProps, wrapperProps);\n\n // React Aria names each stepper after the field: a text label goes into the\n // name, any other label is composed in through the `aria-labelledby` it sets.\n // The UI Kit strings take the label the same way, so they replace React\n // Aria's own without losing the field name. Without a text label the name\n // has to read on its own, so it has strings of its own rather than an\n // empty `{{label}}` slot.\n let fieldLabel =\n props['aria-label'] || (typeof props.label === 'string' ? props.label : '');\n let stepUpLabel =\n props.incrementAriaLabel ??\n (fieldLabel\n ? t('numberInput.stepUp', 'Increase {{label}}', { label: fieldLabel })\n : t('numberInput.increase', 'Increase'));\n let stepDownLabel =\n props.decrementAriaLabel ??\n (fieldLabel\n ? t('numberInput.stepDown', 'Decrease {{label}}', { label: fieldLabel })\n : t('numberInput.decrease', 'Decrease'));\n // Keep native commits and user callbacks inside one Aria event wrapper so\n // continuePropagation can still undo the native shortcut's propagation stop.\n let { keyboardProps } = useKeyboard({\n isDisabled: props.isDisabled,\n onKeyDown: (event) => {\n inputProps.onKeyDown?.(event as KeyboardEvent<HTMLInputElement>);\n event.defaultPrevented = event.isDefaultPrevented();\n // NumberInput historically lets every key except Enter reach ancestors.\n if (event.key !== 'Enter') event.continuePropagation();\n props.onKeyDown?.(event);\n // Number handling never prevents `Escape` or `Tab`, so a prevented one\n // is the caller's and stops here, as in every other field. An\n // unprevented one already goes on, unless the caller stopped it.\n if (event.isDefaultPrevented()) settleOverlayKey(event);\n },\n onKeyUp: props.onKeyUp,\n });\n\n // Merge user-provided labelProps with aria labelProps\n const mergedLabelProps = mergeProps(labelProps, userLabelProps);\n\n const steppers = showStepper ? (\n <StepperContainer>\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"up\"\n {...incrementButtonProps}\n aria-label={stepUpLabel}\n size={otherProps.size}\n />\n <StepButton\n isDisabled={props.isDisabled}\n direction=\"down\"\n {...decrementButtonProps}\n aria-label={stepDownLabel}\n size={otherProps.size}\n />\n </StepperContainer>\n ) : undefined;\n\n return (\n <StyledTextInputBase\n {...otherProps}\n {...displayedValidation.getDisplayedValidation(otherProps, validation)}\n ref={ref}\n labelProps={mergedLabelProps}\n inputProps={mergeProps(\n // `useNumberField` seeds its input id once. Merging the current id\n // through react-aria's own `mergeProps` updates that seed, so the\n // input, its label and the steppers' `aria-controls` follow the id\n // when the form binding changes after mount.\n mergeAriaProps({ ...inputProps, ...keyboardProps }, { id: props.id }),\n { 'data-input-type': 'numberinput' },\n userInputProps,\n )}\n inputRef={inputRef}\n wrapperProps={groupProps}\n // The validation/loading icon always comes first; `suffixPosition`\n // places the suffix against the steppers instead.\n suffixPosition=\"after\"\n suffix={\n showStepper ? (\n props.suffixPosition === 'after' ? (\n <>\n {steppers}\n {suffix}\n </>\n ) : (\n <>\n {suffix}\n {steppers}\n </>\n )\n ) : (\n suffix\n )\n }\n />\n );\n}\n\n/**\n * NumberFields allow users to enter a number and increment or decrement the value using stepper buttons.\n */\nconst _NumberInput = forwardRef(NumberInput);\n\n(_NumberInput as any).cubeInputType = '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,CAEK0E,UACAlD,MAAM,EAAA,CAAA,IAHX,qBAAA,YAAA,EAAA,UAAA,CAOKA,QACAkD,QAAQ,EAAA,CAAA,IATflD;EAcCT,EAAA,MAAAQ,MAAAvB;EAAAe,EAAA,MAAAoB;EAAApB,EAAA,MAAA2D;EAAA3D,EAAA,MAAAS;EAAAT,EAAA,MAAAkE;CAAA,OAAAA,MAAAlE,EAAA;CAAA,IAAAmE;CAAA,IAAAnE,EAAA,QAAA6D,MAAA7D,EAAA,QAAAiC,cAAAjC,EAAA,QAAAa,YAAAb,EAAA,QAAA0D,oBAAA1D,EAAA,QAAAmB,cAAAnB,EAAA,QAAAD,OAAAC,EAAA,QAAA8D,OAAA9D,EAAA,QAAAgE,OAAAhE,EAAA,QAAAkE,KAAA;EAlCLC,MAAA,oBAAC,IAAD;GAAoB,GACdhD;GAAU,GACV2C;GACC/D;GACO2D,YAAAA;GACA,YAAAM;GASFnD;GACIoB,cAAAA;GAGC,gBAAA;GAEb,QAAAiC;EAcC,CAAA;EAEHlE,EAAA,MAAA6D;EAAA7D,EAAA,MAAAiC;EAAAjC,EAAA,MAAAa;EAAAb,EAAA,MAAA0D;EAAA1D,EAAA,MAAAmB;EAAAnB,EAAA,MAAAD;EAAAC,EAAA,MAAA8D;EAAA9D,EAAA,MAAAgE;EAAAhE,EAAA,MAAAkE;EAAAlE,EAAA,MAAAmE;CAAA,OAAAA,MAAAnE,EAAA;CAAA,OApCFmE;AAoCE;;;;AAON,MAAMC,eAAe9G,WAAWuC,WAAW;AAE3C,aAAsBwE,gBAAgB;AAEtCD,aAAaE,cAAc"}
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { Button } from "../../actions/Button/Button.js";
|
|
3
3
|
import { DirectionIcon } from "../../../icons/DirectionIcon.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { chain } from "../../../utils/react/chain.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";
|
|
@@ -7,6 +7,7 @@ import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
|
|
|
7
7
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
8
8
|
import { EyeIcon } from "../../../icons/EyeIcon.js";
|
|
9
9
|
import { EyeInvisibleIcon } from "../../../icons/EyeInvisibleIcon.js";
|
|
10
|
+
import { withOverlayKeys } from "../../../utils/react/overlayKeyPropagation.js";
|
|
10
11
|
import { castNullableStringValue } from "../../../utils/react/nullableValue.js";
|
|
11
12
|
import { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
|
|
12
13
|
import { TextInputBase } from "../TextInput/TextInputBase.js";
|
|
@@ -51,6 +52,7 @@ function PasswordInput(rawProps, ref) {
|
|
|
51
52
|
value: buffered.value,
|
|
52
53
|
onChange: buffered.onChange,
|
|
53
54
|
onBlur: chain(rest.onBlur, buffered.reset),
|
|
55
|
+
onKeyDown: withOverlayKeys(rest.onKeyDown),
|
|
54
56
|
type
|
|
55
57
|
}), inputRef);
|
|
56
58
|
let t2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.js","names":["ForwardedRef","forwardRef","RefObject","useRef","useState","AriaTextFieldProps","useTextField","useI18n","EyeIcon","EyeInvisibleIcon","chain","mergeProps","useBufferedValue","castNullableStringValue","WithNullableValue","ItemAction","ItemActionProvider","useFieldProps","useDisplayedValidation","CubeBufferedValueProps","CubeTextInputBaseProps","TextInputBase","TextFieldKeyboardProps","CubePasswordInputProps","Omit","validate","PasswordInput","rawProps","ref","$","_c","t","t0","t1","Symbol","for","defaultValidationTrigger","showsValidateErrors","valuePropsMapper","_temp","props","type","setType","labelProps","userLabelProps","inputProps","userInputProps","suffix","multiLine","inputRef","propsInputRef","form","isBuffered","rest","localInputRef","buffered","value","onChange","isDisabled","isReadOnly","displayedValidation","validation","trackTouched","onBlur","reset","HTMLInputElement","t2","mergedLabelProps","t3","_temp2","toggleType","t4","t5","t6","t7","t8","wrappedSuffix","t9","t10","paddingRight","getDisplayedValidation","type_0","toString","_PasswordInput","cubeInputType","displayName","_c","mergeProps"],"sources":["../../../../src/components/fields/PasswordInput/PasswordInput.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef, RefObject, useRef, useState } from 'react';\nimport { AriaTextFieldProps, useTextField } from 'react-aria';\n\nimport { useI18n } from '../../../i18n';\nimport { EyeIcon } from '../../../icons/EyeIcon';\nimport { EyeInvisibleIcon } from '../../../icons/EyeInvisibleIcon';\nimport { chain, mergeProps, useBufferedValue } from '../../../utils/react';\nimport {\n castNullableStringValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { ItemAction } from '../../actions/ItemAction/ItemAction';\nimport { ItemActionProvider } from '../../actions/ItemActionContext';\nimport { useFieldProps } from '../../form';\nimport { useDisplayedValidation } from '../TextInput/displayed-validation';\nimport {\n CubeBufferedValueProps,\n CubeTextInputBaseProps,\n TextInputBase,\n} from '../TextInput/TextInputBase';\n\nimport type { TextFieldKeyboardProps } from '../../../shared/form';\n\nexport interface CubePasswordInputProps\n extends\n WithNullableValue<Omit<CubeTextInputBaseProps, 'validate'>>,\n CubeBufferedValueProps,\n TextFieldKeyboardProps {\n validate?: AriaTextFieldProps['validate'];\n}\n\nfunction PasswordInput(\n rawProps: CubePasswordInputProps,\n ref: ForwardedRef<HTMLElement>,\n) {\n const { t } = useI18n();\n\n rawProps = castNullableStringValue(rawProps);\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onBlur',\n showsValidateErrors: true,\n valuePropsMapper: ({ value, onChange }) => ({\n value: value?.toString() ?? '',\n onChange,\n }),\n });\n\n let [type, setType] = useState('password');\n let {\n labelProps: userLabelProps,\n inputProps: userInputProps,\n suffix,\n multiLine,\n inputRef: propsInputRef,\n // The form instance, not the DOM `form` id `useTextField` forwards.\n form,\n isBuffered,\n ...rest\n } = props;\n let localInputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n let inputRef = propsInputRef ?? localInputRef;\n\n // Hold the typed text locally until the controlled value catches up — see `useBufferedValue`.\n let buffered = useBufferedValue(rest.value, rest.onChange, {\n isBuffered,\n isDisabled: rest.isDisabled,\n isReadOnly: rest.isReadOnly,\n });\n\n let displayedValidation = useDisplayedValidation();\n let { labelProps, inputProps, ...validation } = useTextField(\n displayedValidation.trackTouched({\n ...rest,\n value: buffered.value,\n onChange: buffered.onChange,\n onBlur: chain(rest.onBlur, buffered.reset),\n type,\n }),\n inputRef as RefObject<HTMLInputElement | null>,\n );\n\n // Merge user-provided labelProps with aria labelProps\n const mergedLabelProps = mergeProps(labelProps, userLabelProps);\n\n const toggleType = () => {\n setType((type) => (type === 'password' ? 'text' : 'password'));\n };\n\n const wrappedSuffix = (\n <>\n {suffix}\n {/*\n The disabled state travels through the provider rather than as a prop on\n the action. Both disable it, but the provider marks the state as\n INHERITED from the field, and `current` paints from the colour it\n inherits — which a disabled field has already faded — so a second fade\n would multiply the two down to roughly a tenth opacity. No `type` is\n passed, so the `context` mod stays off and the toggle keeps its margins.\n */}\n <ItemActionProvider isDisabled={rest.isDisabled}>\n <ItemAction\n // No `type` — the default `current` type inherits the input's own text\n // color, so the toggle follows the field's theme, validation state and\n // disabled state rather than staying opaque against faded text.\n // A toggle button keeps one name and reports its state with\n // `aria-pressed`: pressed means the password is shown.\n tooltip={t('passwordInput.showPassword', 'Show password')}\n aria-pressed={type === 'text'}\n icon={type === 'password' ? <EyeInvisibleIcon /> : <EyeIcon />}\n onPress={toggleType}\n />\n </ItemActionProvider>\n </>\n );\n\n return (\n <TextInputBase\n ref={ref}\n labelProps={mergedLabelProps}\n inputProps={mergeProps(\n inputProps,\n { 'data-input-type': 'passwordinput' },\n userInputProps,\n )}\n inputRef={inputRef}\n inputStyles={{ paddingRight: '4x' }}\n type={type}\n suffixPosition=\"after\"\n suffix={wrappedSuffix}\n multiLine={multiLine}\n {...rest}\n {...displayedValidation.getDisplayedValidation(rest, validation)}\n />\n );\n}\n\n/**\n * PasswordInputs are password inputs that allow users to input passwords or code entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nconst _PasswordInput = forwardRef(PasswordInput);\n\n(_PasswordInput as any).cubeInputType = 'Text';\n_PasswordInput.displayName = 'PasswordInput';\n\nexport { _PasswordInput as PasswordInput };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","names":["ForwardedRef","forwardRef","RefObject","useRef","useState","AriaTextFieldProps","useTextField","useI18n","EyeIcon","EyeInvisibleIcon","chain","mergeProps","useBufferedValue","castNullableStringValue","WithNullableValue","withOverlayKeys","ItemAction","ItemActionProvider","useFieldProps","useDisplayedValidation","CubeBufferedValueProps","CubeTextInputBaseProps","TextInputBase","TextFieldKeyboardProps","CubePasswordInputProps","Omit","validate","PasswordInput","rawProps","ref","$","_c","t","t0","t1","Symbol","for","defaultValidationTrigger","showsValidateErrors","valuePropsMapper","_temp","props","type","setType","labelProps","userLabelProps","inputProps","userInputProps","suffix","multiLine","inputRef","propsInputRef","form","isBuffered","rest","localInputRef","buffered","value","onChange","isDisabled","isReadOnly","displayedValidation","validation","trackTouched","onBlur","reset","onKeyDown","HTMLInputElement","t2","mergedLabelProps","t3","_temp2","toggleType","t4","t5","t6","t7","t8","wrappedSuffix","t9","t10","paddingRight","getDisplayedValidation","type_0","toString","_PasswordInput","cubeInputType","displayName","_c","mergeProps"],"sources":["../../../../src/components/fields/PasswordInput/PasswordInput.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef, RefObject, useRef, useState } from 'react';\nimport { AriaTextFieldProps, useTextField } from 'react-aria';\n\nimport { useI18n } from '../../../i18n';\nimport { EyeIcon } from '../../../icons/EyeIcon';\nimport { EyeInvisibleIcon } from '../../../icons/EyeInvisibleIcon';\nimport { chain, mergeProps, useBufferedValue } from '../../../utils/react';\nimport {\n castNullableStringValue,\n WithNullableValue,\n} from '../../../utils/react/nullableValue';\nimport { withOverlayKeys } from '../../../utils/react/overlayKeyPropagation';\nimport { ItemAction } from '../../actions/ItemAction/ItemAction';\nimport { ItemActionProvider } from '../../actions/ItemActionContext';\nimport { useFieldProps } from '../../form';\nimport { useDisplayedValidation } from '../TextInput/displayed-validation';\nimport {\n CubeBufferedValueProps,\n CubeTextInputBaseProps,\n TextInputBase,\n} from '../TextInput/TextInputBase';\n\nimport type { TextFieldKeyboardProps } from '../../../shared/form';\n\nexport interface CubePasswordInputProps\n extends\n WithNullableValue<Omit<CubeTextInputBaseProps, 'validate'>>,\n CubeBufferedValueProps,\n TextFieldKeyboardProps {\n validate?: AriaTextFieldProps['validate'];\n}\n\nfunction PasswordInput(\n rawProps: CubePasswordInputProps,\n ref: ForwardedRef<HTMLElement>,\n) {\n const { t } = useI18n();\n\n rawProps = castNullableStringValue(rawProps);\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onBlur',\n showsValidateErrors: true,\n valuePropsMapper: ({ value, onChange }) => ({\n value: value?.toString() ?? '',\n onChange,\n }),\n });\n\n let [type, setType] = useState('password');\n let {\n labelProps: userLabelProps,\n inputProps: userInputProps,\n suffix,\n multiLine,\n inputRef: propsInputRef,\n // The form instance, not the DOM `form` id `useTextField` forwards.\n form,\n isBuffered,\n ...rest\n } = props;\n let localInputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n let inputRef = propsInputRef ?? localInputRef;\n\n // Hold the typed text locally until the controlled value catches up — see `useBufferedValue`.\n let buffered = useBufferedValue(rest.value, rest.onChange, {\n isBuffered,\n isDisabled: rest.isDisabled,\n isReadOnly: rest.isReadOnly,\n });\n\n let displayedValidation = useDisplayedValidation();\n let { labelProps, inputProps, ...validation } = useTextField(\n displayedValidation.trackTouched({\n ...rest,\n value: buffered.value,\n onChange: buffered.onChange,\n onBlur: chain(rest.onBlur, buffered.reset),\n onKeyDown: withOverlayKeys(rest.onKeyDown),\n type,\n }),\n inputRef as RefObject<HTMLInputElement | null>,\n );\n\n // Merge user-provided labelProps with aria labelProps\n const mergedLabelProps = mergeProps(labelProps, userLabelProps);\n\n const toggleType = () => {\n setType((type) => (type === 'password' ? 'text' : 'password'));\n };\n\n const wrappedSuffix = (\n <>\n {suffix}\n {/*\n The disabled state travels through the provider rather than as a prop on\n the action. Both disable it, but the provider marks the state as\n INHERITED from the field, and `current` paints from the colour it\n inherits — which a disabled field has already faded — so a second fade\n would multiply the two down to roughly a tenth opacity. No `type` is\n passed, so the `context` mod stays off and the toggle keeps its margins.\n */}\n <ItemActionProvider isDisabled={rest.isDisabled}>\n <ItemAction\n // No `type` — the default `current` type inherits the input's own text\n // color, so the toggle follows the field's theme, validation state and\n // disabled state rather than staying opaque against faded text.\n // A toggle button keeps one name and reports its state with\n // `aria-pressed`: pressed means the password is shown.\n tooltip={t('passwordInput.showPassword', 'Show password')}\n aria-pressed={type === 'text'}\n icon={type === 'password' ? <EyeInvisibleIcon /> : <EyeIcon />}\n onPress={toggleType}\n />\n </ItemActionProvider>\n </>\n );\n\n return (\n <TextInputBase\n ref={ref}\n labelProps={mergedLabelProps}\n inputProps={mergeProps(\n inputProps,\n { 'data-input-type': 'passwordinput' },\n userInputProps,\n )}\n inputRef={inputRef}\n inputStyles={{ paddingRight: '4x' }}\n type={type}\n suffixPosition=\"after\"\n suffix={wrappedSuffix}\n multiLine={multiLine}\n {...rest}\n {...displayedValidation.getDisplayedValidation(rest, validation)}\n />\n );\n}\n\n/**\n * PasswordInputs are password inputs that allow users to input passwords or code entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nconst _PasswordInput = forwardRef(PasswordInput);\n\n(_PasswordInput as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;CADiB,CAAA,CAYE,EAAA,CAAA;CAEvB,IAAAE;CAAA,IAAAjD,EAAA,QAAAgB,cAAAhB,EAAA,QAAAiB,gBAAA;EAMcgC,KAAApE,aACVmC,YACA,EAAA,mBAAqB,gBAAgB,GACrCC,cACF;EAACjB,EAAA,MAAAgB;EAAAhB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAiD;CAAA,OAAAA,KAAAjD,EAAA;CAAA,IAAAkD;CAAA,IAAAlD,EAAA,QAAAK,OAAAC,IAAA,2BAAA,GAAA;EAEY4C,MAAA,EAAAC,cAAgB,KAAK;EAACnD,EAAA,MAAAkD;CAAA,OAAAA,MAAAlD,EAAA;CAAA,OATrC,oBAAC,eAAD;EACOD;EACOwC,YAAAA;EACA,YAAAU;EAKF7B;EACG,aAAA8B;EACPtC;EACS,gBAAA;EACPoC,QAAAA;EACG7B;EAAS,GAChBK;EAAI,GACJO,oBAAmBqB,uBAAwB5B,MAAMQ,UAAU;CAAC,CAAA;AAChE;;;;;;AAtGN,SAAAS,OAAAY,QAAA;CAAA,OAuDuBzC,WAAS,aAAT,SAAA;AAAyC;AAvDhE,SAAAF,MAAAP,IAAA;CAUuB,MAAA,EAAAwB,OAAAC,aAAAzB;CAAmB,OAAM;EAAAwB,OACnCA,OAAK2B,SAAiB,KAAtB;EAAuB1B;CAEhC;AAAC;AAkGL,MAAM2B,iBAAiBpF,WAAW0B,aAAa;AAE/C,eAAwB2D,gBAAgB;AACxCD,eAAeE,cAAc"}
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { Text as _Text } from "../../content/Text.js";
|
|
4
4
|
import { isTextOnly } from "../../../utils/react/isTextOnly.js";
|
|
@@ -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-50fa86a | 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 { getDisabledElementProps, getInertInputProps } from "../../../utils/react/disabledProps.js";
|
|
@@ -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-50fa86a | 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 { castNullableStringValue } from "../../../utils/react/nullableValue.js";
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
//#region src/components/fields/RadioGroup/context.ts
|
|
4
4
|
const RadioContext = createContext(null);
|
|
@@ -47,8 +47,12 @@ export interface CubeSearchComboBoxProps<T> extends BasePropsWithoutChildren, Ba
|
|
|
47
47
|
/**
|
|
48
48
|
* Callback fired when a key is pressed on the input, before the built-in
|
|
49
49
|
* key handling. Receives React Aria's keyboard event: `e.preventDefault()`
|
|
50
|
-
* skips the built-in handling for the key
|
|
51
|
-
*
|
|
50
|
+
* skips the built-in handling for the key. `Escape` and `Tab` go on to
|
|
51
|
+
* ancestors, such as a surrounding dialog, unless SearchComboBox acts on
|
|
52
|
+
* them or the handler prevents them. It acts on `Escape` while the list is
|
|
53
|
+
* open or the input has text: it closes the list, or clears the text, or,
|
|
54
|
+
* when not clearable, keeps the browser from clearing it. Other keys stop
|
|
55
|
+
* at the input unless the handler calls `e.continuePropagation()`.
|
|
52
56
|
*/
|
|
53
57
|
onKeyDown?: TextFieldKeyboardProps['onKeyDown'];
|
|
54
58
|
/** Popover trigger behavior: 'focus', 'input', or 'manual'. Defaults to 'input' */
|
|
@@ -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-50fa86a | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
4
|
import { usePopoverSync } from "../../../utils/react/usePopoverSync.js";
|
|
@@ -11,6 +11,7 @@ import { useI18n } from "../../../i18n/useI18n.js";
|
|
|
11
11
|
import { DirectionIcon } from "../../../icons/DirectionIcon.js";
|
|
12
12
|
import { generateRandomId } from "../../../utils/random.js";
|
|
13
13
|
import { CloseIcon } from "../../../icons/CloseIcon.js";
|
|
14
|
+
import { settleOverlayKey } from "../../../utils/react/overlayKeyPropagation.js";
|
|
14
15
|
import { asksForFieldChrome, withFieldChrome } from "../../form/field-chrome.js";
|
|
15
16
|
import { getValidationMods } from "../../form/validation/resolve-validation-props.js";
|
|
16
17
|
import { useValidationProps } from "../../form/validation/use-validation-props.js";
|
|
@@ -299,8 +300,7 @@ const SearchComboBox = forwardRef(function SearchComboBox(props, ref) {
|
|
|
299
300
|
};
|
|
300
301
|
const { keyboardProps } = useKeyboard({ onKeyDown: (e_5) => {
|
|
301
302
|
onKeyDown?.(e_5);
|
|
302
|
-
if (e_5.isDefaultPrevented())
|
|
303
|
-
switch (e_5.key) {
|
|
303
|
+
if (!e_5.isDefaultPrevented()) switch (e_5.key) {
|
|
304
304
|
case "ArrowDown":
|
|
305
305
|
case "ArrowUp":
|
|
306
306
|
handleArrowKey(e_5);
|
|
@@ -314,6 +314,7 @@ const SearchComboBox = forwardRef(function SearchComboBox(props, ref) {
|
|
|
314
314
|
case "Home":
|
|
315
315
|
case "End": handleEdgeKey(e_5);
|
|
316
316
|
}
|
|
317
|
+
settleOverlayKey(e_5);
|
|
317
318
|
} });
|
|
318
319
|
if (icon === void 0) icon = /* @__PURE__ */ jsx(SearchIcon, {});
|
|
319
320
|
if (icon) {
|