haze-ui 1.28.0 → 1.30.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 +139 -33
- 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/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 +21 -16
- 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 +117 -52
- 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 +1 -0
- package/dist/components/CountUp/CountUp.js +46 -0
- package/dist/components/CountUp/index.js +3 -0
- 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 +56 -0
- package/dist/components/Ellipsis/index.js +3 -0
- 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 +1 -0
- package/dist/components/List/ListItem.js +1 -0
- package/dist/components/LocaleProvider/LocaleProvider.js +4 -4
- package/dist/components/LocaleProvider/ar-sa.js +255 -0
- package/dist/components/LocaleProvider/de-de.js +255 -0
- package/dist/components/LocaleProvider/es-es.js +255 -0
- package/dist/components/LocaleProvider/fr-fr.js +255 -0
- package/dist/components/LocaleProvider/index.js +10 -2
- package/dist/components/LocaleProvider/it-it.js +255 -0
- package/dist/components/LocaleProvider/ja-jp.js +35 -2
- package/dist/components/LocaleProvider/ko-kr.js +255 -0
- package/dist/components/LocaleProvider/locale.js +35 -2
- package/dist/components/LocaleProvider/pt-br.js +255 -0
- package/dist/components/LocaleProvider/ru-ru.js +255 -0
- package/dist/components/LocaleProvider/zh-cn.js +35 -2
- package/dist/components/LogViewer/LogViewer.js +25 -14
- 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 +9 -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 +45 -0
- package/dist/components/QRCode/index.js +3 -0
- 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 +25 -22
- package/dist/components/Result/Result.js +234 -0
- package/dist/components/Result/index.js +3 -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/Spinner/Spinner.js +1 -0
- package/dist/components/Stat/Stat.js +7 -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/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/Tab.js +1 -0
- package/dist/components/Tabs/TabList.js +5 -4
- package/dist/components/Tabs/TabPanel.js +1 -0
- package/dist/components/Tabs/Tabs.js +1 -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 +13 -10
- 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/toast2.js +20 -14
- 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 +240 -0
- package/dist/components/TreeSelect/index.js +3 -0
- package/dist/components/Typography/Typography.js +42 -12
- 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 +229 -124
- package/dist/components/Watermark/Watermark.js +8 -6
- package/dist/css/accordion.css +1 -1
- package/dist/css/alert.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/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/context-menu.css +1 -1
- package/dist/css/count-up.css +2 -0
- 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/ellipsis.css +2 -0
- 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/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/qr-code.css +2 -0
- package/dist/css/radio.css +1 -1
- package/dist/css/rating.css +1 -1
- package/dist/css/result.css +2 -0
- package/dist/css/segmented.css +1 -1
- package/dist/css/skeleton.css +1 -1
- package/dist/css/slider.css +1 -1
- package/dist/css/spinner.css +1 -1
- 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/tabs.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 +4 -2
- package/dist/css/tooltip.css +1 -1
- package/dist/css/tree-select.css +3 -0
- package/dist/css/tree.css +2 -1
- package/dist/css/typography.css +1 -1
- package/dist/css/upload.css +1 -1
- package/dist/css/virtual-list.css +1 -1
- package/dist/css-manifest.json +41 -0
- package/dist/dates/adapter.js +13 -0
- package/dist/dates/gregory.js +44 -0
- package/dist/dates/islamic.js +87 -0
- package/dist/dates/registry.js +13 -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/dark.json +355 -0
- package/dist/design-tokens/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 +73 -50
- package/dist/index.js +250 -218
- package/dist/mcp-docs.json +10312 -0
- package/dist/registry.json +144 -42
- package/dist/tokens/brands.js +21 -0
- package/dist/tokens/density.js +6 -0
- package/dist/tokens/index.js +7 -6
- package/dist/tokens/motion.js +9 -2
- package/dist/tokens/palette.js +256 -88
- package/dist/tokens/registry.js +18 -22
- 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 +24 -13
- package/dist/types/components/Chart/chart-elements.d.ts +39 -10
- 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/CountUp/CountUp.d.ts +20 -0
- package/dist/types/components/CountUp/index.d.ts +2 -0
- 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/Ellipsis/Ellipsis.d.ts +19 -0
- package/dist/types/components/Ellipsis/index.d.ts +2 -0
- 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/LocaleProvider/ar-sa.d.ts +22 -0
- package/dist/types/components/LocaleProvider/de-de.d.ts +15 -0
- package/dist/types/components/LocaleProvider/es-es.d.ts +15 -0
- package/dist/types/components/LocaleProvider/fr-fr.d.ts +15 -0
- package/dist/types/components/LocaleProvider/index.d.ts +8 -0
- package/dist/types/components/LocaleProvider/it-it.d.ts +15 -0
- package/dist/types/components/LocaleProvider/ko-kr.d.ts +15 -0
- package/dist/types/components/LocaleProvider/locale.d.ts +35 -0
- package/dist/types/components/LocaleProvider/pt-br.d.ts +16 -0
- package/dist/types/components/LocaleProvider/ru-ru.d.ts +15 -0
- 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/QRCode/QRCode.d.ts +33 -0
- package/dist/types/components/QRCode/index.d.ts +2 -0
- package/dist/types/components/Result/Result.d.ts +16 -0
- package/dist/types/components/Result/index.d.ts +2 -0
- 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/StreamingText/StreamingText.d.ts +8 -1
- package/dist/types/components/TagGroup/SortableTagGroup.d.ts +3 -2
- package/dist/types/components/TagGroup/TagGroup.d.ts +1 -1
- package/dist/types/components/TagInput/SortableTagInput.d.ts +2 -3
- package/dist/types/components/TagInput/SortableTagInputCore.d.ts +3 -3
- 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 +1 -1
- package/dist/types/components/Toast/toast.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/TreeSelect/TreeSelect.d.ts +93 -0
- package/dist/types/components/TreeSelect/index.d.ts +2 -0
- package/dist/types/components/Typography/Typography.d.ts +12 -3
- package/dist/types/components/Typography/index.d.ts +1 -1
- 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 +79 -26
- package/dist/types/components/VirtualList/index.d.ts +1 -1
- package/dist/types/dates/adapter.d.ts +74 -0
- package/dist/types/dates/gregory.d.ts +10 -0
- package/dist/types/dates/index.d.ts +6 -0
- package/dist/types/dates/islamic.d.ts +17 -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 +34 -13
- package/dist/types/tokens/brands.d.ts +28 -0
- package/dist/types/tokens/density.d.ts +3 -0
- package/dist/types/tokens/index.d.ts +5 -2
- package/dist/types/tokens/motion.d.ts +16 -0
- package/dist/types/tokens/palette.d.ts +95 -1
- package/dist/types/tokens/spacing.d.ts +13 -0
- package/dist/types/utils/menuItems.d.ts +126 -0
- package/dist/types/utils/menuRadio.d.ts +21 -0
- package/dist/types/utils/sortable-shared.d.ts +4 -4
- 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-shared.js +3 -3
- package/dist/utils/sortable.js +12 -11
- package/mcp/index.mjs +64 -0
- package/mcp/server.mjs +89 -0
- package/mcp/server.test.mjs +281 -0
- package/mcp/tools.mjs +240 -0
- package/package.json +74 -47
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HazeConfig } from './ConfigContext';
|
|
2
|
+
/**
|
|
3
|
+
* Reads one component's resolved defaults from the enclosing
|
|
4
|
+
* `ConfigProvider` chain. Returns a frozen empty object when no provider
|
|
5
|
+
* is mounted; callers fall through to their built-in defaults, so wiring
|
|
6
|
+
* a component never changes its provider-less behavior.
|
|
7
|
+
*
|
|
8
|
+
* ## Wiring a new component (the internal pattern)
|
|
9
|
+
*
|
|
10
|
+
* 1. Declare a section in `HazeConfig` (`ConfigContext.ts`) named after
|
|
11
|
+
* the exported component:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* MyComponent?: { size?: 'sm' | 'md' | 'lg' };
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* 2. In the component, drop the destructuring default for each wired
|
|
18
|
+
* prop and resolve three tiers — explicit prop, config, built-in:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* const config = useConfigDefaults('MyComponent');
|
|
22
|
+
* const size = sizeProp ?? config.size ?? 'md';
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* The built-in stays last so a missing provider renders exactly what
|
|
26
|
+
* the component rendered before the wiring (byte-identical).
|
|
27
|
+
*/
|
|
28
|
+
export declare function useConfigDefaults<K extends keyof HazeConfig>(component: K): Readonly<NonNullable<HazeConfig[K]>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type CountUpProps = {
|
|
3
|
+
/** Animation target — changes animate from the currently shown value. */
|
|
4
|
+
to: number;
|
|
5
|
+
/** Mount value; the first animation starts here (default 0). */
|
|
6
|
+
from?: number;
|
|
7
|
+
/** Animation length in milliseconds (default 1200). */
|
|
8
|
+
duration?: number;
|
|
9
|
+
/** Fraction digits kept by the default formatter (default 0). */
|
|
10
|
+
decimals?: number;
|
|
11
|
+
/** Value → display string. Default: cached `Intl.NumberFormat` with
|
|
12
|
+
* thousand grouping and `decimals` fraction digits. */
|
|
13
|
+
format?: (value: number) => string;
|
|
14
|
+
/** Animate on mount (default true). `false` renders `from` until the
|
|
15
|
+
* `to` prop changes. */
|
|
16
|
+
autostart?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
} & Omit<ComponentPropsWithoutRef<'span'>, 'children'>;
|
|
19
|
+
export default function CountUp({ to, from, duration, decimals, format, autostart, className, ...rest }: CountUpProps): import("react").JSX.Element;
|
|
20
|
+
export type { CountUpProps };
|
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
import type { Ref } from 'react';
|
|
2
2
|
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
-
import type { CalendarPickerMode } from '../Calendar/Calendar';
|
|
3
|
+
import type { CalendarCellRender, CalendarPickerMode } from '../Calendar/Calendar';
|
|
4
4
|
import type { DatepickerPreset } from './DatepickerCore';
|
|
5
5
|
type DatepickerProps = {
|
|
6
6
|
value?: ControlOrValue<string>;
|
|
7
7
|
open?: ControlOrValue<boolean>;
|
|
8
|
-
/** Calendar granularity — 'date' (default), '
|
|
9
|
-
* 'year'. `value` serializes per mode:
|
|
10
|
-
* "YYYY-Qn" or "YYYY". */
|
|
8
|
+
/** Calendar granularity — 'date' (default), an ISO week 'week',
|
|
9
|
+
* 'month', 'quarter' or 'year'. `value` serializes per mode:
|
|
10
|
+
* "YYYY-MM-DD", "YYYY-Www", "YYYY-MM", "YYYY-Qn" or "YYYY". */
|
|
11
11
|
picker?: CalendarPickerMode;
|
|
12
12
|
min?: string;
|
|
13
13
|
max?: string;
|
|
14
14
|
/** Disables individual dates on the calendar panel (see Calendar's
|
|
15
|
-
* `disabledDate`). */
|
|
15
|
+
* `disabledDate`) — day grid and header drill-down grids alike. */
|
|
16
16
|
disabledDate?: (date: Date) => boolean;
|
|
17
17
|
/** Shortcut rows at the top of the panel; clicking applies the
|
|
18
18
|
* preset's value and closes the panel. */
|
|
19
19
|
presets?: DatepickerPreset[];
|
|
20
|
-
/** Adds a time input (hour/minute
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
20
|
+
/** Adds a time input (hour/minute, or seconds with
|
|
21
|
+
* `{ seconds: true }`) below the calendar; `value` serializes as
|
|
22
|
+
* `"YYYY-MM-DD HH:mm"` / `"YYYY-MM-DD HH:mm:ss"` instead of
|
|
23
|
+
* `"YYYY-MM-DD"` (plain-date values stay accepted). Date granularity
|
|
24
|
+
* only. */
|
|
25
|
+
showTime?: boolean | {
|
|
26
|
+
seconds?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/** Custom serialization for picks, replacing the built-in value
|
|
29
|
+
* format (see DatepickerCore's `format`). */
|
|
30
|
+
format?: (date: Date) => string;
|
|
31
|
+
/** Reads a custom-formatted value back into the calendar (see
|
|
32
|
+
* DatepickerCore's `parse`). */
|
|
33
|
+
parse?: (text: string) => Date | null;
|
|
34
|
+
/** Appends custom content inside the panel's picker cells (see
|
|
35
|
+
* Calendar's `cellRender`). */
|
|
36
|
+
cellRender?: CalendarCellRender;
|
|
24
37
|
locale?: string;
|
|
25
38
|
weekStartsOn?: 0 | 1;
|
|
26
39
|
placeholder?: string;
|
|
@@ -29,5 +42,5 @@ type DatepickerProps = {
|
|
|
29
42
|
* element form bridges and `ref.current.focus()` reach. */
|
|
30
43
|
ref?: Ref<HTMLInputElement>;
|
|
31
44
|
};
|
|
32
|
-
export default function Datepicker({ value: valueControl, open: openControl, picker, min, max, disabledDate, presets, showTime, locale, weekStartsOn, placeholder, className, ref, }: DatepickerProps): import("react").JSX.Element;
|
|
45
|
+
export default function Datepicker({ value: valueControl, open: openControl, picker, min, max, disabledDate, presets, showTime, format, parse, locale, weekStartsOn, cellRender, placeholder, className, ref, }: DatepickerProps): import("react").JSX.Element;
|
|
33
46
|
export type { DatepickerProps };
|
|
@@ -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';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
+
type EllipsisProps = {
|
|
4
|
+
/** Full text to clamp; the tooltip and expand affordances reuse it. */
|
|
5
|
+
children: string;
|
|
6
|
+
/** Visible line budget before the ellipsis kicks in (default 1). */
|
|
7
|
+
lines?: number;
|
|
8
|
+
/** Reveal the full text in a library Tooltip while clamped. */
|
|
9
|
+
tooltip?: boolean;
|
|
10
|
+
/** Render an expand/collapse toggle once truncation is detected. */
|
|
11
|
+
expandable?: boolean;
|
|
12
|
+
/** Clamped/revealed state — pass a `useControl` triple to own it. */
|
|
13
|
+
expanded?: ControlOrValue<boolean>;
|
|
14
|
+
/** Fires with the next value on toggle-button activation. */
|
|
15
|
+
onExpandChange?: (expanded: boolean) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
} & Omit<ComponentPropsWithoutRef<'span'>, 'children'>;
|
|
18
|
+
export default function Ellipsis({ children, lines, tooltip, expandable, expanded: expandedControl, onExpandChange, className, ...rest }: EllipsisProps): import("react").JSX.Element;
|
|
19
|
+
export type { EllipsisProps };
|
|
@@ -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 };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HazeStrings } from './locale';
|
|
2
|
+
/**
|
|
3
|
+
* Modern Standard Arabic (ar-SA) copy for every user-visible literal
|
|
4
|
+
* in the library. Not auto-selected by `LocaleProvider`'s `locale`
|
|
5
|
+
* tag (only Chinese and Japanese variants resolve automatically) —
|
|
6
|
+
* mount it explicitly:
|
|
7
|
+
*
|
|
8
|
+
* <LocaleProvider locale="ar-SA" strings={arSA}>
|
|
9
|
+
*
|
|
10
|
+
* Arabic is RTL: the provider chain derives direction 'rtl' from the
|
|
11
|
+
* tag (see utils/direction.ts), while the app keeps responsibility
|
|
12
|
+
* for writing `dir="rtl"` on the document. Temporal labels such as
|
|
13
|
+
* "previous"/"next" stay semantic — their visual mirroring is the
|
|
14
|
+
* layout's job, not the copy's.
|
|
15
|
+
*
|
|
16
|
+
* Keys mirror `defaultStrings` 1:1 — the `HazeStrings` annotation
|
|
17
|
+
* fails the build when either pack drifts out of sync. `{name}`
|
|
18
|
+
* placeholders must survive translation verbatim; they are expanded
|
|
19
|
+
* by `formatString` at runtime.
|
|
20
|
+
*/
|
|
21
|
+
declare const arSA: HazeStrings;
|
|
22
|
+
export { arSA };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HazeStrings } from './locale';
|
|
2
|
+
/**
|
|
3
|
+
* German (de-DE) copy for every user-visible literal in the library.
|
|
4
|
+
* Not auto-selected by `LocaleProvider`'s `locale` tag (only Chinese
|
|
5
|
+
* and Japanese variants resolve automatically) — mount it explicitly:
|
|
6
|
+
*
|
|
7
|
+
* <LocaleProvider locale="de-DE" strings={deDE}>
|
|
8
|
+
*
|
|
9
|
+
* Keys mirror `defaultStrings` 1:1 — the `HazeStrings` annotation
|
|
10
|
+
* fails the build when either pack drifts out of sync. `{name}`
|
|
11
|
+
* placeholders must survive translation verbatim; they are expanded
|
|
12
|
+
* by `formatString` at runtime.
|
|
13
|
+
*/
|
|
14
|
+
declare const deDE: HazeStrings;
|
|
15
|
+
export { deDE };
|