@cube-dev/ui-kit 0.121.0 → 0.121.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +6 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- 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/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/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/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/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.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/ComboBox/ComboBox.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/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/intl.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.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/ListBox.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/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.d.ts +8 -2
- 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 +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/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/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/FieldWrapper/extract-field-wrapper-props.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/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/index.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/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/EditableTitle.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/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/FileTabs/FileTabs.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/RangeCalendar.js +1 -1
- package/dist/components/other/CloudLogo/CloudLogo.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/context.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/OpenTransition.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/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/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/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/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/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/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/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/layout.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/utils/ResizeSensor.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/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/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.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/useQaProps.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.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/BaseProperties.md +78 -0
- package/docs/ComplexLayout.md +459 -0
- package/docs/CreateComponent.md +410 -0
- package/docs/FieldProperties.md +117 -0
- package/docs/Introduction.md +122 -0
- package/docs/RenderCache.md +177 -0
- package/docs/Result.md +42 -0
- package/docs/SimpleLayout.md +26 -0
- package/docs/Typography.md +38 -0
- package/docs/components/Block.md +33 -0
- package/docs/components/CollectionItem.md +293 -0
- package/docs/components/GridProvider.md +38 -0
- package/docs/components/Root.md +50 -0
- package/docs/components/actions/Action.md +47 -0
- package/docs/components/actions/Banner.md +195 -0
- package/docs/components/actions/Button.md +209 -0
- package/docs/components/actions/ButtonGroup.md +46 -0
- package/docs/components/actions/ButtonSplit.md +199 -0
- package/docs/components/actions/CommandMenu.md +422 -0
- package/docs/components/actions/ItemAction.md +60 -0
- package/docs/components/actions/ItemButton.md +316 -0
- package/docs/components/actions/Link.md +325 -0
- package/docs/components/actions/Menu.md +485 -0
- package/docs/components/actions/MenuTrigger.md +47 -0
- package/docs/components/actions/SubMenuTrigger.md +38 -0
- package/docs/components/actions/use-anchored-menu.md +209 -0
- package/docs/components/actions/use-context-menu.md +218 -0
- package/docs/components/content/ActiveZone.md +37 -0
- package/docs/components/content/Alert.md +40 -0
- package/docs/components/content/Avatar.md +37 -0
- package/docs/components/content/Badge.md +194 -0
- package/docs/components/content/Card.md +40 -0
- package/docs/components/content/Content.md +44 -0
- package/docs/components/content/CopyPasteBlock.md +36 -0
- package/docs/components/content/CopySnippet.md +43 -0
- package/docs/components/content/Disclosure.md +181 -0
- package/docs/components/content/Divider.md +39 -0
- package/docs/components/content/Footer.md +35 -0
- package/docs/components/content/Header.md +35 -0
- package/docs/components/content/HotKeys.md +352 -0
- package/docs/components/content/Item.md +499 -0
- package/docs/components/content/ItemBadge.md +31 -0
- package/docs/components/content/ItemCard.md +131 -0
- package/docs/components/content/Layout.md +843 -0
- package/docs/components/content/Paragraph.md +32 -0
- package/docs/components/content/Placeholder.md +37 -0
- package/docs/components/content/PrismCode.md +36 -0
- package/docs/components/content/PrismDiffCode.md +29 -0
- package/docs/components/content/Result.md +46 -0
- package/docs/components/content/Skeleton.md +35 -0
- package/docs/components/content/Tag.md +165 -0
- package/docs/components/content/Text.md +54 -0
- package/docs/components/content/TextItem.md +217 -0
- package/docs/components/content/Title.md +45 -0
- package/docs/components/fields/Checkbox.md +176 -0
- package/docs/components/fields/ComboBox.md +651 -0
- package/docs/components/fields/DatePicker.md +227 -0
- package/docs/components/fields/FileInput.md +194 -0
- package/docs/components/fields/FilterListBox.md +726 -0
- package/docs/components/fields/FilterPicker.md +776 -0
- package/docs/components/fields/HueSlider.md +175 -0
- package/docs/components/fields/ListBox.md +714 -0
- package/docs/components/fields/NumberInput.md +180 -0
- package/docs/components/fields/PasswordInput.md +214 -0
- package/docs/components/fields/Picker.md +906 -0
- package/docs/components/fields/RadioGroup.md +310 -0
- package/docs/components/fields/SearchInput.md +224 -0
- package/docs/components/fields/Select.md +576 -0
- package/docs/components/fields/Slider.md +53 -0
- package/docs/components/fields/Switch.md +169 -0
- package/docs/components/fields/TextArea.md +61 -0
- package/docs/components/fields/TextInput.md +205 -0
- package/docs/components/fields/TextInputMapper.md +34 -0
- package/docs/components/form/Field.md +333 -0
- package/docs/components/form/Form.md +644 -0
- package/docs/components/form/FormInstance.md +307 -0
- package/docs/components/helpers/DisplayTransition.md +268 -0
- package/docs/components/helpers/IconSwitch.md +160 -0
- package/docs/components/layout/Flex.md +51 -0
- package/docs/components/layout/Flow.md +32 -0
- package/docs/components/layout/Grid.md +46 -0
- package/docs/components/layout/Panel.md +65 -0
- package/docs/components/layout/Prefix.md +37 -0
- package/docs/components/layout/ResizablePanel.md +69 -0
- package/docs/components/layout/Space.md +44 -0
- package/docs/components/layout/Suffix.md +39 -0
- package/docs/components/navigation/Tabs.md +726 -0
- package/docs/components/organisms/FileTabs.md +39 -0
- package/docs/components/organisms/StatsCard.md +40 -0
- package/docs/components/other/CloudLogo.md +33 -0
- package/docs/components/overlays/AlertDialog.md +51 -0
- package/docs/components/overlays/Dialog.md +200 -0
- package/docs/components/overlays/DialogContainer.md +201 -0
- package/docs/components/overlays/DialogForm.md +295 -0
- package/docs/components/overlays/DialogTrigger.md +191 -0
- package/docs/components/overlays/Notifications.md +402 -0
- package/docs/components/overlays/Toast.md +289 -0
- package/docs/components/overlays/Tooltip.md +400 -0
- package/docs/components/overlays/TooltipProvider.md +42 -0
- package/docs/components/overlays/TooltipTrigger.md +42 -0
- package/docs/components/overlays/UseDialogContainer.md +597 -0
- package/docs/components/portal/Portal.md +29 -0
- package/docs/components/status/LoadingAnimation.md +27 -0
- package/docs/components/status/Spin.md +35 -0
- package/docs/tasty/configuration.md +211 -0
- package/docs/tasty/debug.md +505 -0
- package/docs/tasty/injector.md +528 -0
- package/docs/tasty/styles.md +567 -0
- package/docs/tasty/tasty-static.md +376 -0
- package/docs/tasty/usage.md +643 -0
- package/package.json +4 -8
|
@@ -0,0 +1,726 @@
|
|
|
1
|
+
# FilterListBox
|
|
2
|
+
|
|
3
|
+
A searchable list selection component that combines a ListBox with an integrated search input. Users can filter through options in real-time while maintaining full keyboard navigation and accessibility. Built with React Aria's accessibility features and the Cube `tasty` style system for theming.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Present a searchable list of selectable options for large datasets
|
|
8
|
+
- Enable real-time filtering through options as users type
|
|
9
|
+
- Create searchable selection interfaces for data with many entries
|
|
10
|
+
- Build filterable form controls that need to remain visible
|
|
11
|
+
- Provide quick option discovery in lengthy lists
|
|
12
|
+
- Display structured data with searchable sections and descriptions
|
|
13
|
+
- Customize empty state messages when search yields no results
|
|
14
|
+
|
|
15
|
+
## Component
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### Properties
|
|
20
|
+
|
|
21
|
+
- **`selectedKey`** `string` — The selected key in controlled mode
|
|
22
|
+
- **`defaultSelectedKey`** `string` — The default selected key in uncontrolled mode
|
|
23
|
+
- **`selectedKeys`** `string[] | 'all'` — The selected keys in controlled multiple mode
|
|
24
|
+
- **`defaultSelectedKeys`** `string[] | 'all'` — The default selected keys in uncontrolled multiple mode
|
|
25
|
+
- **`selectionMode`** `'single' | 'multiple'` (default: `single`) — Selection mode
|
|
26
|
+
- **`disallowEmptySelection`** `boolean` (default: `false`) — Whether to disallow empty selection
|
|
27
|
+
- **`disabledKeys`** `Key[]` — Array of keys for disabled items
|
|
28
|
+
- **`size`** `'small' | 'medium' | 'large'` (default: `medium`) — FilterListBox size
|
|
29
|
+
- **`searchPlaceholder`** `string` (default: `Search...`) — Placeholder text in the search input
|
|
30
|
+
- **`filter`** `((textValue: string, inputValue: string) => boolean) | false` — Custom filter function or `false` to disable filtering
|
|
31
|
+
- **`emptyLabel`** `ReactNode` (default: `No items` / `No results found`) — Label displayed when no items match
|
|
32
|
+
- **`allowsCustomValue`** `boolean` (default: `false`) — Whether to allow custom values not in the options list
|
|
33
|
+
- **`isCheckable`** `boolean` (default: `false`) — Whether to show checkboxes for multiple selection
|
|
34
|
+
- **`shouldFocusWrap`** `boolean` (default: `false`) — Whether keyboard navigation should wrap around
|
|
35
|
+
- **`description`** `string` — Field description
|
|
36
|
+
- **`header`** `ReactNode` — Custom header content
|
|
37
|
+
- **`footer`** `ReactNode` — Custom footer content
|
|
38
|
+
- **`showSelectAll`** `boolean` (default: `false`) — Whether to show "Select All" option in multiple mode
|
|
39
|
+
- **`selectAllLabel`** `string` (default: `All`) — Label for the "Select All" option
|
|
40
|
+
- **`searchValue`** `string` — Controlled search input value
|
|
41
|
+
- **`onSearchChange`** `(value: string) => void` — Callback when search input changes
|
|
42
|
+
- **`onSelectionChange`** `(keys: Key | Key[] | 'all' | null) => void` — Callback when selection changes
|
|
43
|
+
- **`onEscape`** `() => void` — Callback when Escape key is pressed
|
|
44
|
+
- **`onOptionClick`** `(key: Key) => void` — Callback when an option is clicked
|
|
45
|
+
|
|
46
|
+
### Base Properties
|
|
47
|
+
|
|
48
|
+
Supports [Base properties](../../BaseProperties.md)
|
|
49
|
+
|
|
50
|
+
### Field Properties
|
|
51
|
+
|
|
52
|
+
Supports all [Field properties](../../FieldProperties.md)
|
|
53
|
+
|
|
54
|
+
### Styling Properties
|
|
55
|
+
|
|
56
|
+
#### styles
|
|
57
|
+
|
|
58
|
+
Customizes the root wrapper element of the component.
|
|
59
|
+
|
|
60
|
+
**Sub-elements:**
|
|
61
|
+
- `ValidationState` - Container for validation and loading indicators
|
|
62
|
+
|
|
63
|
+
#### searchInputStyles
|
|
64
|
+
|
|
65
|
+
Customizes the search input field appearance.
|
|
66
|
+
|
|
67
|
+
**Sub-elements:**
|
|
68
|
+
- `Prefix` - Container for search icon
|
|
69
|
+
- `InputIcon` - The search or loading icon
|
|
70
|
+
|
|
71
|
+
#### listStyles
|
|
72
|
+
|
|
73
|
+
Customizes the list container element that holds the filtered options.
|
|
74
|
+
|
|
75
|
+
**Sub-elements:**
|
|
76
|
+
- Same as ListBox component sub-elements
|
|
77
|
+
|
|
78
|
+
#### optionStyles
|
|
79
|
+
|
|
80
|
+
Customizes individual option elements.
|
|
81
|
+
|
|
82
|
+
**Sub-elements:**
|
|
83
|
+
- `Label` - The main text of each option
|
|
84
|
+
- `Description` - Secondary descriptive text for options
|
|
85
|
+
- `Content` - Container for label and description
|
|
86
|
+
- `Checkbox` - Checkbox element when `isCheckable={true}`
|
|
87
|
+
- `CheckboxWrapper` - Wrapper around the checkbox
|
|
88
|
+
|
|
89
|
+
#### sectionStyles
|
|
90
|
+
|
|
91
|
+
Customizes section wrapper elements.
|
|
92
|
+
|
|
93
|
+
**Sub-elements:**
|
|
94
|
+
- Same as ListBox component sub-elements
|
|
95
|
+
|
|
96
|
+
#### headingStyles
|
|
97
|
+
|
|
98
|
+
Customizes section heading elements.
|
|
99
|
+
|
|
100
|
+
**Sub-elements:**
|
|
101
|
+
- Same as ListBox component sub-elements
|
|
102
|
+
|
|
103
|
+
#### headerStyles
|
|
104
|
+
|
|
105
|
+
Customizes the header area when header prop is provided.
|
|
106
|
+
|
|
107
|
+
**Sub-elements:**
|
|
108
|
+
- None - styles apply directly to the header container
|
|
109
|
+
|
|
110
|
+
#### footerStyles
|
|
111
|
+
|
|
112
|
+
Customizes the footer area when footer prop is provided.
|
|
113
|
+
|
|
114
|
+
**Sub-elements:**
|
|
115
|
+
- None - styles apply directly to the footer container
|
|
116
|
+
|
|
117
|
+
### Style Properties
|
|
118
|
+
|
|
119
|
+
These properties allow direct style application without using the `styles` prop: `display`, `font`, `preset`, `hide`, `opacity`, `whiteSpace`, `color`, `fill`, `fade`, `width`, `height`, `flexBasis`, `flexGrow`, `flexShrink`, `flex`, `gridArea`, `order`, `gridColumn`, `gridRow`, `placeSelf`, `alignSelf`, `justifySelf`, `zIndex`, `margin`, `inset`, `position`, `reset`, `padding`, `paddingInline`, `paddingBlock`, `shadow`, `border`, `radius`, `overflow`, `scrollbar`, `outline`, `textAlign`, `flow`, `placeItems`, `placeContent`, `alignItems`, `alignContent`, `justifyItems`, `justifyContent`, `align`, `justify`, `gap`, `columnGap`, `rowGap`, `gridColumns`, `gridRows`, `gridTemplate`, `gridAreas`.
|
|
120
|
+
|
|
121
|
+
### Modifiers
|
|
122
|
+
|
|
123
|
+
The `mods` property accepts the following modifiers you can override:
|
|
124
|
+
|
|
125
|
+
- `invalid` `boolean` — Applied when `validationState="invalid"`
|
|
126
|
+
- `valid` `boolean` — Applied when `validationState="valid"`
|
|
127
|
+
- `disabled` `boolean` — Applied when `isDisabled={true}`
|
|
128
|
+
- `focused` `boolean` — Applied when the FilterListBox has focus
|
|
129
|
+
- `loading` `boolean` — Applied when `isLoading={true}`
|
|
130
|
+
- `searchable` `boolean` — Always true for FilterListBox
|
|
131
|
+
- `prefix` `boolean` — Applied when loading icon is shown
|
|
132
|
+
|
|
133
|
+
## Sub-components
|
|
134
|
+
|
|
135
|
+
### FilterListBox.Item
|
|
136
|
+
|
|
137
|
+
Individual items within the FilterListBox. Each item is rendered using [Item](../content/Item.md) and supports all Item properties.
|
|
138
|
+
|
|
139
|
+
#### Item API
|
|
140
|
+
|
|
141
|
+
For detailed information about all available item properties, see [Item documentation](../content/Item.md). Key properties include:
|
|
142
|
+
|
|
143
|
+
- **`key`** `string \| number` — Unique identifier for the item (required)
|
|
144
|
+
- **`children`** `ReactNode` — The main content/label for the option
|
|
145
|
+
- **`textValue`** `string` — Searchable text value (use for complex content)
|
|
146
|
+
- **`description`** `ReactNode` — Secondary text below the main content
|
|
147
|
+
- **`icon`** `ReactNode` — Icon displayed before the content
|
|
148
|
+
- **`styles`** `Styles` — Custom styling for the item
|
|
149
|
+
- **`qa`** `string` — QA identifier for testing
|
|
150
|
+
|
|
151
|
+
### FilterListBox.Section
|
|
152
|
+
|
|
153
|
+
Groups related items together with an optional heading.
|
|
154
|
+
|
|
155
|
+
- **`title`** `ReactNode` — Optional heading text for the section
|
|
156
|
+
- **`children`** `FilterListBox.Item[]` — Collection of FilterListBox.Item components
|
|
157
|
+
|
|
158
|
+
## Variants
|
|
159
|
+
|
|
160
|
+
### Selection Modes
|
|
161
|
+
|
|
162
|
+
- `single` - Allows selecting only one item at a time (default)
|
|
163
|
+
- `multiple` - Allows selecting multiple items
|
|
164
|
+
|
|
165
|
+
### Sizes
|
|
166
|
+
|
|
167
|
+
- `medium` - Standard size for general use (32px item height, default)
|
|
168
|
+
- `large` - Emphasized size for important sections (40px item height)
|
|
169
|
+
|
|
170
|
+
## Examples
|
|
171
|
+
|
|
172
|
+
### Basic Usage
|
|
173
|
+
|
|
174
|
+
```jsx
|
|
175
|
+
<FilterListBox label="Choose a fruit" searchPlaceholder="Search fruits...">
|
|
176
|
+
<FilterListBox.Item key="apple">Apple</FilterListBox.Item>
|
|
177
|
+
<FilterListBox.Item key="banana">Banana</FilterListBox.Item>
|
|
178
|
+
<FilterListBox.Item key="cherry">Cherry</FilterListBox.Item>
|
|
179
|
+
</FilterListBox>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Multiple Selection
|
|
183
|
+
|
|
184
|
+
```jsx
|
|
185
|
+
<FilterListBox
|
|
186
|
+
label="Select permissions"
|
|
187
|
+
selectionMode="multiple"
|
|
188
|
+
defaultSelectedKeys={['read', 'write']}
|
|
189
|
+
searchPlaceholder="Filter permissions..."
|
|
190
|
+
>
|
|
191
|
+
<FilterListBox.Item key="read" description="View content and data">
|
|
192
|
+
Read
|
|
193
|
+
</FilterListBox.Item>
|
|
194
|
+
<FilterListBox.Item key="write" description="Create and edit content">
|
|
195
|
+
Write
|
|
196
|
+
</FilterListBox.Item>
|
|
197
|
+
<FilterListBox.Item key="execute" description="Run operations">
|
|
198
|
+
Execute
|
|
199
|
+
</FilterListBox.Item>
|
|
200
|
+
</FilterListBox>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### With Sections
|
|
204
|
+
|
|
205
|
+
```jsx
|
|
206
|
+
<FilterListBox label="Choose an ingredient" searchPlaceholder="Search ingredients...">
|
|
207
|
+
<FilterListBox.Section title="Fruits">
|
|
208
|
+
<FilterListBox.Item key="apple">Apple</FilterListBox.Item>
|
|
209
|
+
<FilterListBox.Item key="banana">Banana</FilterListBox.Item>
|
|
210
|
+
</FilterListBox.Section>
|
|
211
|
+
<FilterListBox.Section title="Vegetables">
|
|
212
|
+
<FilterListBox.Item key="carrot">Carrot</FilterListBox.Item>
|
|
213
|
+
<FilterListBox.Item key="broccoli">Broccoli</FilterListBox.Item>
|
|
214
|
+
</FilterListBox.Section>
|
|
215
|
+
</FilterListBox>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### With Descriptions
|
|
219
|
+
|
|
220
|
+
```jsx
|
|
221
|
+
<FilterListBox label="Choose a fruit" searchPlaceholder="Search fruits...">
|
|
222
|
+
<FilterListBox.Item
|
|
223
|
+
key="apple"
|
|
224
|
+
description="Crisp and sweet red fruit"
|
|
225
|
+
>
|
|
226
|
+
Apple
|
|
227
|
+
</FilterListBox.Item>
|
|
228
|
+
<FilterListBox.Item
|
|
229
|
+
key="banana"
|
|
230
|
+
description="Yellow tropical fruit rich in potassium"
|
|
231
|
+
>
|
|
232
|
+
Banana
|
|
233
|
+
</FilterListBox.Item>
|
|
234
|
+
</FilterListBox>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Multiple Selection with Checkboxes
|
|
238
|
+
|
|
239
|
+
```jsx
|
|
240
|
+
<FilterListBox
|
|
241
|
+
label="Select user permissions"
|
|
242
|
+
selectionMode="multiple"
|
|
243
|
+
isCheckable={true}
|
|
244
|
+
defaultSelectedKeys={['read', 'write']}
|
|
245
|
+
searchPlaceholder="Filter permissions..."
|
|
246
|
+
>
|
|
247
|
+
<FilterListBox.Item key="read" description="View content and data">
|
|
248
|
+
Read
|
|
249
|
+
</FilterListBox.Item>
|
|
250
|
+
<FilterListBox.Item key="write" description="Create and edit content">
|
|
251
|
+
Write
|
|
252
|
+
</FilterListBox.Item>
|
|
253
|
+
</FilterListBox>
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Multiple Selection with Select All
|
|
257
|
+
|
|
258
|
+
```jsx
|
|
259
|
+
<FilterListBox
|
|
260
|
+
label="Select permissions"
|
|
261
|
+
selectionMode="multiple"
|
|
262
|
+
isCheckable={true}
|
|
263
|
+
showSelectAll={true}
|
|
264
|
+
selectAllLabel="All Permissions"
|
|
265
|
+
searchPlaceholder="Search permissions..."
|
|
266
|
+
>
|
|
267
|
+
<FilterListBox.Item key="read">Read</FilterListBox.Item>
|
|
268
|
+
<FilterListBox.Item key="write">Write</FilterListBox.Item>
|
|
269
|
+
<FilterListBox.Item key="execute">Execute</FilterListBox.Item>
|
|
270
|
+
</FilterListBox>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### With Header and Footer
|
|
274
|
+
|
|
275
|
+
```jsx
|
|
276
|
+
<FilterListBox
|
|
277
|
+
label="Choose your preferred programming language"
|
|
278
|
+
searchPlaceholder="Search languages..."
|
|
279
|
+
header={
|
|
280
|
+
<Space gap="1x" flow="row" placeItems="center">
|
|
281
|
+
<Title level={6}>Programming Languages</Title>
|
|
282
|
+
<Badge type="purple">12</Badge>
|
|
283
|
+
</Space>
|
|
284
|
+
}
|
|
285
|
+
footer={
|
|
286
|
+
<Text color="#dark.50" preset="t4">
|
|
287
|
+
Popular languages shown
|
|
288
|
+
</Text>
|
|
289
|
+
}
|
|
290
|
+
>
|
|
291
|
+
<FilterListBox.Item key="javascript">JavaScript</FilterListBox.Item>
|
|
292
|
+
<FilterListBox.Item key="python">Python</FilterListBox.Item>
|
|
293
|
+
</FilterListBox>
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### With Custom Filter
|
|
297
|
+
|
|
298
|
+
```jsx
|
|
299
|
+
<FilterListBox
|
|
300
|
+
label="Programming Language"
|
|
301
|
+
searchPlaceholder="Type first letters..."
|
|
302
|
+
filter={(text, search) =>
|
|
303
|
+
text.toLowerCase().startsWith(search.toLowerCase())
|
|
304
|
+
}
|
|
305
|
+
>
|
|
306
|
+
<FilterListBox.Item key="javascript">JavaScript</FilterListBox.Item>
|
|
307
|
+
<FilterListBox.Item key="typescript">TypeScript</FilterListBox.Item>
|
|
308
|
+
<FilterListBox.Item key="python">Python</FilterListBox.Item>
|
|
309
|
+
</FilterListBox>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Custom Empty State
|
|
313
|
+
|
|
314
|
+
```jsx
|
|
315
|
+
<FilterListBox
|
|
316
|
+
label="Search Results"
|
|
317
|
+
emptyLabel="No matching results found. Try a different search term."
|
|
318
|
+
searchPlaceholder="Search..."
|
|
319
|
+
>
|
|
320
|
+
<FilterListBox.Item key="item1">Searchable Item</FilterListBox.Item>
|
|
321
|
+
</FilterListBox>
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### With Custom Values
|
|
325
|
+
|
|
326
|
+
```jsx
|
|
327
|
+
<FilterListBox
|
|
328
|
+
label="Select or add fruits"
|
|
329
|
+
allowsCustomValue={true}
|
|
330
|
+
selectionMode="multiple"
|
|
331
|
+
searchPlaceholder="Search or type new fruit..."
|
|
332
|
+
>
|
|
333
|
+
<FilterListBox.Item key="apple">Apple</FilterListBox.Item>
|
|
334
|
+
<FilterListBox.Item key="banana">Banana</FilterListBox.Item>
|
|
335
|
+
</FilterListBox>
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### With Icons
|
|
339
|
+
|
|
340
|
+
```jsx
|
|
341
|
+
<FilterListBox
|
|
342
|
+
label="System Administration"
|
|
343
|
+
selectionMode="single"
|
|
344
|
+
searchPlaceholder="Search admin options..."
|
|
345
|
+
>
|
|
346
|
+
<FilterListBox.Section title="User Management">
|
|
347
|
+
<FilterListBox.Item key="users">
|
|
348
|
+
<Space gap="1x" flow="row" placeItems="center">
|
|
349
|
+
<UserIcon />
|
|
350
|
+
Users
|
|
351
|
+
</Space>
|
|
352
|
+
</FilterListBox.Item>
|
|
353
|
+
<FilterListBox.Item key="permissions">
|
|
354
|
+
<Space gap="1x" flow="row" placeItems="center">
|
|
355
|
+
<CheckIcon />
|
|
356
|
+
Permissions
|
|
357
|
+
</Space>
|
|
358
|
+
</FilterListBox.Item>
|
|
359
|
+
</FilterListBox.Section>
|
|
360
|
+
</FilterListBox>
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### With Complex Content (textValue)
|
|
364
|
+
|
|
365
|
+
```jsx
|
|
366
|
+
<FilterListBox
|
|
367
|
+
label="Choose your plan"
|
|
368
|
+
selectionMode="single"
|
|
369
|
+
searchPlaceholder="Search plans..."
|
|
370
|
+
>
|
|
371
|
+
<FilterListBox.Item
|
|
372
|
+
key="basic"
|
|
373
|
+
textValue="Basic Plan - Free with limited features"
|
|
374
|
+
>
|
|
375
|
+
<Space gap="1x" flow="column">
|
|
376
|
+
<Text weight="600">Basic Plan</Text>
|
|
377
|
+
<Badge type="neutral">Free</Badge>
|
|
378
|
+
</Space>
|
|
379
|
+
</FilterListBox.Item>
|
|
380
|
+
<FilterListBox.Item
|
|
381
|
+
key="pro"
|
|
382
|
+
textValue="Pro Plan - Monthly subscription with all features"
|
|
383
|
+
>
|
|
384
|
+
<Space gap="1x" flow="column">
|
|
385
|
+
<Text weight="600">Pro Plan</Text>
|
|
386
|
+
<Badge type="purple">$19/month</Badge>
|
|
387
|
+
</Space>
|
|
388
|
+
</FilterListBox.Item>
|
|
389
|
+
</FilterListBox>
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
## Accessibility
|
|
393
|
+
|
|
394
|
+
### Keyboard Navigation
|
|
395
|
+
|
|
396
|
+
- `Tab` - Moves focus to the search input
|
|
397
|
+
- `Arrow Down/Up` - Navigate through filtered options
|
|
398
|
+
- `Enter` - Select the focused option
|
|
399
|
+
- `Space` - In multiple selection mode, toggle selection (when search is empty)
|
|
400
|
+
- `Escape` - Clear search input or close (if empty)
|
|
401
|
+
- `Home/End` - Move to first/last option
|
|
402
|
+
- `PageUp/PageDown` - Jump to first/last option
|
|
403
|
+
|
|
404
|
+
### Screen Reader Support
|
|
405
|
+
|
|
406
|
+
- Search input announces as "combobox" with proper state
|
|
407
|
+
- Filtered results are announced when search changes
|
|
408
|
+
- Selected items are announced immediately
|
|
409
|
+
- Loading states are communicated to screen readers
|
|
410
|
+
- Empty search results are properly announced
|
|
411
|
+
|
|
412
|
+
### ARIA Properties
|
|
413
|
+
|
|
414
|
+
- `aria-label` - Provides accessible label for the FilterListBox
|
|
415
|
+
- `aria-expanded` - Indicates the expanded state of the listbox
|
|
416
|
+
- `aria-haspopup` - Indicates the search input controls a listbox
|
|
417
|
+
- `aria-activedescendant` - Tracks the focused option
|
|
418
|
+
- `aria-describedby` - Associates help text and descriptions
|
|
419
|
+
|
|
420
|
+
## Best Practices
|
|
421
|
+
|
|
422
|
+
1. **Do**: Use for lists with more than 10-15 options
|
|
423
|
+
```jsx
|
|
424
|
+
<FilterListBox label="Choose Country" searchPlaceholder="Search countries...">
|
|
425
|
+
{countries.map(country => (
|
|
426
|
+
<FilterListBox.Item key={country.code}>{country.name}</FilterListBox.Item>
|
|
427
|
+
))}
|
|
428
|
+
</FilterListBox>
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
2. **Don't**: Use for very small lists (under 5-7 options)
|
|
432
|
+
```jsx
|
|
433
|
+
// ❌ Avoid for small lists - use ListBox instead
|
|
434
|
+
<FilterListBox>
|
|
435
|
+
<FilterListBox.Item key="yes">Yes</FilterListBox.Item>
|
|
436
|
+
<FilterListBox.Item key="no">No</FilterListBox.Item>
|
|
437
|
+
</FilterListBox>
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
3. **Do**: Provide `textValue` for complex option content
|
|
441
|
+
```jsx
|
|
442
|
+
<FilterListBox.Item key="user1" textValue="John Doe john.doe@company.com">
|
|
443
|
+
<Avatar src="/john.jpg" />
|
|
444
|
+
<div>
|
|
445
|
+
<strong>John Doe</strong>
|
|
446
|
+
<div>john.doe@company.com</div>
|
|
447
|
+
</div>
|
|
448
|
+
</FilterListBox.Item>
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
4. **Do**: Use `showSelectAll` for efficient multiple selection from filtered lists
|
|
452
|
+
```jsx
|
|
453
|
+
<FilterListBox
|
|
454
|
+
selectionMode="multiple"
|
|
455
|
+
showSelectAll
|
|
456
|
+
selectAllLabel="Select All Visible"
|
|
457
|
+
searchPlaceholder="Filter items..."
|
|
458
|
+
>
|
|
459
|
+
{/* many items */}
|
|
460
|
+
</FilterListBox>
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
5. **Do**: Use `isCheckable` for visual clarity in multiple selection mode
|
|
464
|
+
```jsx
|
|
465
|
+
<FilterListBox
|
|
466
|
+
selectionMode="multiple"
|
|
467
|
+
isCheckable={true}
|
|
468
|
+
searchPlaceholder="Search options..."
|
|
469
|
+
>
|
|
470
|
+
{/* items */}
|
|
471
|
+
</FilterListBox>
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
6. **Performance**: Use custom filter functions for specialized search needs
|
|
475
|
+
7. **UX**: Provide meaningful empty state messages
|
|
476
|
+
8. **Accessibility**: Always provide clear search placeholders
|
|
477
|
+
|
|
478
|
+
## Integration with Forms
|
|
479
|
+
|
|
480
|
+
This component supports all [Field properties](../../FieldProperties.md) when used within a Form. The component automatically handles form validation, field states, and integrates with form submission.
|
|
481
|
+
|
|
482
|
+
```jsx
|
|
483
|
+
<Form onSubmit={handleSubmit}>
|
|
484
|
+
<FilterListBox
|
|
485
|
+
name="skills"
|
|
486
|
+
label="Technical Skills"
|
|
487
|
+
isRequired
|
|
488
|
+
selectionMode="multiple"
|
|
489
|
+
searchPlaceholder="Search skills..."
|
|
490
|
+
rules={[{ required: true, min: 2 }]}
|
|
491
|
+
>
|
|
492
|
+
<FilterListBox.Section title="Frontend">
|
|
493
|
+
<FilterListBox.Item key="react">React</FilterListBox.Item>
|
|
494
|
+
<FilterListBox.Item key="vue">Vue.js</FilterListBox.Item>
|
|
495
|
+
</FilterListBox.Section>
|
|
496
|
+
<FilterListBox.Section title="Backend">
|
|
497
|
+
<FilterListBox.Item key="nodejs">Node.js</FilterListBox.Item>
|
|
498
|
+
<FilterListBox.Item key="python">Python</FilterListBox.Item>
|
|
499
|
+
</FilterListBox.Section>
|
|
500
|
+
</FilterListBox>
|
|
501
|
+
</Form>
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
## Advanced Features
|
|
505
|
+
|
|
506
|
+
### Custom Filter Functions
|
|
507
|
+
|
|
508
|
+
FilterListBox supports custom filter functions for specialized search behavior:
|
|
509
|
+
|
|
510
|
+
```jsx
|
|
511
|
+
// Starts-with filter
|
|
512
|
+
const startsWithFilter = (text, search) =>
|
|
513
|
+
text.toLowerCase().startsWith(search.toLowerCase());
|
|
514
|
+
|
|
515
|
+
// Fuzzy search filter
|
|
516
|
+
const fuzzyFilter = (text, search) => {
|
|
517
|
+
const searchChars = search.toLowerCase().split('');
|
|
518
|
+
const textLower = text.toLowerCase();
|
|
519
|
+
let searchIndex = 0;
|
|
520
|
+
|
|
521
|
+
for (const char of textLower) {
|
|
522
|
+
if (char === searchChars[searchIndex]) {
|
|
523
|
+
searchIndex++;
|
|
524
|
+
if (searchIndex === searchChars.length) return true;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
return false;
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
<FilterListBox filter={startsWithFilter}>
|
|
531
|
+
{/* items */}
|
|
532
|
+
</FilterListBox>
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Custom Values
|
|
536
|
+
|
|
537
|
+
When `allowsCustomValue={true}`, users can add new options by typing:
|
|
538
|
+
|
|
539
|
+
```jsx
|
|
540
|
+
<FilterListBox
|
|
541
|
+
allowsCustomValue={true}
|
|
542
|
+
selectionMode="multiple"
|
|
543
|
+
searchPlaceholder="Search or add new..."
|
|
544
|
+
>
|
|
545
|
+
<FilterListBox.Item key="existing">Existing Option</FilterListBox.Item>
|
|
546
|
+
</FilterListBox>
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
Custom values:
|
|
550
|
+
- Are automatically added when selected
|
|
551
|
+
- Persist across searches
|
|
552
|
+
- Appear in the list with selected items
|
|
553
|
+
- Can be removed like any other selection
|
|
554
|
+
|
|
555
|
+
### Custom Value Styling
|
|
556
|
+
|
|
557
|
+
Use `customValueProps` to style existing custom values and `newCustomValueProps` to style new custom values appearing in search results:
|
|
558
|
+
|
|
559
|
+
```jsx
|
|
560
|
+
<FilterListBox
|
|
561
|
+
allowsCustomValue={true}
|
|
562
|
+
selectionMode="multiple"
|
|
563
|
+
customValueProps={{
|
|
564
|
+
icon: <TagIcon />,
|
|
565
|
+
styles: {
|
|
566
|
+
color: '#orange-text',
|
|
567
|
+
},
|
|
568
|
+
}}
|
|
569
|
+
newCustomValueProps={{
|
|
570
|
+
icon: <PlusIcon />,
|
|
571
|
+
styles: {
|
|
572
|
+
color: '#success-text',
|
|
573
|
+
},
|
|
574
|
+
}}
|
|
575
|
+
>
|
|
576
|
+
<FilterListBox.Item key="react">React</FilterListBox.Item>
|
|
577
|
+
<FilterListBox.Item key="vue">Vue.js</FilterListBox.Item>
|
|
578
|
+
</FilterListBox>
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
**Key differences:**
|
|
582
|
+
- `customValueProps` - Applied to custom values that are already selected
|
|
583
|
+
- `newCustomValueProps` - Applied to new custom values appearing when typing in search (merged with `customValueProps`)
|
|
584
|
+
|
|
585
|
+
### External Filtering
|
|
586
|
+
|
|
587
|
+
For server-side filtering or complex custom logic, use `filter={false}` with controlled search:
|
|
588
|
+
|
|
589
|
+
```jsx
|
|
590
|
+
const [searchValue, setSearchValue] = useState('');
|
|
591
|
+
const [filteredItems, setFilteredItems] = useState(allItems);
|
|
592
|
+
|
|
593
|
+
useEffect(() => {
|
|
594
|
+
// Your custom filtering logic (e.g., API call, complex algorithm)
|
|
595
|
+
const filtered = customFilterLogic(allItems, searchValue);
|
|
596
|
+
setFilteredItems(filtered);
|
|
597
|
+
}, [searchValue, allItems]);
|
|
598
|
+
|
|
599
|
+
<FilterListBox
|
|
600
|
+
searchValue={searchValue}
|
|
601
|
+
onSearchChange={setSearchValue}
|
|
602
|
+
filter={false}
|
|
603
|
+
>
|
|
604
|
+
{filteredItems.map(item => (
|
|
605
|
+
<FilterListBox.Item key={item.id}>{item.name}</FilterListBox.Item>
|
|
606
|
+
))}
|
|
607
|
+
</FilterListBox>
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
**When to use:**
|
|
611
|
+
- Server-side filtering for large datasets
|
|
612
|
+
- Complex custom search algorithms
|
|
613
|
+
- Debounced API calls
|
|
614
|
+
- Multi-field search logic
|
|
615
|
+
|
|
616
|
+
### Escape Key Handling
|
|
617
|
+
|
|
618
|
+
Use the `onEscape` prop to handle custom behavior when Escape is pressed with empty search input:
|
|
619
|
+
|
|
620
|
+
```jsx
|
|
621
|
+
<FilterListBox
|
|
622
|
+
label="Custom Escape Handling"
|
|
623
|
+
searchPlaceholder="Search fruits..."
|
|
624
|
+
onEscape={() => {
|
|
625
|
+
// Custom behavior (e.g., close parent dialog)
|
|
626
|
+
closeParentDialog();
|
|
627
|
+
}}
|
|
628
|
+
>
|
|
629
|
+
<FilterListBox.Item key="apple">Apple</FilterListBox.Item>
|
|
630
|
+
<FilterListBox.Item key="banana">Banana</FilterListBox.Item>
|
|
631
|
+
</FilterListBox>
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
**Key behaviors:**
|
|
635
|
+
- If search has text: Escape clears the search
|
|
636
|
+
- If search is empty: Escape calls `onEscape` callback
|
|
637
|
+
- Useful for closing parent modals or dialogs
|
|
638
|
+
|
|
639
|
+
### Controlled Search
|
|
640
|
+
|
|
641
|
+
Use `searchValue` and `onSearchChange` for complete control over the search input:
|
|
642
|
+
|
|
643
|
+
```jsx
|
|
644
|
+
const [searchValue, setSearchValue] = useState('');
|
|
645
|
+
|
|
646
|
+
// Debounced search example
|
|
647
|
+
const debouncedSearch = useDebounce(searchValue, 300);
|
|
648
|
+
|
|
649
|
+
useEffect(() => {
|
|
650
|
+
// Perform search with debounced value
|
|
651
|
+
performSearch(debouncedSearch);
|
|
652
|
+
}, [debouncedSearch]);
|
|
653
|
+
|
|
654
|
+
<FilterListBox
|
|
655
|
+
searchValue={searchValue}
|
|
656
|
+
onSearchChange={setSearchValue}
|
|
657
|
+
searchPlaceholder="Search..."
|
|
658
|
+
>
|
|
659
|
+
{/* items */}
|
|
660
|
+
</FilterListBox>
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
**Use cases:**
|
|
664
|
+
- Debouncing search input
|
|
665
|
+
- Synchronizing with external UI
|
|
666
|
+
- Tracking search analytics
|
|
667
|
+
- Clearing search from external triggers
|
|
668
|
+
|
|
669
|
+
### Virtualization
|
|
670
|
+
|
|
671
|
+
When FilterListBox contains many items without sections, virtualization is automatically enabled to improve performance. Only visible items are rendered in the DOM, providing smooth scrolling even with large datasets.
|
|
672
|
+
|
|
673
|
+
```jsx
|
|
674
|
+
const items = Array.from({ length: 1000 }, (_, i) => ({
|
|
675
|
+
id: `item-${i}`,
|
|
676
|
+
name: `Item ${i + 1}`,
|
|
677
|
+
}));
|
|
678
|
+
|
|
679
|
+
<FilterListBox
|
|
680
|
+
label="Large Dataset"
|
|
681
|
+
searchPlaceholder="Search through 1000+ items..."
|
|
682
|
+
items={items}
|
|
683
|
+
>
|
|
684
|
+
{(item) => (
|
|
685
|
+
<FilterListBox.Item key={item.id}>{item.name}</FilterListBox.Item>
|
|
686
|
+
)}
|
|
687
|
+
</FilterListBox>
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
**Key features:**
|
|
691
|
+
- Automatically enabled for large lists without sections
|
|
692
|
+
- Handles items with varying heights
|
|
693
|
+
- Works seamlessly with filtering
|
|
694
|
+
- Maintains performance with thousands of items
|
|
695
|
+
|
|
696
|
+
**Limitations:**
|
|
697
|
+
- Virtualization is disabled when sections are present
|
|
698
|
+
- For sectioned large lists, consider flattening or alternative approaches
|
|
699
|
+
|
|
700
|
+
## Performance
|
|
701
|
+
|
|
702
|
+
### Optimization Tips
|
|
703
|
+
|
|
704
|
+
- **Use `textValue` prop**: For complex option content, provide searchable text that includes more context than just the visible label
|
|
705
|
+
- **Implement debounced search**: For external filtering or expensive operations
|
|
706
|
+
- **Use `filter={false}` with external logic**: For server-side filtering or complex custom logic
|
|
707
|
+
- **Avoid sections for very large lists**: Virtualization is disabled when sections are present
|
|
708
|
+
- **Consider FilterPicker**: For trigger-based interfaces to save screen space
|
|
709
|
+
|
|
710
|
+
```jsx
|
|
711
|
+
// Optimized for performance
|
|
712
|
+
<FilterListBox.Item
|
|
713
|
+
key="complex"
|
|
714
|
+
textValue="John Doe - Senior Developer - Engineering Team"
|
|
715
|
+
>
|
|
716
|
+
<ComplexUserCard user={user} />
|
|
717
|
+
</FilterListBox.Item>
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
## Related Components
|
|
721
|
+
|
|
722
|
+
- [ListBox](./ListBox.md) - Simple list selection without search
|
|
723
|
+
- [FilterPicker](./FilterPicker.md) - FilterListBox in a trigger-based popover
|
|
724
|
+
- [ComboBox](./ComboBox.md) - Dropdown with search and text input
|
|
725
|
+
- [Select](./Select.md) - Dropdown selection without search
|
|
726
|
+
- [SearchInput](./SearchInput.md) - Standalone search input component
|