@cube-dev/ui-kit 0.120.1 → 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 +20 -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.d.ts +1 -0
- package/dist/components/actions/Button/Button.js +34 -14
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.d.ts +47 -0
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +105 -0
- package/dist/components/actions/ButtonSplit/ButtonSplit.js.map +1 -0
- package/dist/components/actions/ButtonSplit/context.d.ts +18 -0
- package/dist/components/actions/ButtonSplit/context.js +12 -0
- package/dist/components/actions/ButtonSplit/context.js.map +1 -0
- package/dist/components/actions/ButtonSplit/index.d.ts +3 -0
- 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.d.ts +2 -2
- 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.d.ts +8 -3
- package/dist/components/actions/index.js +10 -5
- package/dist/components/actions/index.js.map +1 -1
- package/dist/components/actions/use-action.d.ts +1 -0
- package/dist/components/actions/use-action.js +21 -18
- package/dist/components/actions/use-action.js.map +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 +2 -1
- package/dist/components/content/Badge/Badge.js.map +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 +5 -2
- package/dist/components/content/Disclosure/Disclosure.js.map +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 +3 -2
- package/dist/components/content/ItemBadge/ItemBadge.js.map +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 +2 -1
- package/dist/components/content/Tag/Tag.js.map +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 +2 -2
- 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 +2 -2
- package/dist/components/fields/RadioGroup/Radio.js +3 -1
- package/dist/components/fields/RadioGroup/Radio.js.map +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 +2 -1
- package/dist/components/navigation/Tabs/TabPicker.js.map +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 +3 -1
- package/dist/components/navigation/Tabs/styled.js.map +1 -1
- package/dist/components/navigation/Tabs/types.d.ts +2 -2
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/types.js.map +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 +2 -2
- 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 +6 -6
- package/dist/data/item-themes.js.map +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.d.ts +6 -4
- package/dist/index.js +7 -5
- package/dist/index.js.map +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 +5 -9
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
# Item
|
|
2
|
+
|
|
3
|
+
A foundational component that provides a standardized layout and styling for item-like elements across the design system. Item offers a flexible grid-based structure with support for icons, labels, descriptions, prefixes, suffixes, and interactive features like hotkeys and tooltips.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- As a building block for other components that need item-like styling (Select options, Menu items, List items, etc.)
|
|
8
|
+
- When creating custom interactive elements that need consistent spacing and alignment
|
|
9
|
+
- For buttons or clickable elements that need to display structured content with icons and descriptions
|
|
10
|
+
- When building components that need to support features like selection states, hotkeys, or overflow tooltips
|
|
11
|
+
|
|
12
|
+
## Component
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
- **`children`** `ReactNode` — The content inside the Item
|
|
19
|
+
- **`icon`** — Icon rendered before the content. Can be: ReactNode, `"checkbox"`, `true` (empty slot), or function `({ selected, loading, ...mods }) => ReactNode | true`
|
|
20
|
+
- **`rightIcon`** — Icon rendered after the content. Can be: ReactNode, `true` (empty slot), or function `({ selected, loading, ...mods }) => ReactNode | true`
|
|
21
|
+
- **`prefix`** `ReactNode` — Element rendered before the content (after icon)
|
|
22
|
+
- **`suffix`** `ReactNode` — Element rendered after the content (before rightIcon)
|
|
23
|
+
- **`description`** `ReactNode` — Description text displayed with the item
|
|
24
|
+
- **`descriptionPlacement`** `'inline' | 'block'` (default: `inline`) — How the description is positioned relative to the main content. Defaults to `'block'` for `type="card"` and `type="header"`
|
|
25
|
+
- **`type`** `'item' | 'header' | 'primary' | 'secondary' | 'outline' | 'neutral' | 'clear' | 'link' | 'card'` (default: `item`) — Visual style variant
|
|
26
|
+
- **`theme`** `'default' | 'danger' | 'success' | 'warning' | 'note' | 'special'` (default: `default`) — Semantic colour palette theme
|
|
27
|
+
- **`size`** `'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'inline' | number` (default: `medium`) — Item size. Accepts custom number or string values
|
|
28
|
+
- **`shape`** `'card' | 'button' | 'sharp' | 'pill'` (default: `button`) — Shape of the item border radius. Defaults to `'card'` for `type="card"`
|
|
29
|
+
- **`isSelected`** `boolean` (default: `false`) — Marks the item as selected
|
|
30
|
+
- **`isLoading`** `boolean` (default: `false`) — Show loading indicator and disable the item
|
|
31
|
+
- **`loadingSlot`** `'auto' | 'icon' | 'rightIcon' | 'prefix' | 'suffix'` (default: `auto`) — Which slot the loading indicator replaces. `'auto'` prefers `icon` if present, then `rightIcon`, then falls back to `icon`
|
|
32
|
+
- **`actions`** `ReactNode | true` — Inline action buttons displayed on the right side. Use `Item.Action` for consistent styling
|
|
33
|
+
- **`autoHideActions`** `boolean` (default: `false`) — When true, actions are hidden by default and shown only on hover, focus, or focus-within
|
|
34
|
+
- **`preserveActionsSpace`** `boolean` (default: `false`) — When true, preserves the actions width when hidden (only changes opacity). Only applies when `autoHideActions` is true
|
|
35
|
+
- **`disableActionsFocus`** `boolean` (default: `true`) — When true, action buttons are not focusable via keyboard
|
|
36
|
+
- **`hotkeys`** `string` — Keyboard shortcut displayed as a badge (e.g. `"cmd+s"`)
|
|
37
|
+
- **`tooltip`** `string | boolean | object` (default: `true`) — Tooltip content. `true` enables auto tooltip on overflow, a string shows fixed tooltip text, an object supports advanced configuration `{ title, auto, placement, ...tooltipProps }`
|
|
38
|
+
- **`highlight`** `string` — Text to highlight within the item label
|
|
39
|
+
- **`highlightCaseSensitive`** `boolean` (default: `false`) — Whether highlight matching is case-sensitive
|
|
40
|
+
- **`level`** `1 | 2 | 3 | 4 | 5 | 6` (default: `3`) — Heading level for the Label element when `type="header"` or `type="card"`. Changes the HTML tag to the corresponding heading (h1-h6)
|
|
41
|
+
|
|
42
|
+
### Base Properties
|
|
43
|
+
|
|
44
|
+
Supports [Base properties](../../BaseProperties.md)
|
|
45
|
+
|
|
46
|
+
## Styling
|
|
47
|
+
|
|
48
|
+
### styles
|
|
49
|
+
|
|
50
|
+
Customizes the root element of the component.
|
|
51
|
+
|
|
52
|
+
**Sub-elements:**
|
|
53
|
+
- `Icon` - The main icon displayed before the content
|
|
54
|
+
- `RightIcon` - The icon displayed after the content
|
|
55
|
+
- `Label` - The main text content area
|
|
56
|
+
- `Description` - The secondary text below or inline with the main content
|
|
57
|
+
- `Prefix` - Additional content displayed before the main content
|
|
58
|
+
- `Suffix` - Additional content displayed after the main content
|
|
59
|
+
- `Actions` - Container for inline action buttons displayed on the right side
|
|
60
|
+
|
|
61
|
+
### Style Properties
|
|
62
|
+
|
|
63
|
+
Direct style application without using the `styles` prop: `width`, `height`, `padding`, `paddingInline`, `paddingBlock`, `margin`, `inset`, `color`, `fill`, `fade`, `opacity`, `display`, `font`, `preset`, `hide`, `whiteSpace`, `position`, `gridArea`, `order`, `gridColumn`, `gridRow`, `placeSelf`, `alignSelf`, `justifySelf`, `zIndex`, `gap`, `columnGap`, `rowGap`, `flow`, `placeItems`, `placeContent`, `alignItems`, `alignContent`, `justifyItems`, `justifyContent`, `align`, `justify`, `gridColumns`, `gridRows`, `gridTemplate`, `gridAreas`, `border`, `radius`, `shadow`, `overflow`, `scrollbar`, `outline`, `textAlign`, `reset`, `flexBasis`, `flexGrow`, `flexShrink`, `flex`, `fontWeight`, `fontStyle`, `textTransform`.
|
|
64
|
+
|
|
65
|
+
### Modifiers
|
|
66
|
+
|
|
67
|
+
The `mods` property accepts the following modifiers:
|
|
68
|
+
|
|
69
|
+
- **`has-icon`** `boolean` — Applied when icon prop is provided
|
|
70
|
+
- **`has-right-icon`** `boolean` — Applied when rightIcon prop is provided
|
|
71
|
+
- **`has-prefix`** `boolean` — Applied when prefix prop is provided
|
|
72
|
+
- **`has-suffix`** `boolean` — Applied when suffix prop is provided
|
|
73
|
+
- **`has-label`** `boolean` — Applied when children or labelProps are provided
|
|
74
|
+
- **`has-start-content`** `boolean` — Applied when icon or prefix is present
|
|
75
|
+
- **`has-end-content`** `boolean` — Applied when rightIcon, suffix, or actions are present
|
|
76
|
+
- **`has-description`** `boolean` — Applied when description is provided
|
|
77
|
+
- **`description`** `'inline' | 'block' | 'none'` — Applied based on the resolved description placement
|
|
78
|
+
- **`has-actions`** `boolean` — Applied when actions prop is provided
|
|
79
|
+
- **`has-actions-content`** `boolean` — Applied when actions have actual content (not just placeholder)
|
|
80
|
+
- **`auto-hide-actions`** `boolean` — Applied when autoHideActions is true
|
|
81
|
+
- **`preserve-actions-space`** `boolean` — Applied when preserveActionsSpace is true
|
|
82
|
+
- **`checkbox`** `boolean` — Applied when using checkbox icon (icon="checkbox")
|
|
83
|
+
- **`selected`** `boolean` — Applied when isSelected is true
|
|
84
|
+
- **`disabled`** `boolean` — Applied when isDisabled is true or when loading
|
|
85
|
+
- **`loading`** `boolean` — Applied when isLoading is true
|
|
86
|
+
- **`size`** `string` — Applied based on size prop value (xsmall, small, medium, large, xlarge, inline)
|
|
87
|
+
- **`type`** `string` — Applied based on type prop value (item, header, primary, secondary, outline, neutral, clear, link, card)
|
|
88
|
+
- **`theme`** `string` — Applied based on theme prop value (default, danger, success, special, warning, note)
|
|
89
|
+
- **`shape`** `string` — Applied based on shape prop value (card, button, sharp, pill)
|
|
90
|
+
|
|
91
|
+
## Variants
|
|
92
|
+
|
|
93
|
+
### Types
|
|
94
|
+
|
|
95
|
+
- `item` - Default item appearance (no specific styling)
|
|
96
|
+
- `header` - Header appearance for section headers (only supports `default` theme, defaults to `descriptionPlacement="block"`, uses semantic heading tags via `level` prop)
|
|
97
|
+
- `primary` - Primary styled item with prominent appearance
|
|
98
|
+
- `secondary` - Secondary styled item with moderate emphasis
|
|
99
|
+
- `outline` - Item with border outline styling
|
|
100
|
+
- `neutral` - Neutral colored item styling
|
|
101
|
+
- `clear` - Transparent item with minimal styling
|
|
102
|
+
- `link` - Link-styled item appearance (does not support icons or loading state)
|
|
103
|
+
- `card` - Card appearance for notifications (supports `default`, `success`, `danger`, `warning`, `note` themes; defaults to `shape="card"`, `descriptionPlacement="block"`, uses semantic heading tags via `level` prop, and has `.5x` padding)
|
|
104
|
+
|
|
105
|
+
### Themes
|
|
106
|
+
|
|
107
|
+
- `default` - Standard appearance with default colors
|
|
108
|
+
- `danger` - Red theme for destructive actions
|
|
109
|
+
- `success` - Green theme for positive actions
|
|
110
|
+
- `warning` - Yellow/amber theme for caution or attention
|
|
111
|
+
- `note` - Violet theme for informational context
|
|
112
|
+
- `special` - Special theme with unique styling (not available for `card` or `header` types)
|
|
113
|
+
|
|
114
|
+
### Sizes
|
|
115
|
+
|
|
116
|
+
- `xsmall` - Extra small size for compact interfaces
|
|
117
|
+
- `small` - Small size for dense layouts
|
|
118
|
+
- `medium` - Default size for most use cases
|
|
119
|
+
- `large` - Large size for prominent items
|
|
120
|
+
- `xlarge` - Extra large size for emphasized items
|
|
121
|
+
- `inline` - Inline size that adapts to content
|
|
122
|
+
|
|
123
|
+
### Shapes
|
|
124
|
+
|
|
125
|
+
- `card` - Card shape with larger border radius (`1cr`) — default for `type="card"`
|
|
126
|
+
- `button` - Button shape with default border radius (default for other types)
|
|
127
|
+
- `sharp` - Sharp corners with no border radius (`0`)
|
|
128
|
+
- `pill` - Pill shape with fully rounded ends (`round`)
|
|
129
|
+
|
|
130
|
+
## Examples
|
|
131
|
+
|
|
132
|
+
### Basic Usage
|
|
133
|
+
|
|
134
|
+
```jsx
|
|
135
|
+
<Item>Simple item content</Item>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### With Icons
|
|
139
|
+
|
|
140
|
+
```jsx
|
|
141
|
+
{/* Standard icons */}
|
|
142
|
+
<Item icon={<IconUser />} rightIcon={<IconSettings />}>
|
|
143
|
+
Item with icons
|
|
144
|
+
</Item>
|
|
145
|
+
|
|
146
|
+
{/* Empty slot (reserves space but shows nothing) */}
|
|
147
|
+
<Item icon={true} rightIcon={true}>
|
|
148
|
+
Item with empty slots
|
|
149
|
+
</Item>
|
|
150
|
+
|
|
151
|
+
{/* Dynamic icon based on mods */}
|
|
152
|
+
<Item
|
|
153
|
+
icon={({ loading }) => loading ? <LoadingIcon /> : <IconUser />}
|
|
154
|
+
rightIcon={({ selected }) => selected ? <CheckIcon /> : <IconSettings />}
|
|
155
|
+
>
|
|
156
|
+
Dynamic icons
|
|
157
|
+
</Item>
|
|
158
|
+
|
|
159
|
+
{/* Return true from function for empty slot */}
|
|
160
|
+
<Item
|
|
161
|
+
icon={({ selected }) => selected ? <CheckIcon /> : true}
|
|
162
|
+
>
|
|
163
|
+
Conditional icon
|
|
164
|
+
</Item>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### With Description
|
|
168
|
+
|
|
169
|
+
The `descriptionPlacement` prop controls where the description appears. It defaults to `"inline"` for most types, but `"block"` for `type="card"` and `type="header"`:
|
|
170
|
+
|
|
171
|
+
```jsx
|
|
172
|
+
{/* Inline description (default for most types) */}
|
|
173
|
+
<Item
|
|
174
|
+
icon={<IconFile />}
|
|
175
|
+
description="Secondary description text"
|
|
176
|
+
descriptionPlacement="inline"
|
|
177
|
+
>
|
|
178
|
+
Main item content
|
|
179
|
+
</Item>
|
|
180
|
+
|
|
181
|
+
{/* Block description */}
|
|
182
|
+
<Item
|
|
183
|
+
icon={<IconFile />}
|
|
184
|
+
description="Description appears below the label"
|
|
185
|
+
descriptionPlacement="block"
|
|
186
|
+
>
|
|
187
|
+
Main item content
|
|
188
|
+
</Item>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### With Hotkeys
|
|
192
|
+
|
|
193
|
+
```jsx
|
|
194
|
+
<Item
|
|
195
|
+
as="button"
|
|
196
|
+
hotkeys="cmd+s"
|
|
197
|
+
onClick={() => console.log('Save triggered')}
|
|
198
|
+
>
|
|
199
|
+
Save Document
|
|
200
|
+
</Item>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### With Selection State
|
|
204
|
+
|
|
205
|
+
```jsx
|
|
206
|
+
<Item icon="checkbox" isSelected={true}>
|
|
207
|
+
Selected item with checkbox
|
|
208
|
+
</Item>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### With Different Shapes
|
|
212
|
+
|
|
213
|
+
### Header Type
|
|
214
|
+
|
|
215
|
+
Use `type="header"` for section headers. Header items have larger text preset and default to block description placement:
|
|
216
|
+
|
|
217
|
+
```jsx
|
|
218
|
+
<Item type="header" icon={<IconFolder />}>
|
|
219
|
+
Section Header
|
|
220
|
+
</Item>
|
|
221
|
+
|
|
222
|
+
<Item type="header" icon={<IconFolder />} description="Section description">
|
|
223
|
+
Section Header with Description
|
|
224
|
+
</Item>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Card Type
|
|
228
|
+
|
|
229
|
+
Use `type="card"` for notification-style items. Card items automatically use card shape, block description placement, and have `.5x` padding. They support `default`, `success`, `danger`, `warning`, and `note` themes.
|
|
230
|
+
|
|
231
|
+
Like headers, card labels use semantic heading tags (h1-h6) controlled by the `level` prop (default: 3):
|
|
232
|
+
|
|
233
|
+
```jsx
|
|
234
|
+
<Item type="card" theme="default" icon={<IconInfo />} description="This is an informational message">
|
|
235
|
+
Info Card
|
|
236
|
+
</Item>
|
|
237
|
+
|
|
238
|
+
<Item type="card" theme="success" icon={<IconCheck />} description="Operation completed successfully">
|
|
239
|
+
Success Card
|
|
240
|
+
</Item>
|
|
241
|
+
|
|
242
|
+
<Item type="card" theme="danger" icon={<IconAlertTriangle />} description="Something went wrong">
|
|
243
|
+
Error Card
|
|
244
|
+
</Item>
|
|
245
|
+
|
|
246
|
+
<Item type="card" theme="warning" icon={<IconAlertTriangle />} description="Proceed with caution">
|
|
247
|
+
Warning Card
|
|
248
|
+
</Item>
|
|
249
|
+
|
|
250
|
+
<Item type="card" theme="note" icon={<IconNote />} description="Additional context or tips">
|
|
251
|
+
Note Card
|
|
252
|
+
</Item>
|
|
253
|
+
|
|
254
|
+
{/* Card with custom heading level */}
|
|
255
|
+
<Item type="card" theme="default" level={2} icon={<IconInfo />} description="Important section">
|
|
256
|
+
Section Card (h2)
|
|
257
|
+
</Item>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### With Loading State
|
|
261
|
+
|
|
262
|
+
The `isLoading` prop displays a loading indicator and disables the item. The `loadingSlot` prop controls which slot the loading icon replaces:
|
|
263
|
+
|
|
264
|
+
```jsx
|
|
265
|
+
<Item
|
|
266
|
+
icon={<IconSave />}
|
|
267
|
+
isLoading={true}
|
|
268
|
+
loadingSlot="icon"
|
|
269
|
+
>
|
|
270
|
+
Saving...
|
|
271
|
+
</Item>
|
|
272
|
+
|
|
273
|
+
<Item
|
|
274
|
+
icon={<IconFile />}
|
|
275
|
+
rightIcon={<IconDownload />}
|
|
276
|
+
isLoading={true}
|
|
277
|
+
loadingSlot="rightIcon"
|
|
278
|
+
>
|
|
279
|
+
Downloading...
|
|
280
|
+
</Item>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
When `loadingSlot="auto"` (default), the loading icon intelligently selects the best slot: prefers `icon` if present, then `rightIcon`, or falls back to `icon`.
|
|
284
|
+
|
|
285
|
+
### With Actions
|
|
286
|
+
|
|
287
|
+
Item supports inline actions that appear on the right side. Use the `Item.Action` compound component for consistent styling:
|
|
288
|
+
|
|
289
|
+
```jsx
|
|
290
|
+
<Item
|
|
291
|
+
icon={<IconFile />}
|
|
292
|
+
actions={
|
|
293
|
+
<>
|
|
294
|
+
<Item.Action icon={<IconEdit />} aria-label="Edit" onPress={handleEdit} />
|
|
295
|
+
<Item.Action icon={<IconTrash />} aria-label="Delete" onPress={handleDelete} />
|
|
296
|
+
</>
|
|
297
|
+
}
|
|
298
|
+
>
|
|
299
|
+
Document with Actions
|
|
300
|
+
</Item>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Actions automatically inherit the parent's `type`, `theme`, and `isDisabled` props and adjust their styling accordingly. When the parent Item is disabled, all actions are also disabled unless explicitly overridden with `isDisabled={false}`. The component reserves space for actions to prevent content overlap.
|
|
304
|
+
|
|
305
|
+
By default, action buttons are focusable. Use `disableActionsFocus={true}` to prevent them from receiving keyboard focus.
|
|
306
|
+
|
|
307
|
+
#### Show Actions on Hover
|
|
308
|
+
|
|
309
|
+
Use `autoHideActions` to hide actions by default and reveal them on hover, focus, or focus-within:
|
|
310
|
+
|
|
311
|
+
```jsx
|
|
312
|
+
<Item
|
|
313
|
+
icon={<IconFile />}
|
|
314
|
+
autoHideActions={true}
|
|
315
|
+
actions={
|
|
316
|
+
<>
|
|
317
|
+
<Item.Action icon={<IconEdit />} aria-label="Edit" onPress={handleEdit} />
|
|
318
|
+
<Item.Action icon={<IconTrash />} aria-label="Delete" onPress={handleDelete} />
|
|
319
|
+
</>
|
|
320
|
+
}
|
|
321
|
+
>
|
|
322
|
+
Hover to show actions
|
|
323
|
+
</Item>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
This provides a cleaner interface while keeping actions easily accessible. By default, actions collapse to zero width when hidden.
|
|
327
|
+
|
|
328
|
+
#### Preserve Actions Space
|
|
329
|
+
|
|
330
|
+
Use `preserveActionsSpace` together with `autoHideActions` to keep the actions area visible (preserving its width) while only changing the opacity. This prevents content from shifting when actions appear:
|
|
331
|
+
|
|
332
|
+
```jsx
|
|
333
|
+
<Item
|
|
334
|
+
icon={<IconFile />}
|
|
335
|
+
autoHideActions={true}
|
|
336
|
+
preserveActionsSpace={true}
|
|
337
|
+
actions={
|
|
338
|
+
<>
|
|
339
|
+
<Item.Action icon={<IconEdit />} aria-label="Edit" onPress={handleEdit} />
|
|
340
|
+
<Item.Action icon={<IconTrash />} aria-label="Delete" onPress={handleDelete} />
|
|
341
|
+
</>
|
|
342
|
+
}
|
|
343
|
+
>
|
|
344
|
+
Actions fade in without shifting content
|
|
345
|
+
</Item>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### With Tooltip
|
|
349
|
+
|
|
350
|
+
By default, Item shows an auto tooltip when content overflows.
|
|
351
|
+
|
|
352
|
+
**Type:** `string | boolean | object`
|
|
353
|
+
|
|
354
|
+
**Values:**
|
|
355
|
+
- `true` (default) - Shows tooltip with item content when text overflows
|
|
356
|
+
- `false` - Disables tooltip entirely
|
|
357
|
+
- `string` - Shows tooltip with the specified text (always visible, not auto)
|
|
358
|
+
- `object` - Advanced configuration:
|
|
359
|
+
- `title?: string` - Custom tooltip text (when provided, always shows tooltip unless `auto: true`)
|
|
360
|
+
- `auto?: boolean` - Enable/disable auto overflow behavior (defaults to `true` when no `title` is provided)
|
|
361
|
+
- `placement?: string` - Tooltip position (top, bottom, left, right, etc.)
|
|
362
|
+
- Plus other [TooltipProvider props](../overlays/Tooltip.md)
|
|
363
|
+
|
|
364
|
+
```jsx
|
|
365
|
+
{/* Auto tooltip on overflow (default) */}
|
|
366
|
+
<Item style={{ width: '200px' }}>
|
|
367
|
+
This is a very long text that will show a tooltip when overflowed
|
|
368
|
+
</Item>
|
|
369
|
+
|
|
370
|
+
{/* Disable tooltip */}
|
|
371
|
+
<Item tooltip={false} style={{ width: '200px' }}>
|
|
372
|
+
This text will be truncated without a tooltip
|
|
373
|
+
</Item>
|
|
374
|
+
|
|
375
|
+
{/* Always show custom tooltip */}
|
|
376
|
+
<Item tooltip={{ title: 'Custom tooltip text' }}>
|
|
377
|
+
Hover to see custom tooltip
|
|
378
|
+
</Item>
|
|
379
|
+
|
|
380
|
+
{/* Auto tooltip with custom placement */}
|
|
381
|
+
<Item tooltip={{ placement: 'right' }} style={{ width: '200px' }}>
|
|
382
|
+
Long text with tooltip on the right when overflowed
|
|
383
|
+
</Item>
|
|
384
|
+
|
|
385
|
+
{/* Custom tooltip only on overflow */}
|
|
386
|
+
<Item
|
|
387
|
+
tooltip={{ title: 'Custom overflow tooltip', auto: true }}
|
|
388
|
+
style={{ width: '200px' }}
|
|
389
|
+
>
|
|
390
|
+
This shows custom tooltip only when text overflows
|
|
391
|
+
</Item>
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
## Accessibility
|
|
395
|
+
|
|
396
|
+
### Keyboard Navigation
|
|
397
|
+
|
|
398
|
+
- `Tab` - Moves focus to the component when it's focusable
|
|
399
|
+
- `Space/Enter` - Activates the component when used as a button
|
|
400
|
+
- Custom hotkeys - Trigger component actions when hotkeys are specified
|
|
401
|
+
|
|
402
|
+
### Screen Reader Support
|
|
403
|
+
|
|
404
|
+
- Component announces its role based on the `as` prop (button, link, etc.)
|
|
405
|
+
- Selection state is announced when `isSelected` is used
|
|
406
|
+
- Disabled state is properly communicated
|
|
407
|
+
- Tooltip content is accessible to screen readers
|
|
408
|
+
|
|
409
|
+
### ARIA Properties
|
|
410
|
+
|
|
411
|
+
- `aria-label` - Provides accessible label when no visible label exists
|
|
412
|
+
- `aria-disabled` - Indicates disabled state
|
|
413
|
+
- `aria-selected` - Indicates selection state when applicable
|
|
414
|
+
- `tabIndex` - Controls focus behavior
|
|
415
|
+
|
|
416
|
+
## Best Practices
|
|
417
|
+
|
|
418
|
+
1. **Do**: Use clear, descriptive text for the main content
|
|
419
|
+
```jsx
|
|
420
|
+
<Item icon={<IconUser />}>User Profile</Item>
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
2. **Do**: Use descriptions to provide additional context
|
|
424
|
+
```jsx
|
|
425
|
+
<Item icon={<IconFile />} description="Last edited 2 hours ago">
|
|
426
|
+
Document.pdf
|
|
427
|
+
</Item>
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
3. **Do**: Use hotkeys for frequently accessed actions
|
|
431
|
+
```jsx
|
|
432
|
+
<Item as="button" hotkeys="cmd+s" onPress={handleSave}>
|
|
433
|
+
Save Document
|
|
434
|
+
</Item>
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
4. **Do**: Use `Item.Action` for inline actions
|
|
438
|
+
```jsx
|
|
439
|
+
<Item
|
|
440
|
+
icon={<IconFile />}
|
|
441
|
+
actions={
|
|
442
|
+
<>
|
|
443
|
+
<Item.Action icon={<IconEdit />} aria-label="Edit" />
|
|
444
|
+
<Item.Action icon={<IconTrash />} aria-label="Delete" />
|
|
445
|
+
</>
|
|
446
|
+
}
|
|
447
|
+
>
|
|
448
|
+
File with Actions
|
|
449
|
+
</Item>
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
5. **Don't**: Add too many actions (limit to 2-3 for clarity)
|
|
453
|
+
```jsx
|
|
454
|
+
{/* Avoid this - too many action buttons */}
|
|
455
|
+
<Item
|
|
456
|
+
actions={
|
|
457
|
+
<>
|
|
458
|
+
<Item.Action icon={<IconEdit />} aria-label="Edit" />
|
|
459
|
+
<Item.Action icon={<IconCopy />} aria-label="Copy" />
|
|
460
|
+
<Item.Action icon={<IconShare />} aria-label="Share" />
|
|
461
|
+
<Item.Action icon={<IconTrash />} aria-label="Delete" />
|
|
462
|
+
</>
|
|
463
|
+
}
|
|
464
|
+
>
|
|
465
|
+
Item with too many actions
|
|
466
|
+
</Item>
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
6. **Don't**: Overcrowd the component with too many elements
|
|
470
|
+
```jsx
|
|
471
|
+
{/* Avoid this - too many elements competing for attention */}
|
|
472
|
+
<Item
|
|
473
|
+
icon={<IconA />}
|
|
474
|
+
rightIcon={<IconB />}
|
|
475
|
+
prefix="Pre"
|
|
476
|
+
suffix="Suf"
|
|
477
|
+
description="Very long description with lots of details"
|
|
478
|
+
>
|
|
479
|
+
Complex item with everything
|
|
480
|
+
</Item>
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
7. **Accessibility**: Always ensure interactive items are focusable and have proper ARIA attributes, and provide `aria-label` for action buttons
|
|
484
|
+
|
|
485
|
+
## Related Components
|
|
486
|
+
|
|
487
|
+
- [ItemButton](../actions/ItemButton.md) - Interactive button built on Item
|
|
488
|
+
- [ItemAction](../actions/ItemAction.md) - Action button component for inline actions (also available as `Item.Action`, `ItemButton.Action`, `Menu.Item.Action`, etc.)
|
|
489
|
+
- [ItemBadge](./ItemBadge.md) - Badge component for displaying labels or counts (also available as `Item.Badge`)
|
|
490
|
+
- [Select](../fields/Select.md) - Dropdown selection component using Item
|
|
491
|
+
- [ComboBox](../fields/ComboBox.md) - Searchable dropdown component using Item
|
|
492
|
+
- [ListBox](../fields/ListBox.md) - List selection component using Item
|
|
493
|
+
- [FilterListBox](../fields/FilterListBox.md) - Filterable list component using Item
|
|
494
|
+
- [FilterPicker](../fields/FilterPicker.md) - Filter selection component using Item
|
|
495
|
+
- [Menu](../actions/Menu.md) - Context menu component using Item
|
|
496
|
+
- [CommandMenu](../actions/CommandMenu.md) - Command palette component using Item
|
|
497
|
+
- [Button](../actions/Button.md) - Traditional button component
|
|
498
|
+
- [Link](../actions/Link.md) - Text link component
|
|
499
|
+
- Text - Typography component for simple text
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ItemBadge
|
|
2
|
+
|
|
3
|
+
A non-interactive badge indicator for list items. Similar to `ItemAction` but without press behavior (cursor: default).
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Status indicators in list items
|
|
8
|
+
- Visual badges showing state (selected, loading)
|
|
9
|
+
- Non-clickable indicators alongside `ItemAction` buttons
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- **`icon`** `ReactNode | 'checkbox'` — Icon or checkbox display
|
|
14
|
+
- **`type`** `'primary' | 'secondary' | 'neutral' | 'clear'` (default: `'neutral'`) — Visual type. Inherits from parent context.
|
|
15
|
+
- **`theme`** `'default' | 'danger' | 'success' | 'special'` (default: `'default'`) — Color theme. Inherits from parent context.
|
|
16
|
+
- **`isLoading`** `boolean` (default: `false`) — Show loading spinner
|
|
17
|
+
- **`isSelected`** `boolean` (default: `false`) — Selected state (for checkbox)
|
|
18
|
+
|
|
19
|
+
### Base Properties
|
|
20
|
+
|
|
21
|
+
Supports [Base properties](../../BaseProperties.md).
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<ItemBadge icon="checkbox" isSelected />
|
|
27
|
+
|
|
28
|
+
<ItemBadge icon={<IconCheck />} theme="success" />
|
|
29
|
+
|
|
30
|
+
<ItemBadge isLoading />
|
|
31
|
+
```
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# ItemCard
|
|
2
|
+
|
|
3
|
+
A convenience wrapper around `Item type="card"` that provides a more natural card API by mapping `title` to the card heading and `children` to the card body.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- When displaying notification-style messages (success, error, warning, info)
|
|
8
|
+
- For status banners or alert cards
|
|
9
|
+
- When you need a card with a heading and body content
|
|
10
|
+
|
|
11
|
+
## Component
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
### Properties
|
|
16
|
+
|
|
17
|
+
- **`title`** `string` — Card heading
|
|
18
|
+
- **`children`** `ReactNode` — Card body content
|
|
19
|
+
- **`icon`** `ReactNode` — Icon rendered before the content
|
|
20
|
+
- **`theme`** `string` (default: `default`) — Card theme
|
|
21
|
+
- **`level`** `number` (default: `3`) — Heading level for the title (h1-h6)
|
|
22
|
+
|
|
23
|
+
### Base Properties
|
|
24
|
+
|
|
25
|
+
Supports [Base properties](../../BaseProperties.md)
|
|
26
|
+
|
|
27
|
+
### Styling Properties
|
|
28
|
+
|
|
29
|
+
#### styles
|
|
30
|
+
|
|
31
|
+
Inherits all styling from `Item`. See [Item documentation](./Item.md) for sub-elements and modifiers.
|
|
32
|
+
|
|
33
|
+
## Variants
|
|
34
|
+
|
|
35
|
+
### Sizes
|
|
36
|
+
|
|
37
|
+
- `medium` — Default size suitable for most use cases
|
|
38
|
+
- `large` — Larger size for prominent notifications
|
|
39
|
+
- `xlarge` — Extra large size for emphasized alerts
|
|
40
|
+
|
|
41
|
+
### Themes
|
|
42
|
+
|
|
43
|
+
Use the `theme` prop to apply a semantic color scheme:
|
|
44
|
+
|
|
45
|
+
- `default` — Standard card appearance
|
|
46
|
+
- `success` — Green theme for positive outcomes
|
|
47
|
+
- `danger` — Red theme for errors or destructive states
|
|
48
|
+
- `warning` — Amber theme for caution
|
|
49
|
+
- `note` — Violet theme for informational context
|
|
50
|
+
|
|
51
|
+
## Examples
|
|
52
|
+
|
|
53
|
+
### Basic Usage
|
|
54
|
+
|
|
55
|
+
```jsx
|
|
56
|
+
<ItemCard title="Info" icon={<IconInfoCircle />}>
|
|
57
|
+
This is the card body content.
|
|
58
|
+
</ItemCard>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Themed Cards
|
|
62
|
+
|
|
63
|
+
```jsx
|
|
64
|
+
<ItemCard title="Success" icon={<IconCheck />} theme="success">
|
|
65
|
+
Operation completed successfully.
|
|
66
|
+
</ItemCard>
|
|
67
|
+
|
|
68
|
+
<ItemCard title="Error" icon={<IconAlertTriangle />} theme="danger">
|
|
69
|
+
Something went wrong.
|
|
70
|
+
</ItemCard>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### With Actions
|
|
74
|
+
|
|
75
|
+
Use `ItemCard.Action` to add inline action buttons such as dismiss or close.
|
|
76
|
+
|
|
77
|
+
```jsx
|
|
78
|
+
<ItemCard
|
|
79
|
+
title="Deployment Complete"
|
|
80
|
+
icon={<IconCheck />}
|
|
81
|
+
theme="success"
|
|
82
|
+
actions={<ItemCard.Action icon={<IconX />} aria-label="Dismiss" />}
|
|
83
|
+
>
|
|
84
|
+
Your changes are now live in production.
|
|
85
|
+
</ItemCard>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Custom Heading Level
|
|
89
|
+
|
|
90
|
+
The `level` prop controls the semantic HTML heading tag (h1-h6) for the title. Default is `level={3}` (h3).
|
|
91
|
+
|
|
92
|
+
```jsx
|
|
93
|
+
<ItemCard title="Important Section" icon={<IconInfoCircle />} level={2}>
|
|
94
|
+
This card's title renders as an h2 element.
|
|
95
|
+
</ItemCard>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Accessibility
|
|
99
|
+
|
|
100
|
+
### Keyboard Navigation
|
|
101
|
+
|
|
102
|
+
- `Tab` - Moves focus to the component when focusable
|
|
103
|
+
- `Space/Enter` - Activates the component when used as a button
|
|
104
|
+
|
|
105
|
+
### Screen Reader Support
|
|
106
|
+
|
|
107
|
+
- Title renders as a semantic heading (h1-h6) via the `level` prop for proper document structure
|
|
108
|
+
- Inherits all accessibility features from `Item`
|
|
109
|
+
|
|
110
|
+
### ARIA Properties
|
|
111
|
+
|
|
112
|
+
- `aria-label` - Provides accessible label when no visible label exists
|
|
113
|
+
|
|
114
|
+
## Best Practices
|
|
115
|
+
|
|
116
|
+
1. **Do**: Use meaningful titles and body content
|
|
117
|
+
```jsx
|
|
118
|
+
<ItemCard title="Deployment Complete" icon={<IconCheck />} theme="success">
|
|
119
|
+
Your changes are now live in production.
|
|
120
|
+
</ItemCard>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
2. **Don't**: Use without a title
|
|
124
|
+
```jsx
|
|
125
|
+
{/* Prefer using Item type="card" directly if you only need a description */}
|
|
126
|
+
<ItemCard>Body only without a title</ItemCard>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Related Components
|
|
130
|
+
|
|
131
|
+
- [Item](./Item.md) - The underlying component with full control over `type`, `children`, and `description`
|