haze-ui 1.26.0 → 1.28.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 +420 -36
- package/dist/components/Anchor/Anchor.js +78 -0
- package/dist/components/Anchor/index.js +3 -0
- package/dist/components/AppShell/AppShell.js +44 -0
- package/dist/components/AppShell/index.js +3 -0
- package/dist/components/AspectRatio/AspectRatio.js +0 -1
- package/dist/components/AspectRatio/index.js +0 -1
- package/dist/components/Badge/Badge.js +5 -17
- package/dist/components/Badge/badge-styles.js +15 -0
- package/dist/components/Badge/index.js +3 -3
- package/dist/components/BottomSheet/BottomSheet.js +133 -22
- package/dist/components/Button/index.js +4 -3
- package/dist/components/Calendar/Calendar.js +525 -78
- package/dist/components/Calendar/date.js +35 -2
- package/dist/components/Card/Card.js +0 -1
- package/dist/components/Card/index.js +0 -1
- package/dist/components/Carousel/Carousel.js +64 -41
- package/dist/components/Cascader/Cascader.js +222 -140
- package/dist/components/Chart/Chart.js +34 -0
- package/dist/components/Chart/chart-elements.js +164 -0
- package/dist/components/Chart/index.js +3 -0
- package/dist/components/ChatContainer/ChatContainer.js +36 -16
- package/dist/components/ChatInput/ChatInput.js +49 -29
- package/dist/components/ChatMessage/ChatMessage.js +76 -29
- package/dist/components/Checkbox/Checkbox.js +6 -5
- package/dist/components/Checkbox/CheckboxCore.js +6 -5
- package/dist/components/CodeBlock/CodeBlock.js +39 -10
- package/dist/components/CodeBlock/index.js +0 -1
- package/dist/components/Collapsible/Collapsible.js +23 -10
- package/dist/components/ColorPicker/ColorPicker.js +5 -4
- package/dist/components/ColorPicker/ColorPickerCore.js +5 -4
- package/dist/components/Combobox/Combobox.js +202 -75
- package/dist/components/Combobox/ComboboxGroup.js +23 -0
- package/dist/components/Combobox/ComboboxOption.js +7 -6
- package/dist/components/Combobox/index.js +4 -3
- package/dist/components/Command/Command.js +102 -59
- package/dist/components/Command/CommandDialog.js +48 -0
- package/dist/components/Command/command-filter.js +16 -0
- package/dist/components/Command/index.js +3 -2
- package/dist/components/ConfirmDialog/ConfirmDialog.js +3 -3
- package/dist/components/Container/Container.js +0 -1
- package/dist/components/Container/index.js +0 -1
- package/dist/components/ContextMenu/ContextMenuContent.js +4 -4
- package/dist/components/DataTable/CellEditor.js +38 -0
- package/dist/components/DataTable/DataTable.js +394 -143
- package/dist/components/DataTable/csv.js +29 -0
- package/dist/components/DataTable/features.js +25 -0
- package/dist/components/DataTable/index.js +3 -1
- package/dist/components/DataTable/summary.js +17 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +31 -13
- package/dist/components/DateRangePicker/DateRangePickerCore.js +59 -27
- package/dist/components/DateRangePicker/presets.js +43 -0
- package/dist/components/Datepicker/Datepicker.js +17 -12
- package/dist/components/Datepicker/DatepickerCore.js +73 -39
- package/dist/components/Datepicker/datetime.js +23 -0
- package/dist/components/Descriptions/Descriptions.js +46 -0
- package/dist/components/Descriptions/index.js +3 -0
- package/dist/components/Dialog/Dialog.js +56 -32
- package/dist/components/DiffViewer/DiffViewer.js +31 -30
- package/dist/components/Divider/Divider.js +0 -1
- package/dist/components/Divider/index.js +0 -1
- package/dist/components/Drawer/Drawer.js +49 -29
- package/dist/components/DropdownMenu/DropdownMenu.js +38 -26
- package/dist/components/DropdownMenu/DropdownMenuSub.js +23 -0
- package/dist/components/DropdownMenu/DropdownMenuSubContent.js +24 -0
- package/dist/components/DropdownMenu/DropdownMenuSubTrigger.js +30 -0
- package/dist/components/DropdownMenu/index.js +4 -1
- package/dist/components/FilePreview/FilePreview.js +135 -0
- package/dist/components/FilePreview/file-preview-format.js +23 -0
- package/dist/components/FilePreview/index.js +3 -0
- package/dist/components/Flex/Flex.js +0 -1
- package/dist/components/Flex/index.js +0 -1
- package/dist/components/FloatButton/FloatButton.js +42 -0
- package/dist/components/FloatButton/FloatButtonGroup.js +58 -0
- package/dist/components/FloatButton/float-button-context.js +9 -0
- package/dist/components/FloatButton/float-button-glyphs.js +26 -0
- package/dist/components/FloatButton/float-button-styles.js +14 -0
- package/dist/components/FloatButton/index.js +4 -0
- package/dist/components/Fullscreen/Fullscreen.js +29 -0
- package/dist/components/Fullscreen/index.js +3 -0
- package/dist/components/Grid/Grid.js +0 -1
- package/dist/components/Grid/GridItem.js +0 -1
- package/dist/components/Grid/index.js +0 -1
- package/dist/components/Icon/Icon.js +0 -1
- package/dist/components/Icon/index.js +0 -1
- package/dist/components/Image/Image.js +37 -19
- package/dist/components/Image/ImagePreview.js +233 -0
- package/dist/components/InlineCompletion/InlineCompletion.js +81 -0
- package/dist/components/InlineCompletion/index.js +3 -0
- package/dist/components/Input/Input.js +6 -5
- package/dist/components/Input/InputCore.js +3 -2
- package/dist/components/JsonView/JsonView.js +209 -0
- package/dist/components/JsonView/index.js +3 -0
- package/dist/components/JsonView/json-view-utils.js +24 -0
- package/dist/components/Kbd/Kbd.js +0 -1
- package/dist/components/Kbd/index.js +0 -1
- package/dist/components/LocaleProvider/LocaleProvider.js +16 -13
- package/dist/components/LocaleProvider/index.js +5 -3
- package/dist/components/LocaleProvider/ja-jp.js +222 -0
- package/dist/components/LocaleProvider/locale.js +99 -5
- package/dist/components/LocaleProvider/strings.js +15 -0
- package/dist/components/LocaleProvider/useStrings.js +13 -11
- package/dist/components/LocaleProvider/zh-cn.js +99 -5
- package/dist/components/Masonry/Masonry.js +29 -0
- package/dist/components/Masonry/index.js +3 -0
- package/dist/components/Masonry/masonry-distribute.js +15 -0
- package/dist/components/Mentions/Mentions.js +6 -5
- package/dist/components/Mentions/MentionsCore.js +69 -68
- package/dist/components/Menu/Menu.js +5 -5
- package/dist/components/Menu/MenuSub.js +23 -0
- package/dist/components/Menu/MenuSubContent.js +24 -0
- package/dist/components/Menu/MenuSubTrigger.js +30 -0
- package/dist/components/Menu/index.js +4 -1
- package/dist/components/NumberInput/NumberInput.js +6 -5
- package/dist/components/NumberInput/NumberInputCore.js +9 -8
- package/dist/components/OTPInput/OTPInput.js +5 -4
- package/dist/components/OTPInput/OTPInputCore.js +34 -33
- package/dist/components/PasswordInput/PasswordInput.js +5 -4
- package/dist/components/PasswordInput/PasswordInputCore.js +8 -7
- package/dist/components/Popover/Popover.js +43 -31
- package/dist/components/PromptInput/PromptInput.js +213 -0
- package/dist/components/PromptInput/index.js +3 -0
- package/dist/components/Radio/Radio.js +7 -6
- package/dist/components/Radio/RadioGroup.js +5 -4
- package/dist/components/Radio/RadioGroupCore.js +23 -14
- package/dist/components/Rating/Rating.js +5 -4
- package/dist/components/Rating/RatingCore.js +62 -28
- package/dist/components/Resizable/index.js +1 -1
- package/dist/components/Segmented/Segmented.js +5 -4
- package/dist/components/Segmented/SegmentedCore.js +22 -18
- package/dist/components/Select/OptionGroup.js +12 -0
- package/dist/components/Select/Select.js +20 -9
- package/dist/components/Select/SelectCore.js +74 -13
- package/dist/components/Select/SelectFloating.js +256 -0
- package/dist/components/Select/index.js +5 -4
- package/dist/components/Select/select-options.js +57 -0
- package/dist/components/Sidebar/Sidebar.js +9 -9
- package/dist/components/Signature/Signature.js +165 -0
- package/dist/components/Signature/index.js +3 -0
- package/dist/components/Signature/signature-points.js +28 -0
- package/dist/components/Skeleton/Skeleton.js +0 -1
- package/dist/components/Skeleton/index.js +0 -1
- package/dist/components/Slider/Slider.js +16 -8
- package/dist/components/Slider/SliderCore.js +75 -12
- package/dist/components/Sources/Sources.js +109 -0
- package/dist/components/Sources/index.js +3 -0
- package/dist/components/Stat/Stat.js +0 -1
- package/dist/components/Stat/index.js +0 -1
- package/dist/components/Switch/Switch.js +6 -5
- package/dist/components/Switch/SwitchCore.js +3 -2
- package/dist/components/Tabs/Tab.js +7 -4
- package/dist/components/Tabs/TabList.js +38 -7
- package/dist/components/Tabs/TabPanel.js +4 -3
- package/dist/components/Tabs/Tabs.js +11 -6
- package/dist/components/TagGroup/SortableTagGroup.js +26 -0
- package/dist/components/TagGroup/TagGroup.js +4 -6
- package/dist/components/TagGroup/TagGroupItem.js +17 -11
- package/dist/components/TagGroup/index.js +2 -1
- package/dist/components/TagGroup/tag-group-styles.js +7 -0
- package/dist/components/TagInput/SortableTagInput.js +24 -0
- package/dist/components/TagInput/SortableTagInputCore.js +52 -0
- package/dist/components/TagInput/TagInput.js +5 -4
- package/dist/components/TagInput/TagInputCore.js +71 -57
- package/dist/components/TagInput/index.js +3 -1
- package/dist/components/TagInput/tag-input-styles.js +7 -0
- package/dist/components/Textarea/Textarea.js +6 -5
- package/dist/components/Textarea/TextareaCore.js +3 -2
- package/dist/components/TimePicker/TimePicker.js +6 -5
- package/dist/components/TimePicker/TimePickerCore.js +3 -2
- package/dist/components/Toast/Toast.js +44 -42
- package/dist/components/Toast/ToastContainer.js +67 -47
- package/dist/components/Toast/ToastContext.js +23 -4
- package/dist/components/Toast/toast2.js +63 -28
- package/dist/components/Toast/useToast.js +9 -7
- package/dist/components/Toggle/Toggle.js +20 -0
- package/dist/components/Toggle/ToggleCore.js +31 -0
- package/dist/components/Toggle/index.js +4 -0
- package/dist/components/Toolbar/Toolbar.js +33 -32
- package/dist/components/Toolbar/ToolbarToggle.js +31 -0
- package/dist/components/Toolbar/index.js +2 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tour/Tour.js +57 -53
- package/dist/components/Tree/Tree.js +265 -80
- package/dist/components/Tree/TreeItem.js +91 -55
- package/dist/components/Tree/utils.js +82 -10
- package/dist/components/Typography/Typography.js +0 -1
- package/dist/components/Typography/index.js +0 -1
- package/dist/components/Upload/Upload.js +24 -8
- package/dist/components/Upload/UploadCore.js +230 -37
- package/dist/components/Upload/UploadList.js +300 -0
- package/dist/components/Upload/xhr-upload.js +22 -0
- package/dist/components/VirtualList/VirtualList.js +84 -56
- package/dist/components/Watermark/Watermark.js +55 -0
- package/dist/components/Watermark/index.js +3 -0
- package/dist/css/anchor.css +2 -0
- package/dist/css/app-shell.css +2 -0
- package/dist/css/badge.css +1 -1
- package/dist/css/bottom-sheet.css +1 -1
- package/dist/css/button.css +1 -1
- package/dist/css/calendar.css +1 -1
- package/dist/css/cascader.css +1 -1
- package/dist/css/chart.css +2 -0
- package/dist/css/chat-container.css +1 -1
- package/dist/css/chat-message.css +1 -1
- package/dist/css/combobox.css +3 -2
- package/dist/css/command.css +2 -1
- package/dist/css/context-menu.css +1 -1
- package/dist/css/data-table.css +2 -1
- package/dist/css/date-range-picker.css +1 -1
- package/dist/css/datepicker.css +2 -2
- package/dist/css/descriptions.css +2 -0
- package/dist/css/dialog.css +1 -1
- package/dist/css/drawer.css +1 -1
- package/dist/css/dropdown-menu.css +4 -1
- package/dist/css/file-preview.css +2 -0
- package/dist/css/float-button.css +2 -0
- package/dist/css/image.css +2 -1
- package/dist/css/inline-completion.css +2 -0
- package/dist/css/json-view.css +2 -0
- package/dist/css/masonry.css +2 -0
- package/dist/css/menu.css +4 -1
- package/dist/css/popover.css +1 -1
- package/dist/css/prompt-input.css +2 -0
- package/dist/css/rating.css +1 -1
- package/dist/css/select.css +3 -1
- package/dist/css/signature.css +2 -0
- package/dist/css/slider.css +1 -1
- package/dist/css/sources.css +2 -0
- package/dist/css/tag-group.css +3 -1
- package/dist/css/tag-input.css +2 -1
- package/dist/css/toggle.css +2 -0
- package/dist/css/toolbar.css +1 -0
- package/dist/css/tooltip.css +1 -1
- package/dist/css/tree.css +2 -2
- package/dist/css/upload.css +2 -1
- package/dist/css/watermark.css +2 -0
- package/dist/css-manifest.json +75 -1
- package/dist/form/FormItem.js +55 -50
- package/dist/form/FormList.js +79 -0
- package/dist/form/index.js +5 -1
- package/dist/form/standard-schema.js +16 -0
- package/dist/haze-ui.css +61 -30
- package/dist/headless/index.js +19 -0
- package/dist/hooks/useClickOutside.js +24 -0
- package/dist/hooks/useDarkMode.js +27 -0
- package/dist/hooks/useFullscreen.js +42 -0
- package/dist/hooks/useHotkeys.js +77 -0
- package/dist/hooks/useInView.js +27 -0
- package/dist/hooks/useLocalStorage.js +8 -0
- package/dist/hooks/useMediaQuery.js +2 -1
- package/dist/hooks/usePrevious.js +11 -0
- package/dist/hooks/useSessionStorage.js +8 -0
- package/dist/hooks/useStorageState.js +80 -0
- package/dist/index.js +220 -171
- package/dist/registry.json +2435 -91
- package/dist/tokens/colors.js +0 -1
- package/dist/tokens/index.js +0 -1
- package/dist/tokens/motion.js +0 -1
- package/dist/tokens/oklch.js +0 -1
- package/dist/tokens/palette.js +0 -1
- package/dist/tokens/registry.js +17 -28
- package/dist/tokens/spacing.js +0 -1
- package/dist/tokens/typography.js +0 -1
- package/dist/types/components/Anchor/Anchor.d.ts +25 -0
- package/dist/types/components/Anchor/index.d.ts +2 -0
- package/dist/types/components/AppShell/AppShell.d.ts +17 -0
- package/dist/types/components/AppShell/index.d.ts +2 -0
- package/dist/types/components/Badge/badge-styles.d.ts +21 -0
- package/dist/types/components/Badge/index.d.ts +1 -0
- package/dist/types/components/BottomSheet/BottomSheet.d.ts +52 -3
- package/dist/types/components/BottomSheet/index.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +7 -0
- package/dist/types/components/Button/ButtonLink.d.ts +3 -0
- package/dist/types/components/Button/index.d.ts +1 -0
- package/dist/types/components/Button/styles.d.ts +17 -0
- package/dist/types/components/Calendar/Calendar.d.ts +71 -7
- package/dist/types/components/Calendar/date.d.ts +52 -0
- package/dist/types/components/Calendar/index.d.ts +1 -1
- package/dist/types/components/Cascader/Cascader.d.ts +48 -3
- package/dist/types/components/Chart/Chart.d.ts +43 -0
- package/dist/types/components/Chart/chart-elements.d.ts +104 -0
- package/dist/types/components/Chart/index.d.ts +2 -0
- package/dist/types/components/ChatContainer/ChatContainer.d.ts +18 -3
- package/dist/types/components/ChatInput/ChatInput.d.ts +11 -1
- package/dist/types/components/ChatMessage/ChatMessage.d.ts +13 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +6 -2
- package/dist/types/components/Checkbox/CheckboxCore.d.ts +4 -2
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +19 -2
- package/dist/types/components/CodeBlock/index.d.ts +1 -1
- package/dist/types/components/Collapsible/Collapsible.d.ts +24 -2
- package/dist/types/components/Collapsible/index.d.ts +1 -1
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +7 -1
- package/dist/types/components/ColorPicker/ColorPickerCore.d.ts +7 -1
- package/dist/types/components/Combobox/Combobox.d.ts +111 -7
- package/dist/types/components/Combobox/ComboboxGroup.d.ts +22 -0
- package/dist/types/components/Combobox/ComboboxOption.d.ts +7 -2
- package/dist/types/components/Combobox/index.d.ts +3 -1
- package/dist/types/components/Command/Command.d.ts +70 -6
- package/dist/types/components/Command/CommandDialog.d.ts +36 -0
- package/dist/types/components/Command/command-filter.d.ts +34 -0
- package/dist/types/components/Command/index.d.ts +4 -2
- package/dist/types/components/DataTable/CellEditor.d.ts +24 -0
- package/dist/types/components/DataTable/DataTable.d.ts +184 -32
- package/dist/types/components/DataTable/csv.d.ts +36 -0
- package/dist/types/components/DataTable/features.d.ts +124 -0
- package/dist/types/components/DataTable/index.d.ts +4 -1
- package/dist/types/components/DataTable/summary.d.ts +19 -0
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +28 -2
- package/dist/types/components/DateRangePicker/DateRangePickerCore.d.ts +26 -2
- package/dist/types/components/DateRangePicker/index.d.ts +2 -2
- package/dist/types/components/DateRangePicker/presets.d.ts +23 -0
- package/dist/types/components/Datepicker/Datepicker.d.ts +21 -1
- package/dist/types/components/Datepicker/DatepickerCore.d.ts +29 -2
- package/dist/types/components/Datepicker/datetime.d.ts +27 -0
- package/dist/types/components/Datepicker/index.d.ts +1 -1
- package/dist/types/components/Descriptions/Descriptions.d.ts +30 -0
- package/dist/types/components/Descriptions/index.d.ts +2 -0
- package/dist/types/components/Dialog/Dialog.d.ts +68 -3
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/Drawer/Drawer.d.ts +33 -3
- package/dist/types/components/Drawer/index.d.ts +1 -1
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +23 -3
- package/dist/types/components/DropdownMenu/DropdownMenuSub.d.ts +18 -0
- package/dist/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +13 -0
- package/dist/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +14 -0
- package/dist/types/components/DropdownMenu/index.d.ts +7 -1
- package/dist/types/components/FilePreview/FilePreview.d.ts +35 -0
- package/dist/types/components/FilePreview/file-preview-format.d.ts +20 -0
- package/dist/types/components/FilePreview/index.d.ts +2 -0
- package/dist/types/components/FloatButton/FloatButton.d.ts +43 -0
- package/dist/types/components/FloatButton/FloatButtonGroup.d.ts +33 -0
- package/dist/types/components/FloatButton/float-button-context.d.ts +11 -0
- package/dist/types/components/FloatButton/float-button-glyphs.d.ts +3 -0
- package/dist/types/components/FloatButton/float-button-styles.d.ts +58 -0
- package/dist/types/components/FloatButton/index.d.ts +4 -0
- package/dist/types/components/Fullscreen/Fullscreen.d.ts +34 -0
- package/dist/types/components/Fullscreen/index.d.ts +3 -0
- package/dist/types/components/Image/Image.d.ts +20 -5
- package/dist/types/components/Image/ImagePreview.d.ts +13 -0
- package/dist/types/components/Image/index.d.ts +1 -1
- package/dist/types/components/InlineCompletion/InlineCompletion.d.ts +29 -0
- package/dist/types/components/InlineCompletion/index.d.ts +2 -0
- package/dist/types/components/Input/Input.d.ts +5 -2
- package/dist/types/components/Input/InputCore.d.ts +4 -2
- package/dist/types/components/JsonView/JsonView.d.ts +26 -0
- package/dist/types/components/JsonView/index.d.ts +2 -0
- package/dist/types/components/JsonView/json-view-utils.d.ts +22 -0
- package/dist/types/components/LocaleProvider/LocaleContext.d.ts +9 -0
- package/dist/types/components/LocaleProvider/LocaleProvider.d.ts +12 -1
- package/dist/types/components/LocaleProvider/index.d.ts +3 -0
- package/dist/types/components/LocaleProvider/ja-jp.d.ts +13 -0
- package/dist/types/components/LocaleProvider/locale.d.ts +100 -0
- package/dist/types/components/LocaleProvider/strings.d.ts +28 -0
- package/dist/types/components/Masonry/Masonry.d.ts +34 -0
- package/dist/types/components/Masonry/index.d.ts +2 -0
- package/dist/types/components/Masonry/masonry-distribute.d.ts +16 -0
- package/dist/types/components/Mentions/Mentions.d.ts +5 -2
- package/dist/types/components/Mentions/MentionsCore.d.ts +4 -2
- package/dist/types/components/Menu/MenuSub.d.ts +18 -0
- package/dist/types/components/Menu/MenuSubContent.d.ts +12 -0
- package/dist/types/components/Menu/MenuSubTrigger.d.ts +14 -0
- package/dist/types/components/Menu/index.d.ts +6 -0
- package/dist/types/components/NumberInput/NumberInput.d.ts +5 -2
- package/dist/types/components/NumberInput/NumberInputCore.d.ts +4 -2
- package/dist/types/components/OTPInput/OTPInput.d.ts +5 -1
- package/dist/types/components/OTPInput/OTPInputCore.d.ts +4 -1
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +5 -1
- package/dist/types/components/PasswordInput/PasswordInputCore.d.ts +4 -1
- package/dist/types/components/Popover/Popover.d.ts +41 -3
- package/dist/types/components/Popover/index.d.ts +1 -1
- package/dist/types/components/PromptInput/PromptInput.d.ts +46 -0
- package/dist/types/components/PromptInput/index.d.ts +2 -0
- package/dist/types/components/Radio/Radio.d.ts +5 -2
- package/dist/types/components/Radio/RadioGroup.d.ts +8 -2
- package/dist/types/components/Radio/RadioGroupCore.d.ts +7 -2
- package/dist/types/components/Rating/Rating.d.ts +8 -1
- package/dist/types/components/Rating/RatingCore.d.ts +7 -1
- package/dist/types/components/Resizable/index.d.ts +2 -0
- package/dist/types/components/Segmented/Segmented.d.ts +8 -1
- package/dist/types/components/Segmented/SegmentedCore.d.ts +7 -2
- package/dist/types/components/Select/OptionGroup.d.ts +16 -0
- package/dist/types/components/Select/Select.d.ts +78 -4
- package/dist/types/components/Select/SelectCore.d.ts +79 -6
- package/dist/types/components/Select/SelectFloating.d.ts +94 -0
- package/dist/types/components/Select/index.d.ts +2 -0
- package/dist/types/components/Select/select-options.d.ts +53 -0
- package/dist/types/components/Signature/Signature.d.ts +51 -0
- package/dist/types/components/Signature/index.d.ts +2 -0
- package/dist/types/components/Signature/signature-points.d.ts +31 -0
- package/dist/types/components/Slider/Slider.d.ts +29 -4
- package/dist/types/components/Slider/SliderCore.d.ts +35 -6
- package/dist/types/components/Sources/Sources.d.ts +37 -0
- package/dist/types/components/Sources/index.d.ts +2 -0
- package/dist/types/components/Switch/Switch.d.ts +5 -2
- package/dist/types/components/Switch/SwitchCore.d.ts +4 -2
- package/dist/types/components/Tabs/TabList.d.ts +7 -0
- package/dist/types/components/Tabs/Tabs.d.ts +8 -1
- package/dist/types/components/Tabs/TabsContext.d.ts +20 -0
- package/dist/types/components/Tabs/index.d.ts +1 -0
- package/dist/types/components/TagGroup/SortableTagGroup.d.ts +20 -0
- package/dist/types/components/TagGroup/TagGroup.d.ts +3 -0
- package/dist/types/components/TagGroup/index.d.ts +2 -0
- package/dist/types/components/TagGroup/tag-group-styles.d.ts +7 -0
- package/dist/types/components/TagInput/SortableTagInput.d.ts +34 -0
- package/dist/types/components/TagInput/SortableTagInputCore.d.ts +18 -0
- package/dist/types/components/TagInput/TagInput.d.ts +5 -1
- package/dist/types/components/TagInput/TagInputCore.d.ts +6 -2
- package/dist/types/components/TagInput/index.d.ts +4 -0
- package/dist/types/components/TagInput/tag-input-styles.d.ts +12 -0
- package/dist/types/components/Textarea/Textarea.d.ts +5 -2
- package/dist/types/components/Textarea/TextareaCore.d.ts +4 -2
- package/dist/types/components/TimePicker/TimePicker.d.ts +5 -2
- package/dist/types/components/TimePicker/TimePickerCore.d.ts +4 -2
- package/dist/types/components/Toast/Toast.d.ts +31 -2
- package/dist/types/components/Toast/ToastContainer.d.ts +11 -1
- package/dist/types/components/Toast/ToastContext.d.ts +44 -3
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/toast.d.ts +35 -4
- package/dist/types/components/Toast/useToast.d.ts +16 -4
- package/dist/types/components/Toggle/Toggle.d.ts +19 -0
- package/dist/types/components/Toggle/ToggleCore.d.ts +23 -0
- package/dist/types/components/Toggle/index.d.ts +4 -0
- package/dist/types/components/Toolbar/ToolbarToggle.d.ts +19 -0
- package/dist/types/components/Toolbar/index.d.ts +2 -0
- package/dist/types/components/Tour/Tour.d.ts +3 -3
- package/dist/types/components/Tree/Tree.d.ts +3 -3
- package/dist/types/components/Tree/TreeItem.d.ts +16 -1
- package/dist/types/components/Tree/types.d.ts +51 -0
- package/dist/types/components/Tree/utils.d.ts +73 -0
- package/dist/types/components/Upload/Upload.d.ts +47 -3
- package/dist/types/components/Upload/UploadCore.d.ts +95 -4
- package/dist/types/components/Upload/UploadList.d.ts +18 -0
- package/dist/types/components/Upload/index.d.ts +1 -0
- package/dist/types/components/Upload/types.d.ts +60 -0
- package/dist/types/components/Upload/xhr-upload.d.ts +20 -0
- package/dist/types/components/VirtualList/VirtualList.d.ts +16 -1
- package/dist/types/components/Watermark/Watermark.d.ts +32 -0
- package/dist/types/components/Watermark/index.d.ts +2 -0
- package/dist/types/form/FormItem.d.ts +33 -8
- package/dist/types/form/FormList.d.ts +113 -0
- package/dist/types/form/index.d.ts +26 -0
- package/dist/types/form/standard-schema.d.ts +30 -0
- package/dist/types/headless/index.d.ts +399 -0
- package/dist/types/hooks/index.d.ts +13 -0
- package/dist/types/hooks/useClickOutside.d.ts +46 -0
- package/dist/types/hooks/useDarkMode.d.ts +40 -0
- package/dist/types/hooks/useFullscreen.d.ts +33 -0
- package/dist/types/hooks/useHotkeys.d.ts +53 -0
- package/dist/types/hooks/useInView.d.ts +32 -0
- package/dist/types/hooks/useLocalStorage.d.ts +33 -0
- package/dist/types/hooks/useMediaQuery.d.ts +3 -0
- package/dist/types/hooks/usePrevious.d.ts +18 -0
- package/dist/types/hooks/useSessionStorage.d.ts +26 -0
- package/dist/types/hooks/useStorageState.d.ts +12 -0
- package/dist/types/index.d.ts +79 -37
- package/dist/types/utils/collision.d.ts +39 -1
- package/dist/types/utils/direction.d.ts +22 -0
- package/dist/types/utils/floating.d.ts +32 -4
- package/dist/types/utils/focus-scope.d.ts +2 -1
- package/dist/types/utils/focus.d.ts +2 -1
- package/dist/types/utils/menuKeyboard.d.ts +19 -4
- package/dist/types/utils/refs.d.ts +16 -0
- package/dist/types/utils/sortable-handle.d.ts +25 -0
- package/dist/types/utils/sortable-shared.d.ts +30 -0
- package/dist/types/utils/sortable.d.ts +36 -0
- package/dist/types/utils/submenu.d.ts +63 -0
- package/dist/types/utils/view-transition.d.ts +28 -0
- package/dist/utils/classnames.js +0 -1
- package/dist/utils/collision.js +37 -26
- package/dist/utils/direction.js +34 -0
- package/dist/utils/floating.js +163 -143
- package/dist/utils/menuKeyboard.js +59 -46
- package/dist/utils/refs.js +9 -0
- package/dist/utils/sortable-handle.js +12 -0
- package/dist/utils/sortable-shared.js +16 -0
- package/dist/utils/sortable.js +47 -0
- package/dist/utils/submenu.js +106 -0
- package/dist/utils/view-transition.js +26 -0
- package/package.json +169 -16
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
+
import { useStrings as t } from "../LocaleProvider/useStrings.js";
|
|
5
|
+
import n from "../Progress/Progress.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
|
+
import { useEffect as o, useState as s } from "react";
|
|
9
|
+
//#region src/lib/components/Upload/UploadList.tsx
|
|
10
|
+
var c = "haze-UploadList__listBase", l = "haze-UploadList__itemBase", u = "haze-UploadList__rowBase", d = "haze-UploadList__nameClass", f = "haze-UploadList__statusIcon", p = "haze-UploadList__successIcon", m = "haze-UploadList__errorIcon", h = "haze-UploadList__percentClass", g = "haze-UploadList__actionButton", _ = "haze-UploadList__cardGrid", v = "haze-UploadList__cardRemove", y = "haze-UploadList__cardBase", b = "haze-UploadList__cardImage", x = "haze-UploadList__cardFallback", S = "haze-UploadList__cardFallbackName", C = "haze-UploadList__cardMask", w = "haze-UploadList__cardMaskPercent", T = "haze-UploadList__cardErrorOverlay";
|
|
11
|
+
function E(e, t, n, r) {
|
|
12
|
+
return {
|
|
13
|
+
remove: () => t(e.file),
|
|
14
|
+
retry: () => n(e.file),
|
|
15
|
+
cancel: () => r(e.file)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function D({ entry: o, actions: s, removeLabel: c }) {
|
|
19
|
+
let l = t("upload"), { file: _, status: v, percent: y } = o;
|
|
20
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
21
|
+
className: e([u]),
|
|
22
|
+
children: [
|
|
23
|
+
v === "success" && /* @__PURE__ */ i("span", {
|
|
24
|
+
role: "img",
|
|
25
|
+
"aria-label": l.success,
|
|
26
|
+
className: e([f, p]),
|
|
27
|
+
children: /* @__PURE__ */ i("svg", {
|
|
28
|
+
width: "16",
|
|
29
|
+
height: "16",
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
fill: "none",
|
|
32
|
+
stroke: "currentColor",
|
|
33
|
+
strokeWidth: "2",
|
|
34
|
+
strokeLinecap: "round",
|
|
35
|
+
strokeLinejoin: "round",
|
|
36
|
+
children: /* @__PURE__ */ i("polyline", { points: "20 6 9 17 4 12" })
|
|
37
|
+
})
|
|
38
|
+
}),
|
|
39
|
+
v === "error" && /* @__PURE__ */ i("span", {
|
|
40
|
+
role: "img",
|
|
41
|
+
"aria-label": l.error,
|
|
42
|
+
className: e([f, m]),
|
|
43
|
+
children: /* @__PURE__ */ a("svg", {
|
|
44
|
+
width: "16",
|
|
45
|
+
height: "16",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
fill: "none",
|
|
48
|
+
stroke: "currentColor",
|
|
49
|
+
strokeWidth: "2",
|
|
50
|
+
strokeLinecap: "round",
|
|
51
|
+
strokeLinejoin: "round",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ i("circle", {
|
|
54
|
+
cx: "12",
|
|
55
|
+
cy: "12",
|
|
56
|
+
r: "10"
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ i("line", {
|
|
59
|
+
x1: "12",
|
|
60
|
+
y1: "8",
|
|
61
|
+
x2: "12",
|
|
62
|
+
y2: "12"
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ i("line", {
|
|
65
|
+
x1: "12",
|
|
66
|
+
y1: "16",
|
|
67
|
+
x2: "12.01",
|
|
68
|
+
y2: "16"
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ i("span", {
|
|
74
|
+
title: _.name,
|
|
75
|
+
className: e([d]),
|
|
76
|
+
children: _.name
|
|
77
|
+
}),
|
|
78
|
+
v === "uploading" && /* @__PURE__ */ a("span", {
|
|
79
|
+
className: e([h]),
|
|
80
|
+
children: [
|
|
81
|
+
l.uploading,
|
|
82
|
+
" ",
|
|
83
|
+
y,
|
|
84
|
+
"%"
|
|
85
|
+
]
|
|
86
|
+
}),
|
|
87
|
+
v === "uploading" ? /* @__PURE__ */ i("button", {
|
|
88
|
+
type: "button",
|
|
89
|
+
"aria-label": l.cancel,
|
|
90
|
+
"data-action": "cancel",
|
|
91
|
+
onClick: s.cancel,
|
|
92
|
+
className: e([g]),
|
|
93
|
+
children: /* @__PURE__ */ a("svg", {
|
|
94
|
+
width: "16",
|
|
95
|
+
height: "16",
|
|
96
|
+
viewBox: "0 0 24 24",
|
|
97
|
+
fill: "none",
|
|
98
|
+
stroke: "currentColor",
|
|
99
|
+
strokeWidth: "2",
|
|
100
|
+
strokeLinecap: "round",
|
|
101
|
+
strokeLinejoin: "round",
|
|
102
|
+
children: [/* @__PURE__ */ i("line", {
|
|
103
|
+
x1: "18",
|
|
104
|
+
y1: "6",
|
|
105
|
+
x2: "6",
|
|
106
|
+
y2: "18"
|
|
107
|
+
}), /* @__PURE__ */ i("line", {
|
|
108
|
+
x1: "6",
|
|
109
|
+
y1: "6",
|
|
110
|
+
x2: "18",
|
|
111
|
+
y2: "18"
|
|
112
|
+
})]
|
|
113
|
+
})
|
|
114
|
+
}) : /* @__PURE__ */ a(r, { children: [v === "error" && /* @__PURE__ */ i("button", {
|
|
115
|
+
type: "button",
|
|
116
|
+
"aria-label": l.retry,
|
|
117
|
+
"data-action": "retry",
|
|
118
|
+
onClick: s.retry,
|
|
119
|
+
className: e([g]),
|
|
120
|
+
children: /* @__PURE__ */ a("svg", {
|
|
121
|
+
width: "16",
|
|
122
|
+
height: "16",
|
|
123
|
+
viewBox: "0 0 24 24",
|
|
124
|
+
fill: "none",
|
|
125
|
+
stroke: "currentColor",
|
|
126
|
+
strokeWidth: "2",
|
|
127
|
+
strokeLinecap: "round",
|
|
128
|
+
strokeLinejoin: "round",
|
|
129
|
+
children: [/* @__PURE__ */ i("polyline", { points: "23 4 23 10 17 10" }), /* @__PURE__ */ i("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })]
|
|
130
|
+
})
|
|
131
|
+
}), /* @__PURE__ */ i("button", {
|
|
132
|
+
type: "button",
|
|
133
|
+
"aria-label": c ?? l.remove,
|
|
134
|
+
"data-action": "remove",
|
|
135
|
+
onClick: s.remove,
|
|
136
|
+
className: e([g]),
|
|
137
|
+
children: /* @__PURE__ */ a("svg", {
|
|
138
|
+
width: "16",
|
|
139
|
+
height: "16",
|
|
140
|
+
viewBox: "0 0 24 24",
|
|
141
|
+
fill: "none",
|
|
142
|
+
stroke: "currentColor",
|
|
143
|
+
strokeWidth: "2",
|
|
144
|
+
strokeLinecap: "round",
|
|
145
|
+
strokeLinejoin: "round",
|
|
146
|
+
children: [/* @__PURE__ */ i("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ i("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })]
|
|
147
|
+
})
|
|
148
|
+
})] })
|
|
149
|
+
]
|
|
150
|
+
}), (v === "uploading" || v === "error") && /* @__PURE__ */ i(n, {
|
|
151
|
+
value: y,
|
|
152
|
+
size: "sm",
|
|
153
|
+
color: v === "error" ? "danger" : "primary"
|
|
154
|
+
})] });
|
|
155
|
+
}
|
|
156
|
+
function O({ entry: c, actions: l, removeLabel: u }) {
|
|
157
|
+
let d = t("upload"), { file: f, status: p, percent: m } = c, h = f.type.startsWith("image/"), [_, y] = s(null);
|
|
158
|
+
return o(() => {
|
|
159
|
+
if (!h) return;
|
|
160
|
+
let e = URL.createObjectURL(f);
|
|
161
|
+
return y(e), () => URL.revokeObjectURL(e);
|
|
162
|
+
}, [f, h]), /* @__PURE__ */ a(r, { children: [
|
|
163
|
+
_ ? /* @__PURE__ */ i("img", {
|
|
164
|
+
src: _,
|
|
165
|
+
alt: f.name,
|
|
166
|
+
className: e([b])
|
|
167
|
+
}) : /* @__PURE__ */ a("span", {
|
|
168
|
+
role: "img",
|
|
169
|
+
"aria-label": f.name,
|
|
170
|
+
className: e([x]),
|
|
171
|
+
children: [/* @__PURE__ */ a("svg", {
|
|
172
|
+
width: "24",
|
|
173
|
+
height: "24",
|
|
174
|
+
viewBox: "0 0 24 24",
|
|
175
|
+
fill: "none",
|
|
176
|
+
stroke: "currentColor",
|
|
177
|
+
strokeWidth: "2",
|
|
178
|
+
strokeLinecap: "round",
|
|
179
|
+
strokeLinejoin: "round",
|
|
180
|
+
children: [/* @__PURE__ */ i("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), /* @__PURE__ */ i("polyline", { points: "14 2 14 8 20 8" })]
|
|
181
|
+
}), /* @__PURE__ */ i("span", {
|
|
182
|
+
title: f.name,
|
|
183
|
+
className: e([S]),
|
|
184
|
+
children: f.name
|
|
185
|
+
})]
|
|
186
|
+
}),
|
|
187
|
+
p === "uploading" && /* @__PURE__ */ a("div", {
|
|
188
|
+
className: e([C]),
|
|
189
|
+
children: [/* @__PURE__ */ i(n, {
|
|
190
|
+
value: m,
|
|
191
|
+
size: "sm"
|
|
192
|
+
}), /* @__PURE__ */ a("span", {
|
|
193
|
+
className: e([w]),
|
|
194
|
+
children: [m, "%"]
|
|
195
|
+
})]
|
|
196
|
+
}),
|
|
197
|
+
p === "error" && /* @__PURE__ */ a("div", {
|
|
198
|
+
className: e([T]),
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ a("svg", {
|
|
201
|
+
width: "20",
|
|
202
|
+
height: "20",
|
|
203
|
+
viewBox: "0 0 24 24",
|
|
204
|
+
fill: "none",
|
|
205
|
+
stroke: "currentColor",
|
|
206
|
+
strokeWidth: "2",
|
|
207
|
+
strokeLinecap: "round",
|
|
208
|
+
strokeLinejoin: "round",
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ i("circle", {
|
|
211
|
+
cx: "12",
|
|
212
|
+
cy: "12",
|
|
213
|
+
r: "10"
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ i("line", {
|
|
216
|
+
x1: "12",
|
|
217
|
+
y1: "8",
|
|
218
|
+
x2: "12",
|
|
219
|
+
y2: "12"
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ i("line", {
|
|
222
|
+
x1: "12",
|
|
223
|
+
y1: "16",
|
|
224
|
+
x2: "12.01",
|
|
225
|
+
y2: "16"
|
|
226
|
+
})
|
|
227
|
+
]
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ i("span", { children: d.error }),
|
|
230
|
+
/* @__PURE__ */ i("button", {
|
|
231
|
+
type: "button",
|
|
232
|
+
"aria-label": d.retry,
|
|
233
|
+
"data-action": "retry",
|
|
234
|
+
onClick: l.retry,
|
|
235
|
+
className: e([g]),
|
|
236
|
+
children: /* @__PURE__ */ a("svg", {
|
|
237
|
+
width: "16",
|
|
238
|
+
height: "16",
|
|
239
|
+
viewBox: "0 0 24 24",
|
|
240
|
+
fill: "none",
|
|
241
|
+
stroke: "currentColor",
|
|
242
|
+
strokeWidth: "2",
|
|
243
|
+
strokeLinecap: "round",
|
|
244
|
+
strokeLinejoin: "round",
|
|
245
|
+
children: [/* @__PURE__ */ i("polyline", { points: "23 4 23 10 17 10" }), /* @__PURE__ */ i("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })]
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
]
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ i("button", {
|
|
251
|
+
type: "button",
|
|
252
|
+
"data-card-remove": !0,
|
|
253
|
+
"aria-label": u ?? d.remove,
|
|
254
|
+
"data-action": "remove",
|
|
255
|
+
onClick: l.remove,
|
|
256
|
+
className: e([v]),
|
|
257
|
+
children: /* @__PURE__ */ a("svg", {
|
|
258
|
+
width: "14",
|
|
259
|
+
height: "14",
|
|
260
|
+
viewBox: "0 0 24 24",
|
|
261
|
+
fill: "none",
|
|
262
|
+
stroke: "currentColor",
|
|
263
|
+
strokeWidth: "2",
|
|
264
|
+
strokeLinecap: "round",
|
|
265
|
+
strokeLinejoin: "round",
|
|
266
|
+
children: [/* @__PURE__ */ i("line", {
|
|
267
|
+
x1: "18",
|
|
268
|
+
y1: "6",
|
|
269
|
+
x2: "6",
|
|
270
|
+
y2: "18"
|
|
271
|
+
}), /* @__PURE__ */ i("line", {
|
|
272
|
+
x1: "6",
|
|
273
|
+
y1: "6",
|
|
274
|
+
x2: "18",
|
|
275
|
+
y2: "18"
|
|
276
|
+
})]
|
|
277
|
+
})
|
|
278
|
+
})
|
|
279
|
+
] });
|
|
280
|
+
}
|
|
281
|
+
function k({ entries: t, listType: n = "text", removeLabel: r, itemRender: a, onRemove: o, onRetry: s, onCancel: u }) {
|
|
282
|
+
let d = n === "picture-card";
|
|
283
|
+
return /* @__PURE__ */ i("ul", {
|
|
284
|
+
className: e([d ? _ : c]),
|
|
285
|
+
children: t.map((t) => {
|
|
286
|
+
let n = E(t, o, s, u);
|
|
287
|
+
return /* @__PURE__ */ i("li", {
|
|
288
|
+
"data-status": t.status,
|
|
289
|
+
className: e([d ? y : l]),
|
|
290
|
+
children: a ? a(t.file, t.status, t.percent, n) : i(d ? O : D, {
|
|
291
|
+
entry: t,
|
|
292
|
+
actions: n,
|
|
293
|
+
removeLabel: r
|
|
294
|
+
})
|
|
295
|
+
}, t.uid);
|
|
296
|
+
})
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
export { k as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/lib/components/Upload/xhr-upload.ts
|
|
3
|
+
function e(e) {
|
|
4
|
+
return (t, n) => new Promise((r, i) => {
|
|
5
|
+
if (n.signal.aborted) {
|
|
6
|
+
i(new DOMException("Aborted", "AbortError"));
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
let a = new XMLHttpRequest(), o = new FormData();
|
|
10
|
+
if (o.append(e.name ?? "file", t), e.data) for (let [t, n] of Object.entries(e.data)) o.append(t, n);
|
|
11
|
+
if (a.open(e.method ?? "POST", e.action), e.headers) for (let [t, n] of Object.entries(e.headers)) a.setRequestHeader(t, n);
|
|
12
|
+
a.upload.onprogress = (e) => {
|
|
13
|
+
e.lengthComputable && e.total > 0 && n.onProgress(Math.round(e.loaded / e.total * 100));
|
|
14
|
+
}, a.onload = () => {
|
|
15
|
+
a.status >= 200 && a.status < 300 ? r() : i(/* @__PURE__ */ Error(`Upload failed with status ${a.status}`));
|
|
16
|
+
}, a.onerror = () => i(/* @__PURE__ */ TypeError("Network error")), a.onabort = () => i(new DOMException("Aborted", "AbortError")), n.signal.addEventListener("abort", () => {
|
|
17
|
+
a.abort();
|
|
18
|
+
}, { once: !0 }), a.send(o);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { e as createXhrRequest };
|
|
@@ -25,118 +25,146 @@ function f(e, t, n) {
|
|
|
25
25
|
function p(e, t, n) {
|
|
26
26
|
return e[Math.max(0, Math.min(t, n))] ?? 0;
|
|
27
27
|
}
|
|
28
|
-
function m({ items: m, height: h, itemHeight: g, estimatedItemHeight: _, groups: v, renderItem: y, overscan: b = 5,
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
function m({ items: m, height: h, itemHeight: g, estimatedItemHeight: _, groups: v, renderItem: y, overscan: b = 5, reverse: x = !1, className: S, style: C, ref: w, ...T }) {
|
|
29
|
+
let E = _ !== void 0, D = v !== void 0 && v.length > 0, O = _ ?? g, [k, A] = s(0), [j, M] = s(0), N = o(null), P = o(!0), F = o(/* @__PURE__ */ new Map()), I = o(/* @__PURE__ */ new Map()), L = o(null), R = o(null), z = r(() => {
|
|
30
|
+
let e = N.current;
|
|
31
|
+
if (e && (A(e.scrollTop), x)) {
|
|
32
|
+
let t = e.clientHeight || h;
|
|
33
|
+
P.current = e.scrollHeight - e.scrollTop - t <= 1;
|
|
34
|
+
}
|
|
35
|
+
}, [x, h]);
|
|
32
36
|
i(() => {
|
|
33
|
-
let e =
|
|
34
|
-
if (e) return e.addEventListener("scroll",
|
|
35
|
-
}, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
let e = N.current;
|
|
38
|
+
if (e) return e.addEventListener("scroll", z, { passive: !0 }), () => e.removeEventListener("scroll", z);
|
|
39
|
+
}, [z]), i(() => {
|
|
40
|
+
let e = N.current;
|
|
41
|
+
if (!e || !x || !P.current) return;
|
|
42
|
+
let t = e.clientHeight || h;
|
|
43
|
+
e.scrollTop = Math.max(0, e.scrollHeight - t), A(e.scrollTop);
|
|
44
|
+
}, [
|
|
45
|
+
x,
|
|
46
|
+
m,
|
|
47
|
+
j,
|
|
48
|
+
h
|
|
49
|
+
]);
|
|
50
|
+
let B = (() => {
|
|
51
|
+
let e = R.current;
|
|
52
|
+
if (e?.items === m && e.version === j && e.itemHeight === g && e.estimated === _ && e.dynamic === E) return e.sums;
|
|
39
53
|
let t = new Float64Array(m.length + 1);
|
|
40
|
-
for (let e = 0; e < m.length; e++) t[e + 1] = (t[e] ?? 0) + (
|
|
41
|
-
return
|
|
54
|
+
for (let e = 0; e < m.length; e++) t[e + 1] = (t[e] ?? 0) + (E ? F.current.get(e) ?? O : g);
|
|
55
|
+
return R.current = {
|
|
42
56
|
items: m,
|
|
43
|
-
version:
|
|
57
|
+
version: j,
|
|
44
58
|
itemHeight: g,
|
|
45
59
|
estimated: _,
|
|
46
|
-
dynamic:
|
|
60
|
+
dynamic: E,
|
|
47
61
|
sums: t
|
|
48
62
|
}, t;
|
|
49
|
-
})(),
|
|
63
|
+
})(), V = B[m.length] ?? 0, H = x ? Math.max(0, V - h - k) : k, U = Math.max(0, d(B, m.length, H) - b), W = Math.min(m.length, f(B, m.length, H + h) + b);
|
|
50
64
|
i(() => {
|
|
51
|
-
let e =
|
|
65
|
+
let e = F.current;
|
|
52
66
|
for (let t of e.keys()) t >= m.length && e.delete(t);
|
|
53
67
|
}, [m.length]), i(() => {
|
|
54
68
|
if (!v) return;
|
|
55
|
-
let e =
|
|
69
|
+
let e = I.current, t = new Set(v.map((e) => e.key));
|
|
56
70
|
for (let n of e.keys()) t.has(n) || e.delete(n);
|
|
57
71
|
}, [v]), i(() => {
|
|
58
|
-
if (!
|
|
72
|
+
if (!E && !D) return;
|
|
59
73
|
let e = new ResizeObserver((e) => {
|
|
60
74
|
let t = !1;
|
|
61
75
|
for (let n of e) {
|
|
62
76
|
let e = n.target, { index: r, groupKey: i } = e.dataset, a = e.getBoundingClientRect().height;
|
|
63
77
|
if (r !== void 0) {
|
|
64
78
|
let e = Number(r);
|
|
65
|
-
|
|
66
|
-
} else i !== void 0 &&
|
|
79
|
+
F.current.get(e) !== a && (F.current.set(e, a), t = !0);
|
|
80
|
+
} else i !== void 0 && I.current.get(i) !== a && (I.current.set(i, a), t = !0);
|
|
67
81
|
}
|
|
68
|
-
t &&
|
|
82
|
+
t && M((e) => e + 1);
|
|
69
83
|
});
|
|
70
|
-
return
|
|
71
|
-
|
|
84
|
+
return L.current = e, () => {
|
|
85
|
+
L.current = null, e.disconnect();
|
|
72
86
|
};
|
|
73
|
-
}, [
|
|
74
|
-
let e =
|
|
87
|
+
}, [E, D]), i(() => {
|
|
88
|
+
let e = L.current, t = N.current;
|
|
75
89
|
e && t && t.querySelectorAll("[data-index], [data-group-key]").forEach((t) => {
|
|
76
90
|
e.observe(t);
|
|
77
91
|
});
|
|
78
92
|
}, [
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
93
|
+
U,
|
|
94
|
+
W,
|
|
95
|
+
j,
|
|
82
96
|
v,
|
|
83
|
-
|
|
84
|
-
|
|
97
|
+
E,
|
|
98
|
+
D
|
|
85
99
|
]);
|
|
86
|
-
let
|
|
100
|
+
let G = (() => {
|
|
87
101
|
if (!v) return null;
|
|
88
|
-
let n =
|
|
102
|
+
let n = H + h, r = [];
|
|
89
103
|
for (let i = 0; i < v.length; i++) {
|
|
90
104
|
let a = v[i];
|
|
91
105
|
if (!a) continue;
|
|
92
|
-
let o = i + 1 < v.length ? v[i + 1] : void 0, s = p(
|
|
93
|
-
if (c <=
|
|
94
|
-
let l =
|
|
106
|
+
let o = i + 1 < v.length ? v[i + 1] : void 0, s = p(B, m.length, a.startIndex), c = o ? p(B, m.length, o.startIndex) : V;
|
|
107
|
+
if (c <= H || s >= n) continue;
|
|
108
|
+
let l = I.current.get(a.key) ?? O, d = Math.max(s, Math.min(H, c - l));
|
|
95
109
|
r.push(/* @__PURE__ */ t("div", {
|
|
96
110
|
"data-group-key": a.key,
|
|
97
|
-
style: { top: d },
|
|
111
|
+
style: x ? { bottom: d } : { top: d },
|
|
98
112
|
className: e([u]),
|
|
99
113
|
children: a.render()
|
|
100
114
|
}, a.key));
|
|
101
115
|
}
|
|
102
116
|
return r;
|
|
103
|
-
})(),
|
|
104
|
-
let n =
|
|
117
|
+
})(), K = r((e, t = "auto") => {
|
|
118
|
+
let n = N.current;
|
|
105
119
|
if (!n || m.length === 0) return;
|
|
106
|
-
let r = Math.max(0, Math.min(m.length - 1, Math.floor(e))), i =
|
|
120
|
+
let r = Math.max(0, Math.min(m.length - 1, Math.floor(e))), i = B[r] ?? 0, a = E ? F.current.get(r) ?? O : g, o = n.clientHeight || h, s = (e) => e === "start" ? i : e === "end" ? i + a - o : i + a / 2 - o / 2;
|
|
121
|
+
if (x) {
|
|
122
|
+
let e = Math.max(0, n.scrollHeight - o), r = Math.max(0, e - n.scrollTop);
|
|
123
|
+
if (t === "auto") {
|
|
124
|
+
if (i >= r && i + a <= r + o) return;
|
|
125
|
+
let t = s(i < r ? "end" : "start");
|
|
126
|
+
n.scrollTop = e - Math.max(0, Math.min(t, e));
|
|
127
|
+
} else {
|
|
128
|
+
let r = s(t);
|
|
129
|
+
n.scrollTop = e - Math.max(0, Math.min(r, e));
|
|
130
|
+
}
|
|
131
|
+
A(n.scrollTop);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
let c;
|
|
107
135
|
if (t === "auto") {
|
|
108
136
|
let e = n.scrollTop;
|
|
109
137
|
if (i >= e && i + a <= e + o) return;
|
|
110
138
|
c = s(i < e ? "end" : "start");
|
|
111
139
|
} else c = s(t);
|
|
112
|
-
n.scrollTop = Math.max(0, Math.min(c, n.scrollHeight - o)),
|
|
140
|
+
n.scrollTop = Math.max(0, Math.min(c, n.scrollHeight - o)), A(n.scrollTop);
|
|
113
141
|
}, [
|
|
114
|
-
|
|
142
|
+
B,
|
|
115
143
|
m.length,
|
|
116
|
-
|
|
117
|
-
|
|
144
|
+
E,
|
|
145
|
+
O,
|
|
118
146
|
g,
|
|
119
|
-
h
|
|
147
|
+
h,
|
|
148
|
+
x
|
|
120
149
|
]);
|
|
121
|
-
return a(
|
|
122
|
-
ref:
|
|
150
|
+
return a(w, () => ({ scrollToIndex: K }), [K]), /* @__PURE__ */ t("div", {
|
|
151
|
+
ref: N,
|
|
123
152
|
style: {
|
|
124
153
|
height: h,
|
|
125
|
-
...
|
|
154
|
+
...C
|
|
126
155
|
},
|
|
127
|
-
...
|
|
128
|
-
className: e([c,
|
|
156
|
+
...T,
|
|
157
|
+
className: e([c, S]),
|
|
129
158
|
children: n("div", {
|
|
130
|
-
style: { height:
|
|
159
|
+
style: { height: V },
|
|
131
160
|
className: e([l]),
|
|
132
|
-
children: [m.slice(
|
|
133
|
-
let r =
|
|
161
|
+
children: [m.slice(U, W).map((e, n) => {
|
|
162
|
+
let r = U + n, i = {
|
|
134
163
|
position: "absolute",
|
|
135
|
-
top: R[r],
|
|
136
164
|
width: "100%"
|
|
137
165
|
};
|
|
138
|
-
if (
|
|
139
|
-
let e =
|
|
166
|
+
if (x ? i.bottom = B[r] : i.top = B[r], E) {
|
|
167
|
+
let e = F.current.get(r);
|
|
140
168
|
e !== void 0 && (i.height = e);
|
|
141
169
|
} else i.height = g;
|
|
142
170
|
return /* @__PURE__ */ t("div", {
|
|
@@ -144,7 +172,7 @@ function m({ items: m, height: h, itemHeight: g, estimatedItemHeight: _, groups:
|
|
|
144
172
|
style: i,
|
|
145
173
|
children: y(e, r)
|
|
146
174
|
}, r);
|
|
147
|
-
}),
|
|
175
|
+
}), G]
|
|
148
176
|
})
|
|
149
177
|
});
|
|
150
178
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
6
|
+
import { useEffect as r, useRef as i, useState as a } from "react";
|
|
7
|
+
//#region src/lib/components/Watermark/Watermark.tsx
|
|
8
|
+
function o({ lines: e, font: t, rotate: n, gapX: r, gapY: i, probe: a }) {
|
|
9
|
+
if (typeof document > "u") return null;
|
|
10
|
+
let o = document.createElement("canvas"), s = o.getContext("2d");
|
|
11
|
+
if (!s) return null;
|
|
12
|
+
let c = t.size ?? 14, l = a ? getComputedStyle(a) : null, u = t.color ?? l?.getPropertyValue("--haze-color-text-muted").trim() ?? "", d = t.family ?? "sans-serif";
|
|
13
|
+
s.font = `${t.weight ?? 400} ${c}px ${d}`, s.fillStyle = u || "rgba(0, 0, 0, 0.15)";
|
|
14
|
+
let f = c * 1.3, p = Math.max(0, ...e.map((e) => s.measureText(e).width)), m = e.length * f, h = typeof window > "u" ? 1 : window.devicePixelRatio || 1;
|
|
15
|
+
return o.width = Math.ceil((p + r) * h), o.height = Math.ceil((m + i) * h), s.scale(h, h), s.translate((p + r) / 2, (m + i) / 2), s.rotate(n * Math.PI / 180), s.textAlign = "center", s.textBaseline = "middle", e.forEach((t, n) => {
|
|
16
|
+
s.fillText(t, 0, (n - (e.length - 1) / 2) * f);
|
|
17
|
+
}), o.toDataURL();
|
|
18
|
+
}
|
|
19
|
+
var s = "haze-Watermark__container", c = "haze-Watermark__overlay";
|
|
20
|
+
function l({ content: l, font: u, rotate: d = -22, gap: f = 100, offset: p = [0, 0], zIndex: m = 9, fullscreen: h = !1, children: g, className: _, style: v, ...y }) {
|
|
21
|
+
let b = i(null), [x, S] = a(null), C = Array.isArray(l) ? l : [l], w = Array.isArray(f) ? f[0] : f, T = Array.isArray(f) ? f[1] : f, E = C.join("\n"), D = u ? `${u.size ?? ""}/${u.color ?? ""}/${u.weight ?? ""}/${u.family ?? ""}` : "";
|
|
22
|
+
return r(() => {
|
|
23
|
+
S(o({
|
|
24
|
+
lines: C,
|
|
25
|
+
font: u ?? {},
|
|
26
|
+
rotate: d,
|
|
27
|
+
gapX: w,
|
|
28
|
+
gapY: T,
|
|
29
|
+
probe: b.current
|
|
30
|
+
}));
|
|
31
|
+
}, [
|
|
32
|
+
E,
|
|
33
|
+
D,
|
|
34
|
+
d,
|
|
35
|
+
w,
|
|
36
|
+
T
|
|
37
|
+
]), /* @__PURE__ */ n("div", {
|
|
38
|
+
ref: b,
|
|
39
|
+
style: v,
|
|
40
|
+
...y,
|
|
41
|
+
className: e([s, _]),
|
|
42
|
+
children: [g, x && /* @__PURE__ */ t("div", {
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
style: {
|
|
45
|
+
backgroundImage: `url(${x})`,
|
|
46
|
+
backgroundPosition: `${p[0]}px ${p[1]}px`,
|
|
47
|
+
zIndex: m,
|
|
48
|
+
...h ? { position: "fixed" } : void 0
|
|
49
|
+
},
|
|
50
|
+
className: e([c])
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { l as default };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* haze-ui anchor — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
.haze-Anchor__nav{font-size:var(--haze-text-sm);position:sticky;top:0}.haze-Anchor__list{gap:var(--haze-space-1);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.haze-Anchor__link{padding:var(--haze-space-1) var(--haze-space-2);border-inline-start:var(--haze-space-1) solid transparent;border-radius:0 var(--haze-radius-sm) var(--haze-radius-sm) 0;color:var(--haze-color-text-muted);-webkit-transition:color var(--haze-duration-fast) var(--haze-ease),border-color var(--haze-duration-fast) var(--haze-ease);transition:color var(--haze-duration-fast) var(--haze-ease),border-color var(--haze-duration-fast) var(--haze-ease);-webkit-text-decoration:none;text-decoration:none;display:block}.haze-Anchor__link:hover{color:var(--haze-color-text)}.haze-Anchor__linkActive{border-inline-start-color:var(--haze-color-primary);color:var(--haze-color-primary);font-weight:var(--haze-weight-medium)}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* haze-ui app-shell — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
.haze-AppShell__shell{display:-ms-grid;-ms-grid-rows:auto minmax(0, 1fr) auto;-ms-grid-columns:minmax(0, 1fr);grid-template:"header""content"minmax(0,1fr)"footer"/minmax(0,1fr);min-height:100dvh;display:grid;position:relative}.haze-AppShell__withSidebar{-ms-grid-columns:auto minmax(0, 1fr);grid-template-columns:auto minmax(0,1fr);grid-template-areas:"header header""sidebar content""footer footer"}@media (width<=768px){.haze-AppShell__withSidebar{-ms-grid-columns:minmax(0, 1fr);grid-template-columns:minmax(0,1fr);grid-template-areas:"header""content""footer"}}.haze-AppShell__header{z-index:1;align-items:center;gap:var(--haze-space-3);padding:var(--haze-space-3) var(--haze-space-4);background:var(--haze-color-bg);border-block-end:1px solid var(--haze-color-border);grid-area:header;display:flex;position:sticky;top:0}.haze-AppShell__sidebar{width:var(--haze-appshell-sidebar-width,calc(var(--haze-space-16) * 4));background:var(--haze-color-bg-subtle);min-height:0;-webkit-transition:width var(--haze-duration-normal) var(--haze-ease),-webkit-transform var(--haze-duration-normal) var(--haze-ease);transition:width var(--haze-duration-normal) var(--haze-ease),transform var(--haze-duration-normal) var(--haze-ease);grid-area:sidebar;overflow:hidden}.haze-AppShell__sidebar[data-state=collapsed]{width:var(--haze-appshell-sidebar-width-collapsed,var(--haze-space-16))}@media (width<=768px){.haze-AppShell__sidebar{z-index:2;box-shadow:var(--haze-shadow-lg);position:absolute;inset-block:0;inset-inline-start:0}.haze-AppShell__sidebar[data-state=collapsed]{width:var(--haze-appshell-sidebar-width,calc(var(--haze-space-16) * 4));transform:translate(-100%)}}.haze-AppShell__content{grid-area:content;min-width:0}.haze-AppShell__footer{padding:var(--haze-space-3) var(--haze-space-4);background:var(--haze-color-bg);border-block-start:1px solid var(--haze-color-border);grid-area:footer}
|
package/dist/css/badge.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* haze-ui badge — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
-
.haze-
|
|
2
|
+
.haze-badge-styles__base{border-radius:var(--haze-radius-full);font-family:var(--haze-font-sans);font-weight:var(--haze-weight-medium);line-height:var(--haze-leading-tight);white-space:nowrap;align-items:center;display:inline-flex}.haze-badge-styles__default{background:var(--haze-color-bg-muted);color:var(--haze-color-text-secondary)}.haze-badge-styles__success{background:var(--haze-color-success-subtle);color:var(--haze-color-success)}.haze-badge-styles__warning{background:var(--haze-color-warning-subtle);color:var(--haze-color-warning)}.haze-badge-styles__danger{background:var(--haze-color-danger-subtle);color:var(--haze-color-danger)}.haze-badge-styles__info{background:var(--haze-color-info-subtle);color:var(--haze-color-info)}.haze-badge-styles__sm{padding:var(--haze-space-0) var(--haze-space-2);font-size:var(--haze-text-xs)}.haze-badge-styles__md{padding:var(--haze-space-1) var(--haze-space-3);font-size:var(--haze-text-sm)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* haze-ui bottom-sheet — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
-
.haze-BottomSheet__overlay{z-index:100;-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;background:#0006;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.haze-BottomSheet__overlay[data-state=open]{-webkit-animation:haze-sheet-backdrop-in-haze-BottomSheet__overlay var(--haze-duration-normal) var(--haze-ease);animation:haze-sheet-backdrop-in-haze-BottomSheet__overlay var(--haze-duration-normal) var(--haze-ease)}.haze-BottomSheet__overlay[data-state=closed]{-webkit-animation:haze-sheet-backdrop-out-haze-BottomSheet__overlay var(--haze-duration-fast) var(--haze-ease);animation:haze-sheet-backdrop-out-haze-BottomSheet__overlay var(--haze-duration-fast) var(--haze-ease)}@keyframes haze-sheet-backdrop-in-haze-BottomSheet__overlay{0%{opacity:0}}@keyframes haze-sheet-backdrop-out-haze-BottomSheet__overlay{to{opacity:0}}.haze-BottomSheet__sheet{background:var(--haze-color-bg);border-radius:var(--haze-radius-xl) var(--haze-radius-xl) 0 0;padding:var(--haze-space-4) var(--haze-space-6) calc(var(--haze-space-4) + env(safe-area-inset-bottom));width:100%;max-width:640px;max-height:80vh;font-family:var(--haze-font-sans);color:var(--haze-color-text);box-shadow:var(--haze-shadow-xl);overflow-y:auto}[data-state=open] .haze-BottomSheet__sheet{-webkit-animation:haze-sheet-in-haze-BottomSheet__sheet var(--haze-duration-normal) var(--haze-ease);animation:haze-sheet-in-haze-BottomSheet__sheet var(--haze-duration-normal) var(--haze-ease)}[data-state=closed] .haze-BottomSheet__sheet{-webkit-animation:haze-sheet-out-haze-BottomSheet__sheet var(--haze-duration-fast) var(--haze-ease);animation:haze-sheet-out-haze-BottomSheet__sheet var(--haze-duration-fast) var(--haze-ease)}@keyframes haze-sheet-in-haze-BottomSheet__sheet{0%{transform:translateY(100%)}}@keyframes haze-sheet-out-haze-BottomSheet__sheet{to{transform:translateY(100%)}}.haze-BottomSheet__handle{background:var(--haze-color-border);border-radius:var(--haze-radius-full);width:2rem;height:.25rem;margin:0 auto var(--haze-space-4)}
|
|
2
|
+
.haze-BottomSheet__overlay{z-index:100;-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;background:#0006;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.haze-BottomSheet__overlay[data-state=open]{-webkit-animation:haze-sheet-backdrop-in-haze-BottomSheet__overlay var(--haze-duration-normal) var(--haze-ease);animation:haze-sheet-backdrop-in-haze-BottomSheet__overlay var(--haze-duration-normal) var(--haze-ease)}.haze-BottomSheet__overlay[data-state=closed]{-webkit-animation:haze-sheet-backdrop-out-haze-BottomSheet__overlay var(--haze-duration-fast) var(--haze-ease);animation:haze-sheet-backdrop-out-haze-BottomSheet__overlay var(--haze-duration-fast) var(--haze-ease)}@keyframes haze-sheet-backdrop-in-haze-BottomSheet__overlay{0%{opacity:0}}@keyframes haze-sheet-backdrop-out-haze-BottomSheet__overlay{to{opacity:0}}.haze-BottomSheet__sheet{box-sizing:border-box;background:var(--haze-color-bg);border-radius:var(--haze-radius-xl) var(--haze-radius-xl) 0 0;padding:var(--haze-space-4) var(--haze-space-6) calc(var(--haze-space-4) + env(safe-area-inset-bottom));width:100%;max-width:640px;max-height:80vh;font-family:var(--haze-font-sans);color:var(--haze-color-text);box-shadow:var(--haze-shadow-xl);overflow-y:auto}[data-state=open] .haze-BottomSheet__sheet{-webkit-animation:haze-sheet-in-haze-BottomSheet__sheet var(--haze-duration-normal) var(--haze-ease);animation:haze-sheet-in-haze-BottomSheet__sheet var(--haze-duration-normal) var(--haze-ease)}[data-state=closed] .haze-BottomSheet__sheet{-webkit-animation:haze-sheet-out-haze-BottomSheet__sheet var(--haze-duration-fast) var(--haze-ease);animation:haze-sheet-out-haze-BottomSheet__sheet var(--haze-duration-fast) var(--haze-ease)}@keyframes haze-sheet-in-haze-BottomSheet__sheet{0%{transform:translateY(100%)}}@keyframes haze-sheet-out-haze-BottomSheet__sheet{to{transform:translateY(100%)}}.haze-BottomSheet__handle{background:var(--haze-color-border);border-radius:var(--haze-radius-full);width:2rem;height:.25rem;margin:0 auto var(--haze-space-4)}.haze-BottomSheet__swipeable{touch-action:pan-y;overscroll-behavior-y:none}
|
package/dist/css/button.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* haze-ui button — generated by scripts/split-css.mjs, do not edit */
|
|
2
2
|
.haze-ButtonLink__link{-webkit-text-decoration:none;text-decoration:none}.haze-ButtonLink__link[aria-disabled=true]{opacity:.5;cursor:not-allowed;pointer-events:none}
|
|
3
|
-
.haze-styles__base{justify-content:center;align-items:center;gap:var(--haze-space-2);border-radius:var(--haze-radius-md);font-family:var(--haze-font-sans);font-weight:var(--haze-weight-medium);line-height:var(--haze-leading-tight);cursor:pointer;-webkit-transition:background var(--haze-duration-fast),color var(--haze-duration-fast),border-color var(--haze-duration-fast),box-shadow var(--haze-duration-fast);transition:background var(--haze-duration-fast),color var(--haze-duration-fast),border-color var(--haze-duration-fast),box-shadow var(--haze-duration-fast);-webkit-user-select:none;user-select:none;border:1px solid #0000;display:inline-flex}.haze-styles__base:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-styles__base:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.haze-styles__solid{background:var(--haze-color-primary);color:var(--haze-color-text-inverse)}.haze-styles__solid:hover{background:var(--haze-color-primary-hover)}.haze-styles__solid:active{background:var(--haze-color-primary-active)}.haze-styles__outline{border-color:var(--haze-color-border);color:var(--haze-color-text);background:0 0}.haze-styles__outline:hover{border-color:var(--haze-color-border-hover);background:var(--haze-color-bg-subtle)}.haze-styles__outline:active{background:var(--haze-color-bg-muted)}.haze-styles__ghost{color:var(--haze-color-text);background:0 0}.haze-styles__ghost:hover{background:var(--haze-color-bg-subtle)}.haze-styles__ghost:active{background:var(--haze-color-bg-muted)}.haze-styles__sizeSm{padding:var(--haze-space-1) var(--haze-space-3);font-size:var(--haze-text-sm)}.haze-styles__sizeMd{padding:var(--haze-space-2) var(--haze-space-4);font-size:var(--haze-text-sm)}.haze-styles__sizeLg{padding:var(--haze-space-3) var(--haze-space-6);font-size:var(--haze-text-base)}.haze-styles__squareSm{padding:var(--haze-space-1);font-size:var(--haze-text-sm)}.haze-styles__squareMd{padding:var(--haze-space-2);font-size:var(--haze-text-sm)}.haze-styles__squareLg{padding:var(--haze-space-3);font-size:var(--haze-text-base)}
|
|
3
|
+
.haze-styles__base{justify-content:center;align-items:center;gap:var(--haze-space-2);border-radius:var(--haze-button-radius,var(--haze-radius-md));font-family:var(--haze-font-sans);font-weight:var(--haze-weight-medium);line-height:var(--haze-leading-tight);cursor:pointer;-webkit-transition:background var(--haze-duration-fast),color var(--haze-duration-fast),border-color var(--haze-duration-fast),box-shadow var(--haze-duration-fast);transition:background var(--haze-duration-fast),color var(--haze-duration-fast),border-color var(--haze-duration-fast),box-shadow var(--haze-duration-fast);-webkit-user-select:none;user-select:none;border:1px solid #0000;display:inline-flex}.haze-styles__base:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-styles__base:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.haze-styles__solid{background:var(--haze-color-primary);color:var(--haze-color-text-inverse)}.haze-styles__solid:hover{background:var(--haze-color-primary-hover)}.haze-styles__solid:active{background:var(--haze-color-primary-active)}.haze-styles__outline{border-color:var(--haze-color-border);color:var(--haze-color-text);background:0 0}.haze-styles__outline:hover{border-color:var(--haze-color-border-hover);background:var(--haze-color-bg-subtle)}.haze-styles__outline:active{background:var(--haze-color-bg-muted)}.haze-styles__ghost{color:var(--haze-color-text);background:0 0}.haze-styles__ghost:hover{background:var(--haze-color-bg-subtle)}.haze-styles__ghost:active{background:var(--haze-color-bg-muted)}.haze-styles__sizeSm{height:var(--haze-button-height-sm,auto);padding:var(--haze-space-1) var(--haze-space-3);font-size:var(--haze-button-font-size-sm,var(--haze-text-sm))}.haze-styles__sizeMd{height:var(--haze-button-height-md,auto);padding:var(--haze-space-2) var(--haze-space-4);font-size:var(--haze-button-font-size-md,var(--haze-text-sm))}.haze-styles__sizeLg{height:var(--haze-button-height-lg,auto);padding:var(--haze-space-3) var(--haze-space-6);font-size:var(--haze-button-font-size-lg,var(--haze-text-base))}.haze-styles__squareSm{height:var(--haze-button-height-sm,auto);padding:var(--haze-space-1);font-size:var(--haze-button-font-size-sm,var(--haze-text-sm))}.haze-styles__squareMd{height:var(--haze-button-height-md,auto);padding:var(--haze-space-2);font-size:var(--haze-button-font-size-md,var(--haze-text-sm))}.haze-styles__squareLg{height:var(--haze-button-height-lg,auto);padding:var(--haze-space-3);font-size:var(--haze-button-font-size-lg,var(--haze-text-base))}
|
package/dist/css/calendar.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* haze-ui calendar — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
-
.haze-Calendar__calendarWrapper{padding:var(--haze-space-3);font-family:var(--haze-font-sans);font-size:var(--haze-text-sm)}.haze-Calendar__header{-webkit-box-pack:justify;align-items:center;-ms-flex-pack:space-between;justify-content:space-between;gap:var(--haze-space-2);margin-block-end:var(--haze-space-2);display:flex}.haze-Calendar__headerBtn{appearance:none;color:var(--haze-color-text);cursor:pointer;padding:var(--haze-space-1);border-radius:var(--haze-radius-sm);font-size:var(--haze-text-sm);font-family:var(--haze-font-sans);background:0 0;border:none;line-height:1}.haze-Calendar__headerBtn:hover{background:var(--haze-color-bg-subtle)}.haze-Calendar__headerBtn:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-Calendar__headerTitle{font-weight:var(--haze-weight-medium);color:var(--haze-color-text)}.haze-Calendar__headerTrailing{align-items:center;gap:var(--haze-space-1);display:inline-flex}.haze-Calendar__grid{display:-ms-grid;-ms-grid-columns:repeat(7, 1fr);text-align:center;grid-template-columns:repeat(7,1fr);gap:1px;display:grid}.haze-Calendar__rowContents,.haze-Calendar__cellContents{display:contents}.haze-Calendar__weekday{padding:var(--haze-space-1);font-weight:var(--haze-weight-medium);color:var(--haze-color-text-muted);font-size:var(--haze-text-xs)}.haze-Calendar__dayBtn{appearance:none;color:var(--haze-color-text);cursor:pointer;padding:var(--haze-space-2);border-radius:var(--haze-radius-sm);font-size:var(--haze-text-sm);-webkit-transition:background var(--haze-duration-fast) var(--haze-ease);transition:background var(--haze-duration-fast) var(--haze-ease);background:0 0;border:none;line-height:1.5}.haze-Calendar__dayBtn:hover{background:var(--haze-color-bg-subtle)}.haze-Calendar__dayBtn:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-Calendar__dayBtn:disabled{opacity:.3;cursor:not-allowed}.haze-Calendar__daySelected{background:var(--haze-color-primary);color:var(--haze-color-text-inverse)}.haze-Calendar__daySelected:hover{background:var(--haze-color-primary-hover)}.haze-Calendar__dayOutside{color:var(--haze-color-text-muted)}
|
|
2
|
+
.haze-Calendar__calendarWrapper{padding:var(--haze-space-3);font-family:var(--haze-font-sans);font-size:var(--haze-text-sm)}.haze-Calendar__header{-webkit-box-pack:justify;align-items:center;-ms-flex-pack:space-between;justify-content:space-between;gap:var(--haze-space-2);margin-block-end:var(--haze-space-2);display:flex}.haze-Calendar__headerBtn{appearance:none;color:var(--haze-color-text);cursor:pointer;padding:var(--haze-space-1);border-radius:var(--haze-radius-sm);font-size:var(--haze-text-sm);font-family:var(--haze-font-sans);background:0 0;border:none;line-height:1}.haze-Calendar__headerBtn:hover{background:var(--haze-color-bg-subtle)}.haze-Calendar__headerBtn:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-Calendar__headerTitle{font-weight:var(--haze-weight-medium);color:var(--haze-color-text)}.haze-Calendar__titleBtn{appearance:none;color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;cursor:pointer;border-radius:var(--haze-radius-sm);background:0 0;border:none;margin:0;padding:0}.haze-Calendar__titleBtn:hover{background:var(--haze-color-bg-subtle)}.haze-Calendar__titleBtn:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-Calendar__headerTrailing{align-items:center;gap:var(--haze-space-1);display:inline-flex}.haze-Calendar__grid{display:-ms-grid;-ms-grid-columns:repeat(7, 1fr);text-align:center;grid-template-columns:repeat(7,1fr);gap:1px;display:grid}.haze-Calendar__rowContents,.haze-Calendar__cellContents{display:contents}.haze-Calendar__weekday{padding:var(--haze-space-1);font-weight:var(--haze-weight-medium);color:var(--haze-color-text-muted);font-size:var(--haze-text-xs)}.haze-Calendar__weekNumber{padding:var(--haze-space-2);color:var(--haze-color-text-muted);font-size:var(--haze-text-xs)}.haze-Calendar__dayBtn{appearance:none;color:var(--haze-color-text);cursor:pointer;padding:var(--haze-space-2);border-radius:var(--haze-radius-sm);font-size:var(--haze-text-sm);-webkit-transition:background var(--haze-duration-fast) var(--haze-ease);transition:background var(--haze-duration-fast) var(--haze-ease);background:0 0;border:none;line-height:1.5}.haze-Calendar__dayBtn:hover{background:var(--haze-color-bg-subtle)}.haze-Calendar__dayBtn:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-Calendar__dayBtn:disabled{opacity:.3;cursor:not-allowed}.haze-Calendar__daySelected{background:var(--haze-color-primary);color:var(--haze-color-text-inverse)}.haze-Calendar__daySelected:hover{background:var(--haze-color-primary-hover)}.haze-Calendar__dayInRange{background:var(--haze-color-primary-subtle)}.haze-Calendar__dayOutside{color:var(--haze-color-text-muted)}.haze-Calendar__monthPanels{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;gap:var(--haze-space-4);display:flex}.haze-Calendar__monthPanel{flex-direction:column;display:flex}.haze-Calendar__paneHeader{justify-content:center;align-items:center;gap:var(--haze-space-2);margin-block-end:var(--haze-space-2);display:flex}.haze-Calendar__quickSelect{flex-direction:column;display:flex}.haze-Calendar__quickToolbar{justify-content:center;align-items:center;gap:var(--haze-space-2);margin-block-end:var(--haze-space-2);display:flex}.haze-Calendar__quickGrid{display:-ms-grid;-ms-grid-columns:repeat(3, 1fr);text-align:center;grid-template-columns:repeat(3,1fr);gap:1px;display:grid}.haze-Calendar__quarterGrid{display:-ms-grid;-ms-grid-columns:repeat(4, 1fr);text-align:center;grid-template-columns:repeat(4,1fr);gap:1px;display:grid}
|