haze-ui 1.29.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 +58 -0
- 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 +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 +1 -0
- 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 +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 +24 -2
- package/dist/components/LocaleProvider/de-de.js +24 -2
- package/dist/components/LocaleProvider/es-es.js +24 -2
- package/dist/components/LocaleProvider/fr-fr.js +24 -2
- package/dist/components/LocaleProvider/it-it.js +24 -2
- package/dist/components/LocaleProvider/ja-jp.js +24 -2
- package/dist/components/LocaleProvider/ko-kr.js +24 -2
- package/dist/components/LocaleProvider/locale.js +24 -2
- package/dist/components/LocaleProvider/pt-br.js +24 -2
- package/dist/components/LocaleProvider/ru-ru.js +24 -2
- package/dist/components/LocaleProvider/zh-cn.js +24 -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 +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 +25 -22
- 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/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 +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 +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/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/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/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 +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-manifest.json +22 -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/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 +63 -48
- package/dist/index.js +249 -232
- package/dist/mcp-docs.json +1011 -82
- package/dist/registry.json +17 -17
- 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/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/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/LocaleProvider/locale.d.ts +24 -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/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/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/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 +19 -11
- 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/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/package.json +18 -9
|
@@ -7,39 +7,40 @@ import { getEnabledMenuItems as r, useMenuKeyboard as i, useRovingTabindex as a
|
|
|
7
7
|
import o from "../Kbd/Kbd.js";
|
|
8
8
|
import { collectCommandItems as s, commandItemMatches as c } from "./command-filter.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { Children as l, createContext as u, useContext as d, useId as f, useMemo as p, useRef as m } from "react";
|
|
11
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
12
|
import { useControl as _ } from "react-use-control";
|
|
13
13
|
//#region src/lib/components/Command/Command.tsx
|
|
14
|
-
var v = "[role=\"option\"]", y =
|
|
14
|
+
var v = "[role=\"option\"]", y = u(void 0);
|
|
15
15
|
function b() {
|
|
16
|
-
let e =
|
|
16
|
+
let e = d(y);
|
|
17
17
|
if (!e) throw Error("Command sub-components must be used within <Command>");
|
|
18
18
|
return e;
|
|
19
19
|
}
|
|
20
20
|
var x = "haze-Command__base";
|
|
21
21
|
function S({ query: t, shouldFilter: n = !0, onItemSelect: r, children: i, className: a }) {
|
|
22
|
-
let [o, s] = _(t, ""), c =
|
|
22
|
+
let [o, s] = _(t, ""), c = m(null), l = m(null), u = f(), d = p(() => ({
|
|
23
23
|
query: o,
|
|
24
24
|
setQuery: s,
|
|
25
25
|
shouldFilter: n,
|
|
26
26
|
onItemSelect: r,
|
|
27
27
|
inputRef: c,
|
|
28
|
-
listRef:
|
|
29
|
-
listId:
|
|
28
|
+
listRef: l,
|
|
29
|
+
listId: u
|
|
30
30
|
}), [
|
|
31
31
|
o,
|
|
32
32
|
s,
|
|
33
33
|
n,
|
|
34
34
|
r,
|
|
35
|
-
|
|
35
|
+
u
|
|
36
36
|
]);
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
value:
|
|
39
|
-
children:
|
|
37
|
+
return /* @__PURE__ */ h(y.Provider, {
|
|
38
|
+
value: d,
|
|
39
|
+
children: h("div", {
|
|
40
|
+
"data-slot": "command",
|
|
40
41
|
role: "combobox",
|
|
41
42
|
"aria-expanded": !0,
|
|
42
|
-
"aria-controls":
|
|
43
|
+
"aria-controls": u,
|
|
43
44
|
className: e([x, a]),
|
|
44
45
|
children: i
|
|
45
46
|
})
|
|
@@ -47,9 +48,10 @@ function S({ query: t, shouldFilter: n = !0, onItemSelect: r, children: i, class
|
|
|
47
48
|
}
|
|
48
49
|
var C = "haze-Command__inputStyle";
|
|
49
50
|
function w({ placeholder: n, className: i, ref: a }) {
|
|
50
|
-
let { query: o, setQuery: s, inputRef: c, listRef:
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
let { query: o, setQuery: s, inputRef: c, listRef: l } = b();
|
|
52
|
+
return /* @__PURE__ */ h("input", {
|
|
52
53
|
ref: t(c, a),
|
|
54
|
+
"data-slot": "input",
|
|
53
55
|
type: "text",
|
|
54
56
|
placeholder: n,
|
|
55
57
|
value: o,
|
|
@@ -57,7 +59,7 @@ function w({ placeholder: n, className: i, ref: a }) {
|
|
|
57
59
|
onKeyDown: (e) => {
|
|
58
60
|
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
59
61
|
e.preventDefault();
|
|
60
|
-
let t = r(
|
|
62
|
+
let t = r(l.current, v);
|
|
61
63
|
(e.key === "ArrowDown" ? t[0] : t[t.length - 1])?.focus();
|
|
62
64
|
},
|
|
63
65
|
className: e([C, i])
|
|
@@ -65,41 +67,45 @@ function w({ placeholder: n, className: i, ref: a }) {
|
|
|
65
67
|
}
|
|
66
68
|
var T = "haze-Command__listStyle", E = "haze-Command__emptyStyle";
|
|
67
69
|
function D({ children: t, empty: r, className: o }) {
|
|
68
|
-
let { inputRef:
|
|
70
|
+
let { inputRef: l, listRef: u, listId: d, shouldFilter: f, query: p } = b(), m = n("command");
|
|
69
71
|
a({
|
|
70
|
-
menuRef:
|
|
72
|
+
menuRef: u,
|
|
71
73
|
active: !0,
|
|
72
74
|
selector: v
|
|
73
75
|
});
|
|
74
76
|
let _ = i({
|
|
75
|
-
menuRef:
|
|
77
|
+
menuRef: u,
|
|
76
78
|
selector: v,
|
|
77
|
-
onClose: () =>
|
|
78
|
-
}), y = s(t, M), x =
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
ref:
|
|
79
|
+
onClose: () => l.current?.focus()
|
|
80
|
+
}), y = s(t, M), x = f && y.length > 0 && !y.some((e) => c(e.props, p));
|
|
81
|
+
return /* @__PURE__ */ g("div", {
|
|
82
|
+
ref: u,
|
|
83
|
+
"data-slot": "list",
|
|
81
84
|
role: "listbox",
|
|
82
|
-
id:
|
|
85
|
+
id: d,
|
|
83
86
|
onKeyDown: _,
|
|
84
87
|
className: e([T, o]),
|
|
85
|
-
children: [t, x && /* @__PURE__ */
|
|
88
|
+
children: [t, x && /* @__PURE__ */ h("div", {
|
|
89
|
+
"data-slot": "empty",
|
|
86
90
|
role: "option",
|
|
87
91
|
"aria-selected": !1,
|
|
88
92
|
"aria-disabled": "true",
|
|
89
93
|
className: e([E]),
|
|
90
|
-
children: r ??
|
|
94
|
+
children: r ?? m.noResults
|
|
91
95
|
})]
|
|
92
96
|
});
|
|
93
97
|
}
|
|
94
98
|
var O = "haze-Command__groupHeading";
|
|
95
99
|
function k({ heading: t, children: n, className: r }) {
|
|
96
|
-
let { shouldFilter: i, query: a } = b(), o =
|
|
97
|
-
return (
|
|
100
|
+
let { shouldFilter: i, query: a } = b(), o = f(), u = s(n, M);
|
|
101
|
+
return (u.length === 0 ? l.count(n) > 0 : !i || u.some((e) => c(e.props, a))) ? /* @__PURE__ */ g("div", {
|
|
102
|
+
"data-slot": "group",
|
|
98
103
|
role: "group",
|
|
99
104
|
"aria-labelledby": t === void 0 ? void 0 : o,
|
|
100
105
|
className: e([r]),
|
|
101
|
-
children: [t !== void 0 && /* @__PURE__ */
|
|
106
|
+
children: [t !== void 0 && /* @__PURE__ */ h("div", {
|
|
102
107
|
id: o,
|
|
108
|
+
"data-slot": "group-label",
|
|
103
109
|
className: e([O]),
|
|
104
110
|
children: t
|
|
105
111
|
}), n]
|
|
@@ -107,28 +113,29 @@ function k({ heading: t, children: n, className: r }) {
|
|
|
107
113
|
}
|
|
108
114
|
var A = "haze-Command__itemStyle", j = "haze-Command__itemWithShortcut";
|
|
109
115
|
function M({ children: t, value: n, keywords: r, shortcut: i, className: a, onSelect: s }) {
|
|
110
|
-
let { shouldFilter:
|
|
111
|
-
if (
|
|
116
|
+
let { shouldFilter: l, query: u, onItemSelect: d } = b();
|
|
117
|
+
if (l && !c({
|
|
112
118
|
value: n,
|
|
113
119
|
keywords: r,
|
|
114
120
|
children: t
|
|
115
|
-
},
|
|
116
|
-
let
|
|
117
|
-
s?.(),
|
|
121
|
+
}, u)) return null;
|
|
122
|
+
let f = () => {
|
|
123
|
+
s?.(), d?.();
|
|
118
124
|
};
|
|
119
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ g("div", {
|
|
126
|
+
"data-slot": "item",
|
|
120
127
|
role: "option",
|
|
121
128
|
tabIndex: -1,
|
|
122
|
-
onClick:
|
|
129
|
+
onClick: f,
|
|
123
130
|
onKeyDown: (e) => {
|
|
124
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
131
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), f());
|
|
125
132
|
},
|
|
126
133
|
className: e([
|
|
127
134
|
A,
|
|
128
135
|
i !== void 0 && j,
|
|
129
136
|
a
|
|
130
137
|
]),
|
|
131
|
-
children: [t, i !== void 0 && /* @__PURE__ */
|
|
138
|
+
children: [t, i !== void 0 && /* @__PURE__ */ h(o, {
|
|
132
139
|
size: "sm",
|
|
133
140
|
children: i
|
|
134
141
|
})]
|
|
@@ -4,28 +4,28 @@ import e from "../Dialog/Dialog.js";
|
|
|
4
4
|
import t, { CommandInput as n } from "./Command.js";
|
|
5
5
|
import { useHotkeys as r } from "../../hooks/useHotkeys.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useCallback as i, useEffect as a, useRef as o } from "react";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
import { useControl as l } from "react-use-control";
|
|
10
10
|
//#region src/lib/components/Command/CommandDialog.tsx
|
|
11
11
|
var u = "haze-CommandDialog__panel", d = "haze-CommandDialog__panelTitle", f = "haze-CommandDialog__palette";
|
|
12
12
|
function p({ open: p, onOpenChange: m, hotkey: h, title: g, placeholder: _, children: v, className: y }) {
|
|
13
|
-
let [b, x, S] = l(p, !1), C =
|
|
13
|
+
let [b, x, S] = l(p, !1), C = o(null), w = i(() => {
|
|
14
14
|
let e = !b;
|
|
15
15
|
x(e), m?.(e);
|
|
16
16
|
}, [
|
|
17
17
|
b,
|
|
18
18
|
x,
|
|
19
19
|
m
|
|
20
|
-
]), T =
|
|
20
|
+
]), T = i(() => {
|
|
21
21
|
x(!1), m?.(!1);
|
|
22
22
|
}, [x, m]);
|
|
23
23
|
return r(h === void 0 ? {} : { [h]: w }, {
|
|
24
24
|
enabled: h !== void 0,
|
|
25
25
|
allowInInput: !0
|
|
26
|
-
}),
|
|
26
|
+
}), a(() => {
|
|
27
27
|
b && C.current?.focus();
|
|
28
|
-
}, [b]), /* @__PURE__ */
|
|
28
|
+
}, [b]), /* @__PURE__ */ s(e, {
|
|
29
29
|
open: S,
|
|
30
30
|
onClose: () => m?.(!1),
|
|
31
31
|
title: g,
|
|
@@ -34,10 +34,10 @@ function p({ open: p, onOpenChange: m, hotkey: h, title: g, placeholder: _, chil
|
|
|
34
34
|
header: d
|
|
35
35
|
},
|
|
36
36
|
className: y,
|
|
37
|
-
children:
|
|
37
|
+
children: c(t, {
|
|
38
38
|
className: f,
|
|
39
39
|
onItemSelect: T,
|
|
40
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ s(n, {
|
|
41
41
|
ref: C,
|
|
42
42
|
placeholder: _
|
|
43
43
|
}), v]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e } from "react";
|
|
3
|
+
//#region src/lib/components/ConfigProvider/ConfigContext.ts
|
|
4
|
+
var t = e(void 0);
|
|
5
|
+
function n(e, t) {
|
|
6
|
+
return e === void 0 ? t ?? {} : t === void 0 ? e : {
|
|
7
|
+
Button: {
|
|
8
|
+
...e.Button ?? {},
|
|
9
|
+
...t.Button ?? {}
|
|
10
|
+
},
|
|
11
|
+
ButtonLink: {
|
|
12
|
+
...e.ButtonLink ?? {},
|
|
13
|
+
...t.ButtonLink ?? {}
|
|
14
|
+
},
|
|
15
|
+
Toast: {
|
|
16
|
+
...e.Toast ?? {},
|
|
17
|
+
...t.Toast ?? {}
|
|
18
|
+
},
|
|
19
|
+
Tooltip: {
|
|
20
|
+
...e.Tooltip ?? {},
|
|
21
|
+
...t.Tooltip ?? {}
|
|
22
|
+
},
|
|
23
|
+
HoverCard: {
|
|
24
|
+
...e.HoverCard ?? {},
|
|
25
|
+
...t.HoverCard ?? {}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { t as ConfigContext, n as mergeConfig };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ConfigContext as e, mergeConfig as t } from "./ConfigContext.js";
|
|
3
|
+
import { useContext as n, useMemo as r } from "react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/ConfigProvider/ConfigProvider.tsx
|
|
6
|
+
function a({ defaults: a, children: o }) {
|
|
7
|
+
let s = n(e), c = r(() => t(s, a), [s, a]);
|
|
8
|
+
return /* @__PURE__ */ i(e.Provider, {
|
|
9
|
+
value: c,
|
|
10
|
+
children: o
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { a as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ConfigContext as e } from "./ConfigContext.js";
|
|
3
|
+
import { useContext as t } from "react";
|
|
4
|
+
//#region src/lib/components/ConfigProvider/useConfigDefaults.ts
|
|
5
|
+
var n = Object.freeze({});
|
|
6
|
+
function r(r) {
|
|
7
|
+
return t(e)?.[r] ?? n;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as useConfigDefaults };
|
|
@@ -5,8 +5,8 @@ import { useStrings as t } from "../LocaleProvider/useStrings.js";
|
|
|
5
5
|
import { Presence as n } from "../../utils/presence.js";
|
|
6
6
|
import { useFocusScope as r } from "../../utils/focus-scope.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useId as i } from "react";
|
|
9
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
10
10
|
import { useControl as s } from "react-use-control";
|
|
11
11
|
//#region src/lib/components/ConfirmDialog/ConfirmDialog.tsx
|
|
12
12
|
var c = "haze-ConfirmDialog__overlay", l = "haze-ConfirmDialog__dialog", u = "haze-ConfirmDialog__header", d = "haze-ConfirmDialog__body", f = "haze-ConfirmDialog__footer", p = "haze-ConfirmDialog__btn", m = "haze-ConfirmDialog__cancelBtn", h = "haze-ConfirmDialog__confirmBtn", g = "haze-ConfirmDialog__dangerBtn";
|
|
@@ -14,16 +14,17 @@ function _({ open: _, onClose: v, onConfirm: y, onCancel: b, title: x, children:
|
|
|
14
14
|
let [O, k] = s(_, !1), A = t("confirmDialog"), j = C ?? A.confirm, M = w ?? A.cancel, N = r({
|
|
15
15
|
enabled: O,
|
|
16
16
|
trapped: !0
|
|
17
|
-
}), P = `haze-confirm-title-${
|
|
17
|
+
}), P = `haze-confirm-title-${i()}`, F = () => {
|
|
18
18
|
k(!1), v?.();
|
|
19
19
|
}, I = () => {
|
|
20
20
|
b?.(), F();
|
|
21
21
|
}, L = () => {
|
|
22
22
|
y?.(), F();
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ a(n, {
|
|
25
25
|
present: O,
|
|
26
|
-
children:
|
|
26
|
+
children: a("div", {
|
|
27
|
+
"data-slot": "mask",
|
|
27
28
|
onClick: () => {
|
|
28
29
|
O && F();
|
|
29
30
|
},
|
|
@@ -31,8 +32,9 @@ function _({ open: _, onClose: v, onConfirm: y, onCancel: b, title: x, children:
|
|
|
31
32
|
e.key === "Escape" && O && F();
|
|
32
33
|
},
|
|
33
34
|
className: e([c, E]),
|
|
34
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ o("div", {
|
|
35
36
|
ref: N,
|
|
37
|
+
"data-slot": "content",
|
|
36
38
|
role: "dialog",
|
|
37
39
|
"aria-modal": "true",
|
|
38
40
|
"aria-labelledby": x === void 0 ? void 0 : P,
|
|
@@ -40,23 +42,28 @@ function _({ open: _, onClose: v, onConfirm: y, onCancel: b, title: x, children:
|
|
|
40
42
|
onClick: (e) => e.stopPropagation(),
|
|
41
43
|
className: e([l]),
|
|
42
44
|
children: [
|
|
43
|
-
x && /* @__PURE__ */
|
|
45
|
+
x && /* @__PURE__ */ a("div", {
|
|
44
46
|
id: P,
|
|
47
|
+
"data-slot": "title",
|
|
45
48
|
className: e([u]),
|
|
46
49
|
children: x
|
|
47
50
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ a("div", {
|
|
52
|
+
"data-slot": "description",
|
|
49
53
|
className: e([d]),
|
|
50
54
|
children: S
|
|
51
55
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ o("div", {
|
|
57
|
+
"data-slot": "footer",
|
|
53
58
|
className: e([f]),
|
|
54
|
-
children: [/* @__PURE__ */
|
|
59
|
+
children: [/* @__PURE__ */ a("button", {
|
|
60
|
+
"data-slot": "cancel-button",
|
|
55
61
|
type: "button",
|
|
56
62
|
onClick: I,
|
|
57
63
|
className: e([p, m]),
|
|
58
64
|
children: M
|
|
59
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ a("button", {
|
|
66
|
+
"data-slot": "confirm-button",
|
|
60
67
|
type: "button",
|
|
61
68
|
onClick: L,
|
|
62
69
|
className: e([p, T === "danger" ? g : h]),
|
|
@@ -4,20 +4,20 @@ import { classnames as e } from "../../utils/classnames.js";
|
|
|
4
4
|
import { useFloating as t } from "../../utils/floating.js";
|
|
5
5
|
import { ContextMenuProvider as n } from "./ContextMenuContext.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useCallback as r, useRef as i, useState as a } from "react";
|
|
8
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
9
9
|
import { useControl as s } from "react-use-control";
|
|
10
10
|
//#region src/lib/components/ContextMenu/ContextMenu.tsx
|
|
11
11
|
var c = "haze-ContextMenu__wrapper";
|
|
12
12
|
function l({ open: l, onOpenChange: u, children: d, className: f }) {
|
|
13
|
-
let [p, m] = s(l, !1), [h, g] =
|
|
13
|
+
let [p, m] = s(l, !1), [h, g] = a(0), [_, v] = a(0), y = i(null), b = i(null), x = r((e) => {
|
|
14
14
|
let t = typeof e == "function" ? e(p) : e;
|
|
15
15
|
m(t), u?.(t);
|
|
16
16
|
}, [
|
|
17
17
|
p,
|
|
18
18
|
m,
|
|
19
19
|
u
|
|
20
|
-
]), S =
|
|
20
|
+
]), S = r((e, t) => {
|
|
21
21
|
g(e), v(t);
|
|
22
22
|
}, []), C = t({
|
|
23
23
|
open: p,
|
|
@@ -26,7 +26,7 @@ function l({ open: l, onOpenChange: u, children: d, className: f }) {
|
|
|
26
26
|
panelRef: b,
|
|
27
27
|
animated: !0
|
|
28
28
|
});
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ o(n, {
|
|
30
30
|
value: {
|
|
31
31
|
open: p,
|
|
32
32
|
setOpen: x,
|
|
@@ -36,8 +36,9 @@ function l({ open: l, onOpenChange: u, children: d, className: f }) {
|
|
|
36
36
|
contentRef: b,
|
|
37
37
|
floating: C
|
|
38
38
|
},
|
|
39
|
-
children:
|
|
39
|
+
children: o("div", {
|
|
40
40
|
ref: y,
|
|
41
|
+
"data-slot": "context-menu",
|
|
41
42
|
className: e([c, f]),
|
|
42
43
|
children: d
|
|
43
44
|
})
|
|
@@ -5,8 +5,8 @@ import { useFocusScope as t } from "../../utils/focus-scope.js";
|
|
|
5
5
|
import { useMenuKeyboard as n, useRovingTabindex as r } from "../../utils/menuKeyboard.js";
|
|
6
6
|
import { useContextMenuContext as i } from "./ContextMenuContext.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useCallback as a } from "react";
|
|
9
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
10
10
|
//#region src/lib/components/ContextMenu/ContextMenuContent.tsx
|
|
11
11
|
var s = "haze-ContextMenuContent__content";
|
|
12
12
|
function c({ children: c, className: l }) {
|
|
@@ -22,10 +22,10 @@ function c({ children: c, className: l }) {
|
|
|
22
22
|
enabled: u && h.shown,
|
|
23
23
|
autoFocus: !0,
|
|
24
24
|
returnFocus: !0
|
|
25
|
-
}), v =
|
|
25
|
+
}), v = a((e) => {
|
|
26
26
|
m.current = e, _(e);
|
|
27
27
|
}, [m, _]);
|
|
28
|
-
return !u && h.exited ? null : /* @__PURE__ */
|
|
28
|
+
return !u && h.exited ? null : /* @__PURE__ */ o(e, {
|
|
29
29
|
ref: v,
|
|
30
30
|
behavior: h,
|
|
31
31
|
role: "menu",
|
|
@@ -9,6 +9,7 @@ var r = "haze-ContextMenuTrigger__trigger";
|
|
|
9
9
|
function i({ children: i, className: a }) {
|
|
10
10
|
let { setOpen: o, setPosition: s } = t();
|
|
11
11
|
return /* @__PURE__ */ n("div", {
|
|
12
|
+
"data-slot": "trigger",
|
|
12
13
|
onContextMenu: (e) => {
|
|
13
14
|
e.preventDefault(), s(e.clientX, e.clientY), o(!0);
|
|
14
15
|
},
|
|
@@ -7,6 +7,7 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
7
7
|
var r = "haze-ConversationItem__item", i = "haze-ConversationItem__activeItem", a = "haze-ConversationItem__body", o = "haze-ConversationItem__titleStyle", s = "haze-ConversationItem__subtitleStyle", c = "haze-ConversationItem__endSlot";
|
|
8
8
|
function l({ title: l, subtitle: u, active: d, onClick: f, end: p, className: m }) {
|
|
9
9
|
return /* @__PURE__ */ n("button", {
|
|
10
|
+
"data-slot": "conversation-item",
|
|
10
11
|
type: "button",
|
|
11
12
|
onClick: f,
|
|
12
13
|
"aria-current": d ? "true" : void 0,
|
|
@@ -18,13 +19,16 @@ function l({ title: l, subtitle: u, active: d, onClick: f, end: p, className: m
|
|
|
18
19
|
children: [/* @__PURE__ */ n("div", {
|
|
19
20
|
className: e([a]),
|
|
20
21
|
children: [/* @__PURE__ */ t("div", {
|
|
22
|
+
"data-slot": "title",
|
|
21
23
|
className: e([o]),
|
|
22
24
|
children: l
|
|
23
25
|
}), u && /* @__PURE__ */ t("div", {
|
|
26
|
+
"data-slot": "description",
|
|
24
27
|
className: e([s]),
|
|
25
28
|
children: u
|
|
26
29
|
})]
|
|
27
30
|
}), p && /* @__PURE__ */ t("div", {
|
|
31
|
+
"data-slot": "suffix",
|
|
28
32
|
className: e([c]),
|
|
29
33
|
children: p
|
|
30
34
|
})]
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
4
|
import { usePrefersReducedMotion as t } from "../../hooks/usePrefersReducedMotion.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useEffect as n, useRef as r, useState as i } from "react";
|
|
7
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
8
8
|
//#region src/lib/components/CountUp/CountUp.tsx
|
|
9
9
|
var o = "haze-CountUp__base", s = /* @__PURE__ */ new Map();
|
|
10
10
|
function c(e, t) {
|
|
@@ -15,8 +15,8 @@ function c(e, t) {
|
|
|
15
15
|
}), s.set(t, n)), n.format(e);
|
|
16
16
|
}
|
|
17
17
|
function l({ to: s, from: l = 0, duration: u = 1200, decimals: d = 0, format: f, autostart: p = !0, className: m, ...h }) {
|
|
18
|
-
let g = t(), [_, v] =
|
|
19
|
-
return
|
|
18
|
+
let g = t(), [_, v] = i(l), y = r(l), b = r(0), x = r(!0);
|
|
19
|
+
return n(() => {
|
|
20
20
|
let e = x.current;
|
|
21
21
|
if (x.current = !1, e && !p) return;
|
|
22
22
|
let t = y.current;
|
|
@@ -35,7 +35,8 @@ function l({ to: s, from: l = 0, duration: u = 1200, decimals: d = 0, format: f,
|
|
|
35
35
|
u,
|
|
36
36
|
g,
|
|
37
37
|
p
|
|
38
|
-
]), /* @__PURE__ */
|
|
38
|
+
]), /* @__PURE__ */ a("span", {
|
|
39
|
+
"data-slot": "count-up",
|
|
39
40
|
...h,
|
|
40
41
|
className: e([o, m]),
|
|
41
42
|
children: f ? f(_) : c(_, d)
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import e from "../Input/InputCore.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useRef as t, useState as n } from "react";
|
|
6
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
7
7
|
//#region src/lib/components/DataTable/CellEditor.tsx
|
|
8
8
|
var i = "haze-CellEditor__editorInput";
|
|
9
9
|
function a(e) {
|
|
10
10
|
return typeof e == "string" ? e : typeof e == "number" ? String(e) : "";
|
|
11
11
|
}
|
|
12
12
|
function o({ kind: o, value: s, ariaLabel: c, onSave: l, onCancel: u }) {
|
|
13
|
-
let [d, f] =
|
|
13
|
+
let [d, f] = n(() => a(s)), p = t(!1), m = (e) => {
|
|
14
14
|
if (!p.current) {
|
|
15
15
|
if (p.current = !0, !e) {
|
|
16
16
|
u();
|
|
@@ -19,7 +19,7 @@ function o({ kind: o, value: s, ariaLabel: c, onSave: l, onCancel: u }) {
|
|
|
19
19
|
l(o === "number" ? d.trim() === "" ? null : Number(d) : d);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ r(e, {
|
|
23
23
|
size: "sm",
|
|
24
24
|
type: o === "number" ? "number" : "text",
|
|
25
25
|
className: i,
|