@cube-dev/ui-kit 0.0.0-canary-c210a8c → 0.0.0-canary-60981ef
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-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.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/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/ComplexLayout.md +469 -0
- package/docs/CreateComponent.md +410 -0
- package/docs/Introduction.md +122 -0
- package/docs/RenderCache.md +172 -0
- package/docs/Result.md +35 -0
- package/docs/SimpleLayout.md +26 -0
- package/docs/Typography.md +38 -0
- package/docs/components/CollectionItem.md +299 -0
- package/docs/components/actions/Banner.md +189 -0
- package/docs/components/actions/Button.md +183 -0
- package/docs/components/actions/ButtonSplit.md +189 -0
- package/docs/components/actions/CommandMenu.md +430 -0
- package/docs/components/actions/ItemButton.md +304 -0
- package/docs/components/actions/Link.md +325 -0
- package/docs/components/actions/Menu.md +509 -0
- package/docs/components/actions/use-anchored-menu.md +211 -0
- package/docs/components/actions/use-context-menu.md +220 -0
- package/docs/components/content/Badge.md +187 -0
- package/docs/components/content/Disclosure.md +177 -0
- package/docs/components/content/HotKeys.md +352 -0
- package/docs/components/content/Item.md +488 -0
- package/docs/components/content/ItemCard.md +125 -0
- package/docs/components/content/Layout.md +866 -0
- package/docs/components/content/Tag.md +156 -0
- package/docs/components/content/TextItem.md +211 -0
- package/docs/components/fields/Checkbox.md +180 -0
- package/docs/components/fields/ComboBox.md +617 -0
- package/docs/components/fields/DatePicker.md +231 -0
- package/docs/components/fields/FileInput.md +197 -0
- package/docs/components/fields/FilterListBox.md +703 -0
- package/docs/components/fields/FilterPicker.md +736 -0
- package/docs/components/fields/HueSlider.md +175 -0
- package/docs/components/fields/ListBox.md +691 -0
- package/docs/components/fields/NumberInput.md +184 -0
- package/docs/components/fields/PasswordInput.md +218 -0
- package/docs/components/fields/Picker.md +884 -0
- package/docs/components/fields/RadioGroup.md +314 -0
- package/docs/components/fields/SearchInput.md +227 -0
- package/docs/components/fields/Select.md +583 -0
- package/docs/components/fields/Slider.md +53 -0
- package/docs/components/fields/Switch.md +174 -0
- package/docs/components/fields/TextArea.md +61 -0
- package/docs/components/fields/TextInput.md +204 -0
- package/docs/components/fields/TextInputMapper.md +34 -0
- package/docs/components/form/Field.md +341 -0
- package/docs/components/form/Form.md +455 -0
- package/docs/components/form/FormInstance.md +319 -0
- package/docs/components/helpers/DisplayTransition.md +259 -0
- package/docs/components/helpers/IconSwitch.md +156 -0
- package/docs/components/navigation/Tabs.md +704 -0
- package/docs/components/overlays/Dialog.md +202 -0
- package/docs/components/overlays/DialogContainer.md +201 -0
- package/docs/components/overlays/DialogForm.md +290 -0
- package/docs/components/overlays/DialogTrigger.md +191 -0
- package/docs/components/overlays/Notifications.md +406 -0
- package/docs/components/overlays/Toast.md +285 -0
- package/docs/components/overlays/Tooltip.md +371 -0
- package/docs/components/overlays/UseDialogContainer.md +603 -0
- package/package.json +1 -1
- package/docs/.gitignore +0 -3
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# Toast
|
|
2
|
+
|
|
3
|
+
Toast notifications provide brief, non-intrusive feedback to users about actions or events. They appear at the top center of the viewport and automatically dismiss after a configurable duration.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Provide feedback after user actions (e.g., "Copied to clipboard")
|
|
8
|
+
- Show success/error/warning messages that don't require user action
|
|
9
|
+
- Display progress states for ongoing operations
|
|
10
|
+
- Communicate non-critical information that doesn't interrupt workflow
|
|
11
|
+
|
|
12
|
+
## Component
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### Properties
|
|
17
|
+
|
|
18
|
+
### Base Properties
|
|
19
|
+
|
|
20
|
+
Supports [Base properties](/BaseProperties)
|
|
21
|
+
|
|
22
|
+
### Styling Properties
|
|
23
|
+
|
|
24
|
+
#### styles
|
|
25
|
+
|
|
26
|
+
Customizes the root element of the toast. The toast uses the `Item` component with `type="card"` internally.
|
|
27
|
+
|
|
28
|
+
**Sub-elements:**
|
|
29
|
+
- `Label` - Primary content text
|
|
30
|
+
- `Description` - Secondary content text
|
|
31
|
+
- `Icon` - Icon container
|
|
32
|
+
|
|
33
|
+
## Themes
|
|
34
|
+
|
|
35
|
+
Available themes:
|
|
36
|
+
|
|
37
|
+
- `default` - Standard appearance
|
|
38
|
+
- `success` - Positive feedback (green)
|
|
39
|
+
- `danger` - Error or destructive action (red)
|
|
40
|
+
- `warning` - Caution or attention needed (yellow)
|
|
41
|
+
- `note` - Informational (blue)
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
### Using useToast Hook
|
|
46
|
+
|
|
47
|
+
The primary way to show toasts programmatically:
|
|
48
|
+
|
|
49
|
+
```jsx
|
|
50
|
+
const toast = useToast();
|
|
51
|
+
|
|
52
|
+
// String shorthand
|
|
53
|
+
toast.success('Copied to clipboard');
|
|
54
|
+
|
|
55
|
+
// Object with options
|
|
56
|
+
toast.success({
|
|
57
|
+
title: 'Success',
|
|
58
|
+
description: 'File copied to clipboard',
|
|
59
|
+
icon: <CustomIcon />,
|
|
60
|
+
duration: 3000,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Available methods
|
|
64
|
+
toast(); // Default theme
|
|
65
|
+
toast.success(); // Success theme
|
|
66
|
+
toast.danger(); // Danger theme
|
|
67
|
+
toast.warning(); // Warning theme
|
|
68
|
+
toast.note(); // Note theme
|
|
69
|
+
toast.remove(id); // Remove a toast by id
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Declarative Toast Component
|
|
73
|
+
|
|
74
|
+
Use the `<Toast>` component for toasts that should be visible while mounted:
|
|
75
|
+
|
|
76
|
+
```jsx
|
|
77
|
+
// Simple toast (visible while mounted)
|
|
78
|
+
<Toast theme="success">Saved successfully</Toast>
|
|
79
|
+
|
|
80
|
+
// With description
|
|
81
|
+
<Toast title="Success" description="Changes saved" theme="success" />
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Progress Toast
|
|
85
|
+
|
|
86
|
+
Use `useProgressToast` for operations that have loading, success, and error states. The hook manages the entire lifecycle of the toast automatically.
|
|
87
|
+
|
|
88
|
+
#### How It Works
|
|
89
|
+
|
|
90
|
+
The `useProgressToast` hook accepts an optional options object that controls the toast state. The toast only appears after `isLoading: true` is seen — non-loading initial states are silently ignored until a loading cycle occurs.
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
interface ProgressToastOptions {
|
|
94
|
+
isLoading: boolean; // Whether the operation is in progress
|
|
95
|
+
title?: ReactNode; // Primary message
|
|
96
|
+
description?: ReactNode; // Secondary message
|
|
97
|
+
theme?: ToastType; // 'default' | 'success' | 'danger' | 'warning' | 'note'
|
|
98
|
+
icon?: ReactNode; // Custom icon (theme-based icons applied automatically when not loading)
|
|
99
|
+
id?: Key; // For deduplication
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Or pass empty value to immediately dismiss any existing toast
|
|
103
|
+
type ProgressToastEmpty = null | undefined | false | {};
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### State Transitions
|
|
107
|
+
|
|
108
|
+
The hook requires a loading cycle (`isLoading: true`) before any toast becomes visible. If the initial state is not loading, no toast is shown until `isLoading: true` is passed. The hook handles three main scenarios:
|
|
109
|
+
|
|
110
|
+
**1. Loading State** (`isLoading: true`) — triggers initial appearance
|
|
111
|
+
- Toast appears immediately and persists until `isLoading` becomes `false`
|
|
112
|
+
- No auto-dismiss timer while loading
|
|
113
|
+
- This is the only state that can trigger the initial appearance of the toast
|
|
114
|
+
|
|
115
|
+
**2. Result State** (`isLoading: false` with content)
|
|
116
|
+
- Only shown after a prior loading state — ignored if loading was never seen
|
|
117
|
+
- When transitioning from loading to not loading, the toast updates to show the result
|
|
118
|
+
- Result toast auto-dismisses after 3 seconds
|
|
119
|
+
- Theme-based icons are automatically applied (success checkmark, danger X, etc.)
|
|
120
|
+
|
|
121
|
+
**3. Dismissed** (empty value, no argument, or no title when not loading)
|
|
122
|
+
- Pass `null`, `undefined`, `false`, `{}`, or call with no argument to immediately remove any existing toast
|
|
123
|
+
- Also resets the loading gate, so the next toast cycle requires `isLoading: true` again
|
|
124
|
+
- Useful for conditional rendering or cleanup
|
|
125
|
+
|
|
126
|
+
#### Basic Usage
|
|
127
|
+
|
|
128
|
+
```jsx
|
|
129
|
+
function SaveButton() {
|
|
130
|
+
const [status, setStatus] = useState('idle');
|
|
131
|
+
|
|
132
|
+
useProgressToast(
|
|
133
|
+
status === 'saving'
|
|
134
|
+
? { isLoading: true, title: 'Saving...' }
|
|
135
|
+
: status === 'success'
|
|
136
|
+
? { isLoading: false, title: 'Saved!', theme: 'success' }
|
|
137
|
+
: status === 'error'
|
|
138
|
+
? { isLoading: false, title: 'Failed to save', theme: 'danger' }
|
|
139
|
+
: null // idle state - no toast
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
return <Button onPress={() => setStatus('saving')}>Save</Button>;
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### With Error Handling
|
|
147
|
+
|
|
148
|
+
```jsx
|
|
149
|
+
function DataLoader() {
|
|
150
|
+
const { data, isLoading, error } = useQuery('data');
|
|
151
|
+
|
|
152
|
+
useProgressToast(
|
|
153
|
+
isLoading
|
|
154
|
+
? { isLoading: true, title: 'Loading data...' }
|
|
155
|
+
: error
|
|
156
|
+
? { isLoading: false, title: 'Error', description: error.message, theme: 'danger' }
|
|
157
|
+
: { isLoading: false, title: 'Data loaded', theme: 'success' }
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
return <div>{/* content */}</div>;
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### Conditional Display
|
|
165
|
+
|
|
166
|
+
Pass an empty value to prevent the toast from showing or to immediately remove an existing one:
|
|
167
|
+
|
|
168
|
+
```jsx
|
|
169
|
+
// Only show toast when needed
|
|
170
|
+
useProgressToast(
|
|
171
|
+
shouldShowProgress
|
|
172
|
+
? { isLoading: true, title: 'Processing...' }
|
|
173
|
+
: null
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
// All of these are equivalent "empty" values:
|
|
177
|
+
useProgressToast(null);
|
|
178
|
+
useProgressToast(undefined);
|
|
179
|
+
useProgressToast(false);
|
|
180
|
+
useProgressToast({});
|
|
181
|
+
useProgressToast(); // no argument also works
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### Custom Icons
|
|
185
|
+
|
|
186
|
+
When `isLoading` is `false`, the hook automatically applies theme-based icons. You can override this with a custom icon:
|
|
187
|
+
|
|
188
|
+
```jsx
|
|
189
|
+
useProgressToast({
|
|
190
|
+
isLoading: false,
|
|
191
|
+
title: 'Uploaded!',
|
|
192
|
+
theme: 'success',
|
|
193
|
+
icon: <IconCloudUpload />, // Custom icon instead of default checkmark
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Declarative Alternative
|
|
198
|
+
|
|
199
|
+
For component-based usage, use `<Toast.Progress>`:
|
|
200
|
+
|
|
201
|
+
```jsx
|
|
202
|
+
<Toast.Progress
|
|
203
|
+
{...(isLoading
|
|
204
|
+
? { isLoading: true, title: 'Saving...' }
|
|
205
|
+
: { isLoading: false, title: 'Saved!', theme: 'success' }
|
|
206
|
+
)}
|
|
207
|
+
/>
|
|
208
|
+
|
|
209
|
+
### Interactive Progress State Toggle
|
|
210
|
+
|
|
211
|
+
<Story of={ToastStories.ProgressStateToggle} />
|
|
212
|
+
|
|
213
|
+
### Deduplication
|
|
214
|
+
|
|
215
|
+
Toasts with identical content are deduplicated. Clicking the same action multiple times will refresh the existing toast instead of creating duplicates:
|
|
216
|
+
|
|
217
|
+
<Story of={ToastStories.Deduplication} />
|
|
218
|
+
|
|
219
|
+
### Multiple Toasts
|
|
220
|
+
|
|
221
|
+
Maximum 3 toasts are visible at once. When the limit is exceeded, the oldest toast is removed:
|
|
222
|
+
|
|
223
|
+
<Story of={ToastStories.MultipleToasts} />
|
|
224
|
+
|
|
225
|
+
## Toast Behavior
|
|
226
|
+
|
|
227
|
+
### Positioning
|
|
228
|
+
- Fixed at top center of the viewport
|
|
229
|
+
- 16px from the top edge
|
|
230
|
+
- Toasts stack vertically (newest at bottom)
|
|
231
|
+
|
|
232
|
+
### Collapse on Hover
|
|
233
|
+
- When hovering over toasts, they collapse to reveal content behind them
|
|
234
|
+
- Only 8px of the newest toast remains visible
|
|
235
|
+
- Moving the mouse away restores the full toast display
|
|
236
|
+
|
|
237
|
+
### Auto-dismiss
|
|
238
|
+
- Default duration: 5 seconds
|
|
239
|
+
- Progress toasts remain visible while `isLoading` is true
|
|
240
|
+
- Set `duration: null` for persistent toasts
|
|
241
|
+
|
|
242
|
+
### Limits
|
|
243
|
+
- Maximum 3 visible toasts
|
|
244
|
+
- Progress toasts count toward the limit
|
|
245
|
+
- At least 1 temporal toast is always allowed, even with 3 progress toasts
|
|
246
|
+
|
|
247
|
+
## Accessibility
|
|
248
|
+
|
|
249
|
+
### Keyboard Navigation
|
|
250
|
+
|
|
251
|
+
- Toasts do not trap focus
|
|
252
|
+
- Close button is keyboard accessible
|
|
253
|
+
- Screen readers announce toast content
|
|
254
|
+
|
|
255
|
+
### Screen Reader Support
|
|
256
|
+
|
|
257
|
+
- Toasts are announced when they appear
|
|
258
|
+
- Uses appropriate ARIA live regions for notifications
|
|
259
|
+
|
|
260
|
+
### ARIA Properties
|
|
261
|
+
|
|
262
|
+
- `aria-label` - Provides accessible label for close button
|
|
263
|
+
|
|
264
|
+
## Best Practices
|
|
265
|
+
|
|
266
|
+
1. **Do**: Use clear, concise messages
|
|
267
|
+
|
|
268
|
+
```jsx
|
|
269
|
+
toast.success('Changes saved');
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
2. **Don't**: Use overly long or technical messages
|
|
273
|
+
|
|
274
|
+
```jsx
|
|
275
|
+
toast.success('The database transaction completed successfully with no errors');
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
3. **Accessibility**: Keep toast messages brief and actionable
|
|
279
|
+
|
|
280
|
+
4. **Performance**: Use deduplication for repeated actions to avoid toast spam
|
|
281
|
+
|
|
282
|
+
## Related Components
|
|
283
|
+
|
|
284
|
+
- [Item](/components/Item) - Base component used for toast rendering
|
|
285
|
+
- [Alert](/components/Alert) - For persistent, inline feedback
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
Tooltips display informative text when users hover over or focus an element. They provide supplementary information about an element without cluttering the interface.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Provide brief descriptions of buttons, icons, or other UI elements
|
|
8
|
+
- Show keyboard shortcuts or additional context for actions
|
|
9
|
+
- Display truncated text or labels in full
|
|
10
|
+
- Explain unfamiliar terms or provide helpful hints
|
|
11
|
+
- Add supplementary information without overwhelming the interface
|
|
12
|
+
|
|
13
|
+
## Components
|
|
14
|
+
|
|
15
|
+
This module exports three components that work together:
|
|
16
|
+
|
|
17
|
+
- **`TooltipProvider`** - Convenience wrapper for simple tooltip use cases (recommended)
|
|
18
|
+
- **`TooltipTrigger`** - Lower-level component for advanced tooltip scenarios
|
|
19
|
+
- **`Tooltip`** - The tooltip content container (used with `TooltipTrigger`)
|
|
20
|
+
|
|
21
|
+
## TooltipProvider (Recommended)
|
|
22
|
+
|
|
23
|
+
The simplest way to add tooltips to your components. It combines `TooltipTrigger` and `Tooltip` for convenience.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### Properties
|
|
28
|
+
|
|
29
|
+
### Base Properties
|
|
30
|
+
|
|
31
|
+
Supports [Base properties](/docs/base-properties)
|
|
32
|
+
|
|
33
|
+
### Styling Properties
|
|
34
|
+
|
|
35
|
+
#### tooltipStyles
|
|
36
|
+
|
|
37
|
+
Customizes the tooltip content container.
|
|
38
|
+
|
|
39
|
+
**Sub-elements:**
|
|
40
|
+
- None (tooltip tip is styled via `tipStyles` prop on `Tooltip` component)
|
|
41
|
+
|
|
42
|
+
### Style Properties
|
|
43
|
+
|
|
44
|
+
These properties allow direct style application without using the `styles` prop: `width`.
|
|
45
|
+
|
|
46
|
+
### Modifiers
|
|
47
|
+
|
|
48
|
+
The `mods` property on the tooltip accepts the following modifiers you can override:
|
|
49
|
+
|
|
50
|
+
| Modifier | Type | Description |
|
|
51
|
+
|----------|------|-------------|
|
|
52
|
+
| material | `boolean` | Enables material-style tooltip with pointer events |
|
|
53
|
+
| light | `boolean` | Uses light color scheme instead of dark |
|
|
54
|
+
| open | `boolean` | Indicates whether the tooltip is currently visible |
|
|
55
|
+
|
|
56
|
+
## TooltipTrigger
|
|
57
|
+
|
|
58
|
+
Lower-level component that wraps a trigger element and a `Tooltip`. Use this when you need more control over the tooltip content or behavior.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Properties
|
|
63
|
+
|
|
64
|
+
### Base Properties
|
|
65
|
+
|
|
66
|
+
Supports [Base properties](/docs/base-properties)
|
|
67
|
+
|
|
68
|
+
## Tooltip
|
|
69
|
+
|
|
70
|
+
Display container for tooltip content. Has a directional arrow dependent on its placement. This component is typically used as a child of `TooltipTrigger` or automatically rendered by `TooltipProvider`.
|
|
71
|
+
|
|
72
|
+
### Properties
|
|
73
|
+
|
|
74
|
+
#### tipStyles
|
|
75
|
+
|
|
76
|
+
Customizes the tooltip arrow (tip) element.
|
|
77
|
+
|
|
78
|
+
#### showIcon
|
|
79
|
+
|
|
80
|
+
`boolean` - Controls whether an icon should be displayed in the tooltip.
|
|
81
|
+
|
|
82
|
+
#### placement
|
|
83
|
+
|
|
84
|
+
`PlacementAxis` - Controls the position of the tooltip relative to its trigger. Options: `top`, `bottom`, `left`, `right`.
|
|
85
|
+
|
|
86
|
+
#### isMaterial
|
|
87
|
+
|
|
88
|
+
`boolean` - Enables material-style tooltip with auto pointer events.
|
|
89
|
+
|
|
90
|
+
#### isLight
|
|
91
|
+
|
|
92
|
+
`boolean` - Uses light color scheme for the tooltip.
|
|
93
|
+
|
|
94
|
+
#### width
|
|
95
|
+
|
|
96
|
+
Specifies the width of the tooltip.
|
|
97
|
+
|
|
98
|
+
### Base Properties
|
|
99
|
+
|
|
100
|
+
Supports [Base properties](/docs/base-properties)
|
|
101
|
+
|
|
102
|
+
### Styling Properties
|
|
103
|
+
|
|
104
|
+
#### styles
|
|
105
|
+
|
|
106
|
+
Customizes the root element of the tooltip.
|
|
107
|
+
|
|
108
|
+
**Sub-elements:**
|
|
109
|
+
- None
|
|
110
|
+
|
|
111
|
+
## Usage Patterns
|
|
112
|
+
|
|
113
|
+
### Standard Pattern (Active Elements)
|
|
114
|
+
|
|
115
|
+
For focusable and hoverable elements like `Button`, `Link`, `IconButton`, etc., use the standard pattern with `TooltipProvider`:
|
|
116
|
+
|
|
117
|
+
```jsx
|
|
118
|
+
<TooltipProvider title="Click to save">
|
|
119
|
+
<Button>Save</Button>
|
|
120
|
+
</TooltipProvider>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Or with `TooltipTrigger`:
|
|
124
|
+
|
|
125
|
+
```jsx
|
|
126
|
+
<TooltipTrigger>
|
|
127
|
+
<Button>Save</Button>
|
|
128
|
+
<Tooltip>Click to save</Tooltip>
|
|
129
|
+
</TooltipTrigger>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Function Pattern (Non-Focusable Elements)
|
|
133
|
+
|
|
134
|
+
For elements that don't have native DOM focus or hover support (like `div`, `span`, or custom components), use the function-as-child pattern:
|
|
135
|
+
|
|
136
|
+
```jsx
|
|
137
|
+
<TooltipProvider title="Additional information">
|
|
138
|
+
{(triggerProps, ref) => (
|
|
139
|
+
<div ref={ref} {...triggerProps}>
|
|
140
|
+
Hoverable content
|
|
141
|
+
</div>
|
|
142
|
+
)}
|
|
143
|
+
</TooltipProvider>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
With `TooltipTrigger`:
|
|
147
|
+
|
|
148
|
+
```jsx
|
|
149
|
+
<TooltipTrigger>
|
|
150
|
+
{(triggerProps, ref) => (
|
|
151
|
+
<span ref={ref} {...triggerProps}>
|
|
152
|
+
Custom element
|
|
153
|
+
</span>
|
|
154
|
+
)}
|
|
155
|
+
<Tooltip>Tooltip content</Tooltip>
|
|
156
|
+
</TooltipTrigger>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Different Placements
|
|
160
|
+
|
|
161
|
+
Control where the tooltip appears relative to its trigger:
|
|
162
|
+
|
|
163
|
+
```jsx
|
|
164
|
+
<TooltipProvider title="Tooltip on the right" placement="right">
|
|
165
|
+
<Button>Hover me</Button>
|
|
166
|
+
</TooltipProvider>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Light Theme
|
|
170
|
+
|
|
171
|
+
Use the light theme for tooltips on dark backgrounds:
|
|
172
|
+
|
|
173
|
+
```jsx
|
|
174
|
+
<TooltipProvider title="Light tooltip" isLight>
|
|
175
|
+
<Button>Hover me</Button>
|
|
176
|
+
</TooltipProvider>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Custom Delay
|
|
180
|
+
|
|
181
|
+
Adjust how long the user must hover before the tooltip appears:
|
|
182
|
+
|
|
183
|
+
```jsx
|
|
184
|
+
<TooltipProvider title="Quick tooltip" delay={100}>
|
|
185
|
+
<Button>Fast tooltip</Button>
|
|
186
|
+
</TooltipProvider>
|
|
187
|
+
|
|
188
|
+
<TooltipProvider title="Slower tooltip" delay={1000}>
|
|
189
|
+
<Button>Slow tooltip</Button>
|
|
190
|
+
</TooltipProvider>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Custom Styling
|
|
194
|
+
|
|
195
|
+
Customize the appearance of the tooltip:
|
|
196
|
+
|
|
197
|
+
```jsx
|
|
198
|
+
<TooltipProvider
|
|
199
|
+
title="Styled tooltip"
|
|
200
|
+
tooltipStyles={{
|
|
201
|
+
fill: '#purple',
|
|
202
|
+
color: '#white',
|
|
203
|
+
padding: '1.5x 2x',
|
|
204
|
+
}}
|
|
205
|
+
>
|
|
206
|
+
<Button>Custom tooltip</Button>
|
|
207
|
+
</TooltipProvider>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Controlled Tooltip
|
|
211
|
+
|
|
212
|
+
Programmatically control when the tooltip is shown:
|
|
213
|
+
|
|
214
|
+
```jsx
|
|
215
|
+
function ControlledExample() {
|
|
216
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
217
|
+
|
|
218
|
+
return (
|
|
219
|
+
<TooltipProvider
|
|
220
|
+
title="Controlled tooltip"
|
|
221
|
+
isOpen={isOpen}
|
|
222
|
+
onOpenChange={setIsOpen}
|
|
223
|
+
>
|
|
224
|
+
<Button onClick={() => setIsOpen(!isOpen)}>
|
|
225
|
+
Toggle tooltip
|
|
226
|
+
</Button>
|
|
227
|
+
</TooltipProvider>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Conditional Tooltip
|
|
233
|
+
|
|
234
|
+
Show a tooltip only when certain conditions are met:
|
|
235
|
+
|
|
236
|
+
```jsx
|
|
237
|
+
<TooltipProvider title={hasError ? "Fix errors first" : null}>
|
|
238
|
+
<Button isDisabled={hasError}>Submit</Button>
|
|
239
|
+
</TooltipProvider>
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Focus-Only Trigger
|
|
243
|
+
|
|
244
|
+
Show tooltip only on focus, not on hover:
|
|
245
|
+
|
|
246
|
+
```jsx
|
|
247
|
+
<TooltipProvider title="Focus only" trigger="focus">
|
|
248
|
+
<Button>Focus me</Button>
|
|
249
|
+
</TooltipProvider>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Accessibility
|
|
253
|
+
|
|
254
|
+
### Keyboard Navigation
|
|
255
|
+
|
|
256
|
+
- `Tab` - Moves focus to the trigger element, showing the tooltip after the delay
|
|
257
|
+
- `Shift + Tab` - Moves focus away from the trigger, hiding the tooltip
|
|
258
|
+
- Tooltips automatically appear on focus for keyboard users
|
|
259
|
+
|
|
260
|
+
### Screen Reader Support
|
|
261
|
+
|
|
262
|
+
- Tooltips use the `tooltip` ARIA role
|
|
263
|
+
- Content is announced to screen readers when the tooltip appears
|
|
264
|
+
- The trigger element maintains proper focus management
|
|
265
|
+
- Tooltips are associated with their triggers via ARIA attributes
|
|
266
|
+
|
|
267
|
+
### ARIA Properties
|
|
268
|
+
|
|
269
|
+
- `aria-describedby` - Automatically set on the trigger to reference the tooltip
|
|
270
|
+
- All standard ARIA labeling props are supported
|
|
271
|
+
|
|
272
|
+
### Best Practices
|
|
273
|
+
|
|
274
|
+
1. **Keep it brief** - Tooltips should contain concise, supplementary information
|
|
275
|
+
```jsx
|
|
276
|
+
{/* Good */}
|
|
277
|
+
<TooltipProvider title="Save changes">
|
|
278
|
+
<Button><IconDeviceFloppy /></Button>
|
|
279
|
+
</TooltipProvider>
|
|
280
|
+
|
|
281
|
+
{/* Avoid */}
|
|
282
|
+
<TooltipProvider title="This button will save all your changes to the database and close the dialog. Make sure you review your changes before clicking.">
|
|
283
|
+
<Button>Save</Button>
|
|
284
|
+
</TooltipProvider>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
2. **Don't hide critical information** - Never put essential information only in a tooltip
|
|
288
|
+
```jsx
|
|
289
|
+
{/* Good - tooltip adds context */}
|
|
290
|
+
<TooltipProvider title="Permanently delete this item">
|
|
291
|
+
<Button theme="danger">Delete</Button>
|
|
292
|
+
</TooltipProvider>
|
|
293
|
+
|
|
294
|
+
{/* Avoid - essential action only in tooltip */}
|
|
295
|
+
<TooltipProvider title="Delete item">
|
|
296
|
+
<Button><IconX /></Button>
|
|
297
|
+
</TooltipProvider>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
3. **Use appropriate delays** - Default delay (250ms) works for most cases
|
|
301
|
+
```jsx
|
|
302
|
+
{/* Good - default delay */}
|
|
303
|
+
<TooltipProvider title="Info">
|
|
304
|
+
<Button>Action</Button>
|
|
305
|
+
</TooltipProvider>
|
|
306
|
+
|
|
307
|
+
{/* Consider longer delay for dense interfaces */}
|
|
308
|
+
<TooltipProvider title="Info" delay={500}>
|
|
309
|
+
<IconButton><IconInfo /></IconButton>
|
|
310
|
+
</TooltipProvider>
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
4. **Choose the right pattern** - Use function pattern only when necessary
|
|
314
|
+
```jsx
|
|
315
|
+
{/* Good - standard pattern for active elements */}
|
|
316
|
+
<TooltipProvider title="Click me">
|
|
317
|
+
<Button>Action</Button>
|
|
318
|
+
</TooltipProvider>
|
|
319
|
+
|
|
320
|
+
{/* Good - function pattern for non-focusable elements */}
|
|
321
|
+
<TooltipProvider title="Info">
|
|
322
|
+
{(props, ref) => (
|
|
323
|
+
<div ref={ref} {...props}>Content</div>
|
|
324
|
+
)}
|
|
325
|
+
</TooltipProvider>
|
|
326
|
+
|
|
327
|
+
{/* Avoid - unnecessary function pattern */}
|
|
328
|
+
<TooltipProvider title="Click me">
|
|
329
|
+
{(props, ref) => (
|
|
330
|
+
<Button ref={ref} {...props}>Action</Button>
|
|
331
|
+
)}
|
|
332
|
+
</TooltipProvider>
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
5. **Provide meaningful context** - Ensure tooltip text is descriptive
|
|
336
|
+
```jsx
|
|
337
|
+
{/* Good */}
|
|
338
|
+
<TooltipProvider title="Export as CSV">
|
|
339
|
+
<IconButton><IconDownload /></IconButton>
|
|
340
|
+
</TooltipProvider>
|
|
341
|
+
|
|
342
|
+
{/* Avoid */}
|
|
343
|
+
<TooltipProvider title="Click here">
|
|
344
|
+
<IconButton><IconDownload /></IconButton>
|
|
345
|
+
</TooltipProvider>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## Migration from activeWrap
|
|
349
|
+
|
|
350
|
+
The `activeWrap` prop is deprecated. If you're using it, migrate to the function pattern:
|
|
351
|
+
|
|
352
|
+
```jsx
|
|
353
|
+
{/* Before (deprecated) */}
|
|
354
|
+
<TooltipProvider title="Tooltip" activeWrap>
|
|
355
|
+
<span>Text</span>
|
|
356
|
+
</TooltipProvider>
|
|
357
|
+
|
|
358
|
+
{/* After */}
|
|
359
|
+
<TooltipProvider title="Tooltip">
|
|
360
|
+
{(props, ref) => (
|
|
361
|
+
<span ref={ref} {...props}>
|
|
362
|
+
Text
|
|
363
|
+
</span>
|
|
364
|
+
)}
|
|
365
|
+
</TooltipProvider>
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
## Related Components
|
|
369
|
+
|
|
370
|
+
- [Button](../actions/Button.md) - Primary use case for tooltips
|
|
371
|
+
- [Dialog](./Dialog.md) - For more complex interactive content
|