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
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { Ref } from 'react';
|
|
2
|
-
import type { CalendarPickerMode } from '../Calendar/Calendar';
|
|
2
|
+
import type { CalendarCellRender, CalendarPickerMode } from '../Calendar/Calendar';
|
|
3
3
|
/** One shortcut row at the top of the dropdown panel: clicking applies
|
|
4
4
|
* `value` (serialized per `picker`) and closes the panel. */
|
|
5
5
|
type DatepickerPreset = {
|
|
6
6
|
/** Visible row copy. */
|
|
7
7
|
label: string;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
8
|
+
/**
|
|
9
|
+
* Applied value — "YYYY-MM-DD" (date), an ISO week "YYYY-Www" (week),
|
|
10
|
+
* "YYYY-MM" (month), "YYYY-Qn" (quarter) or "YYYY" (year), matching
|
|
11
|
+
* `picker`. With a custom `format`, presets carry the consumer's own
|
|
12
|
+
* serialization and pass through untouched.
|
|
13
|
+
*/
|
|
10
14
|
value: string;
|
|
11
15
|
};
|
|
12
16
|
type DatepickerCoreProps = {
|
|
@@ -20,22 +24,48 @@ type DatepickerCoreProps = {
|
|
|
20
24
|
min?: string;
|
|
21
25
|
max?: string;
|
|
22
26
|
/** Disables individual dates on the panel's Calendar (see Calendar's
|
|
23
|
-
* `disabledDate`).
|
|
27
|
+
* `disabledDate`). Applies to the day grid and the header drill-down
|
|
28
|
+
* grids alike. */
|
|
24
29
|
disabledDate?: (date: Date) => boolean;
|
|
25
30
|
/** Shortcut rows rendered above the calendar; clicking applies the
|
|
26
31
|
* preset and closes the panel. */
|
|
27
32
|
presets?: DatepickerPreset[];
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* `
|
|
32
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Renders a time input below the calendar; `value` serializes as
|
|
35
|
+
* `"YYYY-MM-DD HH:mm"`, or with seconds as `"YYYY-MM-DD HH:mm:ss"`
|
|
36
|
+
* (`{ seconds: true }`). Applies to the default date granularity
|
|
37
|
+
* only; without it the value keeps the plain `"YYYY-MM-DD"` format
|
|
38
|
+
* (plain-date and minute-precision values stay accepted in seconds
|
|
39
|
+
* mode — the missing parts read as `00`).
|
|
40
|
+
*/
|
|
41
|
+
showTime?: boolean | {
|
|
42
|
+
seconds?: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Custom serialization hook: when provided, picks serialize through
|
|
46
|
+
* it (`format(date-of-pick)`) instead of the built-in
|
|
47
|
+
* `"YYYY-MM-DD [HH:mm[:ss]]"` format, and the trigger input displays
|
|
48
|
+
* the resulting string verbatim. Pair with `parse` so a controlled
|
|
49
|
+
* value round-trips back into the calendar's anchor and highlight.
|
|
50
|
+
*/
|
|
51
|
+
format?: (date: Date) => string;
|
|
52
|
+
/**
|
|
53
|
+
* Custom parse hook (the `format` counterpart): reads the value
|
|
54
|
+
* string back into a Date for the calendar's month view, day
|
|
55
|
+
* highlight and the time input. Returns `null` for text it does not
|
|
56
|
+
* recognize (the calendar then opens unanchored). The trigger stays
|
|
57
|
+
* readOnly — parsing serves controlled-value display, not typing.
|
|
58
|
+
*/
|
|
59
|
+
parse?: (text: string) => Date | null;
|
|
33
60
|
locale?: string;
|
|
34
61
|
weekStartsOn?: 0 | 1;
|
|
35
62
|
placeholder?: string;
|
|
36
63
|
className?: string;
|
|
64
|
+
/** Appends custom content inside the panel's picker cells (see
|
|
65
|
+
* Calendar's `cellRender`). */
|
|
66
|
+
cellRender?: CalendarCellRender;
|
|
37
67
|
/** Forwarded to the trigger `<input>` (not the wrapper div). */
|
|
38
68
|
ref?: Ref<HTMLInputElement>;
|
|
39
69
|
};
|
|
40
|
-
export default function DatepickerCore({ value, onChange, open, onOpenChange, picker, min, max, disabledDate, presets, showTime, locale, weekStartsOn, placeholder, className, ref, }: DatepickerCoreProps): import("react").JSX.Element;
|
|
70
|
+
export default function DatepickerCore({ value, onChange, open, onOpenChange, picker, min, max, disabledDate, presets, showTime, format, parse, locale, weekStartsOn, cellRender, placeholder, className, ref, }: DatepickerCoreProps): import("react").JSX.Element;
|
|
41
71
|
export type { DatepickerCoreProps, DatepickerPreset };
|
|
@@ -3,25 +3,47 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The combined value is the day-grid `"YYYY-MM-DD"` value (see
|
|
5
5
|
* Calendar/date.ts — a local civil date, never a UTC timestamp) plus a
|
|
6
|
-
* space and a 24-hour
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* space and a 24-hour time: `"YYYY-MM-DD HH:mm"`, or
|
|
7
|
+
* `"YYYY-MM-DD HH:mm:ss"` when `showTime` asks for seconds
|
|
8
|
+
* (`{ seconds: true }`). Without `showTime` the value keeps the plain
|
|
9
|
+
* date format, and a plain date stays a valid input with `showTime` on
|
|
10
|
+
* (the time then reads as unset, defaulting to midnight on the next
|
|
11
|
+
* pick).
|
|
10
12
|
*/
|
|
11
13
|
/**
|
|
12
14
|
* Split a value into its date and time parts. Accepts the combined
|
|
13
|
-
* `"YYYY-MM-DD HH:mm"`
|
|
14
|
-
* `
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* `"YYYY-MM-DD HH:mm"` and `"YYYY-MM-DD HH:mm:ss"` forms (returning
|
|
16
|
+
* `time` in the same shape — with seconds only when the input had them)
|
|
17
|
+
* and the bare `"YYYY-MM-DD"` form (returning `time: null` — the
|
|
18
|
+
* backward-compatible pure-date value). Returns `null` for anything that
|
|
19
|
+
* is not a real calendar date, leaving the caller free to fall back to
|
|
20
|
+
* empty.
|
|
17
21
|
*/
|
|
18
22
|
export declare function splitDateTimeValue(value: string): {
|
|
19
23
|
date: string;
|
|
20
24
|
time: string | null;
|
|
21
25
|
} | null;
|
|
22
26
|
/**
|
|
23
|
-
* Combine a `"YYYY-MM-DD"` date and an `"HH:mm"`
|
|
24
|
-
*
|
|
25
|
-
*
|
|
27
|
+
* Combine a `"YYYY-MM-DD"` date and an `"HH:mm"` / `"HH:mm:ss"` time
|
|
28
|
+
* into the combined value. Pure string join — both inputs are expected
|
|
29
|
+
* in their already-serialized forms.
|
|
26
30
|
*/
|
|
27
31
|
export declare function formatDateTimeValue(date: string, time: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Match a parsed time to the active precision: seconds mode pads a
|
|
34
|
+
* minute-only value with `:00`, minute mode drops stray seconds. Pure
|
|
35
|
+
* string math over the `"HH:mm"` / `"HH:mm:ss"` shapes.
|
|
36
|
+
*/
|
|
37
|
+
export declare function normalizeTime(time: string, seconds: boolean): string;
|
|
38
|
+
/**
|
|
39
|
+
* Serialize a Date's wall-clock time as the `"HH:mm"` (or
|
|
40
|
+
* `"HH:mm:ss"` with `seconds`) string the combined value and the time
|
|
41
|
+
* input use. Inverse of {@link applyTimeToCivilDate} for the time part.
|
|
42
|
+
*/
|
|
43
|
+
export declare function timeOf(date: Date, seconds: boolean): string;
|
|
44
|
+
/**
|
|
45
|
+
* Apply an `"HH:mm"` / `"HH:mm:ss"` string to a civil date's local
|
|
46
|
+
* wall clock, returning a new Date (the input is untouched). Feeds the
|
|
47
|
+
* consumer `format` hook, which serializes whole Date objects.
|
|
48
|
+
*/
|
|
49
|
+
export declare function applyTimeToCivilDate(date: Date, time: string): Date;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from 'react';
|
|
2
2
|
import type { ControlOrValue } from 'react-use-control';
|
|
3
3
|
import type { CollisionPadding } from '../../utils/collision';
|
|
4
|
+
import type { MenuDataItem } from '../../utils/menuItems';
|
|
4
5
|
/**
|
|
5
6
|
* Imperative handle exposed through the React 19 `ref` prop (same API
|
|
6
7
|
* choice as VirtualList). `open`/`close` run through the same
|
|
@@ -28,9 +29,18 @@ type DropdownMenuProps = {
|
|
|
28
29
|
* to all four edges, an object per edge.
|
|
29
30
|
*/
|
|
30
31
|
collisionPadding?: CollisionPadding;
|
|
31
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Data-driven alternative to composed children: plain items,
|
|
34
|
+
* checkboxes, radio groups, labeled groups, dividers and nested
|
|
35
|
+
* submenus, rendered through the same components the compound API
|
|
36
|
+
* uses. When passed, it replaces the children with a default `⋯`
|
|
37
|
+
* trigger plus the content built from the data.
|
|
38
|
+
*/
|
|
39
|
+
items?: MenuDataItem[];
|
|
40
|
+
children?: ReactNode;
|
|
32
41
|
className?: string;
|
|
33
42
|
ref?: Ref<DropdownMenuHandle>;
|
|
34
43
|
};
|
|
35
|
-
export default function DropdownMenu({ open: openControl, onOpenChange, collisionPadding, children, className, ref, }: DropdownMenuProps): import("react").JSX.Element;
|
|
44
|
+
export default function DropdownMenu({ open: openControl, onOpenChange, collisionPadding, items, children, className, ref, }: DropdownMenuProps): import("react").JSX.Element;
|
|
36
45
|
export type { DropdownMenuProps, DropdownMenuHandle };
|
|
46
|
+
export type { MenuDataItem as DropdownMenuDataItem };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
+
type DropdownMenuCheckboxItemProps = {
|
|
4
|
+
/** Whether the option is checked — controlled control or uncontrolled initial value. */
|
|
5
|
+
checked?: ControlOrValue<boolean>;
|
|
6
|
+
/** Fires on every toggle, whatever drove it (click, Enter, Space). */
|
|
7
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Danger skin for destructive actions: danger-colored text and interaction states. */
|
|
10
|
+
danger?: boolean;
|
|
11
|
+
/** Inline-start icon slot; bare `svg` children are sized to 1em by the slot. */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** Inline-end shortcut hint (e.g. '⌘C'), muted and pushed to the item's end. */
|
|
14
|
+
kbdLabel?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A toggleable menu option (`role="menuitemcheckbox"`): click, Enter or
|
|
20
|
+
* Space flips `checked`; the state is controllable through the standard
|
|
21
|
+
* `ControlOrValue` prop. Toggling keeps the menu open — several options
|
|
22
|
+
* are typically flipped in one visit (unlike a plain item, which
|
|
23
|
+
* closes the menu on activation).
|
|
24
|
+
*/
|
|
25
|
+
export default function DropdownMenuCheckboxItem({ checked: checkedControl, onCheckedChange, disabled, danger, icon, kbdLabel, className, children, }: DropdownMenuCheckboxItemProps): import("react").JSX.Element;
|
|
26
|
+
export type { DropdownMenuCheckboxItemProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type DropdownMenuGroupProps = {
|
|
3
|
+
/** Non-interactive heading naming the group (aria-labelledby). */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
/** The group's menu items. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A labeled, non-interactive section of menu items (`role="group"`
|
|
11
|
+
* named by its heading, the ARIA APG menu group shape). The heading is
|
|
12
|
+
* not a menu item: keyboard traversal, typeahead and the roving tab
|
|
13
|
+
* stop skip it entirely.
|
|
14
|
+
*/
|
|
15
|
+
export default function DropdownMenuGroup({ label, className, children, }: DropdownMenuGroupProps): import("react").JSX.Element;
|
|
16
|
+
export type { DropdownMenuGroupProps };
|
|
@@ -3,7 +3,13 @@ type DropdownMenuItemProps = {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
onClick?: () => void;
|
|
5
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;
|
|
6
12
|
className?: string;
|
|
7
13
|
};
|
|
8
|
-
export default function DropdownMenuItem({ children, onClick, disabled, className }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
14
|
+
export default function DropdownMenuItem({ children, onClick, disabled, danger, icon, kbdLabel, className, }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
9
15
|
export type { DropdownMenuItemProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
+
type DropdownMenuRadioGroupProps = {
|
|
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 `DropdownMenuRadioItem`s. */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* State container for a single-select cluster of
|
|
16
|
+
* `DropdownMenuRadioItem`s (`role="group"`): owns the selected value
|
|
17
|
+
* through the standard `ControlOrValue` prop and exposes it to the
|
|
18
|
+
* items.
|
|
19
|
+
*/
|
|
20
|
+
export default function DropdownMenuRadioGroup({ value, onValueChange, label, className, children, }: DropdownMenuRadioGroupProps): import("react").JSX.Element;
|
|
21
|
+
export type { DropdownMenuRadioGroupProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type DropdownMenuRadioItemProps = {
|
|
3
|
+
/** Value this option selects in its DropdownMenuRadioGroup 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 DropdownMenuRadioGroup (`role="menuitemradio"`):
|
|
17
|
+
* activating it (click, Enter, Space) selects its `value` in the
|
|
18
|
+
* group — the previously selected sibling deselects. Selecting keeps
|
|
19
|
+
* the menu open. Must live inside a `DropdownMenuRadioGroup`.
|
|
20
|
+
*/
|
|
21
|
+
export default function DropdownMenuRadioItem({ value, disabled, danger, icon, kbdLabel, className, children, }: DropdownMenuRadioItemProps): import("react").JSX.Element;
|
|
22
|
+
export type { DropdownMenuRadioItemProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared slot and variant skins for the DropdownMenu family's item
|
|
3
|
+
* types (DropdownMenuItem, DropdownMenuCheckboxItem,
|
|
4
|
+
* DropdownMenuRadioItem). Merged after each item's base class so the
|
|
5
|
+
* overrides win on equal specificity.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Danger skin for destructive actions: danger-colored text with a
|
|
9
|
+
* danger-subtle interaction background.
|
|
10
|
+
*/
|
|
11
|
+
export declare const dropdownMenuItemDanger: import("@linaria/core").LinariaClassName;
|
|
12
|
+
/**
|
|
13
|
+
* Inline-start icon slot. The slot sizes bare `svg` children to 1em —
|
|
14
|
+
* an svg without intrinsic dimensions collapses to 0×0 inside flex.
|
|
15
|
+
*/
|
|
16
|
+
export declare const dropdownMenuItemIcon: import("@linaria/core").LinariaClassName;
|
|
17
|
+
/**
|
|
18
|
+
* Inline-end shortcut hint (e.g. '⌘C'): muted, monospaced, pushed to
|
|
19
|
+
* the item's inline end.
|
|
20
|
+
*/
|
|
21
|
+
export declare const dropdownMenuItemKbd: import("@linaria/core").LinariaClassName;
|
|
22
|
+
/**
|
|
23
|
+
* Fixed-size state indicator box (check/dot) for checkbox and radio
|
|
24
|
+
* items: reserves its square whether or not the glyph renders, so
|
|
25
|
+
* labels align across mixed items.
|
|
26
|
+
*/
|
|
27
|
+
export declare const dropdownMenuItemIndicator: import("@linaria/core").LinariaClassName;
|
|
28
|
+
/** Group heading: muted, one step smaller than item text. Shared by DropdownMenuGroup and DropdownMenuRadioGroup's optional label. */
|
|
29
|
+
export declare const dropdownMenuGroupLabel: import("@linaria/core").LinariaClassName;
|
|
@@ -2,14 +2,22 @@ export { default as DropdownMenu } from './DropdownMenu';
|
|
|
2
2
|
export { default as DropdownMenuTrigger } from './DropdownMenuTrigger';
|
|
3
3
|
export { default as DropdownMenuContent } from './DropdownMenuContent';
|
|
4
4
|
export { default as DropdownMenuItem } from './DropdownMenuItem';
|
|
5
|
+
export { default as DropdownMenuCheckboxItem } from './DropdownMenuCheckboxItem';
|
|
6
|
+
export { default as DropdownMenuRadioGroup } from './DropdownMenuRadioGroup';
|
|
7
|
+
export { default as DropdownMenuRadioItem } from './DropdownMenuRadioItem';
|
|
8
|
+
export { default as DropdownMenuGroup } from './DropdownMenuGroup';
|
|
5
9
|
export { default as DropdownMenuSeparator } from './DropdownMenuSeparator';
|
|
6
10
|
export { default as DropdownMenuSub } from './DropdownMenuSub';
|
|
7
11
|
export { default as DropdownMenuSubTrigger } from './DropdownMenuSubTrigger';
|
|
8
12
|
export { default as DropdownMenuSubContent } from './DropdownMenuSubContent';
|
|
9
|
-
export type { DropdownMenuProps, DropdownMenuHandle } from './DropdownMenu';
|
|
13
|
+
export type { DropdownMenuProps, DropdownMenuHandle, DropdownMenuDataItem } from './DropdownMenu';
|
|
10
14
|
export type { DropdownMenuTriggerProps } from './DropdownMenuTrigger';
|
|
11
15
|
export type { DropdownMenuContentProps } from './DropdownMenuContent';
|
|
12
16
|
export type { DropdownMenuItemProps } from './DropdownMenuItem';
|
|
17
|
+
export type { DropdownMenuCheckboxItemProps } from './DropdownMenuCheckboxItem';
|
|
18
|
+
export type { DropdownMenuRadioGroupProps } from './DropdownMenuRadioGroup';
|
|
19
|
+
export type { DropdownMenuRadioItemProps } from './DropdownMenuRadioItem';
|
|
20
|
+
export type { DropdownMenuGroupProps } from './DropdownMenuGroup';
|
|
13
21
|
export type { DropdownMenuSeparatorProps } from './DropdownMenuSeparator';
|
|
14
22
|
export type { DropdownMenuSubProps } from './DropdownMenuSub';
|
|
15
23
|
export type { DropdownMenuSubTriggerProps } from './DropdownMenuSubTrigger';
|
|
@@ -30,5 +30,6 @@ type FullscreenProps = {
|
|
|
30
30
|
*/
|
|
31
31
|
export default function Fullscreen({ fullscreen: fullscreenControl, onChange, target, children, }: FullscreenProps): ReactElement<{
|
|
32
32
|
onClick?: MouseEventEventHandler;
|
|
33
|
+
'data-slot'?: string;
|
|
33
34
|
}, string | import("react").JSXElementConstructor<any>>;
|
|
34
35
|
export type { FullscreenProps };
|
|
@@ -2,8 +2,15 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
type GridProps = {
|
|
3
3
|
columns?: number;
|
|
4
4
|
gap?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Enables a container-query context (`container-type: inline-size`) so
|
|
7
|
+
* GridItem `sm`/`md`/`lg` breakpoints respond to the grid's own width
|
|
8
|
+
* instead of the viewport. Defaults to false, which keeps the DOM exactly
|
|
9
|
+
* that of a plain grid.
|
|
10
|
+
*/
|
|
11
|
+
responsive?: boolean;
|
|
5
12
|
className?: string;
|
|
6
13
|
children: ReactNode;
|
|
7
14
|
};
|
|
8
|
-
export default function Grid({ columns, gap, className, children, }: GridProps): import("react").JSX.Element;
|
|
15
|
+
export default function Grid({ columns, gap, responsive, className, children, }: GridProps): import("react").JSX.Element;
|
|
9
16
|
export type { GridProps };
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
type GridItemProps = {
|
|
3
|
+
/** Number of columns to span */
|
|
3
4
|
span?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Grid column start line. Preserved across breakpoints when combined with
|
|
7
|
+
* `sm`/`md`/`lg` — the container queries override only the span.
|
|
8
|
+
*/
|
|
4
9
|
start?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Columns to span (1-12) once the grid container is at least 384px wide.
|
|
12
|
+
* Only takes effect inside a `responsive` Grid; without one the container
|
|
13
|
+
* query never matches and the item degrades to `span`.
|
|
14
|
+
*/
|
|
15
|
+
sm?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
16
|
+
/**
|
|
17
|
+
* Columns to span (1-12) once the grid container is at least 576px wide.
|
|
18
|
+
* Only takes effect inside a `responsive` Grid; without one the container
|
|
19
|
+
* query never matches and the item degrades to `span`.
|
|
20
|
+
*/
|
|
21
|
+
md?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
22
|
+
/**
|
|
23
|
+
* Columns to span (1-12) once the grid container is at least 768px wide.
|
|
24
|
+
* Only takes effect inside a `responsive` Grid; without one the container
|
|
25
|
+
* query never matches and the item degrades to `span`.
|
|
26
|
+
*/
|
|
27
|
+
lg?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
5
28
|
className?: string;
|
|
6
29
|
children: ReactNode;
|
|
7
30
|
};
|
|
8
|
-
export default function GridItem({ span, start, className, children, }: GridItemProps): import("react").JSX.Element;
|
|
31
|
+
export default function GridItem({ span, start, sm, md, lg, className, children, }: GridItemProps): import("react").JSX.Element;
|
|
9
32
|
export type { GridItemProps };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare const spanClasses: {
|
|
2
|
+
readonly 1: import("@linaria/core").LinariaClassName;
|
|
3
|
+
readonly 2: import("@linaria/core").LinariaClassName;
|
|
4
|
+
readonly 3: import("@linaria/core").LinariaClassName;
|
|
5
|
+
readonly 4: import("@linaria/core").LinariaClassName;
|
|
6
|
+
readonly 5: import("@linaria/core").LinariaClassName;
|
|
7
|
+
readonly 6: import("@linaria/core").LinariaClassName;
|
|
8
|
+
readonly 7: import("@linaria/core").LinariaClassName;
|
|
9
|
+
readonly 8: import("@linaria/core").LinariaClassName;
|
|
10
|
+
readonly 9: import("@linaria/core").LinariaClassName;
|
|
11
|
+
readonly 10: import("@linaria/core").LinariaClassName;
|
|
12
|
+
readonly 11: import("@linaria/core").LinariaClassName;
|
|
13
|
+
readonly 12: import("@linaria/core").LinariaClassName;
|
|
14
|
+
};
|
|
15
|
+
declare const smSpans: {
|
|
16
|
+
readonly 1: import("@linaria/core").LinariaClassName;
|
|
17
|
+
readonly 2: import("@linaria/core").LinariaClassName;
|
|
18
|
+
readonly 3: import("@linaria/core").LinariaClassName;
|
|
19
|
+
readonly 4: import("@linaria/core").LinariaClassName;
|
|
20
|
+
readonly 5: import("@linaria/core").LinariaClassName;
|
|
21
|
+
readonly 6: import("@linaria/core").LinariaClassName;
|
|
22
|
+
readonly 7: import("@linaria/core").LinariaClassName;
|
|
23
|
+
readonly 8: import("@linaria/core").LinariaClassName;
|
|
24
|
+
readonly 9: import("@linaria/core").LinariaClassName;
|
|
25
|
+
readonly 10: import("@linaria/core").LinariaClassName;
|
|
26
|
+
readonly 11: import("@linaria/core").LinariaClassName;
|
|
27
|
+
readonly 12: import("@linaria/core").LinariaClassName;
|
|
28
|
+
};
|
|
29
|
+
declare const mdSpans: {
|
|
30
|
+
readonly 1: import("@linaria/core").LinariaClassName;
|
|
31
|
+
readonly 2: import("@linaria/core").LinariaClassName;
|
|
32
|
+
readonly 3: import("@linaria/core").LinariaClassName;
|
|
33
|
+
readonly 4: import("@linaria/core").LinariaClassName;
|
|
34
|
+
readonly 5: import("@linaria/core").LinariaClassName;
|
|
35
|
+
readonly 6: import("@linaria/core").LinariaClassName;
|
|
36
|
+
readonly 7: import("@linaria/core").LinariaClassName;
|
|
37
|
+
readonly 8: import("@linaria/core").LinariaClassName;
|
|
38
|
+
readonly 9: import("@linaria/core").LinariaClassName;
|
|
39
|
+
readonly 10: import("@linaria/core").LinariaClassName;
|
|
40
|
+
readonly 11: import("@linaria/core").LinariaClassName;
|
|
41
|
+
readonly 12: import("@linaria/core").LinariaClassName;
|
|
42
|
+
};
|
|
43
|
+
declare const lgSpans: {
|
|
44
|
+
readonly 1: import("@linaria/core").LinariaClassName;
|
|
45
|
+
readonly 2: import("@linaria/core").LinariaClassName;
|
|
46
|
+
readonly 3: import("@linaria/core").LinariaClassName;
|
|
47
|
+
readonly 4: import("@linaria/core").LinariaClassName;
|
|
48
|
+
readonly 5: import("@linaria/core").LinariaClassName;
|
|
49
|
+
readonly 6: import("@linaria/core").LinariaClassName;
|
|
50
|
+
readonly 7: import("@linaria/core").LinariaClassName;
|
|
51
|
+
readonly 8: import("@linaria/core").LinariaClassName;
|
|
52
|
+
readonly 9: import("@linaria/core").LinariaClassName;
|
|
53
|
+
readonly 10: import("@linaria/core").LinariaClassName;
|
|
54
|
+
readonly 11: import("@linaria/core").LinariaClassName;
|
|
55
|
+
readonly 12: import("@linaria/core").LinariaClassName;
|
|
56
|
+
};
|
|
57
|
+
export { lgSpans, mdSpans, smSpans, spanClasses };
|
|
@@ -45,5 +45,5 @@ type HoverCardProps = {
|
|
|
45
45
|
/** The trigger — render a focusable element for keyboard access. */
|
|
46
46
|
children: ReactNode;
|
|
47
47
|
};
|
|
48
|
-
export default function HoverCard({ content, openDelay, closeDelay, placement, open: openControl, collisionPadding, className, children, }: HoverCardProps): import("react").JSX.Element;
|
|
48
|
+
export default function HoverCard({ content, openDelay: openDelayProp, closeDelay: closeDelayProp, placement, open: openControl, collisionPadding, className, children, }: HoverCardProps): import("react").JSX.Element;
|
|
49
49
|
export type { HoverCardProps };
|
|
@@ -3,6 +3,15 @@ type ListProps = {
|
|
|
3
3
|
variant?: 'unordered' | 'ordered' | 'none';
|
|
4
4
|
className?: string;
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Explicit load-more area rendered as the final list item. Zero
|
|
8
|
+
* policy: the consumer decides what appears — a "Load more" button, a
|
|
9
|
+
* skeleton, a spinner. Pair it with whatever triggers the next page:
|
|
10
|
+
* the consumer's own scroll logic (e.g. VirtualList `onEndReached`
|
|
11
|
+
* driving the data) or a plain button inside the slot; the slot itself
|
|
12
|
+
* has no behavior.
|
|
13
|
+
*/
|
|
14
|
+
loadMore?: ReactNode;
|
|
6
15
|
};
|
|
7
|
-
export default function List({ variant, className, children, }: ListProps): import("react").JSX.Element;
|
|
16
|
+
export default function List({ variant, className, children, loadMore, }: ListProps): import("react").JSX.Element;
|
|
8
17
|
export type { ListProps };
|
|
@@ -95,6 +95,11 @@ declare const defaultStrings: {
|
|
|
95
95
|
colorPicker: {
|
|
96
96
|
pickColor: string;
|
|
97
97
|
hexColor: string;
|
|
98
|
+
saturationBrightness: string;
|
|
99
|
+
hue: string;
|
|
100
|
+
alpha: string;
|
|
101
|
+
presetsLabel: string;
|
|
102
|
+
recentColors: string;
|
|
98
103
|
};
|
|
99
104
|
confirmDialog: {
|
|
100
105
|
confirm: string;
|
|
@@ -175,6 +180,13 @@ declare const defaultStrings: {
|
|
|
175
180
|
pagination: {
|
|
176
181
|
previous: string;
|
|
177
182
|
next: string;
|
|
183
|
+
sizeLabel: string;
|
|
184
|
+
sizeOption: string;
|
|
185
|
+
jumperLabel: string;
|
|
186
|
+
jumperPrefix: string;
|
|
187
|
+
jumperSuffix: string;
|
|
188
|
+
ellipsisBackward: string;
|
|
189
|
+
ellipsisForward: string;
|
|
178
190
|
};
|
|
179
191
|
passwordInput: {
|
|
180
192
|
label: string;
|
|
@@ -217,6 +229,16 @@ declare const defaultStrings: {
|
|
|
217
229
|
expand: string;
|
|
218
230
|
collapse: string;
|
|
219
231
|
};
|
|
232
|
+
streamingText: {
|
|
233
|
+
generating: string;
|
|
234
|
+
};
|
|
235
|
+
tabs: {
|
|
236
|
+
close: string;
|
|
237
|
+
moreTabs: string;
|
|
238
|
+
statusDirty: string;
|
|
239
|
+
statusError: string;
|
|
240
|
+
statusSyncing: string;
|
|
241
|
+
};
|
|
220
242
|
tag: {
|
|
221
243
|
remove: string;
|
|
222
244
|
};
|
|
@@ -232,6 +254,15 @@ declare const defaultStrings: {
|
|
|
232
254
|
thinkingIndicator: {
|
|
233
255
|
text: string;
|
|
234
256
|
};
|
|
257
|
+
timePicker: {
|
|
258
|
+
now: string;
|
|
259
|
+
hour: string;
|
|
260
|
+
minute: string;
|
|
261
|
+
second: string;
|
|
262
|
+
period: string;
|
|
263
|
+
am: string;
|
|
264
|
+
pm: string;
|
|
265
|
+
};
|
|
235
266
|
toast: {
|
|
236
267
|
loading: string;
|
|
237
268
|
success: string;
|
|
@@ -8,7 +8,16 @@ type LogEntry = {
|
|
|
8
8
|
type LogViewerProps = {
|
|
9
9
|
logs: LogEntry[];
|
|
10
10
|
filter?: ControlOrValue<LogLevel | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Infinite-scroll trigger on the log body's scrollport: fired when the
|
|
13
|
+
* scroll position comes within 200px of the end. Entering the zone
|
|
14
|
+
* fires once; staying inside does not re-fire; scrolling back out
|
|
15
|
+
* re-arms, and growth of the rendered (filtered) entries re-arms too,
|
|
16
|
+
* so a still-short list chains straight into the next page. Typical
|
|
17
|
+
* use: append the next page of `logs`. Ignored when not provided.
|
|
18
|
+
*/
|
|
19
|
+
onLoadMore?: () => void;
|
|
11
20
|
className?: string;
|
|
12
21
|
};
|
|
13
|
-
export default function LogViewer({ logs, filter: filterControl, className }: LogViewerProps): import("react").JSX.Element;
|
|
22
|
+
export default function LogViewer({ logs, filter: filterControl, onLoadMore, className }: LogViewerProps): import("react").JSX.Element;
|
|
14
23
|
export type { LogViewerProps, LogEntry, LogLevel };
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
+
import type { MenuDataItem } from '../../utils/menuItems';
|
|
3
4
|
type MenuProps = {
|
|
4
5
|
open?: ControlOrValue<boolean>;
|
|
5
6
|
trigger?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Data-driven alternative to composed children: plain items,
|
|
9
|
+
* checkboxes, radio groups, labeled groups, dividers and nested
|
|
10
|
+
* submenus, rendered through the same components the compound API
|
|
11
|
+
* uses. When passed, it replaces the panel's children.
|
|
12
|
+
*/
|
|
13
|
+
items?: MenuDataItem[];
|
|
6
14
|
className?: string;
|
|
7
|
-
children
|
|
15
|
+
children?: ReactNode;
|
|
8
16
|
};
|
|
9
|
-
export default function Menu({ open: openControl, trigger, className, children, }: MenuProps): import("react").JSX.Element;
|
|
17
|
+
export default function Menu({ open: openControl, trigger, items, className, children, }: MenuProps): import("react").JSX.Element;
|
|
10
18
|
export type { MenuProps };
|
|
19
|
+
export type { MenuDataItem };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
+
type MenuCheckboxItemProps = {
|
|
4
|
+
/** Whether the option is checked — controlled control or uncontrolled initial value. */
|
|
5
|
+
checked?: ControlOrValue<boolean>;
|
|
6
|
+
/** Fires on every toggle, whatever drove it (click, Enter, Space). */
|
|
7
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Danger skin for destructive actions: danger-colored text and interaction states. */
|
|
10
|
+
danger?: boolean;
|
|
11
|
+
/** Inline-start icon slot; bare `svg` children are sized to 1em by the slot. */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** Inline-end shortcut hint (e.g. '⌘C'), muted and pushed to the item's end. */
|
|
14
|
+
kbdLabel?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A toggleable menu option (`role="menuitemcheckbox"`): click, Enter or
|
|
20
|
+
* Space flips `checked`; the state is controllable through the standard
|
|
21
|
+
* `ControlOrValue` prop. Unlike a plain item, toggling does not close
|
|
22
|
+
* the menu — several options are typically flipped in one visit.
|
|
23
|
+
*/
|
|
24
|
+
export default function MenuCheckboxItem({ checked: checkedControl, onCheckedChange, disabled, danger, icon, kbdLabel, className, children, }: MenuCheckboxItemProps): import("react").JSX.Element;
|
|
25
|
+
export type { MenuCheckboxItemProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type MenuGroupProps = {
|
|
3
|
+
/** Non-interactive heading naming the group (aria-labelledby). */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
/** The group's menu items. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A labeled, non-interactive section of menu items (`role="group"`
|
|
11
|
+
* named by its heading, the ARIA APG menu group shape). The heading is
|
|
12
|
+
* not a menu item: keyboard traversal, typeahead and the roving tab
|
|
13
|
+
* stop skip it entirely.
|
|
14
|
+
*/
|
|
15
|
+
export default function MenuGroup({ label, className, children }: MenuGroupProps): import("react").JSX.Element;
|
|
16
|
+
export type { MenuGroupProps };
|
|
@@ -2,8 +2,14 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
type MenuItemProps = {
|
|
3
3
|
onSelect?: () => void;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
/** Danger skin for destructive actions: danger-colored text and interaction states. */
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
/** Inline-start icon slot; bare `svg` children are sized to 1em by the slot. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Inline-end shortcut hint (e.g. '⌘C'), muted and pushed to the item's end. */
|
|
10
|
+
kbdLabel?: ReactNode;
|
|
5
11
|
className?: string;
|
|
6
12
|
children: ReactNode;
|
|
7
13
|
};
|
|
8
|
-
export default function MenuItem({ onSelect, disabled, className, children, }: MenuItemProps): import("react").JSX.Element;
|
|
14
|
+
export default function MenuItem({ onSelect, disabled, danger, icon, kbdLabel, className, children, }: MenuItemProps): import("react").JSX.Element;
|
|
9
15
|
export type { MenuItemProps };
|