haze-ui 1.29.0 → 1.31.0
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/README.md +93 -1
- package/cli/theme.mjs +446 -0
- package/dist/components/Accordion/Accordion.js +1 -0
- package/dist/components/Accordion/AccordionItem.js +3 -0
- package/dist/components/ActivityRail/ActivityRail.js +76 -0
- package/dist/components/ActivityRail/index.js +3 -0
- package/dist/components/Affix/Affix.js +1 -0
- package/dist/components/Alert/Alert.js +3 -0
- package/dist/components/Anchor/Anchor.js +21 -15
- package/dist/components/AppShell/AppShell.js +5 -0
- package/dist/components/ApprovalCard/ApprovalCard.js +8 -0
- package/dist/components/AspectRatio/AspectRatio.js +2 -0
- package/dist/components/AsyncSection/AsyncSection.js +8 -0
- package/dist/components/Avatar/Avatar.js +11 -6
- package/dist/components/AvatarGroup/AvatarGroup.js +9 -6
- package/dist/components/BackToTop/BackToTop.js +5 -4
- package/dist/components/Badge/Badge.js +1 -0
- package/dist/components/Banner/Banner.js +3 -0
- package/dist/components/BottomSheet/BottomSheet.js +22 -31
- package/dist/components/Breadcrumb/Breadcrumb.js +11 -7
- package/dist/components/Breadcrumb/BreadcrumbItem.js +2 -0
- package/dist/components/Button/Button.js +13 -11
- package/dist/components/Button/ButtonLink.js +15 -13
- package/dist/components/Calendar/Calendar.js +523 -368
- package/dist/components/Calendar/date.js +35 -10
- package/dist/components/Card/Card.js +1 -0
- package/dist/components/Carousel/Carousel.js +157 -60
- package/dist/components/Carousel/CarouselSlide.js +3 -1
- package/dist/components/Cascader/Cascader.js +48 -35
- package/dist/components/Chart/Chart.js +5 -4
- package/dist/components/Chart/chart-elements.js +14 -10
- package/dist/components/ChatContainer/ChatContainer.js +9 -7
- package/dist/components/ChatInput/ChatInput.js +12 -9
- package/dist/components/ChatMessage/ChatMessage.js +83 -44
- package/dist/components/Checkbox/CheckboxCore.js +2 -0
- package/dist/components/Chip/Chip.js +3 -0
- package/dist/components/CodeBlock/CodeBlock.js +18 -9
- package/dist/components/Collapsible/Collapsible.js +24 -21
- package/dist/components/ColorPicker/ColorPicker.js +85 -14
- package/dist/components/ColorPicker/ColorPickerCore.js +6 -0
- package/dist/components/ColorPicker/ColorPickerPanel.js +277 -0
- package/dist/components/ColorPicker/color-math.js +168 -0
- package/dist/components/ColorPicker/color-picker-styles.js +7 -0
- package/dist/components/ColorPicker/index.js +3 -3
- package/dist/components/Combobox/Combobox.js +31 -24
- package/dist/components/Combobox/ComboboxGroup.js +7 -5
- package/dist/components/Combobox/ComboboxOption.js +1 -0
- package/dist/components/Command/Command.js +44 -37
- package/dist/components/Command/CommandDialog.js +8 -8
- package/dist/components/ConfigProvider/ConfigContext.js +30 -0
- package/dist/components/ConfigProvider/ConfigProvider.js +14 -0
- package/dist/components/ConfigProvider/index.js +4 -0
- package/dist/components/ConfigProvider/useConfigDefaults.js +10 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.js +18 -11
- package/dist/components/Container/Container.js +1 -0
- package/dist/components/ContextMenu/ContextMenu.js +7 -6
- package/dist/components/ContextMenu/ContextMenuContent.js +4 -4
- package/dist/components/ContextMenu/ContextMenuItem.js +1 -0
- package/dist/components/ContextMenu/ContextMenuSeparator.js +1 -0
- package/dist/components/ContextMenu/ContextMenuTrigger.js +1 -0
- package/dist/components/ConversationList/ConversationItem.js +4 -0
- package/dist/components/ConversationList/ConversationList.js +17 -7
- package/dist/components/CountUp/CountUp.js +6 -5
- package/dist/components/DataTable/CellEditor.js +4 -4
- package/dist/components/DataTable/DataTable.js +236 -168
- package/dist/components/DateRangePicker/DateRangePickerCore.js +9 -0
- package/dist/components/Datepicker/Datepicker.js +14 -11
- package/dist/components/Datepicker/DatepickerCore.js +75 -60
- package/dist/components/Datepicker/datetime.js +14 -3
- package/dist/components/Descriptions/Descriptions.js +6 -0
- package/dist/components/Dialog/Dialog.js +13 -11
- package/dist/components/DiffViewer/DiffViewer.js +22 -13
- package/dist/components/Disclosure/Disclosure.js +10 -7
- package/dist/components/Divider/Divider.js +2 -0
- package/dist/components/Drawer/Drawer.js +10 -9
- package/dist/components/DropdownMenu/DropdownMenu.js +58 -35
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.js +63 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.js +5 -5
- package/dist/components/DropdownMenu/DropdownMenuGroup.js +26 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.js +29 -10
- package/dist/components/DropdownMenu/DropdownMenuRadioGroup.js +30 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.js +59 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.js +1 -0
- package/dist/components/DropdownMenu/DropdownMenuSub.js +1 -0
- package/dist/components/DropdownMenu/DropdownMenuSubTrigger.js +1 -0
- package/dist/components/DropdownMenu/DropdownMenuTrigger.js +1 -0
- package/dist/components/DropdownMenu/dropdown-menu-item-styles.js +7 -0
- package/dist/components/DropdownMenu/index.js +12 -8
- package/dist/components/Ellipsis/Ellipsis.js +11 -8
- package/dist/components/Empty/Empty.js +4 -0
- package/dist/components/FileInput/FileInput.js +7 -5
- package/dist/components/FilePreview/FilePreview.js +19 -1
- package/dist/components/Flex/Flex.js +1 -0
- package/dist/components/FloatButton/FloatButton.js +4 -0
- package/dist/components/FloatButton/FloatButtonGroup.js +18 -13
- package/dist/components/Fullscreen/Fullscreen.js +6 -3
- package/dist/components/Grid/Grid.js +12 -7
- package/dist/components/Grid/GridItem.js +17 -7
- package/dist/components/Grid/grid-item-styles.js +58 -0
- package/dist/components/HoverCard/HoverCard.js +46 -43
- package/dist/components/Icon/Icon.js +1 -0
- package/dist/components/Image/Image.js +10 -7
- package/dist/components/Image/ImagePreview.js +42 -34
- package/dist/components/InlineCompletion/InlineCompletion.js +15 -11
- package/dist/components/InlineEdit/InlineEdit.js +8 -6
- package/dist/components/Input/InputCore.js +1 -0
- package/dist/components/JsonView/JsonView.js +104 -79
- package/dist/components/Kbd/Kbd.js +1 -0
- package/dist/components/List/List.js +15 -10
- package/dist/components/List/ListItem.js +1 -0
- package/dist/components/LocaleProvider/LocaleProvider.js +4 -4
- package/dist/components/LocaleProvider/ar-sa.js +31 -2
- package/dist/components/LocaleProvider/de-de.js +31 -2
- package/dist/components/LocaleProvider/es-es.js +31 -2
- package/dist/components/LocaleProvider/fr-fr.js +31 -2
- package/dist/components/LocaleProvider/it-it.js +31 -2
- package/dist/components/LocaleProvider/ja-jp.js +31 -2
- package/dist/components/LocaleProvider/ko-kr.js +31 -2
- package/dist/components/LocaleProvider/locale.js +31 -2
- package/dist/components/LocaleProvider/pt-br.js +31 -2
- package/dist/components/LocaleProvider/ru-ru.js +31 -2
- package/dist/components/LocaleProvider/zh-cn.js +31 -2
- package/dist/components/LogViewer/LogViewer.js +56 -38
- package/dist/components/MarkdownRenderer/MarkdownRenderer.js +6 -5
- package/dist/components/MarkdownRenderer/markdown-blocks.js +1 -1
- package/dist/components/Masonry/Masonry.js +13 -10
- package/dist/components/Mentions/MentionsCore.js +15 -11
- package/dist/components/Menu/Menu.js +58 -36
- package/dist/components/Menu/MenuCheckboxItem.js +63 -0
- package/dist/components/Menu/MenuDivider.js +1 -0
- package/dist/components/Menu/MenuGroup.js +26 -0
- package/dist/components/Menu/MenuItem.js +28 -9
- package/dist/components/Menu/MenuRadioGroup.js +30 -0
- package/dist/components/Menu/MenuRadioItem.js +59 -0
- package/dist/components/Menu/MenuSub.js +1 -0
- package/dist/components/Menu/MenuSubTrigger.js +1 -0
- package/dist/components/Menu/index.js +11 -7
- package/dist/components/Menu/menu-item-styles.js +7 -0
- package/dist/components/ModelPicker/ModelPicker.js +3 -0
- package/dist/components/NavigationBar/NavLink.js +7 -6
- package/dist/components/NavigationBar/NavigationBar.js +4 -0
- package/dist/components/NumberInput/NumberInputCore.js +4 -0
- package/dist/components/OTPInput/OTPInputCore.js +10 -7
- package/dist/components/Pagination/Pagination.js +125 -33
- package/dist/components/PasswordInput/PasswordInputCore.js +9 -6
- package/dist/components/Popover/Popover.js +9 -7
- package/dist/components/Progress/Progress.js +5 -0
- package/dist/components/PromptInput/PromptInput.js +49 -41
- package/dist/components/QRCode/QRCode.js +9 -7
- package/dist/components/Radio/Radio.js +2 -0
- package/dist/components/Radio/RadioGroupCore.js +7 -6
- package/dist/components/Rating/RatingCore.js +18 -15
- package/dist/components/Resizable/Resizable.js +269 -36
- package/dist/components/Result/Result.js +5 -0
- package/dist/components/ScrollArea/ScrollArea.js +1 -0
- package/dist/components/Segmented/SegmentedCore.js +9 -7
- package/dist/components/Select/Option.js +1 -0
- package/dist/components/Select/OptionGroup.js +1 -0
- package/dist/components/Select/SelectCore.js +11 -8
- package/dist/components/Select/SelectFloating.js +54 -36
- package/dist/components/Sidebar/Sidebar.js +52 -42
- package/dist/components/Signature/Signature.js +101 -91
- package/dist/components/Skeleton/Skeleton.js +1 -0
- package/dist/components/Slider/SliderCore.js +149 -43
- package/dist/components/Sources/Sources.js +31 -21
- package/dist/components/Sparkline/Sparkline.js +45 -0
- package/dist/components/Sparkline/index.js +3 -0
- package/dist/components/Sparkline/sparkline-styles.js +18 -0
- package/dist/components/Spinner/Spinner.js +1 -0
- package/dist/components/Stat/Stat.js +7 -0
- package/dist/components/StatusBar/StatusBar.js +47 -0
- package/dist/components/StatusBar/index.js +3 -0
- package/dist/components/StepTimeline/StepTimeline.js +6 -0
- package/dist/components/Stepper/Step.js +8 -1
- package/dist/components/Stepper/Stepper.js +7 -6
- package/dist/components/StreamingText/StreamingText.js +62 -29
- package/dist/components/SwipeAction/SwipeAction.js +11 -9
- package/dist/components/Switch/SwitchCore.js +9 -5
- package/dist/components/TabBar/TabBar.js +60 -0
- package/dist/components/TabBar/index.js +3 -0
- package/dist/components/Table/Table.js +2 -0
- package/dist/components/Table/TableBody.js +1 -0
- package/dist/components/Table/TableCell.js +1 -0
- package/dist/components/Table/TableHead.js +1 -0
- package/dist/components/Table/TableRow.js +1 -0
- package/dist/components/Tabs/SortableTabList.js +116 -0
- package/dist/components/Tabs/Tab.js +84 -16
- package/dist/components/Tabs/TabList.js +94 -37
- package/dist/components/Tabs/TabPanel.js +1 -0
- package/dist/components/Tabs/Tabs.js +1 -0
- package/dist/components/Tabs/edge-scroll.js +6 -0
- package/dist/components/Tabs/index.js +4 -3
- package/dist/components/Tabs/tab-metas.js +24 -0
- package/dist/components/Tag/Tag.js +2 -0
- package/dist/components/TagGroup/SortableTagGroup.js +7 -6
- package/dist/components/TagGroup/TagGroup.js +1 -0
- package/dist/components/TagGroup/TagGroupItem.js +3 -0
- package/dist/components/TagInput/SortableTagInputCore.js +16 -13
- package/dist/components/TagInput/TagInputCore.js +17 -12
- package/dist/components/Textarea/TextareaCore.js +1 -0
- package/dist/components/ThinkingIndicator/ThinkingIndicator.js +18 -4
- package/dist/components/TimePicker/TimePicker.js +30 -14
- package/dist/components/TimePicker/TimePickerCore.js +1 -0
- package/dist/components/TimePicker/TimePickerPanel.js +260 -0
- package/dist/components/TimePicker/time-picker-styles.js +7 -0
- package/dist/components/TimePicker/time.js +51 -0
- package/dist/components/Timeline/Timeline.js +14 -1
- package/dist/components/Toast/Toast.js +94 -48
- package/dist/components/Toast/ToastContainer.js +60 -56
- package/dist/components/Toast/ToastContext.js +3 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/{toast2.js → toast-channel.js} +21 -15
- package/dist/components/Toast/useToast.js +36 -11
- package/dist/components/Toggle/ToggleCore.js +1 -0
- package/dist/components/TokenCounter/TokenCounter.js +8 -1
- package/dist/components/ToolCallCard/ToolCallCard.js +18 -2
- package/dist/components/Toolbar/Toolbar.js +9 -8
- package/dist/components/Toolbar/ToolbarButton.js +1 -0
- package/dist/components/Toolbar/ToolbarSeparator.js +1 -0
- package/dist/components/Toolbar/ToolbarToggle.js +1 -0
- package/dist/components/Tooltip/Tooltip.js +46 -42
- package/dist/components/Tour/Tour.js +76 -65
- package/dist/components/Transfer/TransferCore.js +31 -17
- package/dist/components/Tree/SortableTree.js +151 -0
- package/dist/components/Tree/Tree.js +163 -154
- package/dist/components/Tree/TreeItem.js +52 -39
- package/dist/components/Tree/index.js +2 -1
- package/dist/components/Tree/sortable-tree-styles.js +7 -0
- package/dist/components/Tree/sortable-tree-utils.js +36 -0
- package/dist/components/TreeSelect/TreeSelect.js +44 -34
- package/dist/components/Typography/Typography.js +3 -0
- package/dist/components/Upload/Upload.js +12 -11
- package/dist/components/Upload/UploadCore.js +92 -65
- package/dist/components/Upload/UploadList.js +177 -105
- package/dist/components/VirtualList/VirtualList.js +239 -122
- package/dist/components/Watermark/Watermark.js +8 -6
- package/dist/components/Workbench/Workbench.js +144 -0
- package/dist/components/Workbench/index.js +3 -0
- package/dist/css/accordion.css +1 -1
- package/dist/css/activity-rail.css +2 -0
- package/dist/css/alert.css +1 -1
- package/dist/css/app-shell.css +1 -1
- package/dist/css/async-section.css +1 -1
- package/dist/css/banner.css +1 -1
- package/dist/css/bottom-sheet.css +1 -1
- package/dist/css/breadcrumb.css +1 -1
- package/dist/css/button.css +2 -2
- package/dist/css/calendar.css +1 -1
- package/dist/css/carousel.css +1 -1
- package/dist/css/chat-message.css +1 -1
- package/dist/css/checkbox.css +1 -1
- package/dist/css/color-picker.css +2 -0
- package/dist/css/combobox.css +2 -2
- package/dist/css/command.css +1 -1
- package/dist/css/context-menu.css +1 -1
- package/dist/css/date-range-picker.css +1 -1
- package/dist/css/dialog.css +1 -1
- package/dist/css/drawer.css +1 -1
- package/dist/css/dropdown-menu.css +7 -2
- package/dist/css/form.css +1 -1
- package/dist/css/grid.css +2 -1
- package/dist/css/hover-card.css +1 -1
- package/dist/css/input.css +1 -1
- package/dist/css/list.css +1 -1
- package/dist/css/menu.css +9 -4
- package/dist/css/pagination.css +1 -1
- package/dist/css/popover.css +1 -1
- package/dist/css/progress.css +1 -1
- package/dist/css/radio.css +1 -1
- package/dist/css/rating.css +1 -1
- package/dist/css/resizable.css +1 -1
- package/dist/css/segmented.css +1 -1
- package/dist/css/sidebar.css +1 -1
- package/dist/css/skeleton.css +1 -1
- package/dist/css/slider.css +1 -1
- package/dist/css/sparkline.css +2 -0
- package/dist/css/spinner.css +1 -1
- package/dist/css/status-bar.css +2 -0
- package/dist/css/stepper.css +1 -1
- package/dist/css/streaming-text.css +1 -1
- package/dist/css/switch.css +1 -1
- package/dist/css/tab-bar.css +2 -0
- package/dist/css/tabs.css +3 -2
- package/dist/css/tag.css +1 -1
- package/dist/css/textarea.css +1 -1
- package/dist/css/thinking-indicator.css +1 -1
- package/dist/css/time-picker.css +1 -0
- package/dist/css/toast.css +1 -1
- package/dist/css/toggle.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/tooltip.css +1 -1
- package/dist/css/tree.css +2 -1
- package/dist/css/upload.css +1 -1
- package/dist/css/virtual-list.css +1 -1
- package/dist/css/workbench.css +2 -0
- package/dist/css-manifest.json +38 -0
- package/dist/dates/adapter.js +21 -0
- package/dist/dates/buddhist.js +43 -0
- package/dist/dates/ethiopic.js +67 -0
- package/dist/dates/gregory.js +44 -0
- package/dist/dates/hebrew.js +95 -0
- package/dist/dates/islamic.js +87 -0
- package/dist/dates/japanese.js +41 -0
- package/dist/dates/persian.js +121 -0
- package/dist/dates/registry.js +23 -0
- package/dist/dates/timezone.js +29 -0
- package/dist/design-tokens/cyan-dark.json +355 -0
- package/dist/design-tokens/cyan-light.json +355 -0
- package/dist/design-tokens/orange-dark.json +355 -0
- package/dist/design-tokens/orange-light.json +355 -0
- package/dist/design-tokens/rose-dark.json +355 -0
- package/dist/design-tokens/rose-light.json +355 -0
- package/dist/design-tokens/teal-dark.json +355 -0
- package/dist/design-tokens/teal-light.json +355 -0
- package/dist/design-tokens/violet-dark.json +355 -0
- package/dist/design-tokens/violet-light.json +355 -0
- package/dist/form/FormItem.js +71 -63
- package/dist/form/FormList.js +6 -6
- package/dist/form/form-item-styles.js +7 -0
- package/dist/haze-ui.css +78 -57
- package/dist/index.js +261 -232
- package/dist/mcp-docs.json +1587 -113
- package/dist/registry.json +132 -22
- package/dist/tokens/index.js +7 -7
- package/dist/tokens/motion.js +9 -2
- package/dist/tokens/palette.js +244 -84
- package/dist/tokens/registry.js +18 -22
- package/dist/types/components/ActivityRail/ActivityRail.d.ts +30 -0
- package/dist/types/components/ActivityRail/index.d.ts +4 -0
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Calendar/Calendar.d.ts +39 -14
- package/dist/types/components/Calendar/date.d.ts +51 -0
- package/dist/types/components/Calendar/index.d.ts +1 -1
- package/dist/types/components/Carousel/Carousel.d.ts +5 -1
- package/dist/types/components/Carousel/CarouselSlide.d.ts +3 -3
- package/dist/types/components/Chart/Chart.d.ts +13 -6
- package/dist/types/components/Chart/chart-elements.d.ts +27 -6
- package/dist/types/components/ChatMessage/ChatMessage.d.ts +10 -1
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +44 -5
- package/dist/types/components/ColorPicker/ColorPickerPanel.d.ts +28 -0
- package/dist/types/components/ColorPicker/color-math.d.ts +63 -0
- package/dist/types/components/ColorPicker/color-picker-styles.d.ts +50 -0
- package/dist/types/components/ConfigProvider/ConfigContext.d.ts +67 -0
- package/dist/types/components/ConfigProvider/ConfigProvider.d.ts +25 -0
- package/dist/types/components/ConfigProvider/index.d.ts +4 -0
- package/dist/types/components/ConfigProvider/useConfigDefaults.d.ts +28 -0
- package/dist/types/components/ConversationList/ConversationList.d.ts +10 -1
- package/dist/types/components/Datepicker/Datepicker.d.ts +23 -10
- package/dist/types/components/Datepicker/DatepickerCore.d.ts +40 -10
- package/dist/types/components/Datepicker/datetime.d.ts +33 -11
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +12 -2
- package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +26 -0
- package/dist/types/components/DropdownMenu/DropdownMenuGroup.d.ts +16 -0
- package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +7 -1
- package/dist/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +21 -0
- package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +22 -0
- package/dist/types/components/DropdownMenu/dropdown-menu-item-styles.d.ts +29 -0
- package/dist/types/components/DropdownMenu/index.d.ts +9 -1
- package/dist/types/components/Fullscreen/Fullscreen.d.ts +1 -0
- package/dist/types/components/Grid/Grid.d.ts +8 -1
- package/dist/types/components/Grid/GridItem.d.ts +24 -1
- package/dist/types/components/Grid/grid-item-styles.d.ts +57 -0
- package/dist/types/components/HoverCard/HoverCard.d.ts +1 -1
- package/dist/types/components/List/List.d.ts +10 -1
- package/dist/types/components/LocaleProvider/locale.d.ts +31 -0
- package/dist/types/components/LogViewer/LogViewer.d.ts +10 -1
- package/dist/types/components/Menu/Menu.d.ts +11 -2
- package/dist/types/components/Menu/MenuCheckboxItem.d.ts +25 -0
- package/dist/types/components/Menu/MenuGroup.d.ts +16 -0
- package/dist/types/components/Menu/MenuItem.d.ts +7 -1
- package/dist/types/components/Menu/MenuRadioGroup.d.ts +20 -0
- package/dist/types/components/Menu/MenuRadioItem.d.ts +22 -0
- package/dist/types/components/Menu/index.d.ts +9 -1
- package/dist/types/components/Menu/menu-item-styles.d.ts +28 -0
- package/dist/types/components/NavigationBar/NavLink.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +17 -3
- package/dist/types/components/Resizable/Resizable.d.ts +24 -7
- package/dist/types/components/Resizable/index.d.ts +1 -1
- package/dist/types/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/components/Slider/Slider.d.ts +24 -2
- package/dist/types/components/Slider/SliderCore.d.ts +41 -3
- package/dist/types/components/Sparkline/Sparkline.d.ts +31 -0
- package/dist/types/components/Sparkline/index.d.ts +3 -0
- package/dist/types/components/Sparkline/sparkline-styles.d.ts +26 -0
- package/dist/types/components/StatusBar/StatusBar.d.ts +18 -0
- package/dist/types/components/StatusBar/index.d.ts +3 -0
- package/dist/types/components/StreamingText/StreamingText.d.ts +8 -1
- package/dist/types/components/TabBar/TabBar.d.ts +23 -0
- package/dist/types/components/TabBar/index.d.ts +4 -0
- package/dist/types/components/Tabs/SortableTabList.d.ts +46 -0
- package/dist/types/components/Tabs/Tab.d.ts +54 -3
- package/dist/types/components/Tabs/TabList.d.ts +26 -2
- package/dist/types/components/Tabs/edge-scroll.d.ts +17 -0
- package/dist/types/components/Tabs/index.d.ts +3 -1
- package/dist/types/components/Tabs/tab-metas.d.ts +20 -0
- package/dist/types/components/TimePicker/TimePicker.d.ts +36 -4
- package/dist/types/components/TimePicker/TimePickerPanel.d.ts +26 -0
- package/dist/types/components/TimePicker/index.d.ts +1 -0
- package/dist/types/components/TimePicker/time-picker-styles.d.ts +30 -0
- package/dist/types/components/TimePicker/time.d.ts +49 -0
- package/dist/types/components/Toast/Toast.d.ts +19 -6
- package/dist/types/components/Toast/ToastContainer.d.ts +1 -1
- package/dist/types/components/Toast/ToastContext.d.ts +22 -2
- package/dist/types/components/Toast/index.d.ts +2 -2
- package/dist/types/components/Toast/{toast.d.ts → toast-channel.d.ts} +20 -14
- package/dist/types/components/Toast/useToast.d.ts +14 -4
- package/dist/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/components/Tree/SortableTree.d.ts +38 -0
- package/dist/types/components/Tree/Tree.d.ts +1 -1
- package/dist/types/components/Tree/index.d.ts +2 -0
- package/dist/types/components/Tree/sortable-tree-styles.d.ts +36 -0
- package/dist/types/components/Tree/sortable-tree-utils.d.ts +40 -0
- package/dist/types/components/Upload/Upload.d.ts +17 -10
- package/dist/types/components/Upload/UploadCore.d.ts +26 -12
- package/dist/types/components/Upload/UploadList.d.ts +10 -7
- package/dist/types/components/Upload/index.d.ts +1 -1
- package/dist/types/components/Upload/types.d.ts +33 -7
- package/dist/types/components/VirtualList/VirtualList.d.ts +98 -26
- package/dist/types/components/VirtualList/index.d.ts +1 -1
- package/dist/types/components/Workbench/Workbench.d.ts +50 -0
- package/dist/types/components/Workbench/index.d.ts +2 -0
- package/dist/types/dates/adapter.d.ts +101 -0
- package/dist/types/dates/buddhist.d.ts +14 -0
- package/dist/types/dates/ethiopic.d.ts +15 -0
- package/dist/types/dates/gregory.d.ts +10 -0
- package/dist/types/dates/hebrew.d.ts +19 -0
- package/dist/types/dates/index.d.ts +11 -0
- package/dist/types/dates/islamic.d.ts +17 -0
- package/dist/types/dates/japanese.d.ts +16 -0
- package/dist/types/dates/persian.d.ts +18 -0
- package/dist/types/dates/registry.d.ts +13 -0
- package/dist/types/dates/timezone.d.ts +36 -0
- package/dist/types/form/FormItem.d.ts +31 -1
- package/dist/types/form/form-item-styles.d.ts +24 -0
- package/dist/types/index.d.ts +31 -13
- package/dist/types/tokens/index.d.ts +4 -2
- package/dist/types/tokens/motion.d.ts +16 -0
- package/dist/types/tokens/palette.d.ts +59 -2
- package/dist/types/utils/menuItems.d.ts +126 -0
- package/dist/types/utils/menuRadio.d.ts +21 -0
- package/dist/types/utils/sortable.d.ts +8 -1
- package/dist/types/utils/use-end-reached.d.ts +56 -0
- package/dist/types/utils/viewport.d.ts +12 -0
- package/dist/utils/floating.js +45 -44
- package/dist/utils/menuItems.js +55 -0
- package/dist/utils/menuKeyboard.js +31 -31
- package/dist/utils/menuRadio.js +28 -0
- package/dist/utils/sortable.js +7 -5
- package/dist/utils/use-end-reached.js +46 -0
- package/dist/utils/viewport.js +20 -0
- package/package.json +26 -9
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
+
type MenuRadioGroupProps = {
|
|
4
|
+
/** Selected value — controlled control or uncontrolled initial value ('' = none). */
|
|
5
|
+
value?: ControlOrValue<string>;
|
|
6
|
+
/** Fires when the selection changes, whatever drove it (click, Enter, Space). */
|
|
7
|
+
onValueChange?: (value: string) => void;
|
|
8
|
+
/** Optional non-interactive heading naming the radio group (aria-labelledby). */
|
|
9
|
+
label?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
/** The group's `MenuRadioItem`s. */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* State container for a single-select cluster of `MenuRadioItem`s
|
|
16
|
+
* (`role="group"`): owns the selected value through the standard
|
|
17
|
+
* `ControlOrValue` prop and exposes it to the items.
|
|
18
|
+
*/
|
|
19
|
+
export default function MenuRadioGroup({ value, onValueChange, label, className, children, }: MenuRadioGroupProps): import("react").JSX.Element;
|
|
20
|
+
export type { MenuRadioGroupProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type MenuRadioItemProps = {
|
|
3
|
+
/** Value this option selects in its MenuRadioGroup when activated. */
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Danger skin for destructive actions: danger-colored text and interaction states. */
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
/** Inline-start icon slot; bare `svg` children are sized to 1em by the slot. */
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
/** Inline-end shortcut hint (e.g. '⌘C'), muted and pushed to the item's end. */
|
|
11
|
+
kbdLabel?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* One option of a MenuRadioGroup (`role="menuitemradio"`): activating
|
|
17
|
+
* it (click, Enter, Space) selects its `value` in the group — the
|
|
18
|
+
* previously selected sibling deselects. Must live inside a
|
|
19
|
+
* `MenuRadioGroup`.
|
|
20
|
+
*/
|
|
21
|
+
export default function MenuRadioItem({ value, disabled, danger, icon, kbdLabel, className, children, }: MenuRadioItemProps): import("react").JSX.Element;
|
|
22
|
+
export type { MenuRadioItemProps };
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export { default as Menu } from './Menu';
|
|
2
|
-
export type { MenuProps } from './Menu';
|
|
2
|
+
export type { MenuProps, MenuDataItem } from './Menu';
|
|
3
3
|
export { default as MenuItem } from './MenuItem';
|
|
4
4
|
export type { MenuItemProps } from './MenuItem';
|
|
5
|
+
export { default as MenuCheckboxItem } from './MenuCheckboxItem';
|
|
6
|
+
export type { MenuCheckboxItemProps } from './MenuCheckboxItem';
|
|
7
|
+
export { default as MenuRadioGroup } from './MenuRadioGroup';
|
|
8
|
+
export type { MenuRadioGroupProps } from './MenuRadioGroup';
|
|
9
|
+
export { default as MenuRadioItem } from './MenuRadioItem';
|
|
10
|
+
export type { MenuRadioItemProps } from './MenuRadioItem';
|
|
11
|
+
export { default as MenuGroup } from './MenuGroup';
|
|
12
|
+
export type { MenuGroupProps } from './MenuGroup';
|
|
5
13
|
export { default as MenuDivider } from './MenuDivider';
|
|
6
14
|
export { default as MenuSub } from './MenuSub';
|
|
7
15
|
export type { MenuSubProps } from './MenuSub';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared slot and variant skins for the Menu family's item types
|
|
3
|
+
* (MenuItem, MenuCheckboxItem, MenuRadioItem). Merged after each item's
|
|
4
|
+
* base class so the overrides win on equal specificity.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Danger skin for destructive actions: danger-colored text with a
|
|
8
|
+
* danger-subtle interaction background.
|
|
9
|
+
*/
|
|
10
|
+
export declare const menuItemDanger: import("@linaria/core").LinariaClassName;
|
|
11
|
+
/**
|
|
12
|
+
* Inline-start icon slot. The slot sizes bare `svg` children to 1em —
|
|
13
|
+
* an svg without intrinsic dimensions collapses to 0×0 inside flex.
|
|
14
|
+
*/
|
|
15
|
+
export declare const menuItemIcon: import("@linaria/core").LinariaClassName;
|
|
16
|
+
/**
|
|
17
|
+
* Inline-end shortcut hint (e.g. '⌘C'): muted, monospaced, pushed to
|
|
18
|
+
* the item's inline end.
|
|
19
|
+
*/
|
|
20
|
+
export declare const menuItemKbd: import("@linaria/core").LinariaClassName;
|
|
21
|
+
/**
|
|
22
|
+
* Fixed-size state indicator box (check/dot) for checkbox and radio
|
|
23
|
+
* items: reserves its square whether or not the glyph renders, so
|
|
24
|
+
* labels align across mixed items.
|
|
25
|
+
*/
|
|
26
|
+
export declare const menuItemIndicator: import("@linaria/core").LinariaClassName;
|
|
27
|
+
/** Group heading: muted, one step smaller than item text. Shared by MenuGroup and MenuRadioGroup's optional label. */
|
|
28
|
+
export declare const menuGroupLabel: import("@linaria/core").LinariaClassName;
|
|
@@ -37,6 +37,6 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
37
37
|
*/
|
|
38
38
|
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
39
39
|
className?: string;
|
|
40
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "
|
|
40
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "children" | "className" | "onClick" | "href"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
41
41
|
export default _default;
|
|
42
42
|
export type { NavLinkProps };
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import type { ControlOrValue } from 'react-use-control';
|
|
3
3
|
type PaginationProps = {
|
|
4
4
|
page?: ControlOrValue<number>;
|
|
5
5
|
total: number;
|
|
6
|
-
pageSize?: number
|
|
6
|
+
pageSize?: ControlOrValue<number>;
|
|
7
|
+
/** Page sizes offered by the size changer (`showSizeChanger`). */
|
|
8
|
+
pageSizeOptions?: number[];
|
|
9
|
+
/** Renders a page-size select; changing it resets to page 1. */
|
|
10
|
+
showSizeChanger?: boolean;
|
|
11
|
+
/** Renders a "Go to [input]" control that jumps on Enter (clamped). */
|
|
12
|
+
showQuickJumper?: boolean;
|
|
13
|
+
/** Renders a summary of `total` and the current page's item range. */
|
|
14
|
+
showTotal?: (total: number, range: [number, number]) => ReactNode;
|
|
15
|
+
/** Minimal mode: a page input plus prev/next instead of the page list. */
|
|
16
|
+
simple?: boolean;
|
|
17
|
+
/** Turns the ellipsis markers into buttons jumping ±5 pages (clamped). */
|
|
18
|
+
ellipsisJump?: boolean;
|
|
19
|
+
/** Value callback fired for every page jump and page-size change. */
|
|
20
|
+
onPageChange?: (page: number, pageSize: number) => void;
|
|
7
21
|
size?: 'sm' | 'md' | 'lg';
|
|
8
22
|
className?: string;
|
|
9
23
|
} & Omit<ComponentPropsWithoutRef<'nav'>, 'onChange'>;
|
|
10
|
-
export default function Pagination({ page: pageControl, total, pageSize, size, className, ...rest }: PaginationProps): import("react").JSX.Element;
|
|
24
|
+
export default function Pagination({ page: pageControl, total, pageSize: pageSizeControl, pageSizeOptions, showSizeChanger, showQuickJumper, showTotal, simple, ellipsisJump, onPageChange, size, className, ...rest }: PaginationProps): import("react").JSX.Element;
|
|
11
25
|
export type { PaginationProps };
|
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import type { ControlOrValue } from 'react-use-control';
|
|
2
3
|
type ResizableGroupProps = {
|
|
3
4
|
direction?: 'horizontal' | 'vertical';
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
/** Fired when a drag or keyboard resize ends: the effective px size of
|
|
9
|
+
* every explicitly sized panel, keyed by panel id — a shape ready to
|
|
10
|
+
* persist. Collapsed panels report 0. */
|
|
11
|
+
onResizeCommit?: (sizes: Record<string, number>) => void;
|
|
6
12
|
};
|
|
7
|
-
export declare function ResizableGroup({ direction, children, className, }: ResizableGroupProps): import("react").JSX.Element;
|
|
13
|
+
export declare function ResizableGroup({ direction, children, className, style, onResizeCommit, }: ResizableGroupProps): import("react").JSX.Element;
|
|
8
14
|
type ResizablePanelProps = {
|
|
15
|
+
/** Stable identity within the group — the key `onResizeCommit` reports. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Initial/fallback px size. Omit to make the panel flexible (it grows
|
|
18
|
+
* into the space the fixed panels leave). */
|
|
9
19
|
defaultSize?: number;
|
|
20
|
+
/** px pins honored by both pointer drags and keyboard steps. */
|
|
21
|
+
minSize?: number;
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
/** Opt-in to the collapse feature; without it `collapsed` is inert. */
|
|
24
|
+
collapsible?: boolean;
|
|
25
|
+
collapsed?: ControlOrValue<boolean>;
|
|
26
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
10
27
|
children: ReactNode;
|
|
11
28
|
className?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function ResizablePanel({ defaultSize, children, className, }: ResizablePanelProps): import("react").JSX.Element;
|
|
29
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'id'>;
|
|
30
|
+
export declare function ResizablePanel({ id, defaultSize, minSize, maxSize, collapsible, collapsed: collapsedControl, onCollapsedChange, children, className, style, ...rest }: ResizablePanelProps): import("react").JSX.Element;
|
|
14
31
|
type ResizableHandleProps = {
|
|
15
32
|
className?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function ResizableHandle({ className }: ResizableHandleProps): import("react").JSX.Element;
|
|
18
|
-
export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps };
|
|
33
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'className'>;
|
|
34
|
+
export declare function ResizableHandle({ className, ...rest }: ResizableHandleProps): import("react").JSX.Element;
|
|
35
|
+
export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ResizableGroup, ResizablePanel, ResizableHandle } from './Resizable';
|
|
2
|
-
export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps } from './Resizable';
|
|
2
|
+
export type { ResizableGroupProps, ResizablePanelProps, ResizableHandleProps, } from './Resizable';
|
|
3
3
|
export { ResizableGroup as SplitterGroup, ResizablePanel as SplitterPanel, ResizableHandle as SplitterHandle, } from './Resizable';
|
|
4
4
|
export type { ResizableGroupProps as SplitterGroupProps, ResizablePanelProps as SplitterPanelProps, ResizableHandleProps as SplitterHandleProps, } from './Resizable';
|
|
@@ -49,7 +49,7 @@ export declare const SidebarItem: import("react").ForwardRefExoticComponent<{
|
|
|
49
49
|
*/
|
|
50
50
|
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
51
51
|
className?: string;
|
|
52
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "
|
|
52
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">, "children" | "className" | "onClick"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
53
53
|
type SidebarFooterProps = {
|
|
54
54
|
children: ReactNode;
|
|
55
55
|
className?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, Ref } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
|
|
2
2
|
import type { ControlOrValue } from 'react-use-control';
|
|
3
3
|
type SliderProps = {
|
|
4
4
|
/** `number` in single mode, `[low, high]` when `range` is set. */
|
|
@@ -22,11 +22,33 @@ type SliderProps = {
|
|
|
22
22
|
* identically named sliders are ambiguous — prefer the tuple).
|
|
23
23
|
*/
|
|
24
24
|
'aria-label'?: string | [string, string];
|
|
25
|
+
/**
|
|
26
|
+
* Value bubble over the active thumb while dragging or focused
|
|
27
|
+
* (see SliderCoreProps.tooltip). Opt-in; in single mode it wraps the
|
|
28
|
+
* input in a positioning span (the input keeps `className`).
|
|
29
|
+
*/
|
|
30
|
+
tooltip?: boolean;
|
|
31
|
+
/** Bubble content formatter (see SliderCoreProps.tooltipFormatter). */
|
|
32
|
+
tooltipFormatter?: (value: number) => ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Tick labels under the track, clickable onto the nearest thumb
|
|
35
|
+
* (see SliderCoreProps.marks).
|
|
36
|
+
*/
|
|
37
|
+
marks?: Record<number, ReactNode>;
|
|
38
|
+
/**
|
|
39
|
+
* Vertical orientation, bottom-to-top (see SliderCoreProps.vertical).
|
|
40
|
+
*/
|
|
41
|
+
vertical?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* `null` restricts the selectable values to the `marks` keys
|
|
44
|
+
* (see SliderCoreProps.step); a number forwards to the native input.
|
|
45
|
+
*/
|
|
46
|
+
step?: number | null;
|
|
25
47
|
/**
|
|
26
48
|
* Forwarded to the `<input type='range'>` — the only input in single
|
|
27
49
|
* mode, the low thumb (first tab stop) in range mode.
|
|
28
50
|
*/
|
|
29
51
|
ref?: Ref<HTMLInputElement>;
|
|
30
|
-
} & Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'value' | 'aria-label'>;
|
|
52
|
+
} & Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'value' | 'aria-label' | 'step'>;
|
|
31
53
|
export default function Slider({ value: valueControl, range, className, onChange, onValuesChange, ref, ...rest }: SliderProps): import("react").JSX.Element;
|
|
32
54
|
export type { SliderProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, Ref } from 'react';
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
|
|
2
2
|
type SliderCoreProps = {
|
|
3
3
|
/** `number` in single mode, `[low, high]` when `range` is set. An
|
|
4
4
|
* inverted tuple renders normalized (low ≤ high). */
|
|
@@ -21,6 +21,44 @@ type SliderCoreProps = {
|
|
|
21
21
|
* pointer input.
|
|
22
22
|
*/
|
|
23
23
|
range?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Shows a value bubble over the active thumb while it is being
|
|
26
|
+
* dragged (pointerdown until pointerup) or focused. Opt-in: without
|
|
27
|
+
* it nothing extra renders. The bubble is visual only
|
|
28
|
+
* (`aria-hidden`) — the native input keeps exposing the value, so
|
|
29
|
+
* `aria-valuetext` semantics are untouched. In range mode each thumb
|
|
30
|
+
* carries its own bubble.
|
|
31
|
+
*/
|
|
32
|
+
tooltip?: boolean;
|
|
33
|
+
/** Formats the bubble content (both modes); defaults to the raw
|
|
34
|
+
* number. */
|
|
35
|
+
tooltipFormatter?: (value: number) => ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Tick labels rendered under the track (beside it when `vertical`).
|
|
38
|
+
* Clicking a label commits that value to the nearest thumb (ties go
|
|
39
|
+
* to the low thumb; a value past the other thumb still snaps against
|
|
40
|
+
* it instead of crossing). Combine with `step={null}` to restrict
|
|
41
|
+
* the selectable values to the mark keys.
|
|
42
|
+
*/
|
|
43
|
+
marks?: Record<number, ReactNode>;
|
|
44
|
+
/**
|
|
45
|
+
* Vertical orientation (bottom-to-top) via the modern
|
|
46
|
+
* `writing-mode: vertical-lr; direction: rtl` slider recipe
|
|
47
|
+
* (Chromium 119+ / Firefox 120+ / Safari 17.4+; older engines keep
|
|
48
|
+
* rendering horizontally). Keyboard behavior stays native — the
|
|
49
|
+
* RTL arrow mirroring only applies to horizontal sliders. The track
|
|
50
|
+
* length defaults to `calc(var(--haze-space-16) * 2)`; override it
|
|
51
|
+
* by setting `--haze-slider-track` on the slider or an ancestor.
|
|
52
|
+
*/
|
|
53
|
+
vertical?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Pass `null` (with `marks`) to make the marks the only selectable
|
|
56
|
+
* values: the native inputs receive `step='any'` and every change —
|
|
57
|
+
* drag, click or keyboard — snaps to the nearest mark key. A number
|
|
58
|
+
* is forwarded to the native inputs as-is; omitted keeps the native
|
|
59
|
+
* default.
|
|
60
|
+
*/
|
|
61
|
+
step?: number | null;
|
|
24
62
|
className?: string;
|
|
25
63
|
/**
|
|
26
64
|
* Single mode: forwarded to the input untouched. Range mode: a
|
|
@@ -35,6 +73,6 @@ type SliderCoreProps = {
|
|
|
35
73
|
* mode, the low thumb (first tab stop) in range mode.
|
|
36
74
|
*/
|
|
37
75
|
ref?: Ref<HTMLInputElement>;
|
|
38
|
-
} & Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'value' | 'onChange' | 'aria-label'>;
|
|
39
|
-
export default function SliderCore({ value, onChange, onNativeChange, range, className, onKeyDown, 'aria-label': ariaLabel, ref, ...rest }: SliderCoreProps): import("react").JSX.Element;
|
|
76
|
+
} & Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'value' | 'onChange' | 'aria-label' | 'step'>;
|
|
77
|
+
export default function SliderCore({ value, onChange, onNativeChange, range, className, onKeyDown, 'aria-label': ariaLabel, tooltip, tooltipFormatter, marks, vertical, step, onPointerDown, onFocus, onBlur, ref, ...rest }: SliderCoreProps): import("react").JSX.Element;
|
|
40
78
|
export type { SliderCoreProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Sparkline — a stateless inline-SVG mini trend chart (no recharts, no
|
|
4
|
+
* hooks, RSC-safe). Point coordinates are normalized into a square
|
|
5
|
+
* `0 0 100 100` viewBox stretched by `preserveAspectRatio="none"`, so
|
|
6
|
+
* `width`/`height` size the rendered box freely without touching geometry;
|
|
7
|
+
* `vector-effect="non-scaling-stroke"` keeps the 2px stroke crisp under
|
|
8
|
+
* that non-uniform stretch.
|
|
9
|
+
*
|
|
10
|
+
* Accessibility contract: a sparkline is decorative by default — it
|
|
11
|
+
* renders `aria-hidden="true"` and no role. Naming it (`aria-label` or
|
|
12
|
+
* `aria-labelledby`) switches it to `role="img"` carrying that name (a
|
|
13
|
+
* name makes the image addressable; no name keeps it out of the tree
|
|
14
|
+
* entirely, which axe requires of every meaningful image). Every other
|
|
15
|
+
* native `<svg>` attribute is forwarded via `...rest`.
|
|
16
|
+
*/
|
|
17
|
+
type SparklineProps = {
|
|
18
|
+
/** Y values to plot, in series order; at least two points draw a path. */
|
|
19
|
+
data: readonly number[];
|
|
20
|
+
/** Rendered box width in px (geometry stays viewBox-normalized). */
|
|
21
|
+
width?: number;
|
|
22
|
+
/** Rendered box height in px. */
|
|
23
|
+
height?: number;
|
|
24
|
+
/** `area` adds a translucent token fill under the line. */
|
|
25
|
+
variant?: 'line' | 'area';
|
|
26
|
+
/** Semantic stroke color for the trend. */
|
|
27
|
+
tone?: 'primary' | 'success' | 'danger' | 'warning' | 'info';
|
|
28
|
+
className?: string;
|
|
29
|
+
} & Omit<ComponentPropsWithoutRef<'svg'>, 'children'>;
|
|
30
|
+
export default function Sparkline({ data, width, height, variant, tone, className, ...rest }: SparklineProps): import("react").JSX.Element;
|
|
31
|
+
export type { SparklineProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Sparkline skin — the base class plus tone→stroke / tone→fill
|
|
3
|
+
* variant maps the `Sparkline` component wears. Living in their own module
|
|
4
|
+
* keeps the component file free of style internals (react-refresh
|
|
5
|
+
* boundary) and lets the maps ship as public constants
|
|
6
|
+
* (`sparklineToneStrokes` / `sparklineToneFills`) for consumers composing
|
|
7
|
+
* custom SVG elements with the same skin; split-css groups the emitted
|
|
8
|
+
* CSS into `haze-ui/css/sparkline.css` with them.
|
|
9
|
+
*/
|
|
10
|
+
export declare const base: import("@linaria/core").LinariaClassName;
|
|
11
|
+
/** Stroke color per tone; worn by the line path. */
|
|
12
|
+
export declare const toneStrokes: {
|
|
13
|
+
readonly primary: import("@linaria/core").LinariaClassName;
|
|
14
|
+
readonly success: import("@linaria/core").LinariaClassName;
|
|
15
|
+
readonly danger: import("@linaria/core").LinariaClassName;
|
|
16
|
+
readonly warning: import("@linaria/core").LinariaClassName;
|
|
17
|
+
readonly info: import("@linaria/core").LinariaClassName;
|
|
18
|
+
};
|
|
19
|
+
/** Translucent area fill per tone; worn by the fill path of the `area` variant. */
|
|
20
|
+
export declare const toneFills: {
|
|
21
|
+
readonly primary: import("@linaria/core").LinariaClassName;
|
|
22
|
+
readonly success: import("@linaria/core").LinariaClassName;
|
|
23
|
+
readonly danger: import("@linaria/core").LinariaClassName;
|
|
24
|
+
readonly warning: import("@linaria/core").LinariaClassName;
|
|
25
|
+
readonly info: import("@linaria/core").LinariaClassName;
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
type StatusBarProps = {
|
|
3
|
+
/** Items pinned to the leading edge of the bar. */
|
|
4
|
+
left?: ReactNode;
|
|
5
|
+
/** Items pinned to the trailing edge of the bar. */
|
|
6
|
+
right?: ReactNode;
|
|
7
|
+
} & Omit<ComponentPropsWithoutRef<'footer'>, 'children'>;
|
|
8
|
+
type StatusItemProps = {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/** Keeps the item visible below the mobile breakpoint where lesser items fold away. */
|
|
11
|
+
priority?: boolean;
|
|
12
|
+
/** Presence upgrades the item to a real button; called on activation (click, Enter, Space). */
|
|
13
|
+
onSelect?: () => void;
|
|
14
|
+
} & Omit<ComponentPropsWithoutRef<'span'>, 'children' | 'onSelect'>;
|
|
15
|
+
export default function StatusBar({ left, right, className, ...rest }: StatusBarProps): import("react").JSX.Element;
|
|
16
|
+
declare function StatusItem({ priority, onSelect, className, children, ...rest }: StatusItemProps): import("react").JSX.Element;
|
|
17
|
+
export { StatusItem };
|
|
18
|
+
export type { StatusBarProps, StatusItemProps };
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
type StreamingTextProps = {
|
|
2
2
|
text: string;
|
|
3
3
|
speed?: number;
|
|
4
|
+
/**
|
|
5
|
+
* How often (ms) the screen-reader live region picks up a new snapshot
|
|
6
|
+
* of the streamed text. Everything streamed in between stays silent:
|
|
7
|
+
* announcing per character would restart the reader's utterance on
|
|
8
|
+
* every tick, so the throttle is the point, not an optimization.
|
|
9
|
+
*/
|
|
10
|
+
announceInterval?: number;
|
|
4
11
|
onComplete?: () => void;
|
|
5
12
|
showCursor?: boolean;
|
|
6
13
|
className?: string;
|
|
7
14
|
};
|
|
8
|
-
export default function StreamingText({ text, speed, onComplete, showCursor, className, }: StreamingTextProps): import("react").JSX.Element;
|
|
15
|
+
export default function StreamingText({ text, speed, announceInterval, onComplete, showCursor, className, }: StreamingTextProps): import("react").JSX.Element;
|
|
9
16
|
export type { StreamingTextProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
type TabBarProps = {
|
|
3
|
+
/** TabBarItem list; one row, evenly distributed (scrolls when crowded). */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
} & Omit<ComponentPropsWithoutRef<'nav'>, 'children'>;
|
|
6
|
+
export default function TabBar({ children, className, ...rest }: TabBarProps): import("react").JSX.Element;
|
|
7
|
+
type TabBarItemProps = {
|
|
8
|
+
/** Icon content; rendered inside a fixed-size, aria-hidden slot. */
|
|
9
|
+
icon: ReactNode;
|
|
10
|
+
/** Visible caption under the icon; also the item's accessible name. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Notification count/dot rendered as a small Badge on the icon corner. */
|
|
13
|
+
badge?: ReactNode;
|
|
14
|
+
/** Marks the item as the current view (aria-current="true"). */
|
|
15
|
+
active?: boolean;
|
|
16
|
+
/** Called when a non-active item is activated (click or Enter/Space). */
|
|
17
|
+
onSelect?: () => void;
|
|
18
|
+
/** Called when the already-active item is activated again — the
|
|
19
|
+
* "reselect pops back to root" affordance. onSelect is not re-fired. */
|
|
20
|
+
onReselect?: () => void;
|
|
21
|
+
} & Omit<ComponentPropsWithoutRef<'button'>, 'type' | 'children' | 'onSelect'>;
|
|
22
|
+
export declare function TabBarItem({ icon, label, badge, active, onSelect, onReselect, className, onClick, ...rest }: TabBarItemProps): import("react").JSX.Element;
|
|
23
|
+
export type { TabBarProps, TabBarItemProps };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Drag-and-drop reorderable variant of the Tabs strip — built on the
|
|
4
|
+
* @dnd-kit dependency (the plain TabList never touches it). It is a
|
|
5
|
+
* drop-in `<TabList>` replacement inside `<Tabs>`: the strip keeps the
|
|
6
|
+
* WAI-ARIA tabs model (roving tabindex, arrow-key selection, Home/End)
|
|
7
|
+
* and every `<Tab>` affordance (closable ×, icon, status dot) renders
|
|
8
|
+
* exactly as before.
|
|
9
|
+
*
|
|
10
|
+
* Keyboard sorting follows the shared sensor seam (`Space` lifts the
|
|
11
|
+
* focused tab, arrows walk, `Space` drops, `Escape` cancels) — while
|
|
12
|
+
* inside the sortable strip `Space`/`Enter` lift a drag instead of
|
|
13
|
+
* activating the tab (selection already follows the arrows per the
|
|
14
|
+
* tabs pattern, so nothing is lost). A drag never changes which tab is
|
|
15
|
+
* active: the selection is captured at lift and restored at drop, so
|
|
16
|
+
* reordering cannot move the selection with an index.
|
|
17
|
+
*
|
|
18
|
+
* While a tab is airborne, holding the pointer within
|
|
19
|
+
* `AUTO_SCROLL_EDGE` of either strip end auto-scrolls the hidden
|
|
20
|
+
* viewport — the Chrome-tabs gesture for reaching tabs that
|
|
21
|
+
* compressed past their floor. dnd-kit's own autoScroll is
|
|
22
|
+
* bypassed in favor of this explicit loop: the strip's flex
|
|
23
|
+
* compression reflows item rects mid-drag, which the rect-based
|
|
24
|
+
* detector tracks poorly. The loop arms for pointer drags only —
|
|
25
|
+
* a keyboard lift never feeds the pointer-position ref, so letting
|
|
26
|
+
* it run would scroll the strip under a stale clientX.
|
|
27
|
+
*
|
|
28
|
+
* The sortable wrappers sit between the tablist and its `<Tab>`
|
|
29
|
+
* children, which the plain TabList's menu collector cannot see
|
|
30
|
+
* through — the metas are collected over the unwrapped children
|
|
31
|
+
* here instead and handed down (`tabMetas`), keeping the ⋯
|
|
32
|
+
* overflow menu working unchanged.
|
|
33
|
+
*/
|
|
34
|
+
type SortableTabListProps = {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
className?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Receives `nextOrder` — the new sequence of original child indices —
|
|
39
|
+
* after a completed drag. Reorder the `<Tab>` children you pass
|
|
40
|
+
* accordingly; without a handler a drop only animates back to the
|
|
41
|
+
* source position.
|
|
42
|
+
*/
|
|
43
|
+
onReorder?: (nextOrder: number[]) => void;
|
|
44
|
+
};
|
|
45
|
+
export default function SortableTabList({ className, onReorder, children, }: SortableTabListProps): import("react").JSX.Element;
|
|
46
|
+
export type { SortableTabListProps };
|
|
@@ -1,8 +1,59 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
2
|
+
/** Document-tab status flavors — each maps to a dot color (see `TabStatusDot`). */
|
|
3
|
+
type TabStatus = 'dirty' | 'error' | 'syncing';
|
|
2
4
|
type TabProps = {
|
|
3
5
|
value: string;
|
|
6
|
+
/**
|
|
7
|
+
* Inline-start icon slot, decorative (`aria-hidden`) — pair it with a
|
|
8
|
+
* text label so the meaning survives screen readers.
|
|
9
|
+
*/
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Document-tab status indicator: a small dot after the label —
|
|
13
|
+
* `dirty` renders neutral (text-secondary), `error` danger,
|
|
14
|
+
* `syncing` primary. The dot itself is color-only decoration; the
|
|
15
|
+
* SR-visible status word appended to the tab's accessible name comes
|
|
16
|
+
* from `statusLabel` (or its per-status default).
|
|
17
|
+
*/
|
|
18
|
+
status?: TabStatus;
|
|
19
|
+
/**
|
|
20
|
+
* Overrides the status word appended to the accessible name when
|
|
21
|
+
* `status` is set — the i18n hook for SR users (the dot alone cannot
|
|
22
|
+
* carry meaning). Defaults come from the `tabs` locale pack
|
|
23
|
+
* (Unsaved changes / Error / Syncing).
|
|
24
|
+
*/
|
|
25
|
+
statusLabel?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Renders the × close affordance. Purely notifying: activating it
|
|
28
|
+
* calls `onClose` and nothing else — removing the tab from the
|
|
29
|
+
* (controlled) tabs array and picking the next active tab are the
|
|
30
|
+
* consumer's job. If the active tab is closed and the consumer does
|
|
31
|
+
* not remove it, the selection stays put on the still-rendered tab.
|
|
32
|
+
*
|
|
33
|
+
* Keyboard: the × is a real button, but not a tab stop — the strip
|
|
34
|
+
* keeps its single roving stop per the tabs pattern, and closing by
|
|
35
|
+
* keyboard rides the Delete key on the focused tab (APG deletable
|
|
36
|
+
* tabs).
|
|
37
|
+
*/
|
|
38
|
+
closable?: boolean;
|
|
39
|
+
/** Overrides the × button's aria-label (i18n hook). */
|
|
40
|
+
closeLabel?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Called when the user requests a close — × click, or Delete on the
|
|
43
|
+
* focused tab. The × click is stopped before it can reach the strip,
|
|
44
|
+
* so closing never selects the tab.
|
|
45
|
+
*/
|
|
46
|
+
onClose?: (event: ReactMouseEvent<HTMLSpanElement> | ReactKeyboardEvent<HTMLDivElement>) => void;
|
|
4
47
|
className?: string;
|
|
5
48
|
children: ReactNode;
|
|
6
49
|
};
|
|
7
|
-
|
|
8
|
-
|
|
50
|
+
/**
|
|
51
|
+
* The decorative status dot shared by `Tab` and the TabList overflow
|
|
52
|
+
* menu. Color-only by design (`aria-hidden`) — the SR-visible meaning
|
|
53
|
+
* rides the tab's accessible name via `statusLabel`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function TabStatusDot({ status }: {
|
|
56
|
+
status: TabStatus;
|
|
57
|
+
}): import("react").JSX.Element;
|
|
58
|
+
export default function Tab({ value, icon, status, statusLabel, closable, closeLabel, onClose, className, children, }: TabProps): import("react").JSX.Element;
|
|
59
|
+
export type { TabProps, TabStatus };
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { RefObject, ReactNode } from 'react';
|
|
2
|
+
import type { TabMeta } from './tab-metas';
|
|
2
3
|
type TabListProps = {
|
|
3
4
|
className?: string;
|
|
5
|
+
/** External handle on the strip's scroll viewport. SortableTabList
|
|
6
|
+
* passes its own ref so the drag clamp can measure the exact
|
|
7
|
+
* element the wrappers report as offsetParent. */
|
|
8
|
+
listRef?: RefObject<HTMLDivElement | null>;
|
|
9
|
+
/** Overrides the ⋯ overflow trigger's aria-label (i18n hook). */
|
|
10
|
+
overflowLabel?: string;
|
|
4
11
|
children: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Pre-collected tab metadata for the overflow menu — the
|
|
14
|
+
* SortableTabList passes its own collection because its
|
|
15
|
+
* `<Tab>` children sit inside sortable wrappers the
|
|
16
|
+
* internal collector cannot see through. Omit to collect
|
|
17
|
+
* from `children` (the plain-strip path).
|
|
18
|
+
*/
|
|
19
|
+
tabMetas?: TabMeta[];
|
|
5
20
|
};
|
|
6
21
|
/**
|
|
7
22
|
* The tab strip: a roving-tabindex list per the WAI-ARIA tabs pattern —
|
|
@@ -9,6 +24,15 @@ type TabListProps = {
|
|
|
9
24
|
* (selection follows focus), Home/End jump to the ends. Under
|
|
10
25
|
* `dir="rtl"` the horizontal arrows mirror (← advances), read from the
|
|
11
26
|
* DOM at event time so the keys follow the mirrored strip.
|
|
27
|
+
*
|
|
28
|
+
* Document-tab overflow: the strip itself stays `overflow-x: auto`
|
|
29
|
+
* (scrolling is the baseline, and the only gesture on touch), while a
|
|
30
|
+
* `⋯` menu button appears beside it once the tabs no longer fit. The
|
|
31
|
+
* menu lists every tab — name, icon and status dot — as a radio group
|
|
32
|
+
* bound to the active value, so any tab stays selectable even when
|
|
33
|
+
* scrolled out of view. Overflow is measured from `scrollWidth` vs
|
|
34
|
+
* `clientWidth` through a ResizeObserver (jsdom has neither layout nor
|
|
35
|
+
* the observer; there the strip simply renders menu-less).
|
|
12
36
|
*/
|
|
13
|
-
export default function TabList({ className, children }: TabListProps): import("react").JSX.Element;
|
|
37
|
+
export default function TabList({ className, listRef: listRefProp, overflowLabel, children, tabMetas, }: TabListProps): import("react").JSX.Element;
|
|
14
38
|
export type { TabListProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge auto-scroll math for SortableTabList — sibling module per
|
|
3
|
+
* the react-refresh only-export-components rule (Button/styles.ts,
|
|
4
|
+
* Grid/grid-item-styles.ts precedents). Pure so tests can
|
|
5
|
+
* exercise the gesture without layout. Not part of the barrel.
|
|
6
|
+
*/
|
|
7
|
+
/** Distance from either strip end that arms the auto-scroll, and
|
|
8
|
+
* the steady scroll pace applied per animation frame. */
|
|
9
|
+
export declare const AUTO_SCROLL_EDGE = 48;
|
|
10
|
+
export declare const AUTO_SCROLL_STEP = 10;
|
|
11
|
+
/** Per-frame auto-scroll delta for a pointer hovering the strip's
|
|
12
|
+
* ends: positive scrolls toward the right end, negative toward the
|
|
13
|
+
* left, zero mid-strip. The edge zones are inclusive. */
|
|
14
|
+
export declare function edgeScrollDelta(stripRect: {
|
|
15
|
+
left: number;
|
|
16
|
+
right: number;
|
|
17
|
+
}, pointerX: number): number;
|
|
@@ -4,6 +4,8 @@ export type { TabsClassNames } from './TabsContext';
|
|
|
4
4
|
export { default as TabList } from './TabList';
|
|
5
5
|
export type { TabListProps } from './TabList';
|
|
6
6
|
export { default as Tab } from './Tab';
|
|
7
|
-
export type { TabProps } from './Tab';
|
|
7
|
+
export type { TabProps, TabStatus } from './Tab';
|
|
8
8
|
export { default as TabPanel } from './TabPanel';
|
|
9
9
|
export type { TabPanelProps } from './TabPanel';
|
|
10
|
+
export { default as SortableTabList } from './SortableTabList';
|
|
11
|
+
export type { SortableTabListProps } from './SortableTabList';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TabStatus } from './Tab';
|
|
3
|
+
export type TabMeta = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
status?: TabStatus;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* `<Tab>` children in DOM order for the overflow menu: arrays and
|
|
11
|
+
* Fragments flatten. Anything else between the tabs is left alone —
|
|
12
|
+
* it stays reachable through the strip's scroll, it just is not
|
|
13
|
+
* listed in the menu. Exported so SortableTabList — whose `<Tab>`
|
|
14
|
+
* children sit inside sortable wrappers this collector cannot see
|
|
15
|
+
* through — can gather the same metas itself and hand them over.
|
|
16
|
+
*
|
|
17
|
+
* Lives in a sibling file (not TabList.tsx) so the component file
|
|
18
|
+
* keeps a components-only export surface for react-refresh.
|
|
19
|
+
*/
|
|
20
|
+
export declare function collectTabMetas(children: ReactNode): TabMeta[];
|