@cube-dev/ui-kit 0.0.0-canary-029af7f → 0.0.0-canary-cb45a83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/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/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/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 +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +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/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.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 +6 -2
- package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +3 -2
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +110 -107
- 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/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 +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 +623 -607
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/Form/Field.js +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/use-field/use-field-binding.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/legacy-tooltip.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Board/Board.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +1 -1
- package/dist/components/layout/Board/board-context.js +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +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/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/navigationAdapter.default.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/escapePropagation.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/programmaticFocus.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/components/fields/TagInput.md +2 -2
- package/package.json +1 -1
|
@@ -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-cb45a83 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../../utils/styles.js";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
|
|
4
4
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
@@ -59,7 +59,7 @@ function isComposingKey(e) {
|
|
|
59
59
|
return e.nativeEvent.isComposing || e.keyCode === 229;
|
|
60
60
|
}
|
|
61
61
|
function TagInput(props, ref) {
|
|
62
|
-
const $ = c(
|
|
62
|
+
const $ = c(393);
|
|
63
63
|
let t0;
|
|
64
64
|
if ($[0] !== props) {
|
|
65
65
|
t0 = castNullableArrayValue(props);
|
|
@@ -382,11 +382,17 @@ function TagInput(props, ref) {
|
|
|
382
382
|
const uniqueValues = t6;
|
|
383
383
|
const [draft, setDraftState] = useControlledState(inputValueProp, defaultInputValue ?? "", onInputChange);
|
|
384
384
|
const [tagError, setTagErrorState] = useState(null);
|
|
385
|
+
const tagErrorIdRef = useRef(0);
|
|
385
386
|
let t7;
|
|
386
387
|
if ($[76] === Symbol.for("react.memo_cache_sentinel")) {
|
|
387
388
|
t7 = (text) => {
|
|
388
|
-
|
|
389
|
-
|
|
389
|
+
if (text == null) {
|
|
390
|
+
setTagErrorState(null);
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
tagErrorIdRef.current = tagErrorIdRef.current + 1;
|
|
394
|
+
setTagErrorState({
|
|
395
|
+
id: tagErrorIdRef.current,
|
|
390
396
|
text
|
|
391
397
|
});
|
|
392
398
|
};
|
|
@@ -472,37 +478,26 @@ function TagInput(props, ref) {
|
|
|
472
478
|
} else t16 = $[94];
|
|
473
479
|
const disabledKeySet = t16;
|
|
474
480
|
let t17;
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
t17 = () => {
|
|
481
|
+
if ($[95] !== collection || $[96] !== knownLabels) {
|
|
482
|
+
t17 = (keys) => {
|
|
478
483
|
let next = null;
|
|
479
|
-
for (const
|
|
480
|
-
const label_0 = collection.getItem(
|
|
481
|
-
if (label_0 && knownLabels.get(
|
|
484
|
+
for (const key_0 of keys) {
|
|
485
|
+
const label_0 = collection.getItem(key_0)?.textValue;
|
|
486
|
+
if (label_0 && knownLabels.get(key_0) !== label_0) {
|
|
482
487
|
if (!next) next = new Map(knownLabels);
|
|
483
|
-
next.set(
|
|
488
|
+
next.set(key_0, label_0);
|
|
484
489
|
}
|
|
485
490
|
}
|
|
486
491
|
if (next) setKnownLabels(next);
|
|
487
492
|
};
|
|
488
|
-
t18 = [
|
|
489
|
-
uniqueValues,
|
|
490
|
-
collection,
|
|
491
|
-
knownLabels
|
|
492
|
-
];
|
|
493
493
|
$[95] = collection;
|
|
494
494
|
$[96] = knownLabels;
|
|
495
|
-
$[97] =
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
t18 =
|
|
501
|
-
}
|
|
502
|
-
useEffect(t17, t18);
|
|
503
|
-
let t19;
|
|
504
|
-
if ($[100] !== collection || $[101] !== hasOptions) {
|
|
505
|
-
t19 = (text_0) => {
|
|
495
|
+
$[97] = t17;
|
|
496
|
+
} else t17 = $[97];
|
|
497
|
+
const rememberLabels = useEvent(t17);
|
|
498
|
+
let t18;
|
|
499
|
+
if ($[98] !== collection || $[99] !== hasOptions) {
|
|
500
|
+
t18 = (text_0) => {
|
|
506
501
|
if (!hasOptions) return null;
|
|
507
502
|
for (const node of collection) {
|
|
508
503
|
const nodes = node.type === "section" ? [...node.childNodes] : [node];
|
|
@@ -513,204 +508,200 @@ function TagInput(props, ref) {
|
|
|
513
508
|
}
|
|
514
509
|
return null;
|
|
515
510
|
};
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
} else
|
|
520
|
-
const findOptionKey =
|
|
521
|
-
let
|
|
522
|
-
if ($[
|
|
523
|
-
|
|
511
|
+
$[98] = collection;
|
|
512
|
+
$[99] = hasOptions;
|
|
513
|
+
$[100] = t18;
|
|
514
|
+
} else t18 = $[100];
|
|
515
|
+
const findOptionKey = t18;
|
|
516
|
+
let t19;
|
|
517
|
+
if ($[101] !== isFilterActive || $[102] !== term || $[103] !== textFilterFn) {
|
|
518
|
+
t19 = (nodes_0) => {
|
|
524
519
|
if (!isFilterActive || !term) return nodes_0;
|
|
525
520
|
return filterCollectionNodes(nodes_0, term, textFilterFn);
|
|
526
521
|
};
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
} else
|
|
532
|
-
const optionFilterFn =
|
|
533
|
-
let
|
|
522
|
+
$[101] = isFilterActive;
|
|
523
|
+
$[102] = term;
|
|
524
|
+
$[103] = textFilterFn;
|
|
525
|
+
$[104] = t19;
|
|
526
|
+
} else t19 = $[104];
|
|
527
|
+
const optionFilterFn = t19;
|
|
528
|
+
let t20;
|
|
534
529
|
bb0: {
|
|
535
530
|
if (!hasOptions) {
|
|
536
|
-
let
|
|
537
|
-
if ($[
|
|
538
|
-
|
|
539
|
-
$[
|
|
540
|
-
} else
|
|
541
|
-
|
|
531
|
+
let t21;
|
|
532
|
+
if ($[105] === Symbol.for("react.memo_cache_sentinel")) {
|
|
533
|
+
t21 = [];
|
|
534
|
+
$[105] = t21;
|
|
535
|
+
} else t21 = $[105];
|
|
536
|
+
t20 = t21;
|
|
542
537
|
break bb0;
|
|
543
538
|
}
|
|
544
|
-
let
|
|
545
|
-
if ($[
|
|
546
|
-
|
|
547
|
-
collectVisibleKeys(optionFilterFn(collection),
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
552
|
-
} else
|
|
553
|
-
|
|
539
|
+
let keys_0;
|
|
540
|
+
if ($[106] !== collection || $[107] !== disabledKeys || $[108] !== optionFilterFn) {
|
|
541
|
+
keys_0 = [];
|
|
542
|
+
collectVisibleKeys(optionFilterFn(collection), keys_0, disabledKeys ? new Set(disabledKeys) : void 0);
|
|
543
|
+
$[106] = collection;
|
|
544
|
+
$[107] = disabledKeys;
|
|
545
|
+
$[108] = optionFilterFn;
|
|
546
|
+
$[109] = keys_0;
|
|
547
|
+
} else keys_0 = $[109];
|
|
548
|
+
t20 = keys_0;
|
|
554
549
|
}
|
|
555
|
-
const visibleOptionKeys =
|
|
550
|
+
const visibleOptionKeys = t20;
|
|
556
551
|
const customTerm = hasOptions && allowsCustomValue && term && findOptionKey(term) == null && !uniqueValues.includes(term) ? term : null;
|
|
557
|
-
let
|
|
552
|
+
let t21;
|
|
558
553
|
bb1: {
|
|
559
554
|
if (!customTerm) {
|
|
560
|
-
|
|
555
|
+
t21 = children;
|
|
561
556
|
break bb1;
|
|
562
557
|
}
|
|
563
|
-
let
|
|
564
|
-
if ($[
|
|
565
|
-
|
|
558
|
+
let t22;
|
|
559
|
+
if ($[110] !== customTerm) {
|
|
560
|
+
t22 = /* @__PURE__ */ jsx(_CollectionItem, {
|
|
566
561
|
textValue: customTerm,
|
|
567
562
|
children: customTerm
|
|
568
563
|
}, customTerm);
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
} else
|
|
572
|
-
const customOption =
|
|
564
|
+
$[110] = customTerm;
|
|
565
|
+
$[111] = t22;
|
|
566
|
+
} else t22 = $[111];
|
|
567
|
+
const customOption = t22;
|
|
573
568
|
if (!visibleOptionKeys.length) {
|
|
574
|
-
|
|
569
|
+
t21 = customOption;
|
|
575
570
|
break bb1;
|
|
576
571
|
}
|
|
572
|
+
let t23;
|
|
573
|
+
if ($[112] !== t) {
|
|
574
|
+
t23 = t("tagInput.customValue", "Custom value");
|
|
575
|
+
$[112] = t;
|
|
576
|
+
$[113] = t23;
|
|
577
|
+
} else t23 = $[113];
|
|
577
578
|
let t24;
|
|
578
|
-
if ($[114] !==
|
|
579
|
-
t24 =
|
|
580
|
-
|
|
581
|
-
$[115] = t24;
|
|
582
|
-
} else t24 = $[115];
|
|
583
|
-
let t25;
|
|
584
|
-
if ($[116] !== customOption || $[117] !== t24) {
|
|
585
|
-
t25 = /* @__PURE__ */ jsx(Section, {
|
|
586
|
-
"aria-label": t24,
|
|
579
|
+
if ($[114] !== customOption || $[115] !== t23) {
|
|
580
|
+
t24 = /* @__PURE__ */ jsx(Section, {
|
|
581
|
+
"aria-label": t23,
|
|
587
582
|
children: customOption
|
|
588
583
|
}, "__custom_value__");
|
|
589
|
-
$[
|
|
590
|
-
$[
|
|
591
|
-
$[
|
|
592
|
-
} else
|
|
593
|
-
const customSection =
|
|
584
|
+
$[114] = customOption;
|
|
585
|
+
$[115] = t23;
|
|
586
|
+
$[116] = t24;
|
|
587
|
+
} else t24 = $[116];
|
|
588
|
+
const customSection = t24;
|
|
594
589
|
if ([...collection].some(_temp4)) {
|
|
590
|
+
let t25;
|
|
591
|
+
if ($[117] !== children) {
|
|
592
|
+
t25 = Array.isArray(children) ? children : [children];
|
|
593
|
+
$[117] = children;
|
|
594
|
+
$[118] = t25;
|
|
595
|
+
} else t25 = $[118];
|
|
595
596
|
let t26;
|
|
596
|
-
if ($[119] !==
|
|
597
|
-
t26 =
|
|
598
|
-
$[119] =
|
|
599
|
-
$[120] =
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
t27 = [...t26, customSection];
|
|
604
|
-
$[121] = customSection;
|
|
605
|
-
$[122] = t26;
|
|
606
|
-
$[123] = t27;
|
|
607
|
-
} else t27 = $[123];
|
|
608
|
-
t22 = t27;
|
|
597
|
+
if ($[119] !== customSection || $[120] !== t25) {
|
|
598
|
+
t26 = [...t25, customSection];
|
|
599
|
+
$[119] = customSection;
|
|
600
|
+
$[120] = t25;
|
|
601
|
+
$[121] = t26;
|
|
602
|
+
} else t26 = $[121];
|
|
603
|
+
t21 = t26;
|
|
609
604
|
break bb1;
|
|
610
605
|
}
|
|
611
|
-
let
|
|
612
|
-
if ($[
|
|
613
|
-
|
|
614
|
-
$[
|
|
606
|
+
let t25;
|
|
607
|
+
if ($[122] !== t) {
|
|
608
|
+
t25 = t("tagInput.options", "Options");
|
|
609
|
+
$[122] = t;
|
|
610
|
+
$[123] = t25;
|
|
611
|
+
} else t25 = $[123];
|
|
612
|
+
const t26 = children;
|
|
613
|
+
let t27;
|
|
614
|
+
if ($[124] !== t25 || $[125] !== t26) {
|
|
615
|
+
t27 = /* @__PURE__ */ jsx(Section, {
|
|
616
|
+
"aria-label": t25,
|
|
617
|
+
children: t26
|
|
618
|
+
}, "__options__");
|
|
619
|
+
$[124] = t25;
|
|
615
620
|
$[125] = t26;
|
|
616
|
-
|
|
617
|
-
|
|
621
|
+
$[126] = t27;
|
|
622
|
+
} else t27 = $[126];
|
|
618
623
|
let t28;
|
|
619
|
-
if ($[
|
|
620
|
-
t28 =
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
$[128] = t28;
|
|
627
|
-
} else t28 = $[128];
|
|
628
|
-
let t29;
|
|
629
|
-
if ($[129] !== customSection || $[130] !== t28) {
|
|
630
|
-
t29 = [t28, customSection];
|
|
631
|
-
$[129] = customSection;
|
|
632
|
-
$[130] = t28;
|
|
633
|
-
$[131] = t29;
|
|
634
|
-
} else t29 = $[131];
|
|
635
|
-
t22 = t29;
|
|
624
|
+
if ($[127] !== customSection || $[128] !== t27) {
|
|
625
|
+
t28 = [t27, customSection];
|
|
626
|
+
$[127] = customSection;
|
|
627
|
+
$[128] = t27;
|
|
628
|
+
$[129] = t28;
|
|
629
|
+
} else t28 = $[129];
|
|
630
|
+
t21 = t28;
|
|
636
631
|
}
|
|
637
|
-
const popoverChildren =
|
|
632
|
+
const popoverChildren = t21;
|
|
638
633
|
const hasResults = visibleOptionKeys.length > 0 || customTerm != null;
|
|
639
634
|
const visibleOptionsSignature = visibleOptionKeys.join("\0");
|
|
640
635
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
641
636
|
const isInteractive = !isDisabled && !isReadOnly;
|
|
642
637
|
const shouldShowPopover = hasOptions && isInteractive && isPopoverOpen && hasResults;
|
|
643
|
-
let t23;
|
|
644
|
-
let t24;
|
|
645
|
-
if ($[132] !== hasOptions || $[133] !== hasResults || $[134] !== isPopoverOpen) {
|
|
646
|
-
t23 = () => {
|
|
647
|
-
if (isPopoverOpen && hasOptions && !hasResults) setIsPopoverOpen(false);
|
|
648
|
-
};
|
|
649
|
-
t24 = [
|
|
650
|
-
isPopoverOpen,
|
|
651
|
-
hasOptions,
|
|
652
|
-
hasResults
|
|
653
|
-
];
|
|
654
|
-
$[132] = hasOptions;
|
|
655
|
-
$[133] = hasResults;
|
|
656
|
-
$[134] = isPopoverOpen;
|
|
657
|
-
$[135] = t23;
|
|
658
|
-
$[136] = t24;
|
|
659
|
-
} else {
|
|
660
|
-
t23 = $[135];
|
|
661
|
-
t24 = $[136];
|
|
662
|
-
}
|
|
663
|
-
useEffect(t23, t24);
|
|
664
638
|
const notifiedOpenRef = useRef(false);
|
|
665
|
-
let
|
|
666
|
-
let
|
|
667
|
-
if ($[
|
|
668
|
-
|
|
639
|
+
let t22;
|
|
640
|
+
let t23;
|
|
641
|
+
if ($[130] !== onOpenChange || $[131] !== shouldShowPopover) {
|
|
642
|
+
t22 = () => {
|
|
669
643
|
if (notifiedOpenRef.current === shouldShowPopover) return;
|
|
670
644
|
notifiedOpenRef.current = shouldShowPopover;
|
|
671
645
|
onOpenChange?.(shouldShowPopover);
|
|
672
646
|
};
|
|
673
|
-
|
|
674
|
-
$[
|
|
675
|
-
$[
|
|
676
|
-
$[
|
|
677
|
-
$[
|
|
647
|
+
t23 = [shouldShowPopover, onOpenChange];
|
|
648
|
+
$[130] = onOpenChange;
|
|
649
|
+
$[131] = shouldShowPopover;
|
|
650
|
+
$[132] = t22;
|
|
651
|
+
$[133] = t23;
|
|
678
652
|
} else {
|
|
679
|
-
|
|
680
|
-
|
|
653
|
+
t22 = $[132];
|
|
654
|
+
t23 = $[133];
|
|
681
655
|
}
|
|
682
|
-
useEffect(
|
|
683
|
-
const [
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
656
|
+
useEffect(t22, t23);
|
|
657
|
+
const [activeOption, setActiveOption] = useState(null);
|
|
658
|
+
const activeOptionKey = activeOption?.key ?? null;
|
|
659
|
+
let t24;
|
|
660
|
+
if ($[134] === Symbol.for("react.memo_cache_sentinel")) {
|
|
661
|
+
t24 = (key_1, source, forTerm) => {
|
|
687
662
|
const listState = listStateRef.current;
|
|
688
|
-
if (!listState ||
|
|
663
|
+
if (!listState || key_1 == null) return;
|
|
689
664
|
markKeyboardFocus(listState);
|
|
690
|
-
listState.selectionManager.setFocusedKey(
|
|
691
|
-
|
|
665
|
+
listState.selectionManager.setFocusedKey(key_1);
|
|
666
|
+
setActiveOption({
|
|
667
|
+
key: key_1,
|
|
668
|
+
term: forTerm,
|
|
669
|
+
source
|
|
670
|
+
});
|
|
692
671
|
};
|
|
693
|
-
$[
|
|
694
|
-
} else
|
|
695
|
-
const moveVirtualFocus = useEvent(
|
|
672
|
+
$[134] = t24;
|
|
673
|
+
} else t24 = $[134];
|
|
674
|
+
const moveVirtualFocus = useEvent(t24);
|
|
696
675
|
const [popoverMinWidth, setPopoverMinWidth] = useState();
|
|
697
676
|
const exactOptionKey = term ? findOptionKey(term) : null;
|
|
677
|
+
let t25;
|
|
678
|
+
if ($[135] !== customTerm || $[136] !== visibleOptionKeys) {
|
|
679
|
+
t25 = customTerm ? [...visibleOptionKeys, customTerm] : visibleOptionKeys;
|
|
680
|
+
$[135] = customTerm;
|
|
681
|
+
$[136] = visibleOptionKeys;
|
|
682
|
+
$[137] = t25;
|
|
683
|
+
} else t25 = $[137];
|
|
684
|
+
const visibleTargetKeys = t25;
|
|
685
|
+
const preferredOptionKey = exactOptionKey != null && visibleTargetKeys.includes(exactOptionKey) ? exactOptionKey : visibleTargetKeys[0] ?? null;
|
|
698
686
|
const focusTermRef = useRef(null);
|
|
699
|
-
let
|
|
700
|
-
|
|
701
|
-
|
|
687
|
+
let t26;
|
|
688
|
+
let t27;
|
|
689
|
+
if ($[138] !== customTerm || $[139] !== exactOptionKey || $[140] !== moveVirtualFocus || $[141] !== shouldShowPopover || $[142] !== term || $[143] !== visibleOptionsSignature || $[144] !== wrapperRef) {
|
|
690
|
+
t26 = () => {
|
|
702
691
|
if (!shouldShowPopover) {
|
|
703
|
-
setActiveOptionKey(null);
|
|
704
692
|
focusTermRef.current = null;
|
|
705
693
|
return;
|
|
706
694
|
}
|
|
707
695
|
setPopoverMinWidth(wrapperRef.current?.offsetWidth);
|
|
708
|
-
const visibleKeys =
|
|
696
|
+
const visibleKeys = visibleOptionsSignature ? visibleOptionsSignature.split("\0") : [];
|
|
697
|
+
if (customTerm) visibleKeys.push(customTerm);
|
|
709
698
|
const preferredKey = exactOptionKey != null && visibleKeys.includes(exactOptionKey) ? exactOptionKey : visibleKeys[0] ?? null;
|
|
710
699
|
const isNewTerm = !!term && focusTermRef.current !== term;
|
|
711
700
|
focusTermRef.current = term;
|
|
712
701
|
let attempts = 0;
|
|
702
|
+
let isCancelled = false;
|
|
713
703
|
const tick = () => {
|
|
704
|
+
if (isCancelled) return;
|
|
714
705
|
const listState_0 = listStateRef.current;
|
|
715
706
|
if (!listState_0) {
|
|
716
707
|
attempts = attempts + 1;
|
|
@@ -718,60 +709,68 @@ function TagInput(props, ref) {
|
|
|
718
709
|
return;
|
|
719
710
|
}
|
|
720
711
|
const focused = listState_0.selectionManager.focusedKey;
|
|
721
|
-
if (focused
|
|
712
|
+
if (focused != null && visibleKeys.includes(focused) && !isNewTerm) setActiveOption((prev) => prev?.key === focused ? {
|
|
713
|
+
...prev,
|
|
714
|
+
term
|
|
715
|
+
} : {
|
|
716
|
+
key: focused,
|
|
717
|
+
term,
|
|
718
|
+
source: "auto"
|
|
719
|
+
});
|
|
720
|
+
else moveVirtualFocus(preferredKey, "auto", term);
|
|
722
721
|
};
|
|
723
722
|
requestAnimationFrame(() => requestAnimationFrame(tick));
|
|
723
|
+
return () => {
|
|
724
|
+
isCancelled = true;
|
|
725
|
+
};
|
|
724
726
|
};
|
|
725
|
-
|
|
726
|
-
$[143] = exactOptionKey;
|
|
727
|
-
$[144] = moveVirtualFocus;
|
|
728
|
-
$[145] = shouldShowPopover;
|
|
729
|
-
$[146] = term;
|
|
730
|
-
$[147] = visibleOptionKeys;
|
|
731
|
-
$[148] = wrapperRef;
|
|
732
|
-
$[149] = t28;
|
|
733
|
-
} else t28 = $[149];
|
|
734
|
-
let t29;
|
|
735
|
-
if ($[150] !== customTerm || $[151] !== exactOptionKey || $[152] !== shouldShowPopover || $[153] !== term || $[154] !== visibleOptionsSignature) {
|
|
736
|
-
t29 = [
|
|
727
|
+
t27 = [
|
|
737
728
|
shouldShowPopover,
|
|
738
729
|
visibleOptionsSignature,
|
|
739
730
|
customTerm,
|
|
740
731
|
term,
|
|
741
|
-
exactOptionKey
|
|
732
|
+
exactOptionKey,
|
|
733
|
+
moveVirtualFocus,
|
|
734
|
+
wrapperRef
|
|
742
735
|
];
|
|
743
|
-
$[
|
|
744
|
-
$[
|
|
745
|
-
$[
|
|
746
|
-
$[
|
|
747
|
-
$[
|
|
748
|
-
$[
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
736
|
+
$[138] = customTerm;
|
|
737
|
+
$[139] = exactOptionKey;
|
|
738
|
+
$[140] = moveVirtualFocus;
|
|
739
|
+
$[141] = shouldShowPopover;
|
|
740
|
+
$[142] = term;
|
|
741
|
+
$[143] = visibleOptionsSignature;
|
|
742
|
+
$[144] = wrapperRef;
|
|
743
|
+
$[145] = t26;
|
|
744
|
+
$[146] = t27;
|
|
745
|
+
} else {
|
|
746
|
+
t26 = $[145];
|
|
747
|
+
t27 = $[146];
|
|
748
|
+
}
|
|
749
|
+
useLayoutEffect(t26, t27);
|
|
750
|
+
let t28;
|
|
751
|
+
if ($[147] !== setDraftState) {
|
|
752
|
+
t28 = (next_0) => {
|
|
754
753
|
setDraftState(next_0);
|
|
755
754
|
setIsFilterActive(!!next_0.trim());
|
|
756
755
|
};
|
|
757
|
-
$[
|
|
758
|
-
$[
|
|
759
|
-
} else
|
|
760
|
-
const setDraft = useEvent(
|
|
761
|
-
let
|
|
762
|
-
if ($[
|
|
763
|
-
|
|
756
|
+
$[147] = setDraftState;
|
|
757
|
+
$[148] = t28;
|
|
758
|
+
} else t28 = $[148];
|
|
759
|
+
const setDraft = useEvent(t28);
|
|
760
|
+
let t29;
|
|
761
|
+
if ($[149] === Symbol.for("react.memo_cache_sentinel")) {
|
|
762
|
+
t29 = (text_1) => {
|
|
764
763
|
setAnnouncement((prev_0) => ({
|
|
765
764
|
id: prev_0.id + 1,
|
|
766
765
|
text: text_1
|
|
767
766
|
}));
|
|
768
767
|
};
|
|
769
|
-
$[
|
|
770
|
-
} else
|
|
771
|
-
const announce = useEvent(
|
|
772
|
-
let
|
|
773
|
-
if ($[
|
|
774
|
-
|
|
768
|
+
$[149] = t29;
|
|
769
|
+
} else t29 = $[149];
|
|
770
|
+
const announce = useEvent(t29);
|
|
771
|
+
let t30;
|
|
772
|
+
if ($[150] !== t) {
|
|
773
|
+
t30 = (rejection) => {
|
|
775
774
|
if (rejection.message) return rejection.message;
|
|
776
775
|
switch (rejection.reason) {
|
|
777
776
|
case "duplicate": return t("tagInput.duplicateValue", "\"{{value}}\" is already added", { value: rejection.text });
|
|
@@ -780,15 +779,15 @@ function TagInput(props, ref) {
|
|
|
780
779
|
default: return t("tagInput.invalidValue", "\"{{value}}\" is not a valid value", { value: rejection.text });
|
|
781
780
|
}
|
|
782
781
|
};
|
|
783
|
-
$[
|
|
784
|
-
$[
|
|
785
|
-
} else
|
|
786
|
-
const rejectionMessage = useEvent(
|
|
782
|
+
$[150] = t;
|
|
783
|
+
$[151] = t30;
|
|
784
|
+
} else t30 = $[151];
|
|
785
|
+
const rejectionMessage = useEvent(t30);
|
|
787
786
|
const joiner = delimiters[0] ? `${delimiters[0]} ` : " ";
|
|
788
787
|
const hasFieldMessage = !!label || !!props.forceField;
|
|
789
|
-
let
|
|
790
|
-
if ($[
|
|
791
|
-
|
|
788
|
+
let t31;
|
|
789
|
+
if ($[152] !== allowsCustomValue || $[153] !== announce || $[154] !== disabledKeySet || $[155] !== findOptionKey || $[156] !== formatList || $[157] !== getOptionLabel || $[158] !== hasFieldMessage || $[159] !== hasOptions || $[160] !== joiner || $[161] !== rejectionMessage || $[162] !== rememberLabels || $[163] !== setTagError || $[164] !== setValues || $[165] !== t || $[166] !== uniqueValues || $[167] !== validateTag) {
|
|
790
|
+
t31 = (parts) => {
|
|
792
791
|
if (!parts.length) return "";
|
|
793
792
|
const present = new Set(uniqueValues);
|
|
794
793
|
const accepted = [];
|
|
@@ -834,6 +833,7 @@ function TagInput(props, ref) {
|
|
|
834
833
|
const error = rejected.length ? rejectionMessage(rejected[0]) : null;
|
|
835
834
|
const messages = [];
|
|
836
835
|
if (accepted.length) {
|
|
836
|
+
rememberLabels(accepted);
|
|
837
837
|
setValues([...uniqueValues, ...accepted]);
|
|
838
838
|
messages.push(t("tagInput.added", "Added {{value}}", { value: formatList(accepted.map(getOptionLabel)) }));
|
|
839
839
|
}
|
|
@@ -842,102 +842,107 @@ function TagInput(props, ref) {
|
|
|
842
842
|
setTagError(error);
|
|
843
843
|
return rejected.map(_temp5).join(joiner);
|
|
844
844
|
};
|
|
845
|
-
$[
|
|
846
|
-
$[
|
|
847
|
-
$[
|
|
848
|
-
$[
|
|
849
|
-
$[
|
|
850
|
-
$[
|
|
851
|
-
$[
|
|
852
|
-
$[
|
|
853
|
-
$[
|
|
854
|
-
$[
|
|
855
|
-
$[
|
|
856
|
-
$[
|
|
857
|
-
$[
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
$[
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
845
|
+
$[152] = allowsCustomValue;
|
|
846
|
+
$[153] = announce;
|
|
847
|
+
$[154] = disabledKeySet;
|
|
848
|
+
$[155] = findOptionKey;
|
|
849
|
+
$[156] = formatList;
|
|
850
|
+
$[157] = getOptionLabel;
|
|
851
|
+
$[158] = hasFieldMessage;
|
|
852
|
+
$[159] = hasOptions;
|
|
853
|
+
$[160] = joiner;
|
|
854
|
+
$[161] = rejectionMessage;
|
|
855
|
+
$[162] = rememberLabels;
|
|
856
|
+
$[163] = setTagError;
|
|
857
|
+
$[164] = setValues;
|
|
858
|
+
$[165] = t;
|
|
859
|
+
$[166] = uniqueValues;
|
|
860
|
+
$[167] = validateTag;
|
|
861
|
+
$[168] = t31;
|
|
862
|
+
} else t31 = $[168];
|
|
863
|
+
const commitParts = useEvent(t31);
|
|
864
|
+
let t32;
|
|
865
|
+
if ($[169] !== commitParts || $[170] !== delimiters || $[171] !== draft || $[172] !== setDraft) {
|
|
866
|
+
t32 = () => {
|
|
866
867
|
setDraft(commitParts(splitTagText(draft, delimiters)));
|
|
867
868
|
};
|
|
868
|
-
$[
|
|
869
|
-
$[
|
|
870
|
-
$[
|
|
871
|
-
$[
|
|
872
|
-
$[
|
|
873
|
-
} else
|
|
874
|
-
const commitDraft = useEvent(
|
|
875
|
-
let
|
|
876
|
-
if ($[
|
|
877
|
-
|
|
878
|
-
const removed = new Set(
|
|
879
|
-
const next_1 = uniqueValues.filter((
|
|
869
|
+
$[169] = commitParts;
|
|
870
|
+
$[170] = delimiters;
|
|
871
|
+
$[171] = draft;
|
|
872
|
+
$[172] = setDraft;
|
|
873
|
+
$[173] = t32;
|
|
874
|
+
} else t32 = $[173];
|
|
875
|
+
const commitDraft = useEvent(t32);
|
|
876
|
+
let t33;
|
|
877
|
+
if ($[174] !== announce || $[175] !== formatList || $[176] !== getOptionLabel || $[177] !== inputRef || $[178] !== setTagError || $[179] !== setValues || $[180] !== t || $[181] !== uniqueValues) {
|
|
878
|
+
t33 = (keys_1) => {
|
|
879
|
+
const removed = new Set(keys_1);
|
|
880
|
+
const next_1 = uniqueValues.filter((value_0) => !removed.has(value_0));
|
|
880
881
|
if (!next_1.length) inputRef.current?.focus();
|
|
881
882
|
setValues(next_1);
|
|
882
883
|
setTagError(null);
|
|
883
|
-
announce(t("tagInput.removed", "Removed {{value}}", { value: formatList(
|
|
884
|
+
announce(t("tagInput.removed", "Removed {{value}}", { value: formatList(keys_1.map(getOptionLabel)) }));
|
|
884
885
|
};
|
|
885
|
-
$[
|
|
886
|
-
$[
|
|
887
|
-
$[
|
|
888
|
-
$[
|
|
889
|
-
$[
|
|
890
|
-
$[
|
|
891
|
-
$[
|
|
892
|
-
$[
|
|
893
|
-
$[
|
|
894
|
-
} else
|
|
895
|
-
const removeValues = useEvent(
|
|
896
|
-
let
|
|
897
|
-
if ($[
|
|
898
|
-
|
|
886
|
+
$[174] = announce;
|
|
887
|
+
$[175] = formatList;
|
|
888
|
+
$[176] = getOptionLabel;
|
|
889
|
+
$[177] = inputRef;
|
|
890
|
+
$[178] = setTagError;
|
|
891
|
+
$[179] = setValues;
|
|
892
|
+
$[180] = t;
|
|
893
|
+
$[181] = uniqueValues;
|
|
894
|
+
$[182] = t33;
|
|
895
|
+
} else t33 = $[182];
|
|
896
|
+
const removeValues = useEvent(t33);
|
|
897
|
+
let t34;
|
|
898
|
+
if ($[183] !== commitParts || $[184] !== removeValues || $[185] !== setDraft || $[186] !== setTagError || $[187] !== uniqueValues) {
|
|
899
|
+
t34 = (key_2) => {
|
|
899
900
|
setTagError(null);
|
|
900
|
-
if (uniqueValues.includes(
|
|
901
|
-
removeValues([
|
|
901
|
+
if (uniqueValues.includes(key_2)) {
|
|
902
|
+
removeValues([key_2]);
|
|
902
903
|
setDraft("");
|
|
903
|
-
} else setDraft(commitParts([
|
|
904
|
+
} else setDraft(commitParts([key_2]));
|
|
904
905
|
};
|
|
905
|
-
$[
|
|
906
|
-
$[
|
|
907
|
-
$[
|
|
908
|
-
$[
|
|
909
|
-
$[
|
|
910
|
-
$[
|
|
911
|
-
} else
|
|
912
|
-
const toggleOption = useEvent(
|
|
913
|
-
let
|
|
914
|
-
if ($[
|
|
915
|
-
|
|
906
|
+
$[183] = commitParts;
|
|
907
|
+
$[184] = removeValues;
|
|
908
|
+
$[185] = setDraft;
|
|
909
|
+
$[186] = setTagError;
|
|
910
|
+
$[187] = uniqueValues;
|
|
911
|
+
$[188] = t34;
|
|
912
|
+
} else t34 = $[188];
|
|
913
|
+
const toggleOption = useEvent(t34);
|
|
914
|
+
let t35;
|
|
915
|
+
if ($[189] !== collection || $[190] !== customTerm || $[191] !== inputRef || $[192] !== toggleOption || $[193] !== uniqueValues) {
|
|
916
|
+
t35 = (selection) => {
|
|
916
917
|
if (!Array.isArray(selection)) return;
|
|
917
918
|
const next_2 = new Set(selection.map(String));
|
|
918
|
-
const changed = [...[...next_2].filter((
|
|
919
|
+
const changed = [...[...next_2].filter((key_3) => !uniqueValues.includes(key_3)), ...uniqueValues.filter((value_1) => !next_2.has(value_1) && (collection.getItem(value_1) != null || value_1 === customTerm))];
|
|
919
920
|
changed.forEach(toggleOption);
|
|
920
921
|
const clicked = changed[changed.length - 1];
|
|
921
922
|
if (clicked != null) {
|
|
922
923
|
listStateRef.current?.selectionManager.setFocusedKey(clicked);
|
|
923
|
-
|
|
924
|
+
setActiveOption({
|
|
925
|
+
key: clicked,
|
|
926
|
+
term: "",
|
|
927
|
+
source: "user"
|
|
928
|
+
});
|
|
924
929
|
}
|
|
925
930
|
setTimeout(() => inputRef.current?.focus(), 0);
|
|
926
931
|
};
|
|
927
|
-
$[
|
|
928
|
-
$[
|
|
929
|
-
$[
|
|
930
|
-
$[
|
|
931
|
-
$[
|
|
932
|
-
$[
|
|
933
|
-
} else
|
|
934
|
-
const handlePopoverSelection = useEvent(
|
|
932
|
+
$[189] = collection;
|
|
933
|
+
$[190] = customTerm;
|
|
934
|
+
$[191] = inputRef;
|
|
935
|
+
$[192] = toggleOption;
|
|
936
|
+
$[193] = uniqueValues;
|
|
937
|
+
$[194] = t35;
|
|
938
|
+
} else t35 = $[194];
|
|
939
|
+
const handlePopoverSelection = useEvent(t35);
|
|
935
940
|
const isTabbingRef = useRef(false);
|
|
936
|
-
let
|
|
937
|
-
if ($[
|
|
938
|
-
|
|
939
|
-
isTabbingRef.current = e.key === "Tab";
|
|
941
|
+
let t36;
|
|
942
|
+
if ($[195] !== activeOption || $[196] !== commitDraft || $[197] !== commitParts || $[198] !== delimiters || $[199] !== draft || $[200] !== getOptionLabel || $[201] !== hasOptions || $[202] !== hasResults || $[203] !== isInteractive || $[204] !== joiner || $[205] !== moveVirtualFocus || $[206] !== onKeyDown || $[207] !== preferredOptionKey || $[208] !== rejectionMessage || $[209] !== setDraft || $[210] !== setTagError || $[211] !== shouldShowPopover || $[212] !== term || $[213] !== toggleOption || $[214] !== uniqueValues) {
|
|
943
|
+
t36 = (e) => {
|
|
940
944
|
onKeyDown?.(e);
|
|
945
|
+
isTabbingRef.current = e.key === "Tab" && !e.defaultPrevented;
|
|
941
946
|
if (e.defaultPrevented || !isInteractive) return;
|
|
942
947
|
const listState_1 = listStateRef.current;
|
|
943
948
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -948,20 +953,29 @@ function TagInput(props, ref) {
|
|
|
948
953
|
setIsPopoverOpen(true);
|
|
949
954
|
return;
|
|
950
955
|
}
|
|
951
|
-
if (listState_1) moveVirtualFocus(getNextVisibleKey(listState_1, e.key === "ArrowDown" ? 1 : -1));
|
|
956
|
+
if (listState_1) moveVirtualFocus(getNextVisibleKey(listState_1, e.key === "ArrowDown" ? 1 : -1), "user", term);
|
|
952
957
|
return;
|
|
953
958
|
}
|
|
954
959
|
if ((e.key === "Home" || e.key === "End") && shouldShowPopover) {
|
|
955
960
|
e.preventDefault();
|
|
956
|
-
if (listState_1) moveVirtualFocus(getEdgeVisibleKey(listState_1, e.key === "Home" ? "first" : "last"));
|
|
961
|
+
if (listState_1) moveVirtualFocus(getEdgeVisibleKey(listState_1, e.key === "Home" ? "first" : "last"), "user", term);
|
|
957
962
|
return;
|
|
958
963
|
}
|
|
959
964
|
if (e.key === "Enter") {
|
|
960
965
|
if (isComposingKey(e)) return;
|
|
961
|
-
const
|
|
962
|
-
|
|
966
|
+
const isCurrent = activeOption != null && activeOption.term === term;
|
|
967
|
+
const targetKey = shouldShowPopover ? isCurrent ? activeOption.key : preferredOptionKey : null;
|
|
968
|
+
if (targetKey != null) {
|
|
963
969
|
e.preventDefault();
|
|
964
|
-
|
|
970
|
+
const key_4 = String(targetKey);
|
|
971
|
+
if (term && uniqueValues.includes(key_4) && !(isCurrent && activeOption.source === "user")) {
|
|
972
|
+
setTagError(rejectionMessage({
|
|
973
|
+
text: getOptionLabel(key_4),
|
|
974
|
+
reason: "duplicate"
|
|
975
|
+
}));
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
toggleOption(key_4);
|
|
965
979
|
return;
|
|
966
980
|
}
|
|
967
981
|
if (!term) return;
|
|
@@ -988,31 +1002,38 @@ function TagInput(props, ref) {
|
|
|
988
1002
|
e.stopPropagation();
|
|
989
1003
|
setDraft("");
|
|
990
1004
|
setTagError(null);
|
|
1005
|
+
setIsPopoverOpen(false);
|
|
991
1006
|
}
|
|
992
1007
|
}
|
|
993
1008
|
};
|
|
994
|
-
$[
|
|
995
|
-
$[
|
|
996
|
-
$[
|
|
997
|
-
$[
|
|
998
|
-
$[
|
|
999
|
-
$[
|
|
1000
|
-
$[
|
|
1001
|
-
$[
|
|
1002
|
-
$[
|
|
1003
|
-
$[
|
|
1004
|
-
$[
|
|
1005
|
-
$[
|
|
1006
|
-
$[
|
|
1007
|
-
$[
|
|
1008
|
-
$[
|
|
1009
|
-
$[
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1009
|
+
$[195] = activeOption;
|
|
1010
|
+
$[196] = commitDraft;
|
|
1011
|
+
$[197] = commitParts;
|
|
1012
|
+
$[198] = delimiters;
|
|
1013
|
+
$[199] = draft;
|
|
1014
|
+
$[200] = getOptionLabel;
|
|
1015
|
+
$[201] = hasOptions;
|
|
1016
|
+
$[202] = hasResults;
|
|
1017
|
+
$[203] = isInteractive;
|
|
1018
|
+
$[204] = joiner;
|
|
1019
|
+
$[205] = moveVirtualFocus;
|
|
1020
|
+
$[206] = onKeyDown;
|
|
1021
|
+
$[207] = preferredOptionKey;
|
|
1022
|
+
$[208] = rejectionMessage;
|
|
1023
|
+
$[209] = setDraft;
|
|
1024
|
+
$[210] = setTagError;
|
|
1025
|
+
$[211] = shouldShowPopover;
|
|
1026
|
+
$[212] = term;
|
|
1027
|
+
$[213] = toggleOption;
|
|
1028
|
+
$[214] = uniqueValues;
|
|
1029
|
+
$[215] = t36;
|
|
1030
|
+
} else t36 = $[215];
|
|
1031
|
+
const handleKeyDown = useEvent(t36);
|
|
1032
|
+
let t37;
|
|
1033
|
+
if ($[216] !== commitParts || $[217] !== delimiters || $[218] !== hasOptions || $[219] !== joiner || $[220] !== popoverTrigger || $[221] !== rememberLabels || $[222] !== setDraft || $[223] !== setTagError || $[224] !== uniqueValues) {
|
|
1034
|
+
t37 = (next_3) => {
|
|
1015
1035
|
setTagError(null);
|
|
1036
|
+
rememberLabels(uniqueValues);
|
|
1016
1037
|
const pattern = delimiterPattern(delimiters);
|
|
1017
1038
|
const parts_0 = pattern ? next_3.split(pattern) : [next_3];
|
|
1018
1039
|
let nextDraft = next_3;
|
|
@@ -1023,19 +1044,21 @@ function TagInput(props, ref) {
|
|
|
1023
1044
|
setDraft(nextDraft);
|
|
1024
1045
|
if (hasOptions && popoverTrigger !== "manual" && nextDraft.trim()) setIsPopoverOpen(true);
|
|
1025
1046
|
};
|
|
1026
|
-
$[
|
|
1027
|
-
$[
|
|
1028
|
-
$[
|
|
1029
|
-
$[
|
|
1030
|
-
$[
|
|
1031
|
-
$[
|
|
1032
|
-
$[
|
|
1033
|
-
$[
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1047
|
+
$[216] = commitParts;
|
|
1048
|
+
$[217] = delimiters;
|
|
1049
|
+
$[218] = hasOptions;
|
|
1050
|
+
$[219] = joiner;
|
|
1051
|
+
$[220] = popoverTrigger;
|
|
1052
|
+
$[221] = rememberLabels;
|
|
1053
|
+
$[222] = setDraft;
|
|
1054
|
+
$[223] = setTagError;
|
|
1055
|
+
$[224] = uniqueValues;
|
|
1056
|
+
$[225] = t37;
|
|
1057
|
+
} else t37 = $[225];
|
|
1058
|
+
const handleInputChange = useEvent(t37);
|
|
1059
|
+
let t38;
|
|
1060
|
+
if ($[226] !== commitParts || $[227] !== delimiters || $[228] !== draft || $[229] !== isInteractive || $[230] !== setDraft || $[231] !== setTagError) {
|
|
1061
|
+
t38 = (e_0) => {
|
|
1039
1062
|
if (!isInteractive) return;
|
|
1040
1063
|
const pasted = e_0.clipboardData.getData("text");
|
|
1041
1064
|
if (!pasted || splitTagText(pasted, delimiters).length < 2) return;
|
|
@@ -1046,70 +1069,70 @@ function TagInput(props, ref) {
|
|
|
1046
1069
|
setTagError(null);
|
|
1047
1070
|
setDraft(commitParts(splitTagText(`${draft.slice(0, start_0)}\n${pasted}\n${draft.slice(end_0)}`, delimiters)));
|
|
1048
1071
|
};
|
|
1049
|
-
$[
|
|
1050
|
-
$[
|
|
1051
|
-
$[
|
|
1052
|
-
$[
|
|
1053
|
-
$[
|
|
1054
|
-
$[
|
|
1055
|
-
$[
|
|
1056
|
-
} else
|
|
1057
|
-
const handlePaste = useEvent(
|
|
1058
|
-
let
|
|
1059
|
-
if ($[
|
|
1060
|
-
|
|
1072
|
+
$[226] = commitParts;
|
|
1073
|
+
$[227] = delimiters;
|
|
1074
|
+
$[228] = draft;
|
|
1075
|
+
$[229] = isInteractive;
|
|
1076
|
+
$[230] = setDraft;
|
|
1077
|
+
$[231] = setTagError;
|
|
1078
|
+
$[232] = t38;
|
|
1079
|
+
} else t38 = $[232];
|
|
1080
|
+
const handlePaste = useEvent(t38);
|
|
1081
|
+
let t39;
|
|
1082
|
+
if ($[233] !== allowsCustomValue || $[234] !== commitDraft || $[235] !== findOptionKey || $[236] !== hasOptions || $[237] !== isInteractive || $[238] !== setDraft || $[239] !== setTagError || $[240] !== shouldCommitOnBlur || $[241] !== term) {
|
|
1083
|
+
t39 = () => {
|
|
1061
1084
|
if (!term || !shouldCommitOnBlur || !isInteractive) return;
|
|
1062
1085
|
if (hasOptions && !allowsCustomValue && findOptionKey(term) == null) {
|
|
1063
1086
|
setDraft("");
|
|
1064
1087
|
setTagError(null);
|
|
1065
1088
|
} else commitDraft();
|
|
1066
1089
|
};
|
|
1067
|
-
$[
|
|
1068
|
-
$[
|
|
1069
|
-
$[
|
|
1070
|
-
$[
|
|
1071
|
-
$[
|
|
1072
|
-
$[
|
|
1073
|
-
$[
|
|
1074
|
-
$[
|
|
1075
|
-
$[
|
|
1076
|
-
$[
|
|
1077
|
-
} else
|
|
1078
|
-
const settleDraft = useEvent(
|
|
1079
|
-
let
|
|
1080
|
-
if ($[
|
|
1081
|
-
|
|
1090
|
+
$[233] = allowsCustomValue;
|
|
1091
|
+
$[234] = commitDraft;
|
|
1092
|
+
$[235] = findOptionKey;
|
|
1093
|
+
$[236] = hasOptions;
|
|
1094
|
+
$[237] = isInteractive;
|
|
1095
|
+
$[238] = setDraft;
|
|
1096
|
+
$[239] = setTagError;
|
|
1097
|
+
$[240] = shouldCommitOnBlur;
|
|
1098
|
+
$[241] = term;
|
|
1099
|
+
$[242] = t39;
|
|
1100
|
+
} else t39 = $[242];
|
|
1101
|
+
const settleDraft = useEvent(t39);
|
|
1102
|
+
let t40;
|
|
1103
|
+
if ($[243] !== onBlur || $[244] !== settleDraft) {
|
|
1104
|
+
t40 = () => {
|
|
1082
1105
|
setIsPopoverOpen(false);
|
|
1083
1106
|
settleDraft();
|
|
1084
1107
|
onBlur?.();
|
|
1085
1108
|
};
|
|
1086
|
-
$[
|
|
1087
|
-
$[
|
|
1088
|
-
$[
|
|
1089
|
-
} else
|
|
1090
|
-
const handleCompositeBlur = useEvent(
|
|
1091
|
-
const
|
|
1092
|
-
const
|
|
1093
|
-
let
|
|
1094
|
-
if ($[
|
|
1095
|
-
|
|
1096
|
-
wrapperRef:
|
|
1097
|
-
popoverRef:
|
|
1109
|
+
$[243] = onBlur;
|
|
1110
|
+
$[244] = settleDraft;
|
|
1111
|
+
$[245] = t40;
|
|
1112
|
+
} else t40 = $[245];
|
|
1113
|
+
const handleCompositeBlur = useEvent(t40);
|
|
1114
|
+
const t41 = rootRef;
|
|
1115
|
+
const t42 = popoverRef;
|
|
1116
|
+
let t43;
|
|
1117
|
+
if ($[246] !== handleCompositeBlur || $[247] !== isDisabled || $[248] !== onFocus || $[249] !== t41 || $[250] !== t42) {
|
|
1118
|
+
t43 = {
|
|
1119
|
+
wrapperRef: t41,
|
|
1120
|
+
popoverRef: t42,
|
|
1098
1121
|
onFocus,
|
|
1099
1122
|
onBlur: handleCompositeBlur,
|
|
1100
1123
|
isDisabled
|
|
1101
1124
|
};
|
|
1102
|
-
$[
|
|
1103
|
-
$[
|
|
1104
|
-
$[
|
|
1105
|
-
$[
|
|
1106
|
-
$[
|
|
1107
|
-
$[
|
|
1108
|
-
} else
|
|
1109
|
-
const { compositeFocusProps } = useCompositeFocus(
|
|
1110
|
-
let
|
|
1111
|
-
if ($[
|
|
1112
|
-
|
|
1125
|
+
$[246] = handleCompositeBlur;
|
|
1126
|
+
$[247] = isDisabled;
|
|
1127
|
+
$[248] = onFocus;
|
|
1128
|
+
$[249] = t41;
|
|
1129
|
+
$[250] = t42;
|
|
1130
|
+
$[251] = t43;
|
|
1131
|
+
} else t43 = $[251];
|
|
1132
|
+
const { compositeFocusProps } = useCompositeFocus(t43);
|
|
1133
|
+
let t44;
|
|
1134
|
+
if ($[252] !== rootRef || $[253] !== settleDraft) {
|
|
1135
|
+
t44 = (e_1) => {
|
|
1113
1136
|
const isTabbing = isTabbingRef.current;
|
|
1114
1137
|
const next_4 = e_1.relatedTarget;
|
|
1115
1138
|
isTabbingRef.current = false;
|
|
@@ -1117,48 +1140,48 @@ function TagInput(props, ref) {
|
|
|
1117
1140
|
setIsPopoverOpen(false);
|
|
1118
1141
|
settleDraft();
|
|
1119
1142
|
};
|
|
1120
|
-
$[
|
|
1121
|
-
$[
|
|
1122
|
-
$[
|
|
1123
|
-
} else
|
|
1124
|
-
const handleInputBlur = useEvent(
|
|
1125
|
-
let
|
|
1126
|
-
if ($[
|
|
1127
|
-
|
|
1143
|
+
$[252] = rootRef;
|
|
1144
|
+
$[253] = settleDraft;
|
|
1145
|
+
$[254] = t44;
|
|
1146
|
+
} else t44 = $[254];
|
|
1147
|
+
const handleInputBlur = useEvent(t44);
|
|
1148
|
+
let t45;
|
|
1149
|
+
if ($[255] !== hasOptions || $[256] !== isInteractive || $[257] !== popoverTrigger) {
|
|
1150
|
+
t45 = () => {
|
|
1128
1151
|
if (hasOptions && popoverTrigger === "focus" && isInteractive) setIsPopoverOpen(true);
|
|
1129
1152
|
};
|
|
1130
|
-
$[
|
|
1131
|
-
$[
|
|
1132
|
-
$[
|
|
1133
|
-
$[
|
|
1134
|
-
} else
|
|
1135
|
-
const handleInputFocus = useEvent(
|
|
1136
|
-
let
|
|
1137
|
-
if ($[
|
|
1138
|
-
|
|
1139
|
-
const result_0 = !(collection.getItem(
|
|
1140
|
-
const label_1 = getOptionLabel(
|
|
1153
|
+
$[255] = hasOptions;
|
|
1154
|
+
$[256] = isInteractive;
|
|
1155
|
+
$[257] = popoverTrigger;
|
|
1156
|
+
$[258] = t45;
|
|
1157
|
+
} else t45 = $[258];
|
|
1158
|
+
const handleInputFocus = useEvent(t45);
|
|
1159
|
+
let t46;
|
|
1160
|
+
if ($[259] !== collection || $[260] !== getOptionLabel || $[261] !== knownLabels || $[262] !== t || $[263] !== tagProps || $[264] !== uniqueValues || $[265] !== validateTag) {
|
|
1161
|
+
t46 = uniqueValues.map((value_2) => {
|
|
1162
|
+
const result_0 = !(collection.getItem(value_2) != null || knownLabels.has(value_2)) && validateTag ? validateTag(value_2) : true;
|
|
1163
|
+
const label_1 = getOptionLabel(value_2);
|
|
1141
1164
|
return {
|
|
1142
|
-
key:
|
|
1165
|
+
key: value_2,
|
|
1143
1166
|
label: label_1,
|
|
1144
1167
|
invalidMessage: typeof result_0 === "string" ? result_0 : result_0 === false ? t("tagInput.invalidValue", "\"{{value}}\" is not a valid value", { value: label_1 }) : void 0,
|
|
1145
|
-
tagProps: tagProps?.(
|
|
1168
|
+
tagProps: tagProps?.(value_2)
|
|
1146
1169
|
};
|
|
1147
1170
|
});
|
|
1148
|
-
$[
|
|
1149
|
-
$[
|
|
1150
|
-
$[
|
|
1151
|
-
$[
|
|
1152
|
-
$[
|
|
1153
|
-
$[
|
|
1154
|
-
$[
|
|
1155
|
-
$[
|
|
1156
|
-
} else
|
|
1157
|
-
const tags =
|
|
1171
|
+
$[259] = collection;
|
|
1172
|
+
$[260] = getOptionLabel;
|
|
1173
|
+
$[261] = knownLabels;
|
|
1174
|
+
$[262] = t;
|
|
1175
|
+
$[263] = tagProps;
|
|
1176
|
+
$[264] = uniqueValues;
|
|
1177
|
+
$[265] = validateTag;
|
|
1178
|
+
$[266] = t46;
|
|
1179
|
+
} else t46 = $[266];
|
|
1180
|
+
const tags = t46;
|
|
1158
1181
|
const effectiveIsInvalid = tagError ? true : isInvalid;
|
|
1159
|
-
let
|
|
1160
|
-
if ($[
|
|
1161
|
-
|
|
1182
|
+
let t47;
|
|
1183
|
+
if ($[267] !== autoFocus || $[268] !== draft || $[269] !== effectiveIsInvalid || $[270] !== handleInputChange || $[271] !== id || $[272] !== isDisabled || $[273] !== isReadOnly || $[274] !== isRequired || $[275] !== label || $[276] !== otherProps || $[277] !== placeholder) {
|
|
1184
|
+
t47 = {
|
|
1162
1185
|
...otherProps,
|
|
1163
1186
|
id,
|
|
1164
1187
|
label,
|
|
@@ -1171,39 +1194,39 @@ function TagInput(props, ref) {
|
|
|
1171
1194
|
autoFocus,
|
|
1172
1195
|
onChange: handleInputChange
|
|
1173
1196
|
};
|
|
1174
|
-
$[
|
|
1175
|
-
$[
|
|
1176
|
-
$[
|
|
1177
|
-
$[
|
|
1178
|
-
$[
|
|
1179
|
-
$[
|
|
1180
|
-
$[
|
|
1181
|
-
$[
|
|
1182
|
-
$[
|
|
1183
|
-
$[
|
|
1184
|
-
$[
|
|
1185
|
-
$[
|
|
1186
|
-
} else
|
|
1187
|
-
const { labelProps, inputProps } = useTextField(
|
|
1197
|
+
$[267] = autoFocus;
|
|
1198
|
+
$[268] = draft;
|
|
1199
|
+
$[269] = effectiveIsInvalid;
|
|
1200
|
+
$[270] = handleInputChange;
|
|
1201
|
+
$[271] = id;
|
|
1202
|
+
$[272] = isDisabled;
|
|
1203
|
+
$[273] = isReadOnly;
|
|
1204
|
+
$[274] = isRequired;
|
|
1205
|
+
$[275] = label;
|
|
1206
|
+
$[276] = otherProps;
|
|
1207
|
+
$[277] = placeholder;
|
|
1208
|
+
$[278] = t47;
|
|
1209
|
+
} else t47 = $[278];
|
|
1210
|
+
const { labelProps, inputProps } = useTextField(t47, inputRef);
|
|
1188
1211
|
const labelId = label ? labelProps.id : void 0;
|
|
1189
|
-
let
|
|
1190
|
-
if ($[
|
|
1191
|
-
let
|
|
1192
|
-
if ($[
|
|
1193
|
-
|
|
1194
|
-
$[
|
|
1195
|
-
$[
|
|
1196
|
-
$[
|
|
1197
|
-
$[
|
|
1198
|
-
} else
|
|
1199
|
-
|
|
1212
|
+
let t48;
|
|
1213
|
+
if ($[279] !== activeOptionKey || $[280] !== autoComplete || $[281] !== handleInputBlur || $[282] !== handleInputFocus || $[283] !== handleKeyDown || $[284] !== handlePaste || $[285] !== hasOptions || $[286] !== inputProps || $[287] !== shouldShowPopover || $[288] !== summaryId || $[289] !== uniqueValues.length) {
|
|
1214
|
+
let t49;
|
|
1215
|
+
if ($[291] !== inputProps || $[292] !== summaryId || $[293] !== uniqueValues.length) {
|
|
1216
|
+
t49 = [inputProps["aria-describedby"], uniqueValues.length ? summaryId : null].filter(Boolean).join(" ") || void 0;
|
|
1217
|
+
$[291] = inputProps;
|
|
1218
|
+
$[292] = summaryId;
|
|
1219
|
+
$[293] = uniqueValues.length;
|
|
1220
|
+
$[294] = t49;
|
|
1221
|
+
} else t49 = $[294];
|
|
1222
|
+
t48 = mergeProps$1(inputProps, {
|
|
1200
1223
|
onKeyDown: handleKeyDown,
|
|
1201
1224
|
onPaste: handlePaste,
|
|
1202
1225
|
onBlur: handleInputBlur,
|
|
1203
1226
|
onFocus: handleInputFocus,
|
|
1204
1227
|
autoComplete,
|
|
1205
1228
|
"data-input-type": "taginput",
|
|
1206
|
-
"aria-describedby":
|
|
1229
|
+
"aria-describedby": t49
|
|
1207
1230
|
}, hasOptions ? {
|
|
1208
1231
|
role: "combobox",
|
|
1209
1232
|
"aria-autocomplete": "list",
|
|
@@ -1212,37 +1235,37 @@ function TagInput(props, ref) {
|
|
|
1212
1235
|
"aria-controls": shouldShowPopover ? listBoxId : void 0,
|
|
1213
1236
|
"aria-activedescendant": shouldShowPopover && activeOptionKey != null ? getListBoxOptionId(listBoxId, activeOptionKey) : void 0
|
|
1214
1237
|
} : null);
|
|
1215
|
-
$[
|
|
1216
|
-
$[
|
|
1217
|
-
$[
|
|
1218
|
-
$[
|
|
1219
|
-
$[
|
|
1220
|
-
$[
|
|
1221
|
-
$[
|
|
1222
|
-
$[
|
|
1223
|
-
$[
|
|
1224
|
-
$[
|
|
1225
|
-
$[
|
|
1226
|
-
$[
|
|
1227
|
-
} else
|
|
1228
|
-
const tagInputProps =
|
|
1229
|
-
let
|
|
1230
|
-
if ($[
|
|
1231
|
-
|
|
1238
|
+
$[279] = activeOptionKey;
|
|
1239
|
+
$[280] = autoComplete;
|
|
1240
|
+
$[281] = handleInputBlur;
|
|
1241
|
+
$[282] = handleInputFocus;
|
|
1242
|
+
$[283] = handleKeyDown;
|
|
1243
|
+
$[284] = handlePaste;
|
|
1244
|
+
$[285] = hasOptions;
|
|
1245
|
+
$[286] = inputProps;
|
|
1246
|
+
$[287] = shouldShowPopover;
|
|
1247
|
+
$[288] = summaryId;
|
|
1248
|
+
$[289] = uniqueValues.length;
|
|
1249
|
+
$[290] = t48;
|
|
1250
|
+
} else t48 = $[290];
|
|
1251
|
+
const tagInputProps = t48;
|
|
1252
|
+
let t49;
|
|
1253
|
+
if ($[295] !== hasResults || $[296] !== inputRef || $[297] !== shouldShowPopover) {
|
|
1254
|
+
t49 = () => {
|
|
1232
1255
|
const willOpen = !shouldShowPopover;
|
|
1233
1256
|
if (willOpen && !hasResults) setIsFilterActive(false);
|
|
1234
1257
|
setIsPopoverOpen(willOpen);
|
|
1235
1258
|
inputRef.current?.focus();
|
|
1236
1259
|
};
|
|
1237
|
-
$[
|
|
1238
|
-
$[
|
|
1239
|
-
$[
|
|
1240
|
-
$[
|
|
1241
|
-
} else
|
|
1242
|
-
const handleTriggerPress = useEvent(
|
|
1243
|
-
let
|
|
1244
|
-
if ($[
|
|
1245
|
-
|
|
1260
|
+
$[295] = hasResults;
|
|
1261
|
+
$[296] = inputRef;
|
|
1262
|
+
$[297] = shouldShowPopover;
|
|
1263
|
+
$[298] = t49;
|
|
1264
|
+
} else t49 = $[298];
|
|
1265
|
+
const handleTriggerPress = useEvent(t49);
|
|
1266
|
+
let t50;
|
|
1267
|
+
if ($[299] !== handleTriggerPress || $[300] !== hasOptions || $[301] !== hideTrigger || $[302] !== isInteractive || $[303] !== labelId || $[304] !== shouldShowPopover || $[305] !== size || $[306] !== t || $[307] !== triggerId || $[308] !== triggerStyles) {
|
|
1268
|
+
t50 = hasOptions && !hideTrigger ? /* @__PURE__ */ jsx(ItemAction, {
|
|
1246
1269
|
"data-popover-trigger": true,
|
|
1247
1270
|
id: triggerId,
|
|
1248
1271
|
qa: "TagInputTrigger",
|
|
@@ -1258,33 +1281,26 @@ function TagInput(props, ref) {
|
|
|
1258
1281
|
"aria-labelledby": labelId ? `${triggerId} ${labelId}` : void 0,
|
|
1259
1282
|
onPress: handleTriggerPress
|
|
1260
1283
|
}) : null;
|
|
1261
|
-
$[
|
|
1262
|
-
$[
|
|
1263
|
-
$[
|
|
1264
|
-
$[
|
|
1265
|
-
$[
|
|
1266
|
-
$[
|
|
1267
|
-
$[
|
|
1268
|
-
$[
|
|
1269
|
-
$[
|
|
1270
|
-
$[
|
|
1271
|
-
$[
|
|
1272
|
-
} else
|
|
1273
|
-
const trigger =
|
|
1274
|
-
const
|
|
1275
|
-
let
|
|
1276
|
-
if ($[311] !==
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
$[312] = t54;
|
|
1280
|
-
} else t54 = $[312];
|
|
1281
|
-
let t55;
|
|
1282
|
-
if ($[313] !== autoFocus || $[314] !== effectiveIsInvalid || $[315] !== icon || $[316] !== inputRef || $[317] !== inputStyles || $[318] !== isDisabled || $[319] !== isLoading || $[320] !== isValid || $[321] !== mods || $[322] !== prefix || $[323] !== size || $[324] !== suffix || $[325] !== suffixPosition || $[326] !== t53 || $[327] !== t54 || $[328] !== tagInputProps || $[329] !== trigger || $[330] !== wrapperRef || $[331] !== wrapperStyles) {
|
|
1283
|
-
t55 = /* @__PURE__ */ jsx(TextInputBase, {
|
|
1284
|
-
qa: t53,
|
|
1284
|
+
$[299] = handleTriggerPress;
|
|
1285
|
+
$[300] = hasOptions;
|
|
1286
|
+
$[301] = hideTrigger;
|
|
1287
|
+
$[302] = isInteractive;
|
|
1288
|
+
$[303] = labelId;
|
|
1289
|
+
$[304] = shouldShowPopover;
|
|
1290
|
+
$[305] = size;
|
|
1291
|
+
$[306] = t;
|
|
1292
|
+
$[307] = triggerId;
|
|
1293
|
+
$[308] = triggerStyles;
|
|
1294
|
+
$[309] = t50;
|
|
1295
|
+
} else t50 = $[309];
|
|
1296
|
+
const trigger = t50;
|
|
1297
|
+
const t51 = qa || "TagInput";
|
|
1298
|
+
let t52;
|
|
1299
|
+
if ($[310] !== autoFocus || $[311] !== effectiveIsInvalid || $[312] !== icon || $[313] !== inputRef || $[314] !== inputStyles || $[315] !== isDisabled || $[316] !== isLoading || $[317] !== isValid || $[318] !== mods || $[319] !== prefix || $[320] !== size || $[321] !== suffix || $[322] !== suffixPosition || $[323] !== t51 || $[324] !== tagInputProps || $[325] !== trigger || $[326] !== wrapperRef || $[327] !== wrapperStyles) {
|
|
1300
|
+
t52 = /* @__PURE__ */ jsx(TextInputBase, {
|
|
1301
|
+
qa: t51,
|
|
1285
1302
|
inputRef,
|
|
1286
1303
|
wrapperRef,
|
|
1287
|
-
wrapperProps: t54,
|
|
1288
1304
|
inputProps: tagInputProps,
|
|
1289
1305
|
mods,
|
|
1290
1306
|
icon,
|
|
@@ -1301,30 +1317,29 @@ function TagInput(props, ref) {
|
|
|
1301
1317
|
styles: wrapperStyles,
|
|
1302
1318
|
inputStyles
|
|
1303
1319
|
});
|
|
1304
|
-
$[
|
|
1305
|
-
$[
|
|
1306
|
-
$[
|
|
1307
|
-
$[
|
|
1308
|
-
$[
|
|
1309
|
-
$[
|
|
1310
|
-
$[
|
|
1311
|
-
$[
|
|
1312
|
-
$[
|
|
1313
|
-
$[
|
|
1314
|
-
$[
|
|
1315
|
-
$[
|
|
1316
|
-
$[
|
|
1317
|
-
$[
|
|
1318
|
-
$[
|
|
1319
|
-
$[
|
|
1320
|
-
$[
|
|
1321
|
-
$[
|
|
1322
|
-
$[
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
t56 = tags.length ? /* @__PURE__ */ jsx(TagList, {
|
|
1320
|
+
$[310] = autoFocus;
|
|
1321
|
+
$[311] = effectiveIsInvalid;
|
|
1322
|
+
$[312] = icon;
|
|
1323
|
+
$[313] = inputRef;
|
|
1324
|
+
$[314] = inputStyles;
|
|
1325
|
+
$[315] = isDisabled;
|
|
1326
|
+
$[316] = isLoading;
|
|
1327
|
+
$[317] = isValid;
|
|
1328
|
+
$[318] = mods;
|
|
1329
|
+
$[319] = prefix;
|
|
1330
|
+
$[320] = size;
|
|
1331
|
+
$[321] = suffix;
|
|
1332
|
+
$[322] = suffixPosition;
|
|
1333
|
+
$[323] = t51;
|
|
1334
|
+
$[324] = tagInputProps;
|
|
1335
|
+
$[325] = trigger;
|
|
1336
|
+
$[326] = wrapperRef;
|
|
1337
|
+
$[327] = wrapperStyles;
|
|
1338
|
+
$[328] = t52;
|
|
1339
|
+
} else t52 = $[328];
|
|
1340
|
+
let t53;
|
|
1341
|
+
if ($[329] !== isDisabled || $[330] !== isReadOnly || $[331] !== labelId || $[332] !== removeValues || $[333] !== size || $[334] !== t || $[335] !== tagListId || $[336] !== tagListStyles || $[337] !== tagStyles || $[338] !== tags) {
|
|
1342
|
+
t53 = tags.length ? /* @__PURE__ */ jsx(TagList, {
|
|
1328
1343
|
id: tagListId,
|
|
1329
1344
|
listRef: tagListRef,
|
|
1330
1345
|
"aria-label": t("tagInput.selectedValues", "Selected values"),
|
|
@@ -1337,52 +1352,52 @@ function TagInput(props, ref) {
|
|
|
1337
1352
|
tagStyles,
|
|
1338
1353
|
onRemove: removeValues
|
|
1339
1354
|
}) : null;
|
|
1340
|
-
$[
|
|
1341
|
-
$[
|
|
1342
|
-
$[
|
|
1343
|
-
$[
|
|
1344
|
-
$[
|
|
1345
|
-
$[
|
|
1346
|
-
$[
|
|
1347
|
-
$[
|
|
1348
|
-
$[
|
|
1355
|
+
$[329] = isDisabled;
|
|
1356
|
+
$[330] = isReadOnly;
|
|
1357
|
+
$[331] = labelId;
|
|
1358
|
+
$[332] = removeValues;
|
|
1359
|
+
$[333] = size;
|
|
1360
|
+
$[334] = t;
|
|
1361
|
+
$[335] = tagListId;
|
|
1362
|
+
$[336] = tagListStyles;
|
|
1363
|
+
$[337] = tagStyles;
|
|
1364
|
+
$[338] = tags;
|
|
1365
|
+
$[339] = t53;
|
|
1366
|
+
} else t53 = $[339];
|
|
1367
|
+
let t54;
|
|
1368
|
+
if ($[340] !== formatList || $[341] !== t || $[342] !== tags) {
|
|
1369
|
+
t54 = tags.length ? t("tagInput.summary", "Selected: {{values}}", { values: formatList(tags.map(_temp7)) }) : null;
|
|
1370
|
+
$[340] = formatList;
|
|
1371
|
+
$[341] = t;
|
|
1349
1372
|
$[342] = tags;
|
|
1350
|
-
$[343] =
|
|
1351
|
-
} else
|
|
1352
|
-
let
|
|
1353
|
-
if ($[344] !==
|
|
1354
|
-
|
|
1355
|
-
$[344] = formatList;
|
|
1356
|
-
$[345] = t;
|
|
1357
|
-
$[346] = tags;
|
|
1358
|
-
$[347] = t57;
|
|
1359
|
-
} else t57 = $[347];
|
|
1360
|
-
let t58;
|
|
1361
|
-
if ($[348] !== summaryId || $[349] !== t57) {
|
|
1362
|
-
t58 = /* @__PURE__ */ jsx("span", {
|
|
1373
|
+
$[343] = t54;
|
|
1374
|
+
} else t54 = $[343];
|
|
1375
|
+
let t55;
|
|
1376
|
+
if ($[344] !== summaryId || $[345] !== t54) {
|
|
1377
|
+
t55 = /* @__PURE__ */ jsx("span", {
|
|
1363
1378
|
hidden: true,
|
|
1364
1379
|
id: summaryId,
|
|
1365
|
-
children:
|
|
1380
|
+
children: t54
|
|
1366
1381
|
});
|
|
1367
|
-
$[
|
|
1368
|
-
$[
|
|
1369
|
-
$[
|
|
1370
|
-
} else
|
|
1371
|
-
let
|
|
1372
|
-
if ($[
|
|
1373
|
-
|
|
1382
|
+
$[344] = summaryId;
|
|
1383
|
+
$[345] = t54;
|
|
1384
|
+
$[346] = t55;
|
|
1385
|
+
} else t55 = $[346];
|
|
1386
|
+
let t56;
|
|
1387
|
+
if ($[347] !== announcement.id || $[348] !== announcement.text) {
|
|
1388
|
+
t56 = /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
1374
1389
|
role: "status",
|
|
1375
1390
|
"aria-live": "polite",
|
|
1376
1391
|
"aria-atomic": "true",
|
|
1377
1392
|
children: /* @__PURE__ */ jsx("span", { children: announcement.text }, announcement.id)
|
|
1378
1393
|
});
|
|
1379
|
-
$[
|
|
1380
|
-
$[
|
|
1381
|
-
$[
|
|
1382
|
-
} else
|
|
1383
|
-
let
|
|
1384
|
-
if ($[
|
|
1385
|
-
|
|
1394
|
+
$[347] = announcement.id;
|
|
1395
|
+
$[348] = announcement.text;
|
|
1396
|
+
$[349] = t56;
|
|
1397
|
+
} else t56 = $[349];
|
|
1398
|
+
let t57;
|
|
1399
|
+
if ($[350] !== compositeFocusProps || $[351] !== containerPadding || $[352] !== direction || $[353] !== disabledKeys || $[354] !== handlePopoverSelection || $[355] !== hasOptions || $[356] !== headingStyles || $[357] !== isDisabled || $[358] !== isFilterActive || $[359] !== label || $[360] !== listBoxRef || $[361] !== listBoxStyles || $[362] !== optionFilterFn || $[363] !== optionStyles || $[364] !== overlayOffset || $[365] !== overlayStyles || $[366] !== popoverChildren || $[367] !== popoverMinWidth || $[368] !== popoverRef || $[369] !== props || $[370] !== sectionStyles || $[371] !== shouldFlip || $[372] !== shouldShowPopover || $[373] !== size || $[374] !== term || $[375] !== uniqueValues || $[376] !== wrapperRef) {
|
|
1400
|
+
t57 = hasOptions ? /* @__PURE__ */ jsx(ListBoxPopover, {
|
|
1386
1401
|
isOpen: shouldShowPopover,
|
|
1387
1402
|
triggerRef: wrapperRef,
|
|
1388
1403
|
popoverRef,
|
|
@@ -1402,6 +1417,7 @@ function TagInput(props, ref) {
|
|
|
1402
1417
|
selectionMode: "multiple",
|
|
1403
1418
|
selectedKeys: uniqueValues,
|
|
1404
1419
|
isCheckable: true,
|
|
1420
|
+
shouldCloseOnTriggerInteraction: false,
|
|
1405
1421
|
isDisabled,
|
|
1406
1422
|
disabledKeys,
|
|
1407
1423
|
listStateRef,
|
|
@@ -1414,38 +1430,38 @@ function TagInput(props, ref) {
|
|
|
1414
1430
|
onClose: () => setIsPopoverOpen(false),
|
|
1415
1431
|
children: popoverChildren
|
|
1416
1432
|
}) : null;
|
|
1417
|
-
$[
|
|
1418
|
-
$[
|
|
1419
|
-
$[
|
|
1420
|
-
$[
|
|
1421
|
-
$[
|
|
1422
|
-
$[
|
|
1423
|
-
$[
|
|
1424
|
-
$[
|
|
1425
|
-
$[
|
|
1426
|
-
$[
|
|
1427
|
-
$[
|
|
1428
|
-
$[
|
|
1429
|
-
$[
|
|
1430
|
-
$[
|
|
1431
|
-
$[
|
|
1432
|
-
$[
|
|
1433
|
-
$[
|
|
1434
|
-
$[
|
|
1435
|
-
$[
|
|
1436
|
-
$[
|
|
1437
|
-
$[
|
|
1438
|
-
$[
|
|
1439
|
-
$[
|
|
1440
|
-
$[
|
|
1441
|
-
$[
|
|
1442
|
-
$[
|
|
1443
|
-
$[
|
|
1444
|
-
$[
|
|
1445
|
-
} else
|
|
1446
|
-
let
|
|
1447
|
-
if ($[
|
|
1448
|
-
|
|
1433
|
+
$[350] = compositeFocusProps;
|
|
1434
|
+
$[351] = containerPadding;
|
|
1435
|
+
$[352] = direction;
|
|
1436
|
+
$[353] = disabledKeys;
|
|
1437
|
+
$[354] = handlePopoverSelection;
|
|
1438
|
+
$[355] = hasOptions;
|
|
1439
|
+
$[356] = headingStyles;
|
|
1440
|
+
$[357] = isDisabled;
|
|
1441
|
+
$[358] = isFilterActive;
|
|
1442
|
+
$[359] = label;
|
|
1443
|
+
$[360] = listBoxRef;
|
|
1444
|
+
$[361] = listBoxStyles;
|
|
1445
|
+
$[362] = optionFilterFn;
|
|
1446
|
+
$[363] = optionStyles;
|
|
1447
|
+
$[364] = overlayOffset;
|
|
1448
|
+
$[365] = overlayStyles;
|
|
1449
|
+
$[366] = popoverChildren;
|
|
1450
|
+
$[367] = popoverMinWidth;
|
|
1451
|
+
$[368] = popoverRef;
|
|
1452
|
+
$[369] = props;
|
|
1453
|
+
$[370] = sectionStyles;
|
|
1454
|
+
$[371] = shouldFlip;
|
|
1455
|
+
$[372] = shouldShowPopover;
|
|
1456
|
+
$[373] = size;
|
|
1457
|
+
$[374] = term;
|
|
1458
|
+
$[375] = uniqueValues;
|
|
1459
|
+
$[376] = wrapperRef;
|
|
1460
|
+
$[377] = t57;
|
|
1461
|
+
} else t57 = $[377];
|
|
1462
|
+
let t58;
|
|
1463
|
+
if ($[378] !== className || $[379] !== compositeFocusProps || $[380] !== qaVal || $[381] !== rootRef || $[382] !== style || $[383] !== styles || $[384] !== t52 || $[385] !== t53 || $[386] !== t55 || $[387] !== t56 || $[388] !== t57) {
|
|
1464
|
+
t58 = /* @__PURE__ */ jsxs(TagInputElement, {
|
|
1449
1465
|
ref: rootRef,
|
|
1450
1466
|
className,
|
|
1451
1467
|
style,
|
|
@@ -1453,41 +1469,41 @@ function TagInput(props, ref) {
|
|
|
1453
1469
|
styles,
|
|
1454
1470
|
...compositeFocusProps,
|
|
1455
1471
|
children: [
|
|
1472
|
+
t52,
|
|
1473
|
+
t53,
|
|
1456
1474
|
t55,
|
|
1457
1475
|
t56,
|
|
1458
|
-
|
|
1459
|
-
t59,
|
|
1460
|
-
t60
|
|
1476
|
+
t57
|
|
1461
1477
|
]
|
|
1462
1478
|
});
|
|
1463
|
-
$[
|
|
1464
|
-
$[
|
|
1465
|
-
$[
|
|
1466
|
-
$[
|
|
1467
|
-
$[
|
|
1468
|
-
$[
|
|
1469
|
-
$[
|
|
1470
|
-
$[
|
|
1471
|
-
$[
|
|
1472
|
-
$[
|
|
1473
|
-
$[
|
|
1474
|
-
$[
|
|
1475
|
-
} else
|
|
1476
|
-
const tagInputField =
|
|
1479
|
+
$[378] = className;
|
|
1480
|
+
$[379] = compositeFocusProps;
|
|
1481
|
+
$[380] = qaVal;
|
|
1482
|
+
$[381] = rootRef;
|
|
1483
|
+
$[382] = style;
|
|
1484
|
+
$[383] = styles;
|
|
1485
|
+
$[384] = t52;
|
|
1486
|
+
$[385] = t53;
|
|
1487
|
+
$[386] = t55;
|
|
1488
|
+
$[387] = t56;
|
|
1489
|
+
$[388] = t57;
|
|
1490
|
+
$[389] = t58;
|
|
1491
|
+
} else t58 = $[389];
|
|
1492
|
+
const tagInputField = t58;
|
|
1477
1493
|
const { children: _children, ...fieldProps } = props;
|
|
1478
1494
|
const fieldRef = useCombinedRefs();
|
|
1479
|
-
let
|
|
1480
|
-
if ($[
|
|
1481
|
-
|
|
1482
|
-
$[
|
|
1483
|
-
$[
|
|
1484
|
-
$[
|
|
1485
|
-
} else
|
|
1495
|
+
let t59;
|
|
1496
|
+
if ($[390] !== message || $[391] !== tagError) {
|
|
1497
|
+
t59 = tagError ? /* @__PURE__ */ jsx("span", { children: tagError.text }, tagError.id) : message;
|
|
1498
|
+
$[390] = message;
|
|
1499
|
+
$[391] = tagError;
|
|
1500
|
+
$[392] = t59;
|
|
1501
|
+
} else t59 = $[392];
|
|
1486
1502
|
return wrapWithField(tagInputField, fieldRef, {
|
|
1487
1503
|
...fieldProps,
|
|
1488
1504
|
labelProps: mergeProps$1(labelProps, userLabelProps),
|
|
1489
1505
|
isInvalid: effectiveIsInvalid,
|
|
1490
|
-
message:
|
|
1506
|
+
message: t59,
|
|
1491
1507
|
errorMessage: tagError ? void 0 : errorMessage
|
|
1492
1508
|
});
|
|
1493
1509
|
}
|