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,34 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props of a `<CommandItem>` element as far as built-in filtering is
|
|
4
|
+
* concerned. Structurally typed (not imported from Command.tsx) so the
|
|
5
|
+
* helper stays free of the component-file import cycle.
|
|
6
|
+
*/
|
|
7
|
+
export type CommandItemLikeProps = {
|
|
8
|
+
value?: string;
|
|
9
|
+
keywords?: readonly string[];
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Concatenated text of an item's children — the default filter target
|
|
14
|
+
* when no explicit `value` is given. Strings/numbers/booleans pass
|
|
15
|
+
* through; nested arrays and elements are walked depth-first (the same
|
|
16
|
+
* shape as Select's `selectOptionText`).
|
|
17
|
+
*/
|
|
18
|
+
export declare function commandItemText(node: ReactNode): string;
|
|
19
|
+
/**
|
|
20
|
+
* Case-insensitive substring match of the query against an item's
|
|
21
|
+
* filterable text: the explicit `value` (falling back to the item's
|
|
22
|
+
* concatenated children text) plus every `keywords` entry. An empty
|
|
23
|
+
* query matches everything, preserving the pre-filter behavior of a
|
|
24
|
+
* fresh palette.
|
|
25
|
+
*/
|
|
26
|
+
export declare function commandItemMatches(props: CommandItemLikeProps, query: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Collects every `<CommandItem>` element in the subtree at any nesting
|
|
29
|
+
* depth (directly under the list, inside `<CommandGroup>` wrappers, or
|
|
30
|
+
* behind plain layout elements/fragments). The component reference is
|
|
31
|
+
* passed in by the caller — the identity check is what keeps the walk
|
|
32
|
+
* precise without importing the component (import cycle).
|
|
33
|
+
*/
|
|
34
|
+
export declare function collectCommandItems(children: ReactNode, itemComponent: unknown): ReactElement<CommandItemLikeProps>[];
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { default as Command, CommandInput, CommandList, CommandItem } from './Command';
|
|
2
|
-
export type { CommandProps, CommandInputProps, CommandListProps, CommandItemProps } from './Command';
|
|
1
|
+
export { default as Command, CommandInput, CommandList, CommandItem, CommandGroup } from './Command';
|
|
2
|
+
export type { CommandProps, CommandInputProps, CommandListProps, CommandItemProps, CommandGroupProps } from './Command';
|
|
3
|
+
export { default as CommandDialog } from './CommandDialog';
|
|
4
|
+
export type { CommandDialogProps } from './CommandDialog';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type CellEditorProps = {
|
|
2
|
+
/** Built-in editor variant: text saves the raw draft, number parses it. */
|
|
3
|
+
kind: 'text' | 'number';
|
|
4
|
+
/** Current cell value — stringified into the draft. */
|
|
5
|
+
value: unknown;
|
|
6
|
+
/** Accessible name for the editor input. */
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
/**
|
|
9
|
+
* Commits the draft: the text variant reports the raw string, the number
|
|
10
|
+
* variant a parsed number (`null` when the draft is empty). Called once
|
|
11
|
+
* (Enter or blur); the editor then unmounts as DataTable exits edit mode.
|
|
12
|
+
*/
|
|
13
|
+
onSave: (next: string | number | null) => void;
|
|
14
|
+
/** Discards the draft (Escape). */
|
|
15
|
+
onCancel: () => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The built-in inline cell editor behind `editable` + `meta.editor:
|
|
19
|
+
* 'text' | 'number'`. Enters with focus and the draft selected; Enter
|
|
20
|
+
* saves, Escape cancels, blur saves. After a keyboard exit (Enter/Escape)
|
|
21
|
+
* focus returns to the cell so Tab keeps walking the row.
|
|
22
|
+
*/
|
|
23
|
+
export default function CellEditor({ kind, value, ariaLabel, onSave, onCancel, }: CellEditorProps): import("react").JSX.Element;
|
|
24
|
+
export type { CellEditorProps };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
-
import type { ColumnDef, RowData, RowSelectionState, SortingState } from '@tanstack/react-table';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Column-level sorting switch — overrides the table-level `sortable` default. */
|
|
7
|
-
sortable?: boolean;
|
|
8
|
-
};
|
|
3
|
+
import type { ColumnDef, ColumnVisibilityState, ExpandedState, Row, RowData, RowSelectionState, SortingState } from '@tanstack/react-table';
|
|
4
|
+
import type { DataTableCellEditorProps, DataTableColumnMeta } from './features';
|
|
5
|
+
import { dataTableFeatures } from './features';
|
|
9
6
|
/** Windowing configuration for the table body, reusing `VirtualList`. */
|
|
10
7
|
type DataTableVirtualized = boolean | {
|
|
11
8
|
/** Fixed row height in px — must match the rendered row (custom cell
|
|
@@ -15,25 +12,26 @@ type DataTableVirtualized = boolean | {
|
|
|
15
12
|
* Defaults to `VirtualList`'s `5`. */
|
|
16
13
|
overscan?: number;
|
|
17
14
|
};
|
|
18
|
-
/** The feature set stitched into every DataTable instance — TanStack v9's
|
|
19
|
-
* tree-shaking contract: only the row models and registries the component
|
|
20
|
-
* actually drives are registered. `columnMeta` is a type-only slot that
|
|
21
|
-
* types `meta` on column definitions. */
|
|
22
|
-
declare const dataTableFeatures: {
|
|
23
|
-
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
24
|
-
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
25
|
-
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
26
|
-
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
27
|
-
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
28
|
-
sortFns: {
|
|
29
|
-
alphanumeric: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
30
|
-
text: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
31
|
-
};
|
|
32
|
-
columnMeta: DataTableColumnMeta;
|
|
33
|
-
};
|
|
34
15
|
/** Column definition accepted by DataTable — a TanStack Table column def
|
|
35
|
-
* bound to DataTable's feature set and column meta.
|
|
36
|
-
|
|
16
|
+
* bound to DataTable's feature set and column meta. The native `size`
|
|
17
|
+
* field doubles as a static px width hint (read as the colgroup width
|
|
18
|
+
* fallback after `meta.width`) and seeds the resize math when `resizable`
|
|
19
|
+
* is on. */
|
|
20
|
+
type DataTableColumnDef<TData extends RowData> = ColumnDef<typeof dataTableFeatures, TData> & {
|
|
21
|
+
size?: number;
|
|
22
|
+
};
|
|
23
|
+
/** One cell of a summary row: a static string or number (`undefined`
|
|
24
|
+
* renders an empty cell — `dataTableAvg` of no numeric values), or a
|
|
25
|
+
* function of the summarized rows (the place `dataTableSum` & co. plug
|
|
26
|
+
* in). */
|
|
27
|
+
type DataTableSummaryCell<TData extends RowData = RowData> = string | number | undefined | ((rows: Row<typeof dataTableFeatures, TData>[]) => ReactNode);
|
|
28
|
+
/** One `<tfoot>` row produced by the `summary` callback: an optional
|
|
29
|
+
* accessible label for the whole row (rendered as its `aria-label`) and
|
|
30
|
+
* one cell per leaf column, in column order. */
|
|
31
|
+
type DataTableSummary<TData extends RowData = RowData> = {
|
|
32
|
+
label?: string;
|
|
33
|
+
cells: DataTableSummaryCell<TData>[];
|
|
34
|
+
};
|
|
37
35
|
type DataTableProps<TData extends RowData> = {
|
|
38
36
|
/** Column definitions: accessors, headers and cell templates. */
|
|
39
37
|
columns: DataTableColumnDef<TData>[];
|
|
@@ -52,6 +50,41 @@ type DataTableProps<TData extends RowData> = {
|
|
|
52
50
|
pageSize?: number;
|
|
53
51
|
/** Current page, 1-based, when paginating. */
|
|
54
52
|
page?: ControlOrValue<number>;
|
|
53
|
+
/**
|
|
54
|
+
* Server-driven mode: sorting and pagination stop being computed
|
|
55
|
+
* locally. TanStack's `manualSorting` / `manualPagination` under the
|
|
56
|
+
* hood — the table renders `data` exactly as received (no reordering,
|
|
57
|
+
* no page slicing), so the consumer fetches each page pre-sorted and
|
|
58
|
+
* pre-sliced. Sort-header clicks still toggle the `sorting` state (and
|
|
59
|
+
* `aria-sort`), and the footer still tracks the `page` state; the
|
|
60
|
+
* consumer observes both through the `onSortChange` / `onPageChange`
|
|
61
|
+
* callbacks (or the `sorting` / `page` controls) and refetches. Pass
|
|
62
|
+
* `pageCount` so the footer knows the server-side page total — without
|
|
63
|
+
* it the footer falls back to `data.length`, i.e. one full page.
|
|
64
|
+
* Composes with `rowSelection`, `loading`, `virtualized` and the
|
|
65
|
+
* skeleton exactly as in local mode.
|
|
66
|
+
*/
|
|
67
|
+
manual?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Total number of pages, overriding the footer's page math in `manual`
|
|
70
|
+
* mode (locally derived from `data.length` otherwise). Only meaningful
|
|
71
|
+
* together with `pageSize`.
|
|
72
|
+
*/
|
|
73
|
+
pageCount?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Fires with the next 1-based page whenever the page changes — footer
|
|
76
|
+
* clicks and programmatic updates alike, in local and `manual` mode.
|
|
77
|
+
* The `manual`-mode refetch trigger; pairs with `pageCount`.
|
|
78
|
+
*/
|
|
79
|
+
onPageChange?: (page: number) => void;
|
|
80
|
+
/**
|
|
81
|
+
* Fires with the next TanStack `SortingState` whenever sorting changes
|
|
82
|
+
* — header clicks (including multi-sort) and programmatic updates
|
|
83
|
+
* alike, in local and `manual` mode. In `manual` mode this is the
|
|
84
|
+
* server refetch trigger; the table itself keeps rendering `data`
|
|
85
|
+
* untouched.
|
|
86
|
+
*/
|
|
87
|
+
onSortChange?: (sorting: SortingState) => void;
|
|
55
88
|
/** Render skeleton rows instead of data. */
|
|
56
89
|
loading?: boolean;
|
|
57
90
|
/** Keep the header visible while the table body scrolls. */
|
|
@@ -72,13 +105,22 @@ type DataTableProps<TData extends RowData> = {
|
|
|
72
105
|
* `display: table-row` — so rows cannot stay in the header's table.
|
|
73
106
|
* Instead each row renders as a complete sibling `<table><tbody><tr>`
|
|
74
107
|
* inside the wrapper. Rows remain legal, axe-clean table structures
|
|
75
|
-
* with row/cell roles
|
|
76
|
-
*
|
|
77
|
-
*
|
|
108
|
+
* with row/cell roles. One shared `<colgroup>` — the selection column
|
|
109
|
+
* plus every leaf column's `meta.width` (falling back to the native
|
|
110
|
+
* `size`) — is mirrored into the header table and every row table, and
|
|
111
|
+
* `table-layout: fixed` honors it identically in each sibling: columns
|
|
112
|
+
* with a width are fixed at it, columns without one split the remaining
|
|
113
|
+
* space equally. That mirrored sequence is the alignment contract
|
|
114
|
+
* between the sibling tables — no column-width measurement pass.
|
|
115
|
+
* Consequences:
|
|
78
116
|
* - Fixed row height only — dynamic or wrapping row heights are not
|
|
79
117
|
* supported; content taller than `rowHeight` overlaps the next row.
|
|
80
|
-
* -
|
|
81
|
-
*
|
|
118
|
+
* - Column widths are declarative (`meta.width` / `size`), never
|
|
119
|
+
* content-driven: columns without a width share the remainder equally
|
|
120
|
+
* instead of auto-sizing to content.
|
|
121
|
+
* - `meta.fixed` is ignored in this mode — each row is its own table
|
|
122
|
+
* inside its own absolutely positioned wrapper, so there is no shared
|
|
123
|
+
* horizontal scrollport for cells to stick against.
|
|
82
124
|
* - The header sits outside the scroll window (always visible) — the
|
|
83
125
|
* `stickyHeader` behavior is implied.
|
|
84
126
|
* - The root must be height-bounded by the consumer (e.g. a
|
|
@@ -96,7 +138,117 @@ type DataTableProps<TData extends RowData> = {
|
|
|
96
138
|
onRowClick?: (row: TData, event: MouseEvent<HTMLTableRowElement>) => void;
|
|
97
139
|
/** Custom empty-state node; defaults to the `Empty` component. */
|
|
98
140
|
empty?: ReactNode;
|
|
141
|
+
/**
|
|
142
|
+
* Enable column resizing: every leaf header cell (except those switched
|
|
143
|
+
* off per column) grows a drag handle on its inline-end edge. Dragging
|
|
144
|
+
* commits widths live (TanStack `columnResizeMode: 'onChange'`); the
|
|
145
|
+
* handle is a focusable `separator` widget — ArrowLeft/ArrowRight nudge
|
|
146
|
+
* the width by 5px (mirrored under RTL, read from the DOM at event
|
|
147
|
+
* time), double-click resets the column to its declared width.
|
|
148
|
+
* Per-column `meta.resizable` (or native `enableResizing`) overrides per
|
|
149
|
+
* column. Defaults to `false` — no handles, no colgroup change.
|
|
150
|
+
*/
|
|
151
|
+
resizable?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Expanded-row state (TanStack `ExpandedState`: `true` for all, or a map
|
|
154
|
+
* keyed by row id). Drives both expansion flavors: custom panels
|
|
155
|
+
* (`getRowCanExpand` + `renderExpandedRow`) and tree data (`subRows`).
|
|
156
|
+
*/
|
|
157
|
+
expanded?: ControlOrValue<ExpandedState>;
|
|
158
|
+
/**
|
|
159
|
+
* Decides which rows offer an expander button in the first content
|
|
160
|
+
* column. Without it, providing `renderExpandedRow` alone makes every
|
|
161
|
+
* row expandable. Explicit expansion props win over tree data: when
|
|
162
|
+
* either this or `renderExpandedRow` is given, `subRows` fields are
|
|
163
|
+
* ignored and rows never nest.
|
|
164
|
+
*/
|
|
165
|
+
getRowCanExpand?: (row: Row<typeof dataTableFeatures, TData>) => boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Renders the expansion panel: a full-width row (`colSpan` across every
|
|
168
|
+
* visible column) directly below each expanded row. Called with the
|
|
169
|
+
* TanStack row (`.original` carries the data). Providing it (or
|
|
170
|
+
* `getRowCanExpand`) switches the table to custom-panel expansion and
|
|
171
|
+
* disables tree mode.
|
|
172
|
+
*/
|
|
173
|
+
renderExpandedRow?: (row: Row<typeof dataTableFeatures, TData>) => ReactNode;
|
|
174
|
+
/**
|
|
175
|
+
* The field DataTable reads tree children from, when rows carry nested
|
|
176
|
+
* data — `'subRows'` by default. Tree mode turns on by itself when some
|
|
177
|
+
* top-level row holds a non-empty array there: parent rows grow expander
|
|
178
|
+
* buttons in the first content column, expanded children render as
|
|
179
|
+
* indented rows (one `--haze-space-4` per depth level) in document
|
|
180
|
+
* order, and the `expanded` state keeps its TanStack semantics (keyed by
|
|
181
|
+
* row id — sub-row ids default to `parentId.index`, so pass `getRowId`
|
|
182
|
+
* for stable ids). Works with sorting, filtering, selection, pagination
|
|
183
|
+
* and `virtualized` (the expanded row model already yields the flat
|
|
184
|
+
* display order the window slices). Explicit `getRowCanExpand` /
|
|
185
|
+
* `renderExpandedRow` take priority — with either present, `subRows`
|
|
186
|
+
* data is not read at all.
|
|
187
|
+
*/
|
|
188
|
+
subRowsKey?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Column visibility state (TanStack `ColumnVisibilityState`): a map keyed by
|
|
191
|
+
* column id, `true` (or absent) meaning visible. Hidden columns drop
|
|
192
|
+
* from header, body and colgroup.
|
|
193
|
+
*/
|
|
194
|
+
columnVisibility?: ControlOrValue<ColumnVisibilityState>;
|
|
195
|
+
/**
|
|
196
|
+
* Render the column-settings trigger opening a `DropdownMenu` of
|
|
197
|
+
* checkboxes — one per hideable column (`meta.hideable: false` pins a
|
|
198
|
+
* column out of the menu). With `pageSize` the trigger sits in the
|
|
199
|
+
* pagination row (pagination keeps the end edge); without it a toolbar
|
|
200
|
+
* row appears above the table's inline-end corner. Defaults to `false`.
|
|
201
|
+
*/
|
|
202
|
+
columnToggle?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Render a filter row directly below the header: one `Input` per
|
|
205
|
+
* filterable column, typing filters rows through TanStack's
|
|
206
|
+
* case-insensitive `includesString` (empty input clears the filter).
|
|
207
|
+
* Per-column `meta.filterable` (or native `enableColumnFilter`)
|
|
208
|
+
* overrides per column; a columnDef `filterFn` replaces the default
|
|
209
|
+
* filter function. Defaults to `false`.
|
|
210
|
+
*/
|
|
211
|
+
filterable?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Renders summary rows in a `<tfoot>` below the body: one row per entry,
|
|
214
|
+
* one cell per leaf column (`cells[i]` aligns with column `i`; the
|
|
215
|
+
* selection column, when present, renders an empty cell first). Cell
|
|
216
|
+
* functions receive the rows being summarized — every row of the
|
|
217
|
+
* filtered data (all pages, tree sub-rows included), so totals stay
|
|
218
|
+
* stable across pagination; `label` names the row accessibly. Skipped
|
|
219
|
+
* while `loading` or when no rows render. When `virtualized`, the
|
|
220
|
+
* summary renders in its own table below the scrolling window — pinned
|
|
221
|
+
* by construction, `stickyFooter` is unnecessary there.
|
|
222
|
+
*/
|
|
223
|
+
summary?: (rows: Row<typeof dataTableFeatures, TData>[]) => DataTableSummary<TData>[];
|
|
224
|
+
/**
|
|
225
|
+
* Keep the summary footer visible while the body scrolls vertically —
|
|
226
|
+
* the tfoot cells stick to the bottom of the scroll area (needs a
|
|
227
|
+
* height-bounded table: `stickyHeader`'s scroll area or a consumer
|
|
228
|
+
* `max-height`). No effect when `virtualized` (already pinned) or
|
|
229
|
+
* without `summary`. Defaults to `false`.
|
|
230
|
+
*/
|
|
231
|
+
stickyFooter?: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Enable inline cell editing: cells become focusable and enter edit mode
|
|
234
|
+
* on double-click or Enter; the built-in editors (an `InputCore`) save
|
|
235
|
+
* on Enter or blur and cancel on Escape. The editor kind is chosen per
|
|
236
|
+
* column through `meta.editor` (`'text'` by default, `'number'` parses
|
|
237
|
+
* the draft — reporting `null` when cleared — a function renders a
|
|
238
|
+
* custom editor, `false` opts the column out). DataTable never mutates
|
|
239
|
+
* `data`: committed values are reported through `onCellEdit`, and the
|
|
240
|
+
* cell keeps rendering the current value until the consumer updates the
|
|
241
|
+
* data. Note `onRowClick` still fires for the clicks of a double-click.
|
|
242
|
+
*/
|
|
243
|
+
editable?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Reports a committed cell edit: the row id, the column id, the next
|
|
246
|
+
* value and the previous one. Called after Enter/blur/custom-editor
|
|
247
|
+
* saves, only when the value actually changed (`Object.is`). The
|
|
248
|
+
* consumer owns the data — update it to make the edit visible.
|
|
249
|
+
*/
|
|
250
|
+
onCellEdit?: (rowId: string, columnId: string, nextValue: unknown, prevValue: unknown) => void;
|
|
99
251
|
className?: string;
|
|
100
|
-
} & Omit<ComponentPropsWithoutRef<'table'>, 'children'>;
|
|
101
|
-
export default function DataTable<TData extends RowData>({ columns, data, sortable, selectable, rowSelection: rowSelectionControl, sorting: sortingControl, pageSize, page: pageControl, loading, stickyHeader, virtualized, getRowId, onRowClick, empty, className, ...rest }: DataTableProps<TData>): import("react").JSX.Element;
|
|
102
|
-
export type { DataTableProps, DataTableColumnDef, DataTableColumnMeta, DataTableVirtualized, };
|
|
252
|
+
} & Omit<ComponentPropsWithoutRef<'table'>, 'children' | 'summary'>;
|
|
253
|
+
export default function DataTable<TData extends RowData>({ columns, data, sortable, selectable, rowSelection: rowSelectionControl, sorting: sortingControl, pageSize, page: pageControl, manual, pageCount, onPageChange, onSortChange, loading, stickyHeader, virtualized, getRowId, onRowClick, empty, resizable, expanded: expandedControl, getRowCanExpand, renderExpandedRow, subRowsKey, columnVisibility: columnVisibilityControl, columnToggle, filterable, summary, stickyFooter, editable, onCellEdit, className, ...rest }: DataTableProps<TData>): import("react").JSX.Element;
|
|
254
|
+
export type { DataTableProps, DataTableColumnDef, DataTableColumnMeta, DataTableVirtualized, DataTableSummary, DataTableSummaryCell, DataTableCellEditorProps, };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ColumnVisibilityState, RowData } from '@tanstack/react-table';
|
|
2
|
+
import type { DataTableColumnDef } from './DataTable';
|
|
3
|
+
/** Options for `dataTableToCsv`. */
|
|
4
|
+
type DataTableCsvOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* Prepend a UTF-8 byte-order mark (`\uFEFF`), default `true`. Excel
|
|
7
|
+
* sniffs the BOM to decode the file as UTF-8 — without it, CJK and
|
|
8
|
+
* other non-ASCII cell values come up mojibake in Excel's legacy
|
|
9
|
+
* default encoding. Turn it off when the consumer already handles
|
|
10
|
+
* encoding (or feeds the string to a parser that chokes on it).
|
|
11
|
+
*/
|
|
12
|
+
bom?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The table's column-visibility state (the `columnVisibility` control's
|
|
15
|
+
* value): columns hidden there are skipped, so the export mirrors what
|
|
16
|
+
* the table renders.
|
|
17
|
+
*/
|
|
18
|
+
columnVisibility?: ColumnVisibilityState;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Serializes rows and column defs to a CSV string (RFC 4180: CRLF row
|
|
22
|
+
* separators, quoted fields around commas, quotes and embedded line
|
|
23
|
+
* breaks). The header row uses each column's string `header`, falling
|
|
24
|
+
* back to its id; grouped columns flatten to their leaves. Only exporting
|
|
25
|
+
* columns contribute: display-only columns (no `accessorKey`/`accessorFn`)
|
|
26
|
+
* are skipped, as are `meta.excludeFromExport` columns and columns hidden
|
|
27
|
+
* in `options.columnVisibility`. A UTF-8 BOM is prepended by default so
|
|
28
|
+
* Excel decodes non-ASCII text correctly (`bom: false` drops it).
|
|
29
|
+
*
|
|
30
|
+
* Pure string building — no DOM, no table instance — so it runs anywhere
|
|
31
|
+
* the row data lives (client, worker, server) on the same `columns` array
|
|
32
|
+
* handed to DataTable.
|
|
33
|
+
*/
|
|
34
|
+
declare function dataTableToCsv<TData extends RowData>(rows: TData[], columns: DataTableColumnDef<TData>[], options?: DataTableCsvOptions): string;
|
|
35
|
+
export { dataTableToCsv };
|
|
36
|
+
export type { DataTableCsvOptions };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props handed to a custom cell editor (`meta.editor` as a function): the
|
|
4
|
+
* current cell value, the row and column (structural views of the TanStack
|
|
5
|
+
* objects), and the two exit channels. The editor is uncontrolled UI inside
|
|
6
|
+
* the cell — call `onSave` with the next value (routed to `onCellEdit`,
|
|
7
|
+
* which owns the data) or `onCancel` to leave the value untouched. After
|
|
8
|
+
* either, move focus yourself if needed (e.g. back onto the cell) —
|
|
9
|
+
* DataTable cannot know where a custom editor's focusables live.
|
|
10
|
+
*/
|
|
11
|
+
type DataTableCellEditorProps = {
|
|
12
|
+
/** Current cell value (`row.getValue(column.id)`), untyped. */
|
|
13
|
+
value: unknown;
|
|
14
|
+
/** Structural view of the TanStack row being edited. */
|
|
15
|
+
row: {
|
|
16
|
+
id: string;
|
|
17
|
+
index: number;
|
|
18
|
+
depth: number;
|
|
19
|
+
original: unknown;
|
|
20
|
+
getValue: (columnId: string) => unknown;
|
|
21
|
+
};
|
|
22
|
+
/** Structural view of the column being edited. */
|
|
23
|
+
column: {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
/** Exits edit mode and reports the next value through `onCellEdit`. */
|
|
27
|
+
onSave: (value: unknown) => void;
|
|
28
|
+
/** Exits edit mode leaving the value untouched. */
|
|
29
|
+
onCancel: () => void;
|
|
30
|
+
};
|
|
31
|
+
/** Per-column metadata understood by DataTable. */
|
|
32
|
+
type DataTableColumnMeta = {
|
|
33
|
+
/** Column-level sorting switch — overrides the table-level `sortable` default. */
|
|
34
|
+
sortable?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Column width, applied through a `<colgroup>` shared by every table in
|
|
37
|
+
* the layout: a number is px, strings pass through as CSS lengths
|
|
38
|
+
* (`'25%'`, `'12rem'`). Wins over the native TanStack `size` field, which
|
|
39
|
+
* is read as a px fallback. Columns without any width keep their previous
|
|
40
|
+
* sizing — content-driven in normal mode, an equal share of the remainder
|
|
41
|
+
* when `virtualized`.
|
|
42
|
+
*/
|
|
43
|
+
width?: number | string;
|
|
44
|
+
/**
|
|
45
|
+
* Pin the column to the scroll area's left/right edge so it stays visible
|
|
46
|
+
* while the table scrolls horizontally. Normal mode only — ignored when
|
|
47
|
+
* `virtualized`, where each row is its own table with no shared
|
|
48
|
+
* scrollport. The sticky offset sums the widths of the preceding fixed
|
|
49
|
+
* columns on the same side, starting from the selection column, so fixed
|
|
50
|
+
* columns should declare numeric px widths; non-numeric widths contribute
|
|
51
|
+
* nothing to the offset math. Honored on leaf columns.
|
|
52
|
+
*/
|
|
53
|
+
fixed?: 'left' | 'right';
|
|
54
|
+
/**
|
|
55
|
+
* Column-level resizing switch — overrides the table-level `resizable`
|
|
56
|
+
* default (`false` hides this column's handle when the table is
|
|
57
|
+
* resizable; `true` is the per-column default). The native TanStack
|
|
58
|
+
* `enableResizing` field wins over this.
|
|
59
|
+
*/
|
|
60
|
+
resizable?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* `false` pins the column in the visibility menu — it renders without a
|
|
63
|
+
* toggle and can never be hidden. The native TanStack `enableHiding`
|
|
64
|
+
* field wins over this.
|
|
65
|
+
*/
|
|
66
|
+
hideable?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Column-level filtering switch — overrides the table-level `filterable`
|
|
69
|
+
* default, deciding whether the filter row renders an input for this
|
|
70
|
+
* column. The native TanStack `enableColumnFilter` field wins over this.
|
|
71
|
+
*/
|
|
72
|
+
filterable?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* `true` keeps the column out of `dataTableToCsv` exports — the flag for
|
|
75
|
+
* columns whose cells are presentation-only (badges, action buttons) or
|
|
76
|
+
* internal (row ids) and meaningless in a spreadsheet.
|
|
77
|
+
*/
|
|
78
|
+
excludeFromExport?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Cell editor for this column while the table-level `editable` switch is
|
|
81
|
+
* on. `'text'` and `'number'` render the built-in inline editor (an
|
|
82
|
+
* `InputCore`; the number variant parses the draft on save and reports
|
|
83
|
+
* `null` when cleared); a function renders a fully custom editor through
|
|
84
|
+
* `DataTableCellEditorProps`; `false` opts the column out. Defaults to
|
|
85
|
+
* `'text'` — every column is editable unless switched off here.
|
|
86
|
+
*/
|
|
87
|
+
editor?: false | 'text' | 'number' | ((props: DataTableCellEditorProps) => ReactNode);
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* The feature set stitched into every DataTable instance — TanStack v9's
|
|
91
|
+
* tree-shaking contract: only the row models and registries the component
|
|
92
|
+
* actually drives are registered. `columnMeta` is a type-only slot that
|
|
93
|
+
* types `meta` on column definitions.
|
|
94
|
+
*
|
|
95
|
+
* The resizing, expanding, visibility and filtering features are registered
|
|
96
|
+
* unconditionally but stay inert until their table-level props opt in —
|
|
97
|
+
* with empty state and no `getSubRows` wired their row-model steps are
|
|
98
|
+
* identities, so the default render path is unchanged. The column-sizing
|
|
99
|
+
* feature's `size: 150` column-def default is neutralized through
|
|
100
|
+
* `defaultColumn` (see there). */
|
|
101
|
+
declare const dataTableFeatures: {
|
|
102
|
+
rowPaginationFeature: import("@tanstack/react-table").TableFeature;
|
|
103
|
+
paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
104
|
+
rowSelectionFeature: import("@tanstack/react-table").TableFeature;
|
|
105
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
106
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
107
|
+
sortFns: {
|
|
108
|
+
alphanumeric: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
109
|
+
text: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
110
|
+
};
|
|
111
|
+
rowExpandingFeature: import("@tanstack/react-table").TableFeature;
|
|
112
|
+
expandedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
113
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
114
|
+
columnFilteringFeature: import("@tanstack/react-table").TableFeature;
|
|
115
|
+
filteredRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
116
|
+
filterFns: {
|
|
117
|
+
includesString: import("@tanstack/react-table").CreatedFilterFn<any, any>;
|
|
118
|
+
};
|
|
119
|
+
columnSizingFeature: import("@tanstack/react-table").TableFeature;
|
|
120
|
+
columnResizingFeature: import("@tanstack/react-table").TableFeature;
|
|
121
|
+
columnMeta: DataTableColumnMeta;
|
|
122
|
+
};
|
|
123
|
+
export { dataTableFeatures };
|
|
124
|
+
export type { DataTableCellEditorProps, DataTableColumnMeta };
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { default as DataTable } from './DataTable';
|
|
2
|
-
export type { DataTableProps, DataTableColumnDef, DataTableColumnMeta, DataTableVirtualized, } from './DataTable';
|
|
2
|
+
export type { DataTableProps, DataTableColumnDef, DataTableColumnMeta, DataTableVirtualized, DataTableSummary, DataTableSummaryCell, DataTableCellEditorProps, } from './DataTable';
|
|
3
|
+
export { dataTableToCsv } from './csv';
|
|
4
|
+
export type { DataTableCsvOptions } from './csv';
|
|
5
|
+
export { dataTableSum, dataTableAvg, dataTableCount } from './summary';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Row, RowData } from '@tanstack/react-table';
|
|
2
|
+
import type { dataTableFeatures } from './features';
|
|
3
|
+
/** A row as DataTable hands it to the `summary` callback and editors. */
|
|
4
|
+
type DataTableRow<TData extends RowData> = Row<typeof dataTableFeatures, TData>;
|
|
5
|
+
/**
|
|
6
|
+
* Sums the numeric values of one column across the given rows (the array
|
|
7
|
+
* `summary` receives). Non-numeric and missing cells contribute nothing,
|
|
8
|
+
* so string columns simply total `0`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function dataTableSum<TData extends RowData>(rows: DataTableRow<TData>[], columnId: string): number;
|
|
11
|
+
/**
|
|
12
|
+
* Averages the numeric values of one column across the given rows.
|
|
13
|
+
* Non-numeric cells are excluded from both the total and the divisor;
|
|
14
|
+
* with no numeric values at all the result is `undefined`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function dataTableAvg<TData extends RowData>(rows: DataTableRow<TData>[], columnId: string): number | undefined;
|
|
17
|
+
/** Counts the given rows — the summary helper for non-numeric columns. */
|
|
18
|
+
export declare function dataTableCount<TData extends RowData>(rows: DataTableRow<TData>[]): number;
|
|
19
|
+
export {};
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ControlOrValue } from 'react-use-control';
|
|
3
|
+
import type { DateRangePickerPreset } from './DateRangePickerCore';
|
|
4
|
+
/**
|
|
5
|
+
* Shortcut rows for the range panel: `'common'` selects the built-in
|
|
6
|
+
* set (today / yesterday / last 7 days / last 30 days / this month /
|
|
7
|
+
* last month, localized by the LocaleProvider), plain objects are
|
|
8
|
+
* custom rows, and an array may mix both — `'common'` inside an array
|
|
9
|
+
* splices the built-ins in at that position, so customs append after
|
|
10
|
+
* them as `['common', { label, range }]`.
|
|
11
|
+
*/
|
|
12
|
+
type DateRangePickerPresets = 'common' | readonly ('common' | DateRangePickerPreset)[];
|
|
3
13
|
type DateRangePickerProps = {
|
|
4
14
|
startDate?: ControlOrValue<string>;
|
|
5
15
|
endDate?: ControlOrValue<string>;
|
|
6
16
|
onStartChange?: (value: string) => void;
|
|
7
17
|
onEndChange?: (value: string) => void;
|
|
8
18
|
separator?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Number of month grids in the range panel. `2` renders an inline
|
|
21
|
+
* dual-month calendar below the inputs for visual range picking
|
|
22
|
+
* (first pick sets the start, second completes the range).
|
|
23
|
+
* @default 1
|
|
24
|
+
*/
|
|
25
|
+
months?: 1 | 2;
|
|
26
|
+
/** Disables individual dates on the panel's Calendar (see Calendar's
|
|
27
|
+
* `disabledDate`). */
|
|
28
|
+
disabledDate?: (date: Date) => boolean;
|
|
29
|
+
/** Shortcut rows at the top of the panel; clicking applies the
|
|
30
|
+
* preset's range to the start/end pair. `'common'` enables the
|
|
31
|
+
* built-in set; a custom array lists its own rows and may include
|
|
32
|
+
* `'common'` to prepend the built-ins (see
|
|
33
|
+
* {@link DateRangePickerPresets}). */
|
|
34
|
+
presets?: DateRangePickerPresets;
|
|
9
35
|
className?: string;
|
|
10
36
|
};
|
|
11
|
-
export default function DateRangePicker({ startDate: startDateControl, endDate: endDateControl, onStartChange, onEndChange, separator, className, }: DateRangePickerProps): import("react").JSX.Element;
|
|
12
|
-
export type { DateRangePickerProps };
|
|
37
|
+
export default function DateRangePicker({ startDate: startDateControl, endDate: endDateControl, onStartChange, onEndChange, separator, months, disabledDate, presets, className, }: DateRangePickerProps): import("react").JSX.Element;
|
|
38
|
+
export type { DateRangePickerProps, DateRangePickerPresets };
|
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
/** One shortcut row at the top of the range panel: clicking applies
|
|
3
|
+
* `range` as the start/end pair. */
|
|
4
|
+
type DateRangePickerPreset = {
|
|
5
|
+
/** Visible row copy. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Applied range as two "YYYY-MM-DD" strings. */
|
|
8
|
+
range: [string, string];
|
|
9
|
+
};
|
|
2
10
|
type DateRangePickerCoreProps = {
|
|
3
11
|
startDate: string;
|
|
4
12
|
endDate: string;
|
|
5
13
|
onStartChange: (value: string) => void;
|
|
6
14
|
onEndChange: (value: string) => void;
|
|
7
15
|
separator?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Number of month grids in the range panel. `2` renders an inline
|
|
18
|
+
* dual-month calendar below the inputs: the first pick sets the start
|
|
19
|
+
* date, the second completes the range (a pick before the start
|
|
20
|
+
* restarts it), and the two grids move together under one navigation.
|
|
21
|
+
* The default keeps the plain two-input layout.
|
|
22
|
+
* @default 1
|
|
23
|
+
*/
|
|
24
|
+
months?: 1 | 2;
|
|
25
|
+
/** Disables individual dates on the panel's Calendar (see Calendar's
|
|
26
|
+
* `disabledDate`). */
|
|
27
|
+
disabledDate?: (date: Date) => boolean;
|
|
28
|
+
/** Shortcut rows at the top of the panel; clicking applies the
|
|
29
|
+
* preset's range to the start/end pair. Providing presets renders
|
|
30
|
+
* the inline panel even with the default `months={1}`. */
|
|
31
|
+
presets?: DateRangePickerPreset[];
|
|
8
32
|
className?: string;
|
|
9
33
|
};
|
|
10
|
-
export default function DateRangePickerCore({ startDate, endDate, onStartChange, onEndChange, separator, className, }: DateRangePickerCoreProps): import("react").JSX.Element;
|
|
11
|
-
export type { DateRangePickerCoreProps };
|
|
34
|
+
export default function DateRangePickerCore({ startDate, endDate, onStartChange, onEndChange, separator, months, disabledDate, presets, className, }: DateRangePickerCoreProps): import("react").JSX.Element;
|
|
35
|
+
export type { DateRangePickerCoreProps, DateRangePickerPreset };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as DateRangePicker } from './DateRangePicker';
|
|
2
|
-
export type { DateRangePickerProps } from './DateRangePicker';
|
|
2
|
+
export type { DateRangePickerProps, DateRangePickerPresets } from './DateRangePicker';
|
|
3
3
|
export { default as DateRangePickerCore } from './DateRangePickerCore';
|
|
4
|
-
export type { DateRangePickerCoreProps } from './DateRangePickerCore';
|
|
4
|
+
export type { DateRangePickerCoreProps, DateRangePickerPreset } from './DateRangePickerCore';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in range presets for DateRangePicker's `presets='common'` set.
|
|
3
|
+
*
|
|
4
|
+
* Date arithmetic follows Calendar/date.ts semantics: every value is a
|
|
5
|
+
* local civil date realized at midnight (`new Date(year, month, day)`),
|
|
6
|
+
* and day shifts ride the Date constructor's day-rollover — DST never
|
|
7
|
+
* moves midnight, so a shifted local midnight always round-trips its
|
|
8
|
+
* civil date.
|
|
9
|
+
*/
|
|
10
|
+
import type { DateRangePickerPreset } from './DateRangePickerCore';
|
|
11
|
+
/** Localized labels for the built-in rows (LocaleProvider's
|
|
12
|
+
* `dateRangePicker` section). */
|
|
13
|
+
type CommonPresetLabels = {
|
|
14
|
+
today: string;
|
|
15
|
+
yesterday: string;
|
|
16
|
+
last7Days: string;
|
|
17
|
+
last30Days: string;
|
|
18
|
+
thisMonth: string;
|
|
19
|
+
lastMonth: string;
|
|
20
|
+
};
|
|
21
|
+
/** The built-in shortcut rows relative to `today` (defaults to now). */
|
|
22
|
+
export declare function commonRangePresets(labels: CommonPresetLabels, today?: Date): DateRangePickerPreset[];
|
|
23
|
+
export {};
|