@cube-dev/ui-kit 0.0.0-canary-8208bcd → 0.0.0-canary-5ab95cf
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/Root.js.map +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/Item.js.map +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/Layout.js.map +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 +9 -17
- package/dist/components/content/Tree/Tree.js.map +1 -1
- package/dist/components/content/Tree/TreeNode.js +6 -4
- package/dist/components/content/Tree/TreeNode.js.map +1 -1
- package/dist/components/content/Tree/styled.js +26 -6
- package/dist/components/content/Tree/styled.js.map +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/ItemTable/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/TableRow.js.map +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/TableView.js.map +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 +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/ComboBox/comboBoxOptions.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js.map +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 +47 -38
- package/dist/components/fields/DatePicker/DatePickerSegment.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +43 -19
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Select/Select.js.map +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +4 -6
- package/dist/components/fields/Slider/SliderBase.js.map +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.js +1 -1
- 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 +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js.map +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/Panel.js.map +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +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/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/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/Popover.js.map +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/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 +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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListBoxPopover.js","names":["getEventTarget","isFocusWithin","Key","Styles","tasty","React","CSSProperties","ReactNode","RefObject","useCallback","useEffect","useRef","useInteractOutside","useOverlay","useOverlayPosition","useEvent","useI18n","mergeProps","mergeRefs","DisplayTransition","useModalLayerRef","Portal","ListBox","ListBoxPopoverProps","isOpen","triggerRef","HTMLElement","popoverRef","HTMLDivElement","listBoxRef","direction","shouldFlip","overlayOffset","containerPadding","comboBoxWidth","listBoxId","overlayStyles","listBoxStyles","optionStyles","optionHighlight","sectionStyles","headingStyles","listGap","selectedKey","selectionMode","selectedKeys","isCheckable","shouldCloseOnTriggerInteraction","isDisabled","disabledKeys","Iterable","items","children","listStateRef","onSelectionChange","selection","onClose","label","ariaLabel","ariaLabelledby","compositeFocusProps","onFocus","e","FocusEvent","onBlur","filter","nodes","size","emptyLabel","positionTargetRef","Element","positionApiRef","updatePosition","CONTROL_SELECTOR","LAYER_SELECTOR","DISABLED_SELECTOR","isOutsideControl","el","trigger","control","closest","contains","matches","layer","ListBoxPopoverWrapper","qa","styles","position","zIndex","ListBoxPopoverElement","display","gridRows","gridColumns","width","height","overflow","fill","radius","shadow","padding","border","hide","hidden","boxSizing","transition","translate","transformOrigin","scale","opacity","ListBoxPopover","props","$","_c","t","t0","t1","t2","undefined","mergedPopoverRef","layerRef","overlayScrollRef","t3","t4","t5","t6","targetRef","overlayRef","scrollRef","placement","offset","overlayProps","overlayPositionProps","t7","style","t8","maxHeight","maxWidth","positionStyle","t10","t9","current","t11","menuTriggerEl","dismissEl","getOutsidePressBehavior","t12","el_0","behavior","setTimeout","t13","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","overlayBehaviorProps","t14","event","preventDefault","preserveOutsidePressFocus","t15","t16","ref","onInteractOutsideStart","onInteractOutside","t17","split","placementDirection","transitionRefHolder","t18","Symbol","for","node","setScrollRef","t19","t20","phase","isShown","isExiting","transitionRef","open","overlayContent","_c","mergeProps","mergeRefs"],"sources":["../../../../src/components/fields/ListBoxPopover/ListBoxPopover.tsx"],"sourcesContent":["import { getEventTarget, isFocusWithin } from '@react-aria/utils';\nimport { Key } from '@react-types/shared';\nimport { Styles, tasty } from '@tenphi/tasty';\nimport React, {\n CSSProperties,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n} from 'react';\nimport { useInteractOutside, useOverlay, useOverlayPosition } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks/use-event';\nimport { useI18n } from '../../../i18n';\nimport { mergeProps } from '../../../utils/react';\nimport { mergeRefs } from '../../../utils/react/useCombinedRefs';\nimport { DisplayTransition } from '../../helpers';\nimport { useModalLayerRef } from '../../overlays/Modal/modal-containment';\nimport { Portal } from '../../portal';\nimport { ListBox } from '../ListBox/ListBox';\n\nexport interface ListBoxPopoverProps {\n isOpen: boolean;\n triggerRef: RefObject<HTMLElement>;\n popoverRef: RefObject<HTMLDivElement>;\n listBoxRef: RefObject<HTMLDivElement>;\n direction: 'bottom' | 'top';\n shouldFlip: boolean;\n overlayOffset: number;\n containerPadding: number;\n /** Min width (px) for the overlay; usually the trigger's width. */\n comboBoxWidth?: number;\n /** Stable id used for the ListBox element and aria-controls wiring. */\n listBoxId: string;\n overlayStyles?: Styles;\n listBoxStyles?: Styles;\n optionStyles?: Styles;\n /** Substring to highlight within each option's (text) children. */\n optionHighlight?: string;\n sectionStyles?: Styles;\n headingStyles?: Styles;\n /** Space between options, in pixels. Defaults to a hairline (`$item-gap`, `1px`). */\n listGap?: number;\n selectedKey?: Key | null;\n /**\n * `'multiple'` lets the list hold several selected options. The list then\n * reports the whole new selection on every toggle and never closes itself;\n * the caller decides what a toggle means. Defaults to `'single'`.\n */\n selectionMode?: 'single' | 'multiple';\n /** The selected keys in `'multiple'` mode. Ignored in `'single'` mode. */\n selectedKeys?: Key[];\n /** Whether options show a checkbox. Only applies in `'multiple'` mode. */\n isCheckable?: boolean;\n /**\n * Whether a click inside the element `triggerRef` points at closes the\n * popover, like any other outside click. Pass `false` when that element is\n * where the user keeps working with the list open, such as an input that\n * picks several options in a row. Only this popover is affected; others\n * still close. Defaults to `true`.\n */\n shouldCloseOnTriggerInteraction?: boolean;\n isDisabled?: boolean;\n disabledKeys?: Iterable<Key>;\n items?: Iterable<any>;\n children: ReactNode;\n /** Ref through which the ListBox exposes its internal list state. */\n listStateRef: RefObject<any>;\n onSelectionChange: (selection: Key | Key[] | null) => void;\n onClose: () => void;\n label?: ReactNode;\n ariaLabel?: string;\n /**\n * Ids of the elements that name the field, read after `label` or\n * `ariaLabel`. Without either, they alone name the list, in place of the\n * generic \"Options\".\n */\n ariaLabelledby?: string;\n compositeFocusProps: {\n onFocus: (e: React.FocusEvent) => void;\n onBlur: (e: React.FocusEvent) => void;\n };\n /** Collection node filter applied to the ListBox. */\n filter?: (nodes: Iterable<any>) => Iterable<any>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n /**\n * Label shown when the list is empty (no items / no filter results).\n * Forwarded to the inner ListBox.\n */\n emptyLabel?: ReactNode;\n /**\n * Element to anchor the overlay to geometrically. Defaults to `triggerRef`.\n * Use this to anchor to something other than the trigger (e.g. the caret in\n * a textarea) while keeping `triggerRef` for outside-click/dismiss logic.\n */\n positionTargetRef?: RefObject<Element | null>;\n /**\n * Receives an imperative handle exposing `updatePosition()` so the caller can\n * force the overlay to re-anchor (e.g. when the caret moves).\n */\n positionApiRef?: RefObject<{ updatePosition: () => void } | null>;\n}\n\n// The controls an outside press reaches: a button, a link, a form control,\n// anything with `tabindex`, or something inside one.\nconst CONTROL_SELECTOR =\n 'button, a[href], input, select, textarea, [tabindex], [contenteditable]:not([contenteditable=\"false\"])';\n\n// The layer a field sits in: a dialog, popover or tray, otherwise the page.\nconst LAYER_SELECTOR =\n '[role=\"dialog\"], [role=\"alertdialog\"], [data-overlay-layer]';\n\nconst DISABLED_SELECTOR = ':disabled, [aria-disabled=\"true\"]';\n\n// An enabled control apart from the field, in the field's own layer. A press\n// anywhere else counts as blank space and keeps the field's focus and draft:\n// on the field itself, on a dialog's surface, on a disabled control, or\n// outside the field's layer, which stays open.\nfunction isOutsideControl(el: Element, trigger: HTMLElement | null) {\n const control = el.closest(CONTROL_SELECTOR);\n\n if (\n control == null ||\n trigger == null ||\n control.contains(trigger) ||\n trigger.contains(control) ||\n control.matches(`${LAYER_SELECTOR}, ${DISABLED_SELECTOR}`)\n ) {\n return false;\n }\n\n const layer = trigger.closest(LAYER_SELECTOR);\n\n return layer == null || layer.contains(control);\n}\n\nconst ListBoxPopoverWrapper = tasty({\n qa: 'ComboBoxOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n },\n});\n\nconst ListBoxPopoverElement = tasty({\n qa: 'ComboBoxOverlay',\n styles: {\n display: 'grid',\n gridRows: '1sf',\n gridColumns: '1sf',\n width: '$overlay-min-width max-content 50vw',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '0',\n border: '#border',\n hide: {\n '': false,\n hidden: true,\n },\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n\n '$overlay-min-width': 'min 30x',\n },\n});\n\nexport const ListBoxPopover = function ListBoxPopover(\n props: ListBoxPopoverProps,\n) {\n const { t } = useI18n();\n const {\n isOpen,\n triggerRef,\n popoverRef,\n listBoxRef,\n direction,\n shouldFlip,\n overlayOffset,\n containerPadding,\n comboBoxWidth,\n listBoxId,\n overlayStyles,\n listBoxStyles,\n optionStyles,\n optionHighlight,\n sectionStyles,\n headingStyles,\n listGap,\n selectedKey,\n selectionMode = 'single',\n selectedKeys,\n isCheckable,\n shouldCloseOnTriggerInteraction = true,\n isDisabled,\n disabledKeys,\n items,\n children,\n listStateRef,\n onSelectionChange,\n onClose,\n label,\n ariaLabel,\n ariaLabelledby,\n compositeFocusProps,\n filter,\n size = 'medium',\n emptyLabel,\n positionTargetRef,\n positionApiRef,\n } = props;\n\n const mergedPopoverRef = popoverRef;\n\n // Opened inside a modal, the list stays readable while the modal hides the\n // page.\n const layerRef = useModalLayerRef();\n\n // Ref to the inner scrollable element (the visible popover). react-aria\n // measures this for its flip/shrink math and writes maxHeight onto the\n // overlay (positioning wrapper); we forward that maxHeight to this element\n // below so the scroll container actually shrinks instead of overflowing.\n const overlayScrollRef = useRef<HTMLDivElement | null>(null);\n\n // Overlay positioning — anchor to the explicit position target when given\n // (e.g. a caret anchor), otherwise to the trigger. `triggerRef` is still\n // used below for outside-click/dismiss behavior.\n const {\n overlayProps: overlayPositionProps,\n placement,\n updatePosition,\n } = useOverlayPosition({\n targetRef: (positionTargetRef ?? triggerRef) as any,\n overlayRef: mergedPopoverRef as any,\n scrollRef: overlayScrollRef as any,\n placement: `${direction} start` as any,\n shouldFlip,\n isOpen,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n // Keep positioning (top/left/zIndex) on the wrapper, but split out the\n // available-space cap so it can be applied to the inner scroll element.\n const { maxHeight, maxWidth, ...positionStyle } =\n (overlayPositionProps.style ?? {}) as CSSProperties;\n\n // Expose updatePosition so callers can re-anchor on demand (e.g. caret move).\n useEffect(() => {\n if (positionApiRef) {\n positionApiRef.current = { updatePosition };\n }\n return () => {\n if (positionApiRef) {\n positionApiRef.current = null;\n }\n };\n }, [positionApiRef, updatePosition]);\n\n const getOutsidePressBehavior = (el: Element) => {\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (menuTriggerEl) {\n return menuTriggerEl === triggerRef.current ? 'consume' : 'ignore';\n }\n if (\n (!shouldCloseOnTriggerInteraction && triggerRef.current?.contains(el)) ||\n el.closest('[data-popover-keep]')\n ) {\n return 'ignore';\n }\n // The press reaches an outside control, so a checkbox toggles, a text\n // field takes focus and a native Save button saves on the first click.\n // A UI Kit Button passes from any layer, unless it is disabled.\n const dismissEl = el.closest('[data-popover-dismiss]');\n\n if (\n isOutsideControl(el, triggerRef.current) ||\n (dismissEl != null && !dismissEl.matches(DISABLED_SELECTOR))\n ) {\n return 'pass';\n }\n return 'consume';\n };\n\n // Overlay behavior (dismiss on outside click, escape)\n const { overlayProps: overlayBehaviorProps } = useOverlay(\n {\n onClose,\n shouldCloseOnBlur: true,\n isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n const behavior = getOutsidePressBehavior(el);\n if (behavior === 'pass') {\n // Leave the control's press intact and close after its action.\n setTimeout(onClose, 0);\n }\n return behavior === 'consume';\n },\n },\n mergedPopoverRef as any,\n );\n\n const preserveOutsidePressFocus = useEvent((event: PointerEvent) => {\n if (\n (isFocusWithin(triggerRef.current) ||\n isFocusWithin(mergedPopoverRef.current)) &&\n getOutsidePressBehavior(getEventTarget(event) as Element) === 'consume'\n ) {\n event.preventDefault();\n }\n });\n\n // Aria now permits outside presses to move focus. A passed press moves it\n // to its control, and the field settles its draft on blur, as on Tab. A\n // consumed press, such as one on blank space or a dialog's backdrop, must\n // only dismiss this list: the field keeps focus and its draft.\n useInteractOutside({\n ref: mergedPopoverRef,\n isDisabled: !isOpen,\n onInteractOutsideStart: preserveOutsidePressFocus,\n onInteractOutside: preserveOutsidePressFocus,\n });\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || direction;\n\n // Hold the DisplayTransition ref so we can bind the same node to both the\n // transition listener and our scroll ref via a single stable callback.\n const transitionRefHolder = useRef<\n ((node: HTMLElement | null) => void) | null\n >(null);\n const setScrollRef = useCallback((node: HTMLElement | null) => {\n overlayScrollRef.current = node as HTMLDivElement | null;\n transitionRefHolder.current?.(node);\n }, []);\n\n const overlayContent = (\n <DisplayTransition isShown={isOpen}>\n {({ phase, isShown, isExiting, ref: transitionRef }) => {\n transitionRefHolder.current = transitionRef;\n return (\n <ListBoxPopoverWrapper\n {...mergeProps(\n { ...overlayPositionProps, style: positionStyle },\n overlayBehaviorProps,\n compositeFocusProps,\n )}\n ref={mergeRefs(mergedPopoverRef, layerRef)}\n // oxlint-disable-next-line react/forbid-component-props -- React Aria's overlay positioning computes these coordinates\n style={positionStyle}\n // A press on the list while it fades out must not close the\n // overlay under it (CUB-5293) — see `Overlay`.\n data-react-aria-top-layer={isExiting || undefined}\n >\n <ListBoxPopoverElement\n ref={setScrollRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n hidden: phase === 'unmounted',\n }}\n styles={overlayStyles}\n tokens={{\n '$overlay-min-width': comboBoxWidth\n ? `${comboBoxWidth}px`\n : undefined,\n }}\n // oxlint-disable-next-line react/forbid-component-props -- React Aria's overlay positioning computes the space left\n style={{ maxHeight, maxWidth }}\n >\n <ListBox\n isBare\n ref={listBoxRef}\n disableSelectionToggle\n id={listBoxId}\n aria-label={\n ariaLabel ||\n (typeof label === 'string'\n ? label\n : ariaLabelledby\n ? undefined\n : t('listBoxPopover.options', 'Options'))\n }\n aria-labelledby={ariaLabelledby}\n selectionMode={selectionMode}\n selectedKey={\n selectionMode === 'single' ? selectedKey : undefined\n }\n selectedKeys={\n selectionMode === 'multiple' ? selectedKeys : undefined\n }\n isCheckable={\n selectionMode === 'multiple' ? isCheckable : undefined\n }\n isDisabled={isDisabled}\n disabledKeys={disabledKeys}\n // As in Select: a large field opens large options, a small\n // one medium options, which stay easy to pick.\n size={size === 'large' ? 'large' : 'medium'}\n shouldUseVirtualFocus={true}\n items={items as any}\n filter={filter}\n styles={listBoxStyles}\n optionStyles={optionStyles}\n optionHighlight={optionHighlight}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n listGap={listGap}\n stateRef={listStateRef}\n shape=\"popover\"\n emptyLabel={emptyLabel}\n onSelectionChange={onSelectionChange}\n >\n {children as any}\n </ListBox>\n </ListBoxPopoverElement>\n </ListBoxPopoverWrapper>\n );\n }}\n </DisplayTransition>\n );\n\n return <Portal>{overlayContent}</Portal>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AA0GA,MAAMyE,mBACJ;AAGF,MAAMC,iBACJ;AAEF,MAAMC,oBAAoB;AAM1B,SAASC,iBAAiBC,IAAaC,SAA6B;CAClE,MAAMC,UAAUF,GAAGG,QAAQP,gBAAgB;CAE3C,IACE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AAA;GACzBoJ,UAAAA;EADe,CAsFJO,EAAF,CAAA;EAA0BpE,EAAA,MAAAvF;EAAAuF,EAAA,MAAA6D;EAAA7D,EAAA,MAAA8D;CAAA,OAAAA,MAAA9D,EAAA;CAAA,OAAjC8D;AAAiC"}
|
|
1
|
+
{"version":3,"file":"ListBoxPopover.js","names":["getEventTarget","isFocusWithin","Key","Styles","tasty","React","CSSProperties","ReactNode","RefObject","useCallback","useEffect","useRef","useInteractOutside","useOverlay","useOverlayPosition","useEvent","useI18n","mergeProps","mergeRefs","DisplayTransition","useModalLayerRef","Portal","ListBox","ListBoxPopoverProps","isOpen","triggerRef","HTMLElement","popoverRef","HTMLDivElement","listBoxRef","direction","shouldFlip","overlayOffset","containerPadding","comboBoxWidth","listBoxId","overlayStyles","listBoxStyles","optionStyles","optionHighlight","sectionStyles","headingStyles","listGap","selectedKey","selectionMode","selectedKeys","isCheckable","shouldCloseOnTriggerInteraction","isDisabled","disabledKeys","Iterable","items","children","listStateRef","onSelectionChange","selection","onClose","label","ariaLabel","ariaLabelledby","compositeFocusProps","onFocus","e","FocusEvent","onBlur","filter","nodes","size","emptyLabel","positionTargetRef","Element","positionApiRef","updatePosition","CONTROL_SELECTOR","LAYER_SELECTOR","DISABLED_SELECTOR","isOutsideControl","el","trigger","control","closest","contains","matches","layer","ListBoxPopoverWrapper","qa","styles","position","zIndex","ListBoxPopoverElement","display","gridRows","gridColumns","width","height","overflow","fill","radius","shadow","padding","border","hide","hidden","boxSizing","transition","translate","transformOrigin","scale","opacity","ListBoxPopover","props","$","_c","t","t0","t1","t2","undefined","mergedPopoverRef","layerRef","overlayScrollRef","t3","t4","t5","t6","targetRef","overlayRef","scrollRef","placement","offset","overlayProps","overlayPositionProps","t7","style","t8","maxHeight","maxWidth","positionStyle","t10","t9","current","t11","menuTriggerEl","dismissEl","getOutsidePressBehavior","t12","el_0","behavior","setTimeout","t13","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","overlayBehaviorProps","t14","event","preventDefault","preserveOutsidePressFocus","t15","t16","ref","onInteractOutsideStart","onInteractOutside","t17","split","placementDirection","transitionRefHolder","t18","Symbol","for","node","setScrollRef","t19","t20","phase","isShown","isExiting","transitionRef","open","overlayContent","_c","mergeProps","mergeRefs"],"sources":["../../../../src/components/fields/ListBoxPopover/ListBoxPopover.tsx"],"sourcesContent":["import { getEventTarget, isFocusWithin } from '@react-aria/utils';\nimport { Key } from '@react-types/shared';\nimport { Styles, tasty } from '@tenphi/tasty';\nimport React, {\n CSSProperties,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n} from 'react';\nimport { useInteractOutside, useOverlay, useOverlayPosition } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks/use-event';\nimport { useI18n } from '../../../i18n';\nimport { mergeProps } from '../../../utils/react';\nimport { mergeRefs } from '../../../utils/react/useCombinedRefs';\nimport { DisplayTransition } from '../../helpers';\nimport { useModalLayerRef } from '../../overlays/Modal/modal-containment';\nimport { Portal } from '../../portal';\nimport { ListBox } from '../ListBox/ListBox';\n\nexport interface ListBoxPopoverProps {\n isOpen: boolean;\n triggerRef: RefObject<HTMLElement>;\n popoverRef: RefObject<HTMLDivElement>;\n listBoxRef: RefObject<HTMLDivElement>;\n direction: 'bottom' | 'top';\n shouldFlip: boolean;\n overlayOffset: number;\n containerPadding: number;\n /** Min width (px) for the overlay; usually the trigger's width. */\n comboBoxWidth?: number;\n /** Stable id used for the ListBox element and aria-controls wiring. */\n listBoxId: string;\n overlayStyles?: Styles;\n listBoxStyles?: Styles;\n optionStyles?: Styles;\n /** Substring to highlight within each option's (text) children. */\n optionHighlight?: string;\n sectionStyles?: Styles;\n headingStyles?: Styles;\n /** Space between options, in pixels. Defaults to a hairline (`$item-gap`, `1px`). */\n listGap?: number;\n selectedKey?: Key | null;\n /**\n * `'multiple'` lets the list hold several selected options. The list then\n * reports the whole new selection on every toggle and never closes itself;\n * the caller decides what a toggle means. Defaults to `'single'`.\n */\n selectionMode?: 'single' | 'multiple';\n /** The selected keys in `'multiple'` mode. Ignored in `'single'` mode. */\n selectedKeys?: Key[];\n /** Whether options show a checkbox. Only applies in `'multiple'` mode. */\n isCheckable?: boolean;\n /**\n * Whether a click inside the element `triggerRef` points at closes the\n * popover, like any other outside click. Pass `false` when that element is\n * where the user keeps working with the list open, such as an input that\n * picks several options in a row. Only this popover is affected; others\n * still close. Defaults to `true`.\n */\n shouldCloseOnTriggerInteraction?: boolean;\n isDisabled?: boolean;\n disabledKeys?: Iterable<Key>;\n items?: Iterable<any>;\n children: ReactNode;\n /** Ref through which the ListBox exposes its internal list state. */\n listStateRef: RefObject<any>;\n onSelectionChange: (selection: Key | Key[] | null) => void;\n onClose: () => void;\n label?: ReactNode;\n ariaLabel?: string;\n /**\n * Ids of the elements that name the field, read after `label` or\n * `ariaLabel`. Without either, they alone name the list, in place of the\n * generic \"Options\".\n */\n ariaLabelledby?: string;\n compositeFocusProps: {\n onFocus: (e: React.FocusEvent) => void;\n onBlur: (e: React.FocusEvent) => void;\n };\n /** Collection node filter applied to the ListBox. */\n filter?: (nodes: Iterable<any>) => Iterable<any>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n /**\n * Label shown when the list is empty (no items / no filter results).\n * Forwarded to the inner ListBox.\n */\n emptyLabel?: ReactNode;\n /**\n * Element to anchor the overlay to geometrically. Defaults to `triggerRef`.\n * Use this to anchor to something other than the trigger (e.g. the caret in\n * a textarea) while keeping `triggerRef` for outside-click/dismiss logic.\n */\n positionTargetRef?: RefObject<Element | null>;\n /**\n * Receives an imperative handle exposing `updatePosition()` so the caller can\n * force the overlay to re-anchor (e.g. when the caret moves).\n */\n positionApiRef?: RefObject<{ updatePosition: () => void } | null>;\n}\n\n// The controls an outside press reaches: a button, a link, a form control,\n// anything with `tabindex`, or something inside one.\nconst CONTROL_SELECTOR =\n 'button, a[href], input, select, textarea, [tabindex], [contenteditable]:not([contenteditable=\"false\"])';\n\n// The layer a field sits in: a dialog, popover or tray, otherwise the page.\nconst LAYER_SELECTOR =\n '[role=\"dialog\"], [role=\"alertdialog\"], [data-overlay-layer]';\n\nconst DISABLED_SELECTOR = ':disabled, [aria-disabled=\"true\"]';\n\n// An enabled control apart from the field, in the field's own layer. A press\n// anywhere else counts as blank space and keeps the field's focus and draft:\n// on the field itself, on a dialog's surface, on a disabled control, or\n// outside the field's layer, which stays open.\nfunction isOutsideControl(el: Element, trigger: HTMLElement | null) {\n const control = el.closest(CONTROL_SELECTOR);\n\n if (\n control == null ||\n trigger == null ||\n control.contains(trigger) ||\n trigger.contains(control) ||\n control.matches(`${LAYER_SELECTOR}, ${DISABLED_SELECTOR}`)\n ) {\n return false;\n }\n\n const layer = trigger.closest(LAYER_SELECTOR);\n\n return layer == null || layer.contains(control);\n}\n\nconst ListBoxPopoverWrapper = tasty({\n qa: 'ComboBoxOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n },\n});\n\nconst ListBoxPopoverElement = tasty({\n qa: 'ComboBoxOverlay',\n styles: {\n display: 'grid',\n gridRows: '1sf',\n gridColumns: '1sf',\n width: '$overlay-min-width max-content 50vw',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '0',\n border: '#border',\n hide: {\n '': false,\n hidden: true,\n },\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n\n '$overlay-min-width': 'min 30x',\n },\n});\n\nexport const ListBoxPopover = function ListBoxPopover(\n props: ListBoxPopoverProps,\n) {\n const { t } = useI18n();\n const {\n isOpen,\n triggerRef,\n popoverRef,\n listBoxRef,\n direction,\n shouldFlip,\n overlayOffset,\n containerPadding,\n comboBoxWidth,\n listBoxId,\n overlayStyles,\n listBoxStyles,\n optionStyles,\n optionHighlight,\n sectionStyles,\n headingStyles,\n listGap,\n selectedKey,\n selectionMode = 'single',\n selectedKeys,\n isCheckable,\n shouldCloseOnTriggerInteraction = true,\n isDisabled,\n disabledKeys,\n items,\n children,\n listStateRef,\n onSelectionChange,\n onClose,\n label,\n ariaLabel,\n ariaLabelledby,\n compositeFocusProps,\n filter,\n size = 'medium',\n emptyLabel,\n positionTargetRef,\n positionApiRef,\n } = props;\n\n const mergedPopoverRef = popoverRef;\n\n // Opened inside a modal, the list stays readable while the modal hides the\n // page.\n const layerRef = useModalLayerRef();\n\n // Ref to the inner scrollable element (the visible popover). react-aria\n // measures this for its flip/shrink math and writes maxHeight onto the\n // overlay (positioning wrapper); we forward that maxHeight to this element\n // below so the scroll container actually shrinks instead of overflowing.\n const overlayScrollRef = useRef<HTMLDivElement | null>(null);\n\n // Overlay positioning — anchor to the explicit position target when given\n // (e.g. a caret anchor), otherwise to the trigger. `triggerRef` is still\n // used below for outside-click/dismiss behavior.\n const {\n overlayProps: overlayPositionProps,\n placement,\n updatePosition,\n } = useOverlayPosition({\n targetRef: (positionTargetRef ?? triggerRef) as any,\n overlayRef: mergedPopoverRef as any,\n scrollRef: overlayScrollRef as any,\n placement: `${direction} start` as any,\n shouldFlip,\n isOpen,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n // Keep positioning (top/left/zIndex) on the wrapper, but split out the\n // available-space cap so it can be applied to the inner scroll element.\n const { maxHeight, maxWidth, ...positionStyle } =\n (overlayPositionProps.style ?? {}) as CSSProperties;\n\n // Expose updatePosition so callers can re-anchor on demand (e.g. caret move).\n useEffect(() => {\n if (positionApiRef) {\n positionApiRef.current = { updatePosition };\n }\n return () => {\n if (positionApiRef) {\n positionApiRef.current = null;\n }\n };\n }, [positionApiRef, updatePosition]);\n\n const getOutsidePressBehavior = (el: Element) => {\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (menuTriggerEl) {\n return menuTriggerEl === triggerRef.current ? 'consume' : 'ignore';\n }\n if (\n (!shouldCloseOnTriggerInteraction && triggerRef.current?.contains(el)) ||\n el.closest('[data-popover-keep]')\n ) {\n return 'ignore';\n }\n // The press reaches an outside control, so a checkbox toggles, a text\n // field takes focus and a native Save button saves on the first click.\n // A UI Kit Button passes from any layer, unless it is disabled.\n const dismissEl = el.closest('[data-popover-dismiss]');\n\n if (\n isOutsideControl(el, triggerRef.current) ||\n (dismissEl != null && !dismissEl.matches(DISABLED_SELECTOR))\n ) {\n return 'pass';\n }\n return 'consume';\n };\n\n // Overlay behavior (dismiss on outside click, escape)\n const { overlayProps: overlayBehaviorProps } = useOverlay(\n {\n onClose,\n shouldCloseOnBlur: true,\n isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n const behavior = getOutsidePressBehavior(el);\n if (behavior === 'pass') {\n // Leave the control's press intact and close after its action.\n setTimeout(onClose, 0);\n }\n return behavior === 'consume';\n },\n },\n mergedPopoverRef as any,\n );\n\n const preserveOutsidePressFocus = useEvent((event: PointerEvent) => {\n if (\n (isFocusWithin(triggerRef.current) ||\n isFocusWithin(mergedPopoverRef.current)) &&\n getOutsidePressBehavior(getEventTarget(event) as Element) === 'consume'\n ) {\n event.preventDefault();\n }\n });\n\n // Aria now permits outside presses to move focus. A passed press moves it\n // to its control, and the field settles its draft on blur, as on Tab. A\n // consumed press, such as one on blank space or a dialog's backdrop, must\n // only dismiss this list: the field keeps focus and its draft.\n useInteractOutside({\n ref: mergedPopoverRef,\n isDisabled: !isOpen,\n onInteractOutsideStart: preserveOutsidePressFocus,\n onInteractOutside: preserveOutsidePressFocus,\n });\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || direction;\n\n // Hold the DisplayTransition ref so we can bind the same node to both the\n // transition listener and our scroll ref via a single stable callback.\n const transitionRefHolder = useRef<\n ((node: HTMLElement | null) => void) | null\n >(null);\n const setScrollRef = useCallback((node: HTMLElement | null) => {\n overlayScrollRef.current = node as HTMLDivElement | null;\n transitionRefHolder.current?.(node);\n }, []);\n\n const overlayContent = (\n <DisplayTransition isShown={isOpen}>\n {({ phase, isShown, isExiting, ref: transitionRef }) => {\n transitionRefHolder.current = transitionRef;\n return (\n <ListBoxPopoverWrapper\n {...mergeProps(\n { ...overlayPositionProps, style: positionStyle },\n overlayBehaviorProps,\n compositeFocusProps,\n )}\n ref={mergeRefs(mergedPopoverRef, layerRef)}\n // oxlint-disable-next-line react/forbid-component-props, tasty/no-style-prop -- React Aria's overlay positioning computes these coordinates\n style={positionStyle}\n // A press on the list while it fades out must not close the\n // overlay under it (CUB-5293) — see `Overlay`.\n data-react-aria-top-layer={isExiting || undefined}\n >\n <ListBoxPopoverElement\n ref={setScrollRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n hidden: phase === 'unmounted',\n }}\n styles={overlayStyles}\n tokens={{\n '$overlay-min-width': comboBoxWidth\n ? `${comboBoxWidth}px`\n : undefined,\n }}\n // oxlint-disable-next-line react/forbid-component-props, tasty/no-style-prop -- React Aria's overlay positioning computes the space left once it has measured; inline, it overrides whatever max size the merged styles give, without restating their defaults\n style={{ maxHeight, maxWidth }}\n >\n <ListBox\n isBare\n ref={listBoxRef}\n disableSelectionToggle\n id={listBoxId}\n aria-label={\n ariaLabel ||\n (typeof label === 'string'\n ? label\n : ariaLabelledby\n ? undefined\n : t('listBoxPopover.options', 'Options'))\n }\n aria-labelledby={ariaLabelledby}\n selectionMode={selectionMode}\n selectedKey={\n selectionMode === 'single' ? selectedKey : undefined\n }\n selectedKeys={\n selectionMode === 'multiple' ? selectedKeys : undefined\n }\n isCheckable={\n selectionMode === 'multiple' ? isCheckable : undefined\n }\n isDisabled={isDisabled}\n disabledKeys={disabledKeys}\n // As in Select: a large field opens large options, a small\n // one medium options, which stay easy to pick.\n size={size === 'large' ? 'large' : 'medium'}\n shouldUseVirtualFocus={true}\n items={items as any}\n filter={filter}\n styles={listBoxStyles}\n optionStyles={optionStyles}\n optionHighlight={optionHighlight}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n listGap={listGap}\n stateRef={listStateRef}\n shape=\"popover\"\n emptyLabel={emptyLabel}\n onSelectionChange={onSelectionChange}\n >\n {children as any}\n </ListBox>\n </ListBoxPopoverElement>\n </ListBoxPopoverWrapper>\n );\n }}\n </DisplayTransition>\n );\n\n return <Portal>{overlayContent}</Portal>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AA0GA,MAAMyE,mBACJ;AAGF,MAAMC,iBACJ;AAEF,MAAMC,oBAAoB;AAM1B,SAASC,iBAAiBC,IAAaC,SAA6B;CAClE,MAAMC,UAAUF,GAAGG,QAAQP,gBAAgB;CAE3C,IACEM,WAAW,QACXD,WAAW,QACXC,QAAQE,SAASH,OAAO,KACxBA,QAAQG,SAASF,OAAO,KACxBA,QAAQG,QAAQ,GAAGR,eAAc,IAAKC,mBAAmB,GAEzD,OAAO;CAGT,MAAMQ,QAAQL,QAAQE,QAAQN,cAAc;CAE5C,OAAOS,SAAS,QAAQA,MAAMF,SAASF,OAAO;AAChD;AAEA,MAAMK,wBAAwBhF,MAAM;CAClCiF,IAAI;CACJC,QAAQ;EACNC,UAAU;EACVC,QAAQ;CACV;AACF,CAAC;AAED,MAAMC,wBAAwBrF,MAAM;CAClCiF,IAAI;CACJC,QAAQ;EACNI,SAAS;EACTC,UAAU;EACVC,aAAa;EACbC,OAAO;EACPC,QAAQ;EACRC,UAAU;EACVC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,MAAM;GACJ,IAAI;GACJC,QAAQ;EACV;EACAC,WAAW;EACXC,YACE;EACFC,WAAW;GACT,IAAI;GACJ,mCAAiC;GACjC,oCAAkC;GAClC,4DAA0D;GAC1D,6DAA2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D,EAAA,MAAAwB;EAAAxB,EAAA,MAAAyB;EAAAzB,EAAA,MAAAO;EAAAP,EAAA,MAAAzD;EAAAyD,EAAA,MAAAxE;EAAAwE,EAAA,MAAAzE;EAAAyE,EAAA,MAAA0C;EAAA1C,EAAA,MAAAoB;EAAApB,EAAA,MAAA3E;EAAA2E,EAAA,MAAAsD;EAAAtD,EAAA,MAAA0B;EAAA1B,EAAA,MAAAvE;EAAAuE,EAAA,MAAApE;EAAAoE,EAAA,MAAAlE;EAAAkE,EAAA,MAAAnE;EAAAmE,EAAA,MAAA5C;EAAA4C,EAAA,MAAAE;EAAAF,EAAA,MAAA6D;CAAA,OAAAA,MAAA7D,EAAA;CAAA,IAAA8D;CAAA,IAAA9D,EAAA,QAAAvF,UAAAuF,EAAA,QAAA6D,KAAA;EAIEC,MAAA,oBAAC,QAAD,EAAA,UAASM,oBAtFb,mBAAD;GAA4B3J,SAAAA;GACzBoJ,UAAAA;EADe,CAsFJO,EAAF,CAAA;EAA0BpE,EAAA,MAAAvF;EAAAuF,EAAA,MAAA6D;EAAA7D,EAAA,MAAA8D;CAAA,OAAAA,MAAA9D,EAAA;CAAA,OAAjC8D;AAAiC"}
|
|
@@ -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-5ab95cf | 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-5ab95cf | 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,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-5ab95cf | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
3
3
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
4
4
|
import { castNullableNumberValue } 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-5ab95cf | 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-5ab95cf | 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";
|
|
@@ -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-5ab95cf | 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-5ab95cf | 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, omitActivationEventProps } 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-5ab95cf | 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-5ab95cf | 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);
|
|
@@ -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-5ab95cf | 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";
|
|
@@ -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-5ab95cf | 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";
|
|
@@ -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-5ab95cf | Cube Dev Team */
|
|
2
2
|
import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { Text as _Text } from "../../content/Text.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":["AriaLabelingProps","CollectionBase","Key","BASE_STYLES","BasePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","OUTER_STYLES","OuterStyleProps","Styles","tasty","React","cloneElement","ForwardedRef","forwardRef","ForwardRefRenderFunction","KeyboardEvent","ReactElement","ReactNode","RefObject","useEffect","useEffectEvent","useLayoutEffect","useMemo","useRef","useState","AriaSelectProps","DismissButton","FocusScope","HiddenSelect","useButton","useHover","useListBox","useListBoxSection","useOption","useOverlay","useOverlayPosition","useSelect","Section","BaseSection","SelectState","useSelectState","useI18n","CloseIcon","DirectionIcon","LoadingIcon","FieldBaseProps","generateRandomId","mergeProps","useCombinedRefs","useFocus","focusProgrammatically","mergeRefs","useOverlayEscapeGuard","usePopoverSync","extractStyles","mergeStyleLayers","isOwnActionsPress","ItemAction","ItemActionsWrapper","StyledDivider","ListDivider","StyledSectionHeading","ListSectionHeading","StyledSection","ListSectionWrapper","CollectionItem","filterCollectionItemProps","filterSelectionItemProps","getValueSelectionState","CubeItemProps","Item","Text","getValidationIcon","getValidationMods","useFieldProps","wrapWithField","DisplayTransition","useModalLayerRef","CubeTooltipProviderProps","Portal","useOptionOriginPress","TriggerActions","TriggerIcon","Placement","Props","SelectWrapperElement","qa","styles","display","position","radius","fill","disabled","color","focused","invalid","ListBoxElement","as","section","gap","sections","flow","margin","padding","listStyle","overflow","scrollbar","outline","OptionItem","disableActionsFocus","SelectOverlayWrapper","zIndex","OverlayElement","width","gridRows","height","shadow","border","boxSizing","transition","translate","transformOrigin","scale","opacity","CubeSelectBaseProps","T","Omit","selectedKey","defaultSelectedKey","onSelectionChange","key","icon","rightIcon","prefix","suffix","triggerDescription","descriptionPlacement","hotkeys","tooltip","auto","triggerRef","HTMLButtonElement","isLoading","loadingIndicator","overlayOffset","hideTrigger","inputStyles","optionStyles","triggerStyles","listBoxStyles","listGap","overlayStyles","direction","targetRef","HTMLElement","placement","shouldFlip","containerPadding","inputProps","type","shape","suffixPosition","theme","isClearable","clearLabel","onClear","actions","onOpenChange","isOpen","CubeSelectProps","popoverRef","listBoxRef","size","placeholder","PROP_STYLES","ignore","lockSelectState","state","S","open","toggle","setSelectedKey","setValue","Select","rawProps","ref","HTMLDivElement","props","defaultValidationTrigger","valuePropsMapper","value","onChange","label","extra","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","autoFocus","triggerRefProp","message","placementProp","labelSuffix","form","otherProps","t","isLocked","isReadOnly","selectId","isInert","closeList","close","menuId","onClose","containerRef","popover","current","active","document","activeElement","contains","preventScroll","labelProps","triggerProps","valueProps","menuProps","undefined","overlayProps","overlayRef","scrollRef","offset","isFocused","focusProps","hoverProps","isHovered","buttonProps","validationIcon","hasSelection","selectedItem","showClearButton","clearValue","triggerWidth","setTriggerWidth","offsetWidth","loadingIcon","showPlaceholder","trim","modifiers","loading","hovered","hasCustomRightIcon","triggerRightIcon","hasTriggerActions","triggerActions","pressed","selectField","name","showActions","skipActionsWidthTransition","rendered","ListBoxPopup","t0","$","_c","minWidth","parentOverlayProps","t1","t2","shouldUseVirtualFocus","t3","t4","el","menuTriggerEl","closest","setTimeout","t5","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","rawOverlayProps","layerRef","t6","split","placementDirection","t7","t8","t9","phase","isShown","isExiting","transitionRef","style","getEdgeOptionKey","edge","keys","collection","getKeys","reverse","find","getItem","selectionManager","canSelectItem","getOpeningFocusKey","focusStrategy","scrollIntoList","list","option","top","node","offsetParent","offsetTop","bottom","offsetHeight","scrollTop","clientHeight","focusOpeningOption","manager","setFocused","setFocusedKey","Array","from","querySelectorAll","element","dataset","String","focus","SelectListBox","listItemSize","listGapTokens","listBoxProps","focusOnOpen","Symbol","for","hasSections","renderedItems","item","push","Option","disabledKeys","has","isSelected","isVirtualFocused","focusedKey","shouldSelectOnPressUp","shouldFocusOnHover","optionProps","isPressed","descriptionProps","originPress","onPointerUp","ariaOptionProps","filteredItemProps","keyboardProps","onKeyDown","event","ctrlKey","target","currentTarget","preventDefault","T0","onPointerDown","wrapPointerUp","listboxitem","selected","SelectSectionProps","headingStyles","sectionStyles","SelectSection","heading","itemProps","headingProps","groupProps","childNodes","filter","map","node_0","_Select","cubeInputType","SectionComponent","SelectSectionComponent","Object","assign","displayName","__Select","Action","Item","useFocus","TriggerIcon","mergeProps","Text","_c","ListDivider","ListSectionHeading","ListSectionWrapper","BaseSection","CollectionItem"],"sources":["../../../../src/components/fields/Select/Select.tsx"],"sourcesContent":["import { AriaLabelingProps, CollectionBase, Key } from '@react-types/shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport React, {\n cloneElement,\n ForwardedRef,\n forwardRef,\n ForwardRefRenderFunction,\n KeyboardEvent,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useEffectEvent,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n AriaSelectProps,\n DismissButton,\n FocusScope,\n HiddenSelect,\n useButton,\n useHover,\n useListBox,\n useListBoxSection,\n useOption,\n useOverlay,\n useOverlayPosition,\n useSelect,\n} from 'react-aria';\nimport {\n Section as BaseSection,\n SelectState,\n useSelectState,\n} from 'react-stately';\n\nimport { useI18n } from '../../../i18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { FieldBaseProps } from '../../../shared/index';\nimport { generateRandomId } from '../../../utils/random';\nimport { mergeProps, useCombinedRefs } from '../../../utils/react/index';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { focusProgrammatically } from '../../../utils/react/programmaticFocus';\nimport { mergeRefs } from '../../../utils/react/useCombinedRefs';\nimport { useOverlayEscapeGuard } from '../../../utils/react/useOverlayEscapeGuard';\nimport { usePopoverSync } from '../../../utils/react/usePopoverSync';\nimport { extractStyles, mergeStyleLayers } from '../../../utils/styles';\nimport { isOwnActionsPress } from '../../actions/actions-run';\nimport { ItemAction } from '../../actions/ItemAction/ItemAction';\nimport { ItemActionsWrapper } from '../../actions/ItemActionsWrapper';\nimport {\n StyledDivider as ListDivider,\n StyledSectionHeading as ListSectionHeading,\n StyledSection as ListSectionWrapper,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n filterCollectionItemProps,\n filterSelectionItemProps,\n getValueSelectionState,\n} from '../../CollectionItem';\nimport { CubeItemProps, Item } from '../../content/Item';\nimport { Text } from '../../content/Text';\nimport {\n getValidationIcon,\n getValidationMods,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { DisplayTransition } from '../../helpers';\nimport { useModalLayerRef } from '../../overlays/Modal/modal-containment';\nimport { CubeTooltipProviderProps } from '../../overlays/Tooltip/TooltipProvider';\nimport { Portal } from '../../portal';\nimport { useOptionOriginPress } from '../option-origin-press';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport type { Placement } from 'react-aria';\nimport type { Props } from '../../../props';\n\nconst SelectWrapperElement = tasty({\n qa: 'SelectWrapper',\n styles: {\n display: 'grid',\n position: 'relative',\n radius: true,\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n 'theme=special': '#clear',\n },\n color: {\n '': '#dark.85',\n focused: '#dark.85',\n invalid: '#danger-text',\n disabled: '#disabled-surface-text',\n },\n },\n});\n\nexport const ListBoxElement = tasty({\n qa: 'ListBox',\n as: 'ul',\n styles: {\n // Set from `listGap`. A section's list inherits it from the popup's.\n '$list-gap': { '': '$item-gap', section: false },\n display: 'flex',\n // It spaces options: sections and dividers keep a hairline.\n gap: { '': '$list-gap', sections: '$item-gap' },\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n // The popup's list is the scroll container and the element its height\n // limit lands on, so React Aria's page navigation measures what is\n // actually visible. A section's list grows with its options.\n overflow: { '': 'auto', section: false },\n // Options measure their scroll offset against the list.\n position: 'relative',\n scrollbar: 'styled',\n // The listbox is programmatically focused when the popover opens\n // (so keyboard nav works immediately) but it should never display a\n // focus ring — only the focused option does. Without this, the\n // browser draws its native outline around the whole listbox when\n // it receives focus.\n outline: 0,\n },\n});\n\n// Use Item for options to unify item visuals and reduce custom styling\nconst OptionItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n qa: 'Option',\n styles: {\n '$inline-compensation': '0px',\n },\n});\n\nconst SelectOverlayWrapper = tasty({\n qa: 'SelectOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n // React Aria writes the room left in the viewport as this element's\n // `max-height`; a flex column lets the popup shrink to it.\n display: 'flex',\n flow: 'column',\n },\n});\n\nconst OverlayElement = tasty({\n qa: 'SelectOverlay',\n styles: {\n width: 'min $overlay-min-width',\n display: 'grid',\n gridRows: '1sf',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '.5x',\n border: true,\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nexport interface CubeSelectBaseProps<T>\n extends\n BasePropsWithoutChildren,\n AriaLabelingProps,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n FieldBaseProps<Key | null | undefined>,\n CollectionBase<T>,\n Omit<\n AriaSelectProps<T>,\n | 'errorMessage'\n | 'form'\n | 'name'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n > {\n /** The currently selected key in the collection (controlled). */\n selectedKey?: Key | null;\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n icon?: ReactElement;\n rightIcon?: ReactNode;\n prefix?: ReactNode;\n suffix?: ReactNode;\n /** Description text for the trigger. Note: Different from field-level description. */\n triggerDescription?: ReactNode;\n descriptionPlacement?: 'inline' | 'block';\n /** Keyboard shortcut that triggers the select when pressed */\n hotkeys?: string;\n /**\n * Tooltip content and configuration for the trigger. The info badge next to\n * the field's label is `labelTooltip`.\n * - string: simple tooltip text\n * - true: auto tooltip on overflow (shows selected value as tooltip when truncated)\n * - object: advanced configuration with optional auto property\n */\n tooltip?:\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n triggerRef?: RefObject<HTMLButtonElement>;\n /**\n * Shows a loading indicator in the trigger. The value can't change while\n * loading: the list doesn't open and typeahead is ignored.\n */\n isLoading?: boolean;\n /** Replaces the default loading icon shown while `isLoading` is set. */\n loadingIndicator?: ReactNode;\n overlayOffset?: number;\n /**\n * @deprecated Has no effect: the whole Select is its trigger. To hide the\n * dropdown caret, pass `rightIcon={null}`.\n */\n hideTrigger?: boolean;\n /**\n * @deprecated Use `triggerStyles` instead\n */\n inputStyles?: Styles;\n optionStyles?: Styles;\n triggerStyles?: Styles;\n listBoxStyles?: Styles;\n /** Space between options, in pixels. Defaults to a hairline (`$item-gap`, `1px`). */\n listGap?: number;\n overlayStyles?: Styles;\n direction?: 'top' | 'bottom';\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Only the popover's POSITION follows this ref. The trigger keeps its own\n * ref for focus, outside-click and dismiss logic, so anchoring to a wider\n * container does not make clicks inside that container count as trigger\n * presses. The popover's `minWidth` also stays tied to the trigger, not to\n * this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /**\n * Placement of the popover relative to the anchor.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n *\n * Overrides `direction` when both are given.\n * @default `${direction} end`\n */\n placement?: Placement;\n shouldFlip?: boolean;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Additional props for the trigger button element. */\n inputProps?: Props;\n type?: 'outline' | 'outline-2' | 'clear' | 'primary' | (string & {});\n /**\n * Shape of the trigger's border radius.\n * - `card` - Card shape with larger border radius (`1cr`)\n * - `button` - Button shape with default border radius (default)\n * - `sharp` - Sharp corners with no border radius (`0`)\n * - `pill` - Pill shape with fully rounded ends (`round`)\n * @default \"button\"\n */\n shape?: 'card' | 'button' | 'sharp' | 'pill';\n suffixPosition?: 'before' | 'after';\n theme?: 'default' | 'special';\n /** Whether the select 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 `Select.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 /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport interface CubeSelectProps<T> extends CubeSelectBaseProps<T> {\n /** The ref for the popover element. */\n popoverRef?: RefObject<HTMLElement | null>;\n /** The ref for the list box. */\n listBoxRef?: RefObject<HTMLElement>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n placeholder?: string;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nconst ignore = () => {};\n\n/**\n * A state whose value can't change. React Aria's trigger opens the list,\n * steps with `ArrowLeft`/`ArrowRight` and typeaheads through these methods,\n * so ignoring them fixes the value while the trigger stays focusable.\n */\nfunction lockSelectState<S extends SelectState<object>>(state: S): S {\n return {\n ...state,\n open: ignore,\n toggle: ignore,\n setSelectedKey: ignore,\n setValue: ignore,\n };\n}\n\nfunction Select<T extends object>(\n rawProps: CubeSelectProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n selectedKey: value ?? null,\n onSelectionChange: onChange,\n }),\n });\n\n let {\n qa,\n label,\n extra,\n icon,\n rightIcon,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n prefix,\n isDisabled = props.isLoading || false,\n autoFocus,\n inputProps,\n triggerRef: triggerRefProp,\n popoverRef,\n listBoxRef,\n isLoading,\n loadingIndicator,\n overlayOffset = 8,\n inputStyles,\n triggerStyles,\n optionStyles,\n listBoxStyles,\n listGap,\n overlayStyles,\n suffix,\n actions,\n message,\n triggerDescription,\n descriptionPlacement,\n hotkeys,\n direction = 'bottom',\n targetRef,\n placement: placementProp,\n shouldFlip = true,\n containerPadding = 8,\n placeholder,\n tooltip,\n size = 'medium',\n shape,\n styles,\n type = 'outline',\n theme = 'default',\n labelSuffix,\n suffixPosition = 'before',\n isClearable,\n clearLabel,\n onOpenChange,\n form,\n ...otherProps\n } = props;\n const { t } = useI18n();\n // `useSelectState` reports `onOpenChange` itself, once per transition.\n let state = getValueSelectionState(useSelectState(props));\n // Read-only and loading keep the trigger focusable, but its value is fixed.\n const isLocked = !!props.isReadOnly || !!isLoading;\n\n if (isLocked) state = lockSelectState(state);\n\n // Generate a unique ID for this select instance\n const selectId = useMemo(() => generateRandomId(), []);\n\n // A list that can no longer change the value closes rather than staying open\n // behind a hidden popup, so `aria-expanded` follows and enabling the field\n // again doesn't bring the list back.\n const isInert = isLocked || isDisabled;\n const closeList = useEffectEvent(() => state.close());\n\n useEffect(() => {\n if (isInert && state.isOpen) closeList();\n }, [isInert, state.isOpen]);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n const triggerRef = useCombinedRefs(triggerRefProp);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n usePopoverSync({\n menuId: selectId,\n isOpen: state.isOpen,\n onClose: () => state.close(),\n triggerRef: triggerRef as RefObject<HTMLElement | null>,\n containerRef: popoverRef as RefObject<HTMLElement | null>,\n });\n\n // Hand focus back to the trigger the moment the list closes, rather than\n // leaving it to the popup's `FocusScope`, which only restores when it\n // UNMOUNTS — at the end of the exit transition (CUB-4839).\n //\n // For the length of that transition focus would otherwise sit on an option\n // inside a popup that is going away, and the key a user presses next can\n // land nowhere at all: once the option is detached focus drops to `<body>`,\n // which takes the event out of the React tree entirely.\n //\n // `focusProgrammatically` so the trigger's tooltip does not read this as the\n // user arriving and pop up — it would then swallow that next `Escape`.\n //\n // Guarded on focus still being INSIDE the popup, so this only finishes a\n // hand-off the popup had already started: closing by clicking elsewhere\n // leaves focus wherever the user put it.\n useEffect(() => {\n if (state.isOpen) return;\n\n const popover = popoverRef.current;\n const active = document.activeElement;\n\n if (!popover || !active || !popover.contains(active)) return;\n\n focusProgrammatically(triggerRef.current, { preventScroll: true });\n // Both refs come from `useCombinedRefs`, so their identity never changes;\n // listing them satisfies the rule without re-running this.\n }, [state.isOpen, popoverRef, triggerRef]);\n\n // React Aria hands `form` to `HiddenSelect` as the id of its `<form>`, so the\n // form instance would render as `form=\"[object Object]\"` on the `<select>`.\n let { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n { ...props, form: undefined },\n state,\n triggerRef,\n );\n\n let { overlayProps, placement } = useOverlayPosition({\n // Position only. `triggerRef` stays the dismiss/focus anchor below, so a\n // consumer can line this popover up with a row without that row's clicks\n // reading as presses on the trigger.\n targetRef: (targetRef ?? triggerRef) as RefObject<HTMLElement>,\n overlayRef: popoverRef,\n scrollRef: listBoxRef,\n placement: placementProp ?? (`${direction} end` as Placement),\n shouldFlip: shouldFlip,\n isOpen: state.isOpen,\n onClose: state.close,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n let { isFocused, focusProps } = useFocus(true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n // Get props for the button based on the trigger props from useSelect\n let { buttonProps } = useButton({ ...triggerProps, autoFocus }, triggerRef);\n\n let validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // Clear button logic\n let hasSelection = state.selectedItem != null;\n let showClearButton = isClearable && hasSelection && !isInert;\n\n function clearValue() {\n // Reports the change through `onSelectionChange`.\n state.setSelectedKey(null);\n\n if (state.isOpen) {\n state.close();\n }\n\n // Back to the trigger, without its tooltip reading this as the user\n // arriving there and then swallowing the next `Escape`.\n focusProgrammatically(triggerRef.current);\n\n props.onClear?.();\n }\n\n // The popup is at least as wide as the trigger. Measured as the list opens,\n // before the popup mounts and is positioned, rather than during render, so a\n // trigger resized while the list was closed is read fresh.\n const [triggerWidth, setTriggerWidth] = useState<number>();\n\n useLayoutEffect(() => {\n if (state.isOpen) setTriggerWidth(triggerRef.current?.offsetWidth);\n }, [state.isOpen, triggerRef]);\n\n const loadingIcon = loadingIndicator ?? <LoadingIcon />;\n\n const showPlaceholder = !!placeholder?.trim() && !state.selectedItem;\n\n const modifiers = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n loading: isLoading,\n hovered: isHovered,\n focused: isFocused,\n placeholder: showPlaceholder,\n prefix: !!prefix,\n suffix: true,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isHovered,\n isFocused,\n showPlaceholder,\n prefix,\n ],\n );\n\n suffix = useMemo(() => {\n if (!suffix && !validationIcon) {\n return null;\n }\n\n return (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }, [suffix, validationIcon]);\n\n // A caller's `rightIcon` keeps the `rightIcon` slot: it accepts a render\n // function resolved against the trigger's mods, which only that slot does, and\n // it is also what a caller's `RightIcon` styles target. It replaces the\n // built-in control, exactly as before.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon\n ? isLoading\n ? loadingIcon\n : rightIcon\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. The run\n // is still rendered, so the trigger does not restructure if actions arrive\n // later, but the row stops counting it as end content — which is what keeps an\n // icon-only trigger with `rightIcon={null}` square.\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 : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"SelectClearButton\"\n // `ItemAction` derives its accessible name from `aria-label` or a\n // string `tooltip` and warns for neither, so an icon-only clear\n // button without this reaches a screen reader unnamed.\n aria-label={clearLabel ?? t('select.clearValue', 'Clear value')}\n // No explicit `type`/`theme`: the default `current` type paints\n // from the trigger's own inherited text color, so the button\n // matches whatever the field is showing instead of one palette.\n //\n // NOTE: this trigger keeps NEUTRAL label text when invalid, so\n // the button reads neutral there too. `Picker` and `FilterPicker`\n // are also `Item`-based but do tint theirs, which is the actual\n // inconsistency to fix — in `Select`, not here.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : isLoading ? (\n <TriggerIcon>{loadingIcon}</TriggerIcon>\n ) : (\n <TriggerIcon>\n <DirectionIcon to={state.isOpen ? 'up' : 'down'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n let selectField = (\n <SelectWrapperElement\n ref={ref}\n mods={modifiers}\n styles={styles}\n data-size={size}\n data-type={type}\n data-theme={theme}\n >\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n />\n {/*\n The trigger's trailing controls are rendered as a SIBLING of the\n `<button>` — the same layout `ItemButton` uses for its actions, shared\n through `ItemActionsWrapper`. `Select` builds its trigger from `Item`\n rather than `ItemButton` because `useSelect`/`useButton` already own the\n button props, so it reaches for the wrapper directly.\n\n The RAW theme, unlike `Picker` / `FilterPicker` which forward\n `getValidationTheme(...)`: this trigger is painted with the raw theme too\n and surfaces validation through `SelectWrapperElement` rather than by\n switching theme. What the wrapper hands its actions must always match\n what the trigger paints with.\n */}\n <ItemActionsWrapper\n type={type}\n theme={theme}\n size={size}\n isDisabled={isDisabled || isLoading}\n mods={modifiers}\n actions={triggerActions}\n >\n {({ showActions, skipActionsWidthTransition }) => (\n <Item\n actions={hasTriggerActions || undefined}\n insideWrapper\n as=\"button\"\n qa={qa || 'Select'}\n data-input-type=\"select\"\n {...mergeProps(buttonProps, hoverProps, focusProps, inputProps)}\n // For a dialog kept mounted while closed, as on `Button`.\n {...(autoFocus ? { 'data-autofocus': '' } : undefined)}\n ref={triggerRef}\n data-popover-trigger\n showActions={showActions}\n skipActionsWidthTransition={skipActionsWidthTransition}\n styles={mergeStyleLayers(inputStyles, triggerStyles)}\n theme={theme}\n size={size}\n shape={shape}\n // Ensure this button never submits a surrounding form in tests or runtime\n htmlType=\"button\"\n // Preserve visual variant via data attribute instead of conflicting with HTML attribute\n type={type}\n mods={modifiers}\n prefix={prefix}\n suffix={suffix}\n icon={icon}\n rightIcon={triggerRightIcon}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n hotkeys={hotkeys}\n tooltip={tooltip}\n labelProps={valueProps}\n >\n {state.selectedItem ? (\n state.selectedItem.rendered\n ) : placeholder ? (\n <Text.Placeholder>{placeholder}</Text.Placeholder>\n ) : null}\n </Item>\n )}\n </ItemActionsWrapper>\n <ListBoxPopup\n {...menuProps}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n overlayProps={overlayProps}\n placement={placement}\n state={state}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n overlayStyles={overlayStyles}\n optionStyles={optionStyles}\n minWidth={triggerWidth}\n size={size}\n triggerRef={triggerRef}\n isDisabled={isDisabled}\n />\n </SelectWrapperElement>\n );\n\n return wrapWithField<Omit<CubeSelectProps<T>, 'children' | 'tooltip'>>(\n selectField,\n mergeProps(\n {\n ...props,\n // The trigger's own. Handed on, it read as the legacy field `tooltip`.\n tooltip: undefined,\n },\n { labelProps },\n ),\n );\n}\n\nexport function ListBoxPopup({\n state,\n popoverRef,\n listBoxRef,\n listBoxStyles,\n listGap,\n overlayStyles,\n optionStyles,\n overlayProps: parentOverlayProps,\n shouldUseVirtualFocus = false,\n placement,\n minWidth,\n size = 'small',\n triggerRef,\n isDisabled,\n ...otherProps\n}) {\n // Handle events that should cause the popup to close,\n // e.g. blur, clicking outside, or pressing the escape key.\n let { overlayProps: rawOverlayProps } = useOverlay(\n {\n onClose: () => state.close(),\n shouldCloseOnBlur: true,\n isOpen: state.isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n // The trigger owns interactive controls of its own — the clear button\n // and any custom `actions`. They sit in the actions run, a SIBLING of\n // the trigger, so the lookup below would read them as a press outside\n // and dismiss, swallowing the press: the first press on `Reset` while\n // the list was open only closed the list and the action never ran. Same\n // guard as `DialogTrigger`, which `Picker` / `FilterPicker` go through.\n if (isOwnActionsPress(el, triggerRef?.current)) return false;\n\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) {\n if (el.closest('[data-popover-keep]')) return false;\n // Plain interactive controls (Button, ItemButton) opt in via\n // `data-popover-dismiss` to dismiss us without losing their click\n // to useOverlay's stopPropagation. Schedule the close after the\n // click finishes so the button's onPress runs first.\n if (el.closest('[data-popover-dismiss]')) {\n setTimeout(() => state.close(), 0);\n return false;\n }\n return true;\n }\n // If the same trigger that opened this select was clicked, allow closing\n if (menuTriggerEl === triggerRef?.current) return true;\n // Otherwise, don't close (let event mechanism handle it)\n return false;\n },\n },\n popoverRef,\n );\n\n // A list that has already closed must not swallow the `Escape` meant for\n // whatever surrounds it — see `useOverlayEscapeGuard`.\n const overlayProps = useOverlayEscapeGuard(rawOverlayProps, state.isOpen);\n\n // Opened inside a modal, the list stays readable while the modal hides the\n // page.\n const layerRef = useModalLayerRef();\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || 'bottom';\n\n // Wrap in <FocusScope> so that focus is restored back to the\n // trigger when the popup is closed. In addition, add hidden\n // <DismissButton> components at the start and end of the list\n // to allow screen reader users to dismiss the popup easily.\n //\n // `SelectListBox` puts focus in the list as it mounts, which happens on\n // every open. `autoFocus` on the scope then finds focus already inside and\n // only registers the scope as the active one, so an outer contained Dialog\n // FocusScope (e.g. a popover Dialog wrapping the Select) recognises focus\n // moving into the Select popover and doesn't yank it back to the trigger.\n return (\n <Portal>\n <DisplayTransition isShown={state.isOpen && !isDisabled}>\n {({ phase, isShown, isExiting, ref: transitionRef }) => (\n <SelectOverlayWrapper\n {...overlayProps}\n {...parentOverlayProps}\n ref={mergeRefs(popoverRef, layerRef)}\n // oxlint-disable-next-line react/forbid-component-props -- React Aria's overlay positioning computes these coordinates\n style={parentOverlayProps?.style}\n // A press on the list while it fades out must not close the\n // overlay under it (CUB-5293) — see `Overlay`.\n data-react-aria-top-layer={isExiting || undefined}\n >\n <OverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n }}\n styles={overlayStyles}\n tokens={{\n '$overlay-min-width': minWidth ? `${minWidth}px` : 'initial',\n }}\n >\n <FocusScope autoFocus restoreFocus>\n <DismissButton onDismiss={() => state.close()} />\n <SelectListBox\n {...otherProps}\n state={state}\n listBoxRef={listBoxRef}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n optionStyles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n <DismissButton onDismiss={() => state.close()} />\n </FocusScope>\n </OverlayElement>\n </SelectOverlayWrapper>\n )}\n </DisplayTransition>\n </Portal>\n );\n}\n\n/** The first or last option that can take focus. */\nfunction getEdgeOptionKey(\n state: SelectState<object>,\n edge: 'first' | 'last',\n): Key | null {\n const keys = [...state.collection.getKeys()];\n\n if (edge === 'last') keys.reverse();\n\n return (\n keys.find(\n (key) =>\n state.collection.getItem(key)?.type === 'item' &&\n state.selectionManager.canSelectItem(key),\n ) ?? null\n );\n}\n\n/**\n * Where focus lands as the list opens. `ArrowUp` opens on the last option;\n * `ArrowDown`, `Enter` and `Space` on the selected option, or else the first.\n * A pointer opens on the selected option, or else on the list itself, as in\n * React Aria, so a click highlights nothing the user didn't pick.\n */\nfunction getOpeningFocusKey(state: SelectState<object>): Key | null {\n const { focusStrategy, selectedKey, selectionManager } = state;\n\n if (focusStrategy === 'last') return getEdgeOptionKey(state, 'last');\n\n if (selectedKey != null && selectionManager.canSelectItem(selectedKey)) {\n return selectedKey;\n }\n\n return focusStrategy === 'first' ? getEdgeOptionKey(state, 'first') : null;\n}\n\n/**\n * Scrolls `list` so `option` is in view. Layout offsets rather than client\n * rects: on its first frames the popup is scaled by its enter transition,\n * which would skew a rect-based scroll. The list is positioned, so the offset\n * chain ends at it.\n */\nfunction scrollIntoList(list: HTMLElement, option: HTMLElement) {\n let top = 0;\n\n for (\n let node: HTMLElement | null = option;\n node && node !== list;\n node = node.offsetParent as HTMLElement | null\n ) {\n top += node.offsetTop;\n }\n\n const bottom = top + option.offsetHeight;\n\n if (top < list.scrollTop) {\n list.scrollTop = top;\n } else if (bottom > list.scrollTop + list.clientHeight) {\n list.scrollTop = bottom - list.clientHeight;\n }\n}\n\nfunction focusOpeningOption(\n state: SelectState<object>,\n list: HTMLElement | null,\n shouldUseVirtualFocus: boolean,\n) {\n const key = getOpeningFocusKey(state);\n const manager = state.selectionManager;\n\n manager.setFocused(true);\n manager.setFocusedKey(key);\n\n if (!list || shouldUseVirtualFocus) return;\n\n const option =\n key == null\n ? undefined\n : Array.from(list.querySelectorAll<HTMLElement>('[role=\"option\"]')).find(\n (element) => element.dataset.key === String(key),\n );\n\n if (!option) {\n list.focus({ preventScroll: true });\n\n return;\n }\n\n scrollIntoList(list, option);\n // Focused here rather than left to the option, which would only follow on\n // the next render: the scope's `autoFocus` runs first and would otherwise\n // focus whichever option was tabbable from the last opening.\n option.focus({ preventScroll: true });\n}\n\n/**\n * The list inside the popup. It decides where focus lands when it mounts,\n * rather than inheriting the last opening. The popup unmounts it once it has\n * closed, so that is every opening except a reopen during the exit\n * transition, which keeps the list mounted.\n */\nfunction SelectListBox({\n state,\n listBoxRef,\n listBoxStyles,\n listGap,\n optionStyles,\n shouldUseVirtualFocus,\n size,\n ...otherProps\n}) {\n // For trigger+popover components, map 'small' size to 'medium' for list items\n // while preserving 'medium' and 'large' sizes\n const listItemSize = size === 'small' ? 'medium' : size;\n const listGapTokens =\n listGap == null ? undefined : { '$list-gap': `${listGap}px` };\n\n let { listBoxProps } = useListBox(\n // Opening focus is `focusOpeningOption`'s: React Aria's own `autoFocus`\n // lets a selection win over the last option `ArrowUp` asks for.\n { ...otherProps, shouldUseVirtualFocus, autoFocus: false },\n state,\n listBoxRef,\n );\n\n const focusOnOpen = useEffectEvent(() =>\n focusOpeningOption(state, listBoxRef.current, shouldUseVirtualFocus),\n );\n\n useEffect(() => {\n focusOnOpen();\n }, []);\n\n const renderedItems: React.ReactNode[] = [];\n let hasSections = false;\n\n for (const item of state.collection) {\n if (item.type === 'section') {\n if (hasSections) {\n // A listbox may only own options and groups, so the divider between\n // sections is presentation only.\n renderedItems.push(\n <ListDivider\n key={`divider-${String(item.key)}`}\n as=\"li\"\n role=\"presentation\"\n />,\n );\n }\n\n renderedItems.push(\n <SelectSection\n key={item.key}\n item={item}\n state={state}\n optionStyles={optionStyles}\n sectionStyles={undefined}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n\n hasSections = true;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n item={item}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n }\n }\n\n return (\n <ListBoxElement\n styles={listBoxStyles}\n tokens={listGapTokens}\n mods={{ sections: hasSections }}\n {...listBoxProps}\n ref={listBoxRef}\n >\n {renderedItems}\n </ListBoxElement>\n );\n}\n\nfunction Option({ item, state, styles, shouldUseVirtualFocus, size }) {\n let ref = useRef<HTMLLIElement>(null);\n let isDisabled = state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let isVirtualFocused = state.selectionManager.focusedKey === item.key;\n\n let { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n shouldUseVirtualFocus,\n },\n state,\n ref,\n );\n\n // A mouse press picks the option it started on, even if the list moved\n // under the pointer before the release.\n const originPress = useOptionOriginPress({\n key: item.key,\n ref,\n manager: state.selectionManager,\n isDisabled,\n });\n const { onPointerUp, ...ariaOptionProps } =\n filterSelectionItemProps(optionProps);\n\n // Handle focus events, so we can apply highlighted\n // style to the focused option\n let { isFocused, focusProps } = useFocus();\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterSelectionItemProps(\n filterCollectionItemProps(item.props),\n );\n\n const keyboardProps = {\n onKeyDown(event: KeyboardEvent<HTMLLIElement>) {\n // Committing an option refocuses the trigger during keydown. Cancel\n // Enter's native activation there, preserving Control+Enter context\n // menus and activation of links or controls inside the option.\n if (\n event.key === 'Enter' &&\n !event.ctrlKey &&\n event.target === event.currentTarget\n ) {\n event.preventDefault();\n }\n },\n };\n\n return (\n <OptionItem\n {...mergeProps(\n ariaOptionProps,\n {\n onPointerDown: originPress.onPointerDown,\n onPointerUp: originPress.wrapPointerUp(onPointerUp),\n },\n focusProps,\n filteredItemProps,\n keyboardProps,\n )}\n ref={ref}\n mods={{\n listboxitem: true,\n selected: isSelected,\n focused: shouldUseVirtualFocus ? isVirtualFocused : isFocused,\n disabled: isDisabled,\n pressed: isPressed,\n }}\n data-size={size}\n styles={mergeStyleLayers(\n styles as Styles,\n filteredItemProps.styles as Styles,\n )}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n defaultTooltipPlacement=\"right\"\n >\n {item.rendered}\n </OptionItem>\n );\n}\n\ninterface SelectSectionProps<T> {\n item: any; // react-stately Node<T>\n state: any; // TreeState<T>\n optionStyles?: Styles;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n shouldUseVirtualFocus?: boolean;\n size?: string;\n}\n\nfunction SelectSection<T>(props: SelectSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n headingStyles,\n sectionStyles,\n shouldUseVirtualFocus,\n size,\n } = props;\n\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <ListSectionWrapper {...itemProps} styles={sectionStyles}>\n {heading && (\n <ListSectionHeading\n {...headingProps}\n size={size}\n styles={mergeStyleLayers(headingStyles, {\n '$inline-compensation': '0px',\n })}\n >\n {heading}\n </ListSectionHeading>\n )}\n <ListBoxElement {...groupProps} mods={{ section: true }}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n item={node}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n ))}\n </ListBoxElement>\n </ListSectionWrapper>\n );\n}\n\n// `forwardRef` can't carry the item generic, so the cast restores it, as in\n// ComboBox and Picker.\nconst _Select = forwardRef(\n Select as ForwardRefRenderFunction<HTMLDivElement, any>,\n) as unknown as <T>(\n props: CubeSelectProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement;\n\n(_Select as any).cubeInputType = 'Select';\n\ntype SectionComponent = typeof BaseSection;\n\nconst SelectSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nconst __Select = Object.assign(\n _Select as typeof _Select & {\n Item: typeof CollectionItem;\n Section: typeof SelectSectionComponent;\n Action: typeof ItemAction;\n },\n {\n Item: CollectionItem,\n Section: SelectSectionComponent,\n Action: ItemAction,\n },\n);\n\n(__Select as any).displayName = 'Select';\n\nexport { __Select as Select };\n\nexport type { AriaSelectProps };\nexport { useSelectState };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA,MAAMuF,uBAAuB5E,MAAM;CACjC6E,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,MAAM;GACJ,IAAI;GACJC,UAAU;GACV,iBAAiB;EACnB;EACAC,OAAO;GACL,IAAI;GACJC,SAAS;GACTC,SAAS;GACTH,UAAU;EACZ;CACF;AACF,CAAC;AAED,MAAaI,iBAAiBvF,MAAM;CAClC6E,IAAI;CACJW,IAAI;CACJV,QAAQ;EAEN,aAAa;GAAE,IAAI;GAAaW,SAAS;EAAM;EAC/CV,SAAS;EAETW,KAAK;GAAE,IAAI;GAAaC,UAAU;EAAY;EAC9CC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,WAAW;EAIXC,UAAU;GAAE,IAAI;GAAQP,SAAS;EAAM;EAEvCT,UAAU;EACViB,WAAW;EAMXC,SAAS;CACX;AACF,CAAC;AAGD,MAAMC,aAAanG,MAAM6D,OAAM;CAC7B2B,IAAI;CACJY,qBAAqB;CACrBvB,IAAI;CACJC,QAAQ,EACN,wBAAwB,MAC1B;AACF,CAAC;AAED,M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ePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","OUTER_STYLES","OuterStyleProps","Styles","tasty","React","cloneElement","ForwardedRef","forwardRef","ForwardRefRenderFunction","KeyboardEvent","ReactElement","ReactNode","RefObject","useEffect","useEffectEvent","useLayoutEffect","useMemo","useRef","useState","AriaSelectProps","DismissButton","FocusScope","HiddenSelect","useButton","useHover","useListBox","useListBoxSection","useOption","useOverlay","useOverlayPosition","useSelect","Section","BaseSection","SelectState","useSelectState","useI18n","CloseIcon","DirectionIcon","LoadingIcon","FieldBaseProps","generateRandomId","mergeProps","useCombinedRefs","useFocus","focusProgrammatically","mergeRefs","useOverlayEscapeGuard","usePopoverSync","extractStyles","mergeStyleLayers","isOwnActionsPress","ItemAction","ItemActionsWrapper","StyledDivider","ListDivider","StyledSectionHeading","ListSectionHeading","StyledSection","ListSectionWrapper","CollectionItem","filterCollectionItemProps","filterSelectionItemProps","getValueSelectionState","CubeItemProps","Item","Text","getValidationIcon","getValidationMods","useFieldProps","wrapWithField","DisplayTransition","useModalLayerRef","CubeTooltipProviderProps","Portal","useOptionOriginPress","TriggerActions","TriggerIcon","Placement","Props","SelectWrapperElement","qa","styles","display","position","radius","fill","disabled","color","focused","invalid","ListBoxElement","as","section","gap","sections","flow","margin","padding","listStyle","overflow","scrollbar","outline","OptionItem","disableActionsFocus","SelectOverlayWrapper","zIndex","OverlayElement","width","gridRows","height","shadow","border","boxSizing","transition","translate","transformOrigin","scale","opacity","CubeSelectBaseProps","T","Omit","selectedKey","defaultSelectedKey","onSelectionChange","key","icon","rightIcon","prefix","suffix","triggerDescription","descriptionPlacement","hotkeys","tooltip","auto","triggerRef","HTMLButtonElement","isLoading","loadingIndicator","overlayOffset","hideTrigger","inputStyles","optionStyles","triggerStyles","listBoxStyles","listGap","overlayStyles","direction","targetRef","HTMLElement","placement","shouldFlip","containerPadding","inputProps","type","shape","suffixPosition","theme","isClearable","clearLabel","onClear","actions","onOpenChange","isOpen","CubeSelectProps","popoverRef","listBoxRef","size","placeholder","PROP_STYLES","ignore","lockSelectState","state","S","open","toggle","setSelectedKey","setValue","Select","rawProps","ref","HTMLDivElement","props","defaultValidationTrigger","valuePropsMapper","value","onChange","label","extra","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","autoFocus","triggerRefProp","message","placementProp","labelSuffix","form","otherProps","t","isLocked","isReadOnly","selectId","isInert","closeList","close","menuId","onClose","containerRef","popover","current","active","document","activeElement","contains","preventScroll","labelProps","triggerProps","valueProps","menuProps","undefined","overlayProps","overlayRef","scrollRef","offset","isFocused","focusProps","hoverProps","isHovered","buttonProps","validationIcon","hasSelection","selectedItem","showClearButton","clearValue","triggerWidth","setTriggerWidth","offsetWidth","loadingIcon","showPlaceholder","trim","modifiers","loading","hovered","hasCustomRightIcon","triggerRightIcon","hasTriggerActions","triggerActions","pressed","selectField","name","showActions","skipActionsWidthTransition","rendered","ListBoxPopup","t0","$","_c","minWidth","parentOverlayProps","t1","t2","shouldUseVirtualFocus","t3","t4","el","menuTriggerEl","closest","setTimeout","t5","shouldCloseOnBlur","isDismissable","shouldCloseOnInteractOutside","rawOverlayProps","layerRef","t6","split","placementDirection","t7","t8","t9","phase","isShown","isExiting","transitionRef","style","getEdgeOptionKey","edge","keys","collection","getKeys","reverse","find","getItem","selectionManager","canSelectItem","getOpeningFocusKey","focusStrategy","scrollIntoList","list","option","top","node","offsetParent","offsetTop","bottom","offsetHeight","scrollTop","clientHeight","focusOpeningOption","manager","setFocused","setFocusedKey","Array","from","querySelectorAll","element","dataset","String","focus","SelectListBox","listItemSize","listGapTokens","listBoxProps","focusOnOpen","Symbol","for","hasSections","renderedItems","item","push","Option","disabledKeys","has","isSelected","isVirtualFocused","focusedKey","shouldSelectOnPressUp","shouldFocusOnHover","optionProps","isPressed","descriptionProps","originPress","onPointerUp","ariaOptionProps","filteredItemProps","keyboardProps","onKeyDown","event","ctrlKey","target","currentTarget","preventDefault","T0","onPointerDown","wrapPointerUp","listboxitem","selected","SelectSectionProps","headingStyles","sectionStyles","SelectSection","heading","itemProps","headingProps","groupProps","childNodes","filter","map","node_0","_Select","cubeInputType","SectionComponent","SelectSectionComponent","Object","assign","displayName","__Select","Action","Item","useFocus","TriggerIcon","mergeProps","Text","_c","ListDivider","ListSectionHeading","ListSectionWrapper","BaseSection","CollectionItem"],"sources":["../../../../src/components/fields/Select/Select.tsx"],"sourcesContent":["import { AriaLabelingProps, CollectionBase, Key } from '@react-types/shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport React, {\n cloneElement,\n ForwardedRef,\n forwardRef,\n ForwardRefRenderFunction,\n KeyboardEvent,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useEffectEvent,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n AriaSelectProps,\n DismissButton,\n FocusScope,\n HiddenSelect,\n useButton,\n useHover,\n useListBox,\n useListBoxSection,\n useOption,\n useOverlay,\n useOverlayPosition,\n useSelect,\n} from 'react-aria';\nimport {\n Section as BaseSection,\n SelectState,\n useSelectState,\n} from 'react-stately';\n\nimport { useI18n } from '../../../i18n';\nimport { CloseIcon } from '../../../icons/CloseIcon';\nimport { DirectionIcon } from '../../../icons/DirectionIcon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { FieldBaseProps } from '../../../shared/index';\nimport { generateRandomId } from '../../../utils/random';\nimport { mergeProps, useCombinedRefs } from '../../../utils/react/index';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { focusProgrammatically } from '../../../utils/react/programmaticFocus';\nimport { mergeRefs } from '../../../utils/react/useCombinedRefs';\nimport { useOverlayEscapeGuard } from '../../../utils/react/useOverlayEscapeGuard';\nimport { usePopoverSync } from '../../../utils/react/usePopoverSync';\nimport { extractStyles, mergeStyleLayers } from '../../../utils/styles';\nimport { isOwnActionsPress } from '../../actions/actions-run';\nimport { ItemAction } from '../../actions/ItemAction/ItemAction';\nimport { ItemActionsWrapper } from '../../actions/ItemActionsWrapper';\nimport {\n StyledDivider as ListDivider,\n StyledSectionHeading as ListSectionHeading,\n StyledSection as ListSectionWrapper,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n filterCollectionItemProps,\n filterSelectionItemProps,\n getValueSelectionState,\n} from '../../CollectionItem';\nimport { CubeItemProps, Item } from '../../content/Item';\nimport { Text } from '../../content/Text';\nimport {\n getValidationIcon,\n getValidationMods,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { DisplayTransition } from '../../helpers';\nimport { useModalLayerRef } from '../../overlays/Modal/modal-containment';\nimport { CubeTooltipProviderProps } from '../../overlays/Tooltip/TooltipProvider';\nimport { Portal } from '../../portal';\nimport { useOptionOriginPress } from '../option-origin-press';\nimport { TriggerActions, TriggerIcon } from '../TriggerActions';\n\nimport type { Placement } from 'react-aria';\nimport type { Props } from '../../../props';\n\nconst SelectWrapperElement = tasty({\n qa: 'SelectWrapper',\n styles: {\n display: 'grid',\n position: 'relative',\n radius: true,\n fill: {\n '': '#surface',\n disabled: '#disabled-surface',\n 'theme=special': '#clear',\n },\n color: {\n '': '#dark.85',\n focused: '#dark.85',\n invalid: '#danger-text',\n disabled: '#disabled-surface-text',\n },\n },\n});\n\nexport const ListBoxElement = tasty({\n qa: 'ListBox',\n as: 'ul',\n styles: {\n // Set from `listGap`. A section's list inherits it from the popup's.\n '$list-gap': { '': '$item-gap', section: false },\n display: 'flex',\n // It spaces options: sections and dividers keep a hairline.\n gap: { '': '$list-gap', sections: '$item-gap' },\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n // The popup's list is the scroll container and the element its height\n // limit lands on, so React Aria's page navigation measures what is\n // actually visible. A section's list grows with its options.\n overflow: { '': 'auto', section: false },\n // Options measure their scroll offset against the list.\n position: 'relative',\n scrollbar: 'styled',\n // The listbox is programmatically focused when the popover opens\n // (so keyboard nav works immediately) but it should never display a\n // focus ring — only the focused option does. Without this, the\n // browser draws its native outline around the whole listbox when\n // it receives focus.\n outline: 0,\n },\n});\n\n// Use Item for options to unify item visuals and reduce custom styling\nconst OptionItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n qa: 'Option',\n styles: {\n '$inline-compensation': '0px',\n },\n});\n\nconst SelectOverlayWrapper = tasty({\n qa: 'SelectOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n // React Aria writes the room left in the viewport as this element's\n // `max-height`; a flex column lets the popup shrink to it.\n display: 'flex',\n flow: 'column',\n },\n});\n\nconst OverlayElement = tasty({\n qa: 'SelectOverlay',\n styles: {\n width: 'min $overlay-min-width',\n display: 'grid',\n gridRows: '1sf',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n fill: '#surface',\n radius: '1cr',\n shadow: true,\n padding: '.5x',\n border: true,\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n },\n});\n\nexport interface CubeSelectBaseProps<T>\n extends\n BasePropsWithoutChildren,\n AriaLabelingProps,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n FieldBaseProps<Key | null | undefined>,\n CollectionBase<T>,\n Omit<\n AriaSelectProps<T>,\n | 'errorMessage'\n | 'form'\n | 'name'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n > {\n /** The currently selected key in the collection (controlled). */\n selectedKey?: Key | null;\n /** The initial selected key in the collection (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n icon?: ReactElement;\n rightIcon?: ReactNode;\n prefix?: ReactNode;\n suffix?: ReactNode;\n /** Description text for the trigger. Note: Different from field-level description. */\n triggerDescription?: ReactNode;\n descriptionPlacement?: 'inline' | 'block';\n /** Keyboard shortcut that triggers the select when pressed */\n hotkeys?: string;\n /**\n * Tooltip content and configuration for the trigger. The info badge next to\n * the field's label is `labelTooltip`.\n * - string: simple tooltip text\n * - true: auto tooltip on overflow (shows selected value as tooltip when truncated)\n * - object: advanced configuration with optional auto property\n */\n tooltip?:\n | string\n | boolean\n | (Omit<CubeTooltipProviderProps, 'children'> & { auto?: boolean });\n triggerRef?: RefObject<HTMLButtonElement>;\n /**\n * Shows a loading indicator in the trigger. The value can't change while\n * loading: the list doesn't open and typeahead is ignored.\n */\n isLoading?: boolean;\n /** Replaces the default loading icon shown while `isLoading` is set. */\n loadingIndicator?: ReactNode;\n overlayOffset?: number;\n /**\n * @deprecated Has no effect: the whole Select is its trigger. To hide the\n * dropdown caret, pass `rightIcon={null}`.\n */\n hideTrigger?: boolean;\n /**\n * @deprecated Use `triggerStyles` instead\n */\n inputStyles?: Styles;\n optionStyles?: Styles;\n triggerStyles?: Styles;\n listBoxStyles?: Styles;\n /** Space between options, in pixels. Defaults to a hairline (`$item-gap`, `1px`). */\n listGap?: number;\n overlayStyles?: Styles;\n direction?: 'top' | 'bottom';\n /**\n * The ref of the element the popover should visually attach itself to.\n * Defaults to the trigger button.\n *\n * Only the popover's POSITION follows this ref. The trigger keeps its own\n * ref for focus, outside-click and dismiss logic, so anchoring to a wider\n * container does not make clicks inside that container count as trigger\n * presses. The popover's `minWidth` also stays tied to the trigger, not to\n * this element.\n */\n targetRef?: RefObject<HTMLElement | null>;\n /**\n * Placement of the popover relative to the anchor.\n * Accepts React Aria's `Placement` strings (e.g. `'bottom start'`,\n * `'top start'`, `'right top'`, `'left top'`).\n *\n * Overrides `direction` when both are given.\n * @default `${direction} end`\n */\n placement?: Placement;\n shouldFlip?: boolean;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Additional props for the trigger button element. */\n inputProps?: Props;\n type?: 'outline' | 'outline-2' | 'clear' | 'primary' | (string & {});\n /**\n * Shape of the trigger's border radius.\n * - `card` - Card shape with larger border radius (`1cr`)\n * - `button` - Button shape with default border radius (default)\n * - `sharp` - Sharp corners with no border radius (`0`)\n * - `pill` - Pill shape with fully rounded ends (`round`)\n * @default \"button\"\n */\n shape?: 'card' | 'button' | 'sharp' | 'pill';\n suffixPosition?: 'before' | 'after';\n theme?: 'default' | 'special';\n /** Whether the select 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 `Select.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 /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nexport interface CubeSelectProps<T> extends CubeSelectBaseProps<T> {\n /** The ref for the popover element. */\n popoverRef?: RefObject<HTMLElement | null>;\n /** The ref for the list box. */\n listBoxRef?: RefObject<HTMLElement>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n placeholder?: string;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nconst ignore = () => {};\n\n/**\n * A state whose value can't change. React Aria's trigger opens the list,\n * steps with `ArrowLeft`/`ArrowRight` and typeaheads through these methods,\n * so ignoring them fixes the value while the trigger stays focusable.\n */\nfunction lockSelectState<S extends SelectState<object>>(state: S): S {\n return {\n ...state,\n open: ignore,\n toggle: ignore,\n setSelectedKey: ignore,\n setValue: ignore,\n };\n}\n\nfunction Select<T extends object>(\n rawProps: CubeSelectProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n let props = useFieldProps(rawProps, {\n defaultValidationTrigger: 'onChange',\n valuePropsMapper: ({ value, onChange }) => ({\n selectedKey: value ?? null,\n onSelectionChange: onChange,\n }),\n });\n\n let {\n qa,\n label,\n extra,\n icon,\n rightIcon,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n prefix,\n isDisabled = props.isLoading || false,\n autoFocus,\n inputProps,\n triggerRef: triggerRefProp,\n popoverRef,\n listBoxRef,\n isLoading,\n loadingIndicator,\n overlayOffset = 8,\n inputStyles,\n triggerStyles,\n optionStyles,\n listBoxStyles,\n listGap,\n overlayStyles,\n suffix,\n actions,\n message,\n triggerDescription,\n descriptionPlacement,\n hotkeys,\n direction = 'bottom',\n targetRef,\n placement: placementProp,\n shouldFlip = true,\n containerPadding = 8,\n placeholder,\n tooltip,\n size = 'medium',\n shape,\n styles,\n type = 'outline',\n theme = 'default',\n labelSuffix,\n suffixPosition = 'before',\n isClearable,\n clearLabel,\n onOpenChange,\n form,\n ...otherProps\n } = props;\n const { t } = useI18n();\n // `useSelectState` reports `onOpenChange` itself, once per transition.\n let state = getValueSelectionState(useSelectState(props));\n // Read-only and loading keep the trigger focusable, but its value is fixed.\n const isLocked = !!props.isReadOnly || !!isLoading;\n\n if (isLocked) state = lockSelectState(state);\n\n // Generate a unique ID for this select instance\n const selectId = useMemo(() => generateRandomId(), []);\n\n // A list that can no longer change the value closes rather than staying open\n // behind a hidden popup, so `aria-expanded` follows and enabling the field\n // again doesn't bring the list back.\n const isInert = isLocked || isDisabled;\n const closeList = useEffectEvent(() => state.close());\n\n useEffect(() => {\n if (isInert && state.isOpen) closeList();\n }, [isInert, state.isOpen]);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n const triggerRef = useCombinedRefs(triggerRefProp);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n usePopoverSync({\n menuId: selectId,\n isOpen: state.isOpen,\n onClose: () => state.close(),\n triggerRef: triggerRef as RefObject<HTMLElement | null>,\n containerRef: popoverRef as RefObject<HTMLElement | null>,\n });\n\n // Hand focus back to the trigger the moment the list closes, rather than\n // leaving it to the popup's `FocusScope`, which only restores when it\n // UNMOUNTS — at the end of the exit transition (CUB-4839).\n //\n // For the length of that transition focus would otherwise sit on an option\n // inside a popup that is going away, and the key a user presses next can\n // land nowhere at all: once the option is detached focus drops to `<body>`,\n // which takes the event out of the React tree entirely.\n //\n // `focusProgrammatically` so the trigger's tooltip does not read this as the\n // user arriving and pop up — it would then swallow that next `Escape`.\n //\n // Guarded on focus still being INSIDE the popup, so this only finishes a\n // hand-off the popup had already started: closing by clicking elsewhere\n // leaves focus wherever the user put it.\n useEffect(() => {\n if (state.isOpen) return;\n\n const popover = popoverRef.current;\n const active = document.activeElement;\n\n if (!popover || !active || !popover.contains(active)) return;\n\n focusProgrammatically(triggerRef.current, { preventScroll: true });\n // Both refs come from `useCombinedRefs`, so their identity never changes;\n // listing them satisfies the rule without re-running this.\n }, [state.isOpen, popoverRef, triggerRef]);\n\n // React Aria hands `form` to `HiddenSelect` as the id of its `<form>`, so the\n // form instance would render as `form=\"[object Object]\"` on the `<select>`.\n let { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n { ...props, form: undefined },\n state,\n triggerRef,\n );\n\n let { overlayProps, placement } = useOverlayPosition({\n // Position only. `triggerRef` stays the dismiss/focus anchor below, so a\n // consumer can line this popover up with a row without that row's clicks\n // reading as presses on the trigger.\n targetRef: (targetRef ?? triggerRef) as RefObject<HTMLElement>,\n overlayRef: popoverRef,\n scrollRef: listBoxRef,\n placement: placementProp ?? (`${direction} end` as Placement),\n shouldFlip: shouldFlip,\n isOpen: state.isOpen,\n onClose: state.close,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n let { isFocused, focusProps } = useFocus(true);\n let { hoverProps, isHovered } = useHover({ isDisabled });\n\n // Get props for the button based on the trigger props from useSelect\n let { buttonProps } = useButton({ ...triggerProps, autoFocus }, triggerRef);\n\n let validationIcon = getValidationIcon({ isInvalid, isValid });\n\n // Clear button logic\n let hasSelection = state.selectedItem != null;\n let showClearButton = isClearable && hasSelection && !isInert;\n\n function clearValue() {\n // Reports the change through `onSelectionChange`.\n state.setSelectedKey(null);\n\n if (state.isOpen) {\n state.close();\n }\n\n // Back to the trigger, without its tooltip reading this as the user\n // arriving there and then swallowing the next `Escape`.\n focusProgrammatically(triggerRef.current);\n\n props.onClear?.();\n }\n\n // The popup is at least as wide as the trigger. Measured as the list opens,\n // before the popup mounts and is positioned, rather than during render, so a\n // trigger resized while the list was closed is read fresh.\n const [triggerWidth, setTriggerWidth] = useState<number>();\n\n useLayoutEffect(() => {\n if (state.isOpen) setTriggerWidth(triggerRef.current?.offsetWidth);\n }, [state.isOpen, triggerRef]);\n\n const loadingIcon = loadingIndicator ?? <LoadingIcon />;\n\n const showPlaceholder = !!placeholder?.trim() && !state.selectedItem;\n\n const modifiers = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n loading: isLoading,\n hovered: isHovered,\n focused: isFocused,\n placeholder: showPlaceholder,\n prefix: !!prefix,\n suffix: true,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isHovered,\n isFocused,\n showPlaceholder,\n prefix,\n ],\n );\n\n suffix = useMemo(() => {\n if (!suffix && !validationIcon) {\n return null;\n }\n\n return (\n <>\n {suffix}\n {validationIcon}\n </>\n );\n }, [suffix, validationIcon]);\n\n // A caller's `rightIcon` keeps the `rightIcon` slot: it accepts a render\n // function resolved against the trigger's mods, which only that slot does, and\n // it is also what a caller's `RightIcon` styles target. It replaces the\n // built-in control, exactly as before.\n const hasCustomRightIcon = rightIcon !== undefined;\n const triggerRightIcon = hasCustomRightIcon\n ? isLoading\n ? loadingIcon\n : rightIcon\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. The run\n // is still rendered, so the trigger does not restructure if actions arrive\n // later, but the row stops counting it as end content — which is what keeps an\n // icon-only trigger with `rightIcon={null}` square.\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 : showClearButton ? (\n <ItemAction\n icon={<CloseIcon />}\n size={size}\n qa=\"SelectClearButton\"\n // `ItemAction` derives its accessible name from `aria-label` or a\n // string `tooltip` and warns for neither, so an icon-only clear\n // button without this reaches a screen reader unnamed.\n aria-label={clearLabel ?? t('select.clearValue', 'Clear value')}\n // No explicit `type`/`theme`: the default `current` type paints\n // from the trigger's own inherited text color, so the button\n // matches whatever the field is showing instead of one palette.\n //\n // NOTE: this trigger keeps NEUTRAL label text when invalid, so\n // the button reads neutral there too. `Picker` and `FilterPicker`\n // are also `Item`-based but do tint theirs, which is the actual\n // inconsistency to fix — in `Select`, not here.\n mods={{ pressed: false }}\n onPress={clearValue}\n />\n ) : isLoading ? (\n <TriggerIcon>{loadingIcon}</TriggerIcon>\n ) : (\n <TriggerIcon>\n <DirectionIcon to={state.isOpen ? 'up' : 'down'} />\n </TriggerIcon>\n )\n }\n />\n );\n\n let selectField = (\n <SelectWrapperElement\n ref={ref}\n mods={modifiers}\n styles={styles}\n data-size={size}\n data-type={type}\n data-theme={theme}\n >\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n />\n {/*\n The trigger's trailing controls are rendered as a SIBLING of the\n `<button>` — the same layout `ItemButton` uses for its actions, shared\n through `ItemActionsWrapper`. `Select` builds its trigger from `Item`\n rather than `ItemButton` because `useSelect`/`useButton` already own the\n button props, so it reaches for the wrapper directly.\n\n The RAW theme, unlike `Picker` / `FilterPicker` which forward\n `getValidationTheme(...)`: this trigger is painted with the raw theme too\n and surfaces validation through `SelectWrapperElement` rather than by\n switching theme. What the wrapper hands its actions must always match\n what the trigger paints with.\n */}\n <ItemActionsWrapper\n type={type}\n theme={theme}\n size={size}\n isDisabled={isDisabled || isLoading}\n mods={modifiers}\n actions={triggerActions}\n >\n {({ showActions, skipActionsWidthTransition }) => (\n <Item\n actions={hasTriggerActions || undefined}\n insideWrapper\n as=\"button\"\n qa={qa || 'Select'}\n data-input-type=\"select\"\n {...mergeProps(buttonProps, hoverProps, focusProps, inputProps)}\n // For a dialog kept mounted while closed, as on `Button`.\n {...(autoFocus ? { 'data-autofocus': '' } : undefined)}\n ref={triggerRef}\n data-popover-trigger\n showActions={showActions}\n skipActionsWidthTransition={skipActionsWidthTransition}\n styles={mergeStyleLayers(inputStyles, triggerStyles)}\n theme={theme}\n size={size}\n shape={shape}\n // Ensure this button never submits a surrounding form in tests or runtime\n htmlType=\"button\"\n // Preserve visual variant via data attribute instead of conflicting with HTML attribute\n type={type}\n mods={modifiers}\n prefix={prefix}\n suffix={suffix}\n icon={icon}\n rightIcon={triggerRightIcon}\n description={triggerDescription}\n descriptionPlacement={descriptionPlacement}\n hotkeys={hotkeys}\n tooltip={tooltip}\n labelProps={valueProps}\n >\n {state.selectedItem ? (\n state.selectedItem.rendered\n ) : placeholder ? (\n <Text.Placeholder>{placeholder}</Text.Placeholder>\n ) : null}\n </Item>\n )}\n </ItemActionsWrapper>\n <ListBoxPopup\n {...menuProps}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n overlayProps={overlayProps}\n placement={placement}\n state={state}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n overlayStyles={overlayStyles}\n optionStyles={optionStyles}\n minWidth={triggerWidth}\n size={size}\n triggerRef={triggerRef}\n isDisabled={isDisabled}\n />\n </SelectWrapperElement>\n );\n\n return wrapWithField<Omit<CubeSelectProps<T>, 'children' | 'tooltip'>>(\n selectField,\n mergeProps(\n {\n ...props,\n // The trigger's own. Handed on, it read as the legacy field `tooltip`.\n tooltip: undefined,\n },\n { labelProps },\n ),\n );\n}\n\nexport function ListBoxPopup({\n state,\n popoverRef,\n listBoxRef,\n listBoxStyles,\n listGap,\n overlayStyles,\n optionStyles,\n overlayProps: parentOverlayProps,\n shouldUseVirtualFocus = false,\n placement,\n minWidth,\n size = 'small',\n triggerRef,\n isDisabled,\n ...otherProps\n}) {\n // Handle events that should cause the popup to close,\n // e.g. blur, clicking outside, or pressing the escape key.\n let { overlayProps: rawOverlayProps } = useOverlay(\n {\n onClose: () => state.close(),\n shouldCloseOnBlur: true,\n isOpen: state.isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n // The trigger owns interactive controls of its own — the clear button\n // and any custom `actions`. They sit in the actions run, a SIBLING of\n // the trigger, so the lookup below would read them as a press outside\n // and dismiss, swallowing the press: the first press on `Reset` while\n // the list was open only closed the list and the action never ran. Same\n // guard as `DialogTrigger`, which `Picker` / `FilterPicker` go through.\n if (isOwnActionsPress(el, triggerRef?.current)) return false;\n\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) {\n if (el.closest('[data-popover-keep]')) return false;\n // Plain interactive controls (Button, ItemButton) opt in via\n // `data-popover-dismiss` to dismiss us without losing their click\n // to useOverlay's stopPropagation. Schedule the close after the\n // click finishes so the button's onPress runs first.\n if (el.closest('[data-popover-dismiss]')) {\n setTimeout(() => state.close(), 0);\n return false;\n }\n return true;\n }\n // If the same trigger that opened this select was clicked, allow closing\n if (menuTriggerEl === triggerRef?.current) return true;\n // Otherwise, don't close (let event mechanism handle it)\n return false;\n },\n },\n popoverRef,\n );\n\n // A list that has already closed must not swallow the `Escape` meant for\n // whatever surrounds it — see `useOverlayEscapeGuard`.\n const overlayProps = useOverlayEscapeGuard(rawOverlayProps, state.isOpen);\n\n // Opened inside a modal, the list stays readable while the modal hides the\n // page.\n const layerRef = useModalLayerRef();\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || 'bottom';\n\n // Wrap in <FocusScope> so that focus is restored back to the\n // trigger when the popup is closed. In addition, add hidden\n // <DismissButton> components at the start and end of the list\n // to allow screen reader users to dismiss the popup easily.\n //\n // `SelectListBox` puts focus in the list as it mounts, which happens on\n // every open. `autoFocus` on the scope then finds focus already inside and\n // only registers the scope as the active one, so an outer contained Dialog\n // FocusScope (e.g. a popover Dialog wrapping the Select) recognises focus\n // moving into the Select popover and doesn't yank it back to the trigger.\n return (\n <Portal>\n <DisplayTransition isShown={state.isOpen && !isDisabled}>\n {({ phase, isShown, isExiting, ref: transitionRef }) => (\n <SelectOverlayWrapper\n {...overlayProps}\n {...parentOverlayProps}\n ref={mergeRefs(popoverRef, layerRef)}\n // oxlint-disable-next-line react/forbid-component-props, tasty/no-style-prop -- React Aria's overlay positioning computes these coordinates\n style={parentOverlayProps?.style}\n // A press on the list while it fades out must not close the\n // overlay under it (CUB-5293) — see `Overlay`.\n data-react-aria-top-layer={isExiting || undefined}\n >\n <OverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n }}\n styles={overlayStyles}\n tokens={{\n '$overlay-min-width': minWidth ? `${minWidth}px` : 'initial',\n }}\n >\n <FocusScope autoFocus restoreFocus>\n <DismissButton onDismiss={() => state.close()} />\n <SelectListBox\n {...otherProps}\n state={state}\n listBoxRef={listBoxRef}\n listBoxStyles={listBoxStyles}\n listGap={listGap}\n optionStyles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n <DismissButton onDismiss={() => state.close()} />\n </FocusScope>\n </OverlayElement>\n </SelectOverlayWrapper>\n )}\n </DisplayTransition>\n </Portal>\n );\n}\n\n/** The first or last option that can take focus. */\nfunction getEdgeOptionKey(\n state: SelectState<object>,\n edge: 'first' | 'last',\n): Key | null {\n const keys = [...state.collection.getKeys()];\n\n if (edge === 'last') keys.reverse();\n\n return (\n keys.find(\n (key) =>\n state.collection.getItem(key)?.type === 'item' &&\n state.selectionManager.canSelectItem(key),\n ) ?? null\n );\n}\n\n/**\n * Where focus lands as the list opens. `ArrowUp` opens on the last option;\n * `ArrowDown`, `Enter` and `Space` on the selected option, or else the first.\n * A pointer opens on the selected option, or else on the list itself, as in\n * React Aria, so a click highlights nothing the user didn't pick.\n */\nfunction getOpeningFocusKey(state: SelectState<object>): Key | null {\n const { focusStrategy, selectedKey, selectionManager } = state;\n\n if (focusStrategy === 'last') return getEdgeOptionKey(state, 'last');\n\n if (selectedKey != null && selectionManager.canSelectItem(selectedKey)) {\n return selectedKey;\n }\n\n return focusStrategy === 'first' ? getEdgeOptionKey(state, 'first') : null;\n}\n\n/**\n * Scrolls `list` so `option` is in view. Layout offsets rather than client\n * rects: on its first frames the popup is scaled by its enter transition,\n * which would skew a rect-based scroll. The list is positioned, so the offset\n * chain ends at it.\n */\nfunction scrollIntoList(list: HTMLElement, option: HTMLElement) {\n let top = 0;\n\n for (\n let node: HTMLElement | null = option;\n node && node !== list;\n node = node.offsetParent as HTMLElement | null\n ) {\n top += node.offsetTop;\n }\n\n const bottom = top + option.offsetHeight;\n\n if (top < list.scrollTop) {\n list.scrollTop = top;\n } else if (bottom > list.scrollTop + list.clientHeight) {\n list.scrollTop = bottom - list.clientHeight;\n }\n}\n\nfunction focusOpeningOption(\n state: SelectState<object>,\n list: HTMLElement | null,\n shouldUseVirtualFocus: boolean,\n) {\n const key = getOpeningFocusKey(state);\n const manager = state.selectionManager;\n\n manager.setFocused(true);\n manager.setFocusedKey(key);\n\n if (!list || shouldUseVirtualFocus) return;\n\n const option =\n key == null\n ? undefined\n : Array.from(list.querySelectorAll<HTMLElement>('[role=\"option\"]')).find(\n (element) => element.dataset.key === String(key),\n );\n\n if (!option) {\n list.focus({ preventScroll: true });\n\n return;\n }\n\n scrollIntoList(list, option);\n // Focused here rather than left to the option, which would only follow on\n // the next render: the scope's `autoFocus` runs first and would otherwise\n // focus whichever option was tabbable from the last opening.\n option.focus({ preventScroll: true });\n}\n\n/**\n * The list inside the popup. It decides where focus lands when it mounts,\n * rather than inheriting the last opening. The popup unmounts it once it has\n * closed, so that is every opening except a reopen during the exit\n * transition, which keeps the list mounted.\n */\nfunction SelectListBox({\n state,\n listBoxRef,\n listBoxStyles,\n listGap,\n optionStyles,\n shouldUseVirtualFocus,\n size,\n ...otherProps\n}) {\n // For trigger+popover components, map 'small' size to 'medium' for list items\n // while preserving 'medium' and 'large' sizes\n const listItemSize = size === 'small' ? 'medium' : size;\n const listGapTokens =\n listGap == null ? undefined : { '$list-gap': `${listGap}px` };\n\n let { listBoxProps } = useListBox(\n // Opening focus is `focusOpeningOption`'s: React Aria's own `autoFocus`\n // lets a selection win over the last option `ArrowUp` asks for.\n { ...otherProps, shouldUseVirtualFocus, autoFocus: false },\n state,\n listBoxRef,\n );\n\n const focusOnOpen = useEffectEvent(() =>\n focusOpeningOption(state, listBoxRef.current, shouldUseVirtualFocus),\n );\n\n useEffect(() => {\n focusOnOpen();\n }, []);\n\n const renderedItems: React.ReactNode[] = [];\n let hasSections = false;\n\n for (const item of state.collection) {\n if (item.type === 'section') {\n if (hasSections) {\n // A listbox may only own options and groups, so the divider between\n // sections is presentation only.\n renderedItems.push(\n <ListDivider\n key={`divider-${String(item.key)}`}\n as=\"li\"\n role=\"presentation\"\n />,\n );\n }\n\n renderedItems.push(\n <SelectSection\n key={item.key}\n item={item}\n state={state}\n optionStyles={optionStyles}\n sectionStyles={undefined}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n\n hasSections = true;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n item={item}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={listItemSize}\n />,\n );\n }\n }\n\n return (\n <ListBoxElement\n styles={listBoxStyles}\n tokens={listGapTokens}\n mods={{ sections: hasSections }}\n {...listBoxProps}\n ref={listBoxRef}\n >\n {renderedItems}\n </ListBoxElement>\n );\n}\n\nfunction Option({ item, state, styles, shouldUseVirtualFocus, size }) {\n let ref = useRef<HTMLLIElement>(null);\n let isDisabled = state.disabledKeys.has(item.key);\n let isSelected = state.selectionManager.isSelected(item.key);\n let isVirtualFocused = state.selectionManager.focusedKey === item.key;\n\n let { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n shouldUseVirtualFocus,\n },\n state,\n ref,\n );\n\n // A mouse press picks the option it started on, even if the list moved\n // under the pointer before the release.\n const originPress = useOptionOriginPress({\n key: item.key,\n ref,\n manager: state.selectionManager,\n isDisabled,\n });\n const { onPointerUp, ...ariaOptionProps } =\n filterSelectionItemProps(optionProps);\n\n // Handle focus events, so we can apply highlighted\n // style to the focused option\n let { isFocused, focusProps } = useFocus();\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterSelectionItemProps(\n filterCollectionItemProps(item.props),\n );\n\n const keyboardProps = {\n onKeyDown(event: KeyboardEvent<HTMLLIElement>) {\n // Committing an option refocuses the trigger during keydown. Cancel\n // Enter's native activation there, preserving Control+Enter context\n // menus and activation of links or controls inside the option.\n if (\n event.key === 'Enter' &&\n !event.ctrlKey &&\n event.target === event.currentTarget\n ) {\n event.preventDefault();\n }\n },\n };\n\n return (\n <OptionItem\n {...mergeProps(\n ariaOptionProps,\n {\n onPointerDown: originPress.onPointerDown,\n onPointerUp: originPress.wrapPointerUp(onPointerUp),\n },\n focusProps,\n filteredItemProps,\n keyboardProps,\n )}\n ref={ref}\n mods={{\n listboxitem: true,\n selected: isSelected,\n focused: shouldUseVirtualFocus ? isVirtualFocused : isFocused,\n disabled: isDisabled,\n pressed: isPressed,\n }}\n data-size={size}\n styles={mergeStyleLayers(\n styles as Styles,\n filteredItemProps.styles as Styles,\n )}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n defaultTooltipPlacement=\"right\"\n >\n {item.rendered}\n </OptionItem>\n );\n}\n\ninterface SelectSectionProps<T> {\n item: any; // react-stately Node<T>\n state: any; // TreeState<T>\n optionStyles?: Styles;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n shouldUseVirtualFocus?: boolean;\n size?: string;\n}\n\nfunction SelectSection<T>(props: SelectSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n headingStyles,\n sectionStyles,\n shouldUseVirtualFocus,\n size,\n } = props;\n\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <ListSectionWrapper {...itemProps} styles={sectionStyles}>\n {heading && (\n <ListSectionHeading\n {...headingProps}\n size={size}\n styles={mergeStyleLayers(headingStyles, {\n '$inline-compensation': '0px',\n })}\n >\n {heading}\n </ListSectionHeading>\n )}\n <ListBoxElement {...groupProps} mods={{ section: true }}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n item={node}\n state={state}\n styles={optionStyles}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n size={size}\n />\n ))}\n </ListBoxElement>\n </ListSectionWrapper>\n );\n}\n\n// `forwardRef` can't carry the item generic, so the cast restores it, as in\n// ComboBox and Picker.\nconst _Select = forwardRef(\n Select as ForwardRefRenderFunction<HTMLDivElement, any>,\n) as unknown as <T>(\n props: CubeSelectProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement;\n\n(_Select as any).cubeInputType = 'Select';\n\ntype SectionComponent = typeof BaseSection;\n\nconst SelectSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nconst __Select = Object.assign(\n _Select as typeof _Select & {\n Item: typeof CollectionItem;\n Section: typeof SelectSectionComponent;\n Action: typeof ItemAction;\n },\n {\n Item: CollectionItem,\n Section: SelectSectionComponent,\n Action: ItemAction,\n },\n);\n\n(__Select as any).displayName = 'Select';\n\nexport { __Select as Select };\n\nexport type { AriaSelectProps };\nexport { useSelectState };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA,MAAMuF,uBAAuB5E,MAAM;CACjC6E,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,MAAM;GACJ,IAAI;GACJC,UAAU;GACV,iBAAiB;EACnB;EACAC,OAAO;GACL,IAAI;GACJC,SAAS;GACTC,SAAS;GACTH,UAAU;EACZ;CACF;AACF,CAAC;AAED,MAAaI,iBAAiBvF,MAAM;CAClC6E,IAAI;CACJW,IAAI;CACJV,QAAQ;EAEN,aAAa;GAAE,IAAI;GAAaW,SAAS;EAAM;EAC/CV,SAAS;EAETW,KAAK;GAAE,IAAI;GAAaC,UAAU;EAAY;EAC9CC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,WAAW;EAIXC,UAAU;GAAE,IAAI;GAAQP,SAAS;EAAM;EAEvCT,UAAU;EACViB,WAAW;EAMXC,SAAS;CACX;AACF,CAAC;AAGD,MAAMC,aAAanG,MAAM6D,OAAM;CAC7B2B,IAAI;CACJY,qBAAqB;CACrBvB,IAAI;CACJC,QAAQ,EACN,wBAAwB,MAC1B;AACF,CAAC;AAED,MAAMuB,uBAAuBrG,MAAM;CACjC6E,IAAI;CACJC,QAAQ;EACNE,UAAU;EACVsB,QAAQ;EAGRvB,SAAS;EACTa,MAAM;CACR;AACF,CAAC;AAED,MAAMW,iBAAiBvG,MAAM;CAC3B6E,IAAI;CACJC,QAAQ;EACN0B,OAAO;EACPzB,SAAS;EACT0B,UAAU;EACVC,QAAQ;EACRV,UAAU;EACVd,MAAM;EACND,QAAQ;EACR0B,QAAQ;EACRb,SAAS;EACTc,QAAQ;EACRC,WAAW;EACXC,YACE;EACFC,WAAW;GACT,IAAI;GACJ,mCAAiC;GACjC,oCAAkC;GAClC,4DAA0D;GAC1D,6DAA2D;EAC7D;E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CM,UAAAA;EADY,CAAA;EAaEb,EAAA,MAAA6G;EAAA7G,EAAA,MAAAa;EAAAb,EAAA,MAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,IAAAsB;CAAA,IAAAtB,EAAA,QAAA2G,aAAA3G,EAAA,QAAAwG,iBAAAxG,EAAA,QAAAK,MAAAL,EAAA,QAAAmB,IAAA;EAzBnBG,KAAA,qBAAC6G,eAAD;GAAmB,GAAKxB;GAAmBH,QAAAA;GAA3C,UAAA,CACGnG,IAWDc,EAZiB;;EA0BEnB,EAAA,MAAA2G;EAAA3G,EAAA,MAAAwG;EAAAxG,EAAA,MAAAK;EAAAL,EAAA,MAAAmB;EAAAnB,EAAA,MAAAsB;CAAA,OAAAA,KAAAtB,EAAA;CAAA,OA1BrBsB;AA0BqB;AAMzB,MAAM4F,UAAU7W,WACd0K,MACF;AAIA,QAAiBoM,gBAAgB;AAIjC,MAAME,yBAAyBC,OAAOC,OAAOzV,SAAa,EACxD0V,aAAa,UACf,CAAC;AAED,MAAMC,WAAWH,OAAOC,OACtBL,SAKA;CACEpT,MAAML;CACN5B,SAASwV;CACTK,QAAQzU;AACV,CACF;AAEA,SAAkBuU,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-5ab95cf | Cube Dev Team */
|
|
2
2
|
import { SliderGradationElement, SliderGradeElement } from "./elements.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-5ab95cf | Cube Dev Team */
|
|
2
2
|
import { mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { Slider as __Slider } from "./Slider.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|