@inspirecn/react 1.0.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 +46 -0
- package/dist/components/accordion/Accordion.d.ts +19 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.js +90 -0
- package/dist/components/alert/Alert.d.ts +13 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +100 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts +44 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/alert-dialog/AlertDialog.js +174 -0
- package/dist/components/aspect-ratio/AspectRatio.d.ts +4 -0
- package/dist/components/aspect-ratio/AspectRatio.d.ts.map +1 -0
- package/dist/components/aspect-ratio/AspectRatio.js +13 -0
- package/dist/components/avatar/Avatar.d.ts +19 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +86 -0
- package/dist/components/badge/Badge.d.ts +16 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +46 -0
- package/dist/components/body-text/BodyText.d.ts +17 -0
- package/dist/components/body-text/BodyText.d.ts.map +1 -0
- package/dist/components/body-text/BodyText.js +51 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +30 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +220 -0
- package/dist/components/button/Button.d.ts +24 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.js +95 -0
- package/dist/components/button-group/ButtonGroup.d.ts +12 -0
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -0
- package/dist/components/button-group/ButtonGroup.js +59 -0
- package/dist/components/calendar/Calendar.d.ts +10 -0
- package/dist/components/calendar/Calendar.d.ts.map +1 -0
- package/dist/components/calendar/Calendar.js +147 -0
- package/dist/components/card/Card.d.ts +10 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/Card.js +81 -0
- package/dist/components/carousel/Carousel.d.ts +20 -0
- package/dist/components/carousel/Carousel.d.ts.map +1 -0
- package/dist/components/carousel/Carousel.js +153 -0
- package/dist/components/chart/Chart.d.ts +43 -0
- package/dist/components/chart/Chart.d.ts.map +1 -0
- package/dist/components/chart/Chart.js +175 -0
- package/dist/components/checkbox/Checkbox.d.ts +11 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.js +43 -0
- package/dist/components/code-box/Codebox.d.ts +11 -0
- package/dist/components/code-box/Codebox.d.ts.map +1 -0
- package/dist/components/code-box/Codebox.js +251 -0
- package/dist/components/collapsible/Collapsible.d.ts +6 -0
- package/dist/components/collapsible/Collapsible.d.ts.map +1 -0
- package/dist/components/collapsible/Collapsible.js +31 -0
- package/dist/components/combobox/Combobox.d.ts +161 -0
- package/dist/components/combobox/Combobox.d.ts.map +1 -0
- package/dist/components/combobox/Combobox.js +330 -0
- package/dist/components/command/Command.d.ts +19 -0
- package/dist/components/command/Command.d.ts.map +1 -0
- package/dist/components/command/Command.js +128 -0
- package/dist/components/container/Container.d.ts +14 -0
- package/dist/components/container/Container.d.ts.map +1 -0
- package/dist/components/container/Container.js +27 -0
- package/dist/components/context-menu/ContextMenu.d.ts +26 -0
- package/dist/components/context-menu/ContextMenu.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenu.js +193 -0
- package/dist/components/count-animation/CountAnimation.d.ts +5 -0
- package/dist/components/count-animation/CountAnimation.d.ts.map +1 -0
- package/dist/components/count-animation/CountAnimation.js +19 -0
- package/dist/components/date-time-picker/DateTimePicker.d.ts +38 -0
- package/dist/components/date-time-picker/DateTimePicker.d.ts.map +1 -0
- package/dist/components/date-time-picker/DateTimePicker.js +287 -0
- package/dist/components/dialog/Dialog.d.ts +18 -0
- package/dist/components/dialog/Dialog.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.js +138 -0
- package/dist/components/dialog/FilterDropdown.d.ts +7 -0
- package/dist/components/dialog/FilterDropdown.d.ts.map +1 -0
- package/dist/components/dialog/FilterDropdown.js +38 -0
- package/dist/components/display-error/DisplayError.d.ts +11 -0
- package/dist/components/display-error/DisplayError.d.ts.map +1 -0
- package/dist/components/display-error/DisplayError.js +34 -0
- package/dist/components/drawer/Drawer.d.ts +14 -0
- package/dist/components/drawer/Drawer.d.ts.map +1 -0
- package/dist/components/drawer/Drawer.js +114 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +41 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.js +282 -0
- package/dist/components/empty/Empty.d.ts +12 -0
- package/dist/components/empty/Empty.d.ts.map +1 -0
- package/dist/components/empty/Empty.js +87 -0
- package/dist/components/empty-state/EmptyState.d.ts +12 -0
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/components/empty-state/EmptyState.js +43 -0
- package/dist/components/field/Field.d.ts +25 -0
- package/dist/components/field/Field.d.ts.map +1 -0
- package/dist/components/field/Field.js +164 -0
- package/dist/components/file-uploader/FileUploader.d.ts +34 -0
- package/dist/components/file-uploader/FileUploader.d.ts.map +1 -0
- package/dist/components/file-uploader/FileUploader.js +124 -0
- package/dist/components/file-uploader/types.d.ts +32 -0
- package/dist/components/file-uploader/types.d.ts.map +1 -0
- package/dist/components/file-uploader/types.js +1 -0
- package/dist/components/file-uploader/useFileUploader.d.ts +22 -0
- package/dist/components/file-uploader/useFileUploader.d.ts.map +1 -0
- package/dist/components/file-uploader/useFileUploader.js +115 -0
- package/dist/components/form/FieldArray.d.ts +26 -0
- package/dist/components/form/FieldArray.d.ts.map +1 -0
- package/dist/components/form/FieldArray.js +16 -0
- package/dist/components/form/Form.d.ts +25 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +124 -0
- package/dist/components/form/GenericForm.d.ts +42 -0
- package/dist/components/form/GenericForm.d.ts.map +1 -0
- package/dist/components/form/GenericForm.js +55 -0
- package/dist/components/form/fields/CheckboxField.d.ts +33 -0
- package/dist/components/form/fields/CheckboxField.d.ts.map +1 -0
- package/dist/components/form/fields/CheckboxField.js +66 -0
- package/dist/components/form/fields/CheckboxGroupField.d.ts +50 -0
- package/dist/components/form/fields/CheckboxGroupField.d.ts.map +1 -0
- package/dist/components/form/fields/CheckboxGroupField.js +64 -0
- package/dist/components/form/fields/ColorPickerField.d.ts +12 -0
- package/dist/components/form/fields/ColorPickerField.d.ts.map +1 -0
- package/dist/components/form/fields/ColorPickerField.js +140 -0
- package/dist/components/form/fields/ComboboxField.d.ts +32 -0
- package/dist/components/form/fields/ComboboxField.d.ts.map +1 -0
- package/dist/components/form/fields/ComboboxField.js +93 -0
- package/dist/components/form/fields/DateTimeField.d.ts +77 -0
- package/dist/components/form/fields/DateTimeField.d.ts.map +1 -0
- package/dist/components/form/fields/DateTimeField.js +99 -0
- package/dist/components/form/fields/FieldDescription.d.ts +10 -0
- package/dist/components/form/fields/FieldDescription.d.ts.map +1 -0
- package/dist/components/form/fields/FieldDescription.js +30 -0
- package/dist/components/form/fields/FileField.d.ts +16 -0
- package/dist/components/form/fields/FileField.d.ts.map +1 -0
- package/dist/components/form/fields/FileField.js +79 -0
- package/dist/components/form/fields/FileUploaderField.d.ts +72 -0
- package/dist/components/form/fields/FileUploaderField.d.ts.map +1 -0
- package/dist/components/form/fields/FileUploaderField.js +79 -0
- package/dist/components/form/fields/InputPhoneField.d.ts +40 -0
- package/dist/components/form/fields/InputPhoneField.d.ts.map +1 -0
- package/dist/components/form/fields/InputPhoneField.js +48 -0
- package/dist/components/form/fields/InputTagsField.d.ts +32 -0
- package/dist/components/form/fields/InputTagsField.d.ts.map +1 -0
- package/dist/components/form/fields/InputTagsField.js +50 -0
- package/dist/components/form/fields/RadioGroupField.d.ts +40 -0
- package/dist/components/form/fields/RadioGroupField.d.ts.map +1 -0
- package/dist/components/form/fields/RadioGroupField.js +61 -0
- package/dist/components/form/fields/ResetButton.d.ts +19 -0
- package/dist/components/form/fields/ResetButton.d.ts.map +1 -0
- package/dist/components/form/fields/ResetButton.js +25 -0
- package/dist/components/form/fields/SelectField.d.ts +44 -0
- package/dist/components/form/fields/SelectField.d.ts.map +1 -0
- package/dist/components/form/fields/SelectField.js +59 -0
- package/dist/components/form/fields/SubmitButton.d.ts +27 -0
- package/dist/components/form/fields/SubmitButton.d.ts.map +1 -0
- package/dist/components/form/fields/SubmitButton.js +36 -0
- package/dist/components/form/fields/SwitchField.d.ts +40 -0
- package/dist/components/form/fields/SwitchField.d.ts.map +1 -0
- package/dist/components/form/fields/SwitchField.js +77 -0
- package/dist/components/form/fields/TextField.d.ts +25 -0
- package/dist/components/form/fields/TextField.d.ts.map +1 -0
- package/dist/components/form/fields/TextField.js +98 -0
- package/dist/components/form/fields/TextareaField.d.ts +44 -0
- package/dist/components/form/fields/TextareaField.d.ts.map +1 -0
- package/dist/components/form/fields/TextareaField.js +71 -0
- package/dist/components/form/fields/UniqueTextField.d.ts +38 -0
- package/dist/components/form/fields/UniqueTextField.d.ts.map +1 -0
- package/dist/components/form/fields/UniqueTextField.js +171 -0
- package/dist/components/form/index.d.ts +20 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +40 -0
- package/dist/components/form/useTriggerForm.d.ts +11 -0
- package/dist/components/form/useTriggerForm.d.ts.map +1 -0
- package/dist/components/form/useTriggerForm.js +14 -0
- package/dist/components/heading/Heading.d.ts +18 -0
- package/dist/components/heading/Heading.d.ts.map +1 -0
- package/dist/components/heading/Heading.js +71 -0
- package/dist/components/hover-card/HoverCard.d.ts +7 -0
- package/dist/components/hover-card/HoverCard.d.ts.map +1 -0
- package/dist/components/hover-card/HoverCard.js +41 -0
- package/dist/components/icon/Icon.d.ts +22 -0
- package/dist/components/icon/Icon.d.ts.map +1 -0
- package/dist/components/icon/Icon.js +71 -0
- package/dist/components/index.d.ts +76 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +426 -0
- package/dist/components/input/Input.d.ts +11 -0
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/Input.js +66 -0
- package/dist/components/input-group/InputGroup.d.ts +17 -0
- package/dist/components/input-group/InputGroup.d.ts.map +1 -0
- package/dist/components/input-group/InputGroup.js +129 -0
- package/dist/components/input-otp/input-otp.d.ts +16 -0
- package/dist/components/input-otp/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp/input-otp.js +72 -0
- package/dist/components/input-phone/InputPhone.d.ts +13 -0
- package/dist/components/input-phone/InputPhone.d.ts.map +1 -0
- package/dist/components/input-phone/InputPhone.js +116 -0
- package/dist/components/input-tags/InputTags.d.ts +28 -0
- package/dist/components/input-tags/InputTags.d.ts.map +1 -0
- package/dist/components/input-tags/InputTags.js +88 -0
- package/dist/components/item/Item.d.ts +24 -0
- package/dist/components/item/Item.d.ts.map +1 -0
- package/dist/components/item/Item.js +162 -0
- package/dist/components/kbd/Kbd.d.ts +4 -0
- package/dist/components/kbd/Kbd.d.ts.map +1 -0
- package/dist/components/kbd/Kbd.js +26 -0
- package/dist/components/label/Label.d.ts +11 -0
- package/dist/components/label/Label.d.ts.map +1 -0
- package/dist/components/label/Label.js +26 -0
- package/dist/components/menubar/Menubar.d.ts +27 -0
- package/dist/components/menubar/Menubar.d.ts.map +1 -0
- package/dist/components/menubar/Menubar.js +212 -0
- package/dist/components/native-select/NativeSelect.d.ts +6 -0
- package/dist/components/native-select/NativeSelect.d.ts.map +1 -0
- package/dist/components/native-select/NativeSelect.js +44 -0
- package/dist/components/navbar/Navbar.d.ts +3 -0
- package/dist/components/navbar/Navbar.d.ts.map +1 -0
- package/dist/components/navbar/Navbar.js +69 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts +15 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts.map +1 -0
- package/dist/components/navigation-menu/NavigationMenu.js +112 -0
- package/dist/components/open-dialog/OpenDialog.d.ts +9 -0
- package/dist/components/open-dialog/OpenDialog.d.ts.map +1 -0
- package/dist/components/open-dialog/OpenDialog.js +35 -0
- package/dist/components/pagination/Pagination.d.ts +31 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.js +216 -0
- package/dist/components/pagination/PaginationProvider.d.ts +33 -0
- package/dist/components/pagination/PaginationProvider.d.ts.map +1 -0
- package/dist/components/pagination/PaginationProvider.js +65 -0
- package/dist/components/pagination/types.d.ts +22 -0
- package/dist/components/pagination/types.d.ts.map +1 -0
- package/dist/components/pagination/types.js +1 -0
- package/dist/components/popover/Popover.d.ts +8 -0
- package/dist/components/popover/Popover.d.ts.map +1 -0
- package/dist/components/popover/Popover.js +49 -0
- package/dist/components/profile-pic-uploader/ProfilePicUploader.d.ts +12 -0
- package/dist/components/profile-pic-uploader/ProfilePicUploader.d.ts.map +1 -0
- package/dist/components/profile-pic-uploader/ProfilePicUploader.js +233 -0
- package/dist/components/profile-pic-uploader/index.d.ts +3 -0
- package/dist/components/profile-pic-uploader/index.d.ts.map +1 -0
- package/dist/components/profile-pic-uploader/index.js +4 -0
- package/dist/components/progress/Progress.d.ts +189 -0
- package/dist/components/progress/Progress.d.ts.map +1 -0
- package/dist/components/progress/Progress.js +283 -0
- package/dist/components/radio-group/RadioGroup.d.ts +16 -0
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroup.js +50 -0
- package/dist/components/resizable-panel/ResizablePanel.d.ts +9 -0
- package/dist/components/resizable-panel/ResizablePanel.d.ts.map +1 -0
- package/dist/components/resizable-panel/ResizablePanel.js +44 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +6 -0
- package/dist/components/scroll-area/ScrollArea.d.ts.map +1 -0
- package/dist/components/scroll-area/ScrollArea.js +39 -0
- package/dist/components/section/Section.d.ts +12 -0
- package/dist/components/section/Section.d.ts.map +1 -0
- package/dist/components/section/Section.js +84 -0
- package/dist/components/select/Select.d.ts +16 -0
- package/dist/components/select/Select.d.ts.map +1 -0
- package/dist/components/select/Select.js +148 -0
- package/dist/components/separator/Separator.d.ts +5 -0
- package/dist/components/separator/Separator.d.ts.map +1 -0
- package/dist/components/separator/Separator.js +20 -0
- package/dist/components/sheet/Sheet.d.ts +16 -0
- package/dist/components/sheet/Sheet.d.ts.map +1 -0
- package/dist/components/sheet/Sheet.js +127 -0
- package/dist/components/sidebar/HeaderDropDown.d.ts +3 -0
- package/dist/components/sidebar/HeaderDropDown.d.ts.map +1 -0
- package/dist/components/sidebar/HeaderDropDown.js +39 -0
- package/dist/components/sidebar/Sidebar.d.ts +70 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/Sidebar.js +514 -0
- package/dist/components/sidebar/SidebarFooterContent.d.ts +3 -0
- package/dist/components/sidebar/SidebarFooterContent.d.ts.map +1 -0
- package/dist/components/sidebar/SidebarFooterContent.js +66 -0
- package/dist/components/sidebar/SidebarHeaderLogo.d.ts +2 -0
- package/dist/components/sidebar/SidebarHeaderLogo.d.ts.map +1 -0
- package/dist/components/sidebar/SidebarHeaderLogo.js +34 -0
- package/dist/components/skeleton/Skeleton.d.ts +3 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.js +15 -0
- package/dist/components/slider/Slider.d.ts +6 -0
- package/dist/components/slider/Slider.d.ts.map +1 -0
- package/dist/components/slider/Slider.js +39 -0
- package/dist/components/sonner/Sonner.d.ts +4 -0
- package/dist/components/sonner/Sonner.d.ts.map +1 -0
- package/dist/components/sonner/Sonner.js +55 -0
- package/dist/components/spinner/Spinner.d.ts +11 -0
- package/dist/components/spinner/Spinner.d.ts.map +1 -0
- package/dist/components/spinner/Spinner.js +49 -0
- package/dist/components/stack/Stack.d.ts +14 -0
- package/dist/components/stack/Stack.d.ts.map +1 -0
- package/dist/components/stack/Stack.js +29 -0
- package/dist/components/subText/SubText.d.ts +13 -0
- package/dist/components/subText/SubText.d.ts.map +1 -0
- package/dist/components/subText/SubText.js +50 -0
- package/dist/components/switch/Switch.d.ts +5 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/Switch.js +41 -0
- package/dist/components/table/Table.d.ts +32 -0
- package/dist/components/table/Table.d.ts.map +1 -0
- package/dist/components/table/Table.js +243 -0
- package/dist/components/table-empty-state/TableEmptyState.d.ts +11 -0
- package/dist/components/table-empty-state/TableEmptyState.d.ts.map +1 -0
- package/dist/components/table-empty-state/TableEmptyState.js +52 -0
- package/dist/components/tabs/Tabs.d.ts +12 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +84 -0
- package/dist/components/text-link/LinkText.d.ts +14 -0
- package/dist/components/text-link/LinkText.d.ts.map +1 -0
- package/dist/components/text-link/LinkText.js +42 -0
- package/dist/components/textarea/Textarea.d.ts +7 -0
- package/dist/components/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.js +28 -0
- package/dist/components/toggle/Toggle.d.ts +10 -0
- package/dist/components/toggle/Toggle.d.ts.map +1 -0
- package/dist/components/toggle/Toggle.js +41 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts +10 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts.map +1 -0
- package/dist/components/toggle-group/ToggleGroup.js +78 -0
- package/dist/components/tooltip/Tooltip.d.ts +18 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/Tooltip.js +83 -0
- package/dist/fonts/index.css +49 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/use-countdown.d.ts +20 -0
- package/dist/hooks/use-countdown.d.ts.map +1 -0
- package/dist/hooks/use-countdown.js +21 -0
- package/dist/hooks/use-debounce.d.ts +20 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/hooks/use-debounce.js +15 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/hooks/useDragScroll.d.ts +6 -0
- package/dist/hooks/useDragScroll.d.ts.map +1 -0
- package/dist/hooks/useDragScroll.js +26 -0
- package/dist/hooks/useImageCrop.d.ts +41 -0
- package/dist/hooks/useImageCrop.d.ts.map +1 -0
- package/dist/hooks/useImageCrop.js +84 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +456 -0
- package/dist/lib/datetime.d.ts +8 -0
- package/dist/lib/datetime.d.ts.map +1 -0
- package/dist/lib/datetime.js +44 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +15 -0
- package/dist/lib/string.d.ts +4 -0
- package/dist/lib/string.d.ts.map +1 -0
- package/dist/lib/string.js +12 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +8 -0
- package/dist/styles/globals.css +60 -0
- package/dist/styles/tokens.css +249 -0
- package/dist/theme/ThemeProvider.d.ts +5 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +17 -0
- package/dist/theme/ToggleTheme.d.ts +2 -0
- package/dist/theme/ToggleTheme.d.ts.map +1 -0
- package/dist/theme/ToggleTheme.js +29 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +9 -0
- package/dist/theme/theme.d.ts +8 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +15 -0
- package/dist/vite.svg +1 -0
- package/package.json +156 -0
- package/postcss.config.mjs +6 -0
- package/src/styles/globals.css +60 -0
- package/src/styles/tokens.css +249 -0
- package/src/styles/tokens.json +253 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import * as r from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import { ChevronDown as m, CheckIcon as f, X as x, CircleIcon as g, ChevronRightIcon as h } from "lucide-react";
|
|
3
|
+
import { cn as a } from "@inspirecn/ui/lib/utils";
|
|
4
|
+
import { jsxs as i, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
5
|
+
function D({
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(r.Root, {
|
|
9
|
+
"data-slot": "dropdown-menu",
|
|
10
|
+
...t
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function z({
|
|
14
|
+
...t
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ e(r.Portal, {
|
|
17
|
+
"data-slot": "dropdown-menu-portal",
|
|
18
|
+
...t
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function M({
|
|
22
|
+
label: t = "Filter",
|
|
23
|
+
number: n,
|
|
24
|
+
status: o,
|
|
25
|
+
showNumber: s = !0,
|
|
26
|
+
showStatus: d = !0
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ i("div", {
|
|
29
|
+
className: "group flex items-center gap-2",
|
|
30
|
+
children: [/* @__PURE__ */ e("span", {
|
|
31
|
+
className: "text-text-tertiary group-hover:text-text-primary text-heading-xs group-data-[state=open]:text-text-primary! group-focus:text-text-primary!",
|
|
32
|
+
children: t
|
|
33
|
+
}), s && n !== void 0 && /* @__PURE__ */ e("span", {
|
|
34
|
+
className: "bg-surface-tertiary text-text-xxs text-text-primary group-data-[state=open]:text-text-tertiary! group-focus:text-text-tertiary! group-hover:text-text-tertiary flex h-4 w-4 items-center justify-center rounded-full font-normal",
|
|
35
|
+
children: n
|
|
36
|
+
}), d && o && /* @__PURE__ */ e("span", {
|
|
37
|
+
className: "text-text-primary group-hover:text-text-brand text-heading-xs group-data-[state=open]:text-text-brand! group-focus:text-text-brand! ml-1 font-normal",
|
|
38
|
+
children: o
|
|
39
|
+
}), /* @__PURE__ */ e(m, {
|
|
40
|
+
className: "text-text-primary group-hover:text-text-brand group-data-[state=open]:text-text-brand! h-4 w-4 transition-transform duration-300 group-data-[state=open]:rotate-180"
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function k({
|
|
45
|
+
className: t,
|
|
46
|
+
children: n,
|
|
47
|
+
...o
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ e(r.Trigger, {
|
|
50
|
+
"data-slot": "dropdown-menu-trigger",
|
|
51
|
+
className: a("group outline outline-border-primary text-heading-xs flex h-8 w-fit cursor-pointer items-center gap-2 rounded-md px-4 py-2 font-normal transition-all select-none", "hover:bg-hover-secondary focus:outline-focused", "data-[state=open]:outline-focused data-[state=open]:bg-transparent", "data-[state=open]:hover:bg-hover-secondary!", "h-8 [&>svg]:transition-transform [&>svg]:duration-300 data-[state=open]:[&>svg]:rotate-180", t),
|
|
52
|
+
...o,
|
|
53
|
+
children: n
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function I({
|
|
57
|
+
className: t,
|
|
58
|
+
sideOffset: n = 4,
|
|
59
|
+
...o
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ e(r.Portal, {
|
|
62
|
+
children: /* @__PURE__ */ e(r.Content, {
|
|
63
|
+
"data-slot": "dropdown-menu-content",
|
|
64
|
+
sideOffset: n,
|
|
65
|
+
className: a(
|
|
66
|
+
// 'w-(--radix-dropdown-menu-trigger-width)',
|
|
67
|
+
// min-w-[var(--radix-dropdown-menu-trigger-width)],
|
|
68
|
+
"bg-surface-tertiary! codebox-scroll text-text-secondary data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border-white z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md m-0!",
|
|
69
|
+
t
|
|
70
|
+
),
|
|
71
|
+
...o
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function C({
|
|
76
|
+
...t
|
|
77
|
+
}) {
|
|
78
|
+
return /* @__PURE__ */ e(r.Group, {
|
|
79
|
+
"data-slot": "dropdown-menu-group",
|
|
80
|
+
...t,
|
|
81
|
+
className: "flex flex-col gap-0.5"
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function w({
|
|
85
|
+
className: t,
|
|
86
|
+
inset: n,
|
|
87
|
+
variant: o = "default",
|
|
88
|
+
showDot: s = !0,
|
|
89
|
+
leftIcon: d,
|
|
90
|
+
rightIcon: l,
|
|
91
|
+
selected: c = !1,
|
|
92
|
+
children: u,
|
|
93
|
+
...p
|
|
94
|
+
}) {
|
|
95
|
+
return /* @__PURE__ */ e(r.Item, {
|
|
96
|
+
"data-slot": "dropdown-menu-item",
|
|
97
|
+
"data-inset": n,
|
|
98
|
+
"data-variant": o,
|
|
99
|
+
"data-selected": c,
|
|
100
|
+
className: a("flex flex-row items-start p-2 gap-6", "h-8 w-full rounded-sm", "cursor-pointer outline-none select-none transition-colors", "hover:bg-hover-secondary! hover:text-text-brand focus:bg-hover-secondary!", "data-[selected=true]:bg-hover-secondary!", "data-[variant=destructive]:text-delete data-[variant=destructive]:focus:bg-delete/10 data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
101
|
+
...p,
|
|
102
|
+
children: /* @__PURE__ */ i("div", {
|
|
103
|
+
className: "flex flex-row items-start gap-2 flex-1 h-4",
|
|
104
|
+
children: [d && /* @__PURE__ */ e("div", {
|
|
105
|
+
className: "flex items-center justify-center w-4 h-4 shrink-0",
|
|
106
|
+
children: d
|
|
107
|
+
}), /* @__PURE__ */ i("div", {
|
|
108
|
+
className: "flex flex-row items-center gap-1 flex-1 h-4",
|
|
109
|
+
children: [s && !d && /* @__PURE__ */ e("div", {
|
|
110
|
+
className: "w-1 h-1 rounded-full bg-[#D9D9D9] shrink-0"
|
|
111
|
+
}), /* @__PURE__ */ e("span", {
|
|
112
|
+
className: a("flex items-center h-4 flex-1", "text-heading-xs font-normal", c && "text-text-primary!"),
|
|
113
|
+
children: u
|
|
114
|
+
})]
|
|
115
|
+
}), l && /* @__PURE__ */ e("div", {
|
|
116
|
+
className: "flex items-center justify-center w-4 h-4 shrink-0",
|
|
117
|
+
children: l
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function j({
|
|
123
|
+
className: t,
|
|
124
|
+
children: n,
|
|
125
|
+
checked: o,
|
|
126
|
+
...s
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ i(r.CheckboxItem, {
|
|
129
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
130
|
+
className: a("focus:bg-accent focus:text-accent-foreground text-heading-xs! relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
131
|
+
checked: o,
|
|
132
|
+
...s,
|
|
133
|
+
children: [/* @__PURE__ */ e("span", {
|
|
134
|
+
className: "pointer-events-none absolute left-2 flex size-4 items-center justify-center",
|
|
135
|
+
children: /* @__PURE__ */ e(r.ItemIndicator, {
|
|
136
|
+
children: /* @__PURE__ */ e(f, {
|
|
137
|
+
className: "size-4"
|
|
138
|
+
})
|
|
139
|
+
})
|
|
140
|
+
}), n]
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function S({
|
|
144
|
+
...t
|
|
145
|
+
}) {
|
|
146
|
+
return /* @__PURE__ */ e(r.RadioGroup, {
|
|
147
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
148
|
+
...t
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function _({
|
|
152
|
+
className: t,
|
|
153
|
+
children: n,
|
|
154
|
+
...o
|
|
155
|
+
}) {
|
|
156
|
+
return /* @__PURE__ */ i(r.RadioItem, {
|
|
157
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
158
|
+
className: a("focus:bg-accent focus:text-accent-foreground text-heading-xs! relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
159
|
+
...o,
|
|
160
|
+
children: [/* @__PURE__ */ e("span", {
|
|
161
|
+
className: "pointer-events-none absolute left-2 flex size-4 items-center justify-center",
|
|
162
|
+
children: /* @__PURE__ */ e(r.ItemIndicator, {
|
|
163
|
+
children: /* @__PURE__ */ e(g, {
|
|
164
|
+
className: "size-2 fill-current"
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
}), n]
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function T({
|
|
171
|
+
className: t,
|
|
172
|
+
inset: n,
|
|
173
|
+
...o
|
|
174
|
+
}) {
|
|
175
|
+
return /* @__PURE__ */ e(r.Label, {
|
|
176
|
+
"data-slot": "dropdown-menu-label",
|
|
177
|
+
"data-inset": n,
|
|
178
|
+
className: a("font- text-heading-xs! px-2 py-1.5 data-inset:pl-8", t),
|
|
179
|
+
...o
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function G({
|
|
183
|
+
className: t,
|
|
184
|
+
...n
|
|
185
|
+
}) {
|
|
186
|
+
return /* @__PURE__ */ e(r.Separator, {
|
|
187
|
+
"data-slot": "dropdown-menu-separator",
|
|
188
|
+
className: a("bg-border-primary -mx-1 my-1 h-px", t),
|
|
189
|
+
...n
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function P({
|
|
193
|
+
className: t,
|
|
194
|
+
...n
|
|
195
|
+
}) {
|
|
196
|
+
return /* @__PURE__ */ e("span", {
|
|
197
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
198
|
+
className: a("text-text-tertiary ml-auto text-xs tracking-widest", t),
|
|
199
|
+
...n
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function R({
|
|
203
|
+
...t
|
|
204
|
+
}) {
|
|
205
|
+
return /* @__PURE__ */ e(r.Sub, {
|
|
206
|
+
"data-slot": "dropdown-menu-sub",
|
|
207
|
+
...t
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
function F({
|
|
211
|
+
className: t,
|
|
212
|
+
inset: n,
|
|
213
|
+
children: o,
|
|
214
|
+
leftIcon: s,
|
|
215
|
+
rightIcon: d,
|
|
216
|
+
...l
|
|
217
|
+
}) {
|
|
218
|
+
return /* @__PURE__ */ i(r.SubTrigger, {
|
|
219
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
220
|
+
"data-inset": n,
|
|
221
|
+
className: a("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground text-heading-xs! flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 outline-hidden select-none data-inset:pl-8", t),
|
|
222
|
+
...l,
|
|
223
|
+
children: [s && /* @__PURE__ */ e("div", {
|
|
224
|
+
className: "flex size-4 shrink-0 items-center justify-center [&_svg]:size-4",
|
|
225
|
+
children: s
|
|
226
|
+
}), /* @__PURE__ */ e("span", {
|
|
227
|
+
className: "flex-1",
|
|
228
|
+
children: o
|
|
229
|
+
}), d && /* @__PURE__ */ e("div", {
|
|
230
|
+
className: "flex size-4 shrink-0 items-center justify-center [&_svg]:size-4",
|
|
231
|
+
children: d
|
|
232
|
+
}), /* @__PURE__ */ e(h, {
|
|
233
|
+
className: "ml-auto size-4 shrink-0"
|
|
234
|
+
})]
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
function A({
|
|
238
|
+
className: t,
|
|
239
|
+
...n
|
|
240
|
+
}) {
|
|
241
|
+
return /* @__PURE__ */ e(r.SubContent, {
|
|
242
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
243
|
+
className: a("bg-surface-tertiary! text-text-secondary data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border-white z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", t),
|
|
244
|
+
...n
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function X({
|
|
248
|
+
className: t,
|
|
249
|
+
children: n,
|
|
250
|
+
...o
|
|
251
|
+
}) {
|
|
252
|
+
return /* @__PURE__ */ e(b, {
|
|
253
|
+
children: /* @__PURE__ */ e(w, {
|
|
254
|
+
className: a("text-heading-xs! group text-text-secondary bg-surface-white! hover:bg-surface-white! group-hover:text-text-brand! cursor-pointer justify-between p-2 font-normal", t),
|
|
255
|
+
showDot: !1,
|
|
256
|
+
rightIcon: /* @__PURE__ */ e(x, {
|
|
257
|
+
className: "icon-icon-primary! group-hover:icon-icon-brand! size-4"
|
|
258
|
+
}),
|
|
259
|
+
...o,
|
|
260
|
+
children: n || "Clear all"
|
|
261
|
+
})
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
export {
|
|
265
|
+
M as DropdownFilterTrigger,
|
|
266
|
+
D as DropdownMenu,
|
|
267
|
+
j as DropdownMenuCheckboxItem,
|
|
268
|
+
X as DropdownMenuClearAll,
|
|
269
|
+
I as DropdownMenuContent,
|
|
270
|
+
C as DropdownMenuGroup,
|
|
271
|
+
w as DropdownMenuItem,
|
|
272
|
+
T as DropdownMenuLabel,
|
|
273
|
+
z as DropdownMenuPortal,
|
|
274
|
+
S as DropdownMenuRadioGroup,
|
|
275
|
+
_ as DropdownMenuRadioItem,
|
|
276
|
+
G as DropdownMenuSeparator,
|
|
277
|
+
P as DropdownMenuShortcut,
|
|
278
|
+
R as DropdownMenuSub,
|
|
279
|
+
A as DropdownMenuSubContent,
|
|
280
|
+
F as DropdownMenuSubTrigger,
|
|
281
|
+
k as DropdownMenuTrigger
|
|
282
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const emptyMediaVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
|
|
12
|
+
//# sourceMappingURL=Empty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Empty.d.ts","sourceRoot":"","sources":["../../../src/components/empty/Empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWlE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWxE;AAED,QAAA,MAAM,kBAAkB;;8EAavB,CAAA;AAED,iBAAS,UAAU,CAAC,EAChB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACX,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,2CASvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAW3E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,OAAO,EACH,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAC7E,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { cva as i } from "class-variance-authority";
|
|
2
|
+
import { cn as n } from "@inspirecn/ui/lib/utils";
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
function d({
|
|
5
|
+
className: e,
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ a("div", {
|
|
9
|
+
"data-slot": "empty",
|
|
10
|
+
className: n("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", e),
|
|
11
|
+
...t
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function c({
|
|
15
|
+
className: e,
|
|
16
|
+
...t
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ a("div", {
|
|
19
|
+
"data-slot": "empty-header",
|
|
20
|
+
className: n("flex max-w-sm flex-col items-center gap-2 text-center", e),
|
|
21
|
+
...t
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const s = i("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
default: "bg-transparent",
|
|
28
|
+
icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
function f({
|
|
36
|
+
className: e,
|
|
37
|
+
variant: t = "default",
|
|
38
|
+
...r
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ a("div", {
|
|
41
|
+
"data-slot": "empty-icon",
|
|
42
|
+
"data-variant": t,
|
|
43
|
+
className: n(s({
|
|
44
|
+
variant: t,
|
|
45
|
+
className: e
|
|
46
|
+
})),
|
|
47
|
+
...r
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function u({
|
|
51
|
+
className: e,
|
|
52
|
+
...t
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ a("div", {
|
|
55
|
+
"data-slot": "empty-title",
|
|
56
|
+
className: n("text-lg font-medium tracking-tight", e),
|
|
57
|
+
...t
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function p({
|
|
61
|
+
className: e,
|
|
62
|
+
...t
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ a("div", {
|
|
65
|
+
"data-slot": "empty-description",
|
|
66
|
+
className: n("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4", e),
|
|
67
|
+
...t
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function x({
|
|
71
|
+
className: e,
|
|
72
|
+
...t
|
|
73
|
+
}) {
|
|
74
|
+
return /* @__PURE__ */ a("div", {
|
|
75
|
+
"data-slot": "empty-content",
|
|
76
|
+
className: n("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", e),
|
|
77
|
+
...t
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
d as Empty,
|
|
82
|
+
x as EmptyContent,
|
|
83
|
+
p as EmptyDescription,
|
|
84
|
+
c as EmptyHeader,
|
|
85
|
+
f as EmptyMedia,
|
|
86
|
+
u as EmptyTitle
|
|
87
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type EmptyStateProps = {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
icon?: React.ReactElement<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
className?: string;
|
|
8
|
+
onAction?: () => void | Promise<void>;
|
|
9
|
+
actionLabel?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function EmptyState({ title, description, icon, actionLabel, className, onAction, }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/EmptyState.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,KAAwB,EACxB,WAAqD,EACrD,IAAI,EACJ,WAAwB,EACxB,SAAS,EACT,QAAQ,GACT,EAAE,eAAe,2CAqBjB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Inbox as a } from "lucide-react";
|
|
2
|
+
import { Icon as c } from "../icon/Icon.js";
|
|
3
|
+
import { Button as l } from "../button/Button.js";
|
|
4
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
5
|
+
function h({
|
|
6
|
+
title: d = "No Items Found",
|
|
7
|
+
description: i = "Get started by adding your first item",
|
|
8
|
+
icon: m,
|
|
9
|
+
actionLabel: o = "Add Item",
|
|
10
|
+
className: n,
|
|
11
|
+
onAction: t
|
|
12
|
+
}) {
|
|
13
|
+
const s = m || /* @__PURE__ */ e(a, {});
|
|
14
|
+
return /* @__PURE__ */ r("div", {
|
|
15
|
+
className: `border-muted flex flex-col items-center justify-center gap-4 rounded-lg border-2 border-dashed p-8 ${n}`,
|
|
16
|
+
children: [/* @__PURE__ */ e(c, {
|
|
17
|
+
icon: s,
|
|
18
|
+
size: "xl",
|
|
19
|
+
variant: "info",
|
|
20
|
+
shape: "lg"
|
|
21
|
+
}), /* @__PURE__ */ r("div", {
|
|
22
|
+
className: "text-center",
|
|
23
|
+
children: [/* @__PURE__ */ e("p", {
|
|
24
|
+
className: "text-lg font-medium",
|
|
25
|
+
children: d
|
|
26
|
+
}), /* @__PURE__ */ e("p", {
|
|
27
|
+
className: "text-muted-foreground text-sm",
|
|
28
|
+
children: i
|
|
29
|
+
})]
|
|
30
|
+
}), t && /* @__PURE__ */ e("div", {
|
|
31
|
+
className: "mt-4 flex items-center gap-2",
|
|
32
|
+
children: /* @__PURE__ */ e(l, {
|
|
33
|
+
size: "sm",
|
|
34
|
+
variant: "default",
|
|
35
|
+
onClick: t,
|
|
36
|
+
children: o
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
h as EmptyState
|
|
43
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { Label } from "@inspirecn/ui/components/label/Label";
|
|
3
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
5
|
+
variant?: "legend" | "label";
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const fieldVariants: (props?: ({
|
|
9
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
|
|
20
|
+
errors?: Array<{
|
|
21
|
+
message?: string;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
25
|
+
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/components/field/Field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAA;AAI5D,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAY1E;AAED,iBAAS,WAAW,CAAC,EACjB,SAAS,EACT,OAAkB,EAClB,GAAG,KAAK,EACX,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;CAAE,2CAcnE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,QAAA,MAAM,aAAa;;8EAsBlB,CAAA;AAED,iBAAS,KAAK,CAAC,EACX,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACX,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,2CAUlE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,iBAAS,UAAU,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACX,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,2CAapC;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAa3E;AAED,iBAAS,cAAc,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACX,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC7B,2CAsBA;AAED,iBAAS,UAAU,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACX,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAA;CACnD,kDA0CA;AAED,OAAO,EACH,KAAK,EAAE,YAAY,EAAE,gBAAgB,EACrC,UAAU,EACV,UAAU,EAAE,UAAU,EAAE,WAAW,EACnC,cAAc,EACd,QAAQ,EAAE,UAAU,EACvB,CAAA"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { cva as u } from "class-variance-authority";
|
|
2
|
+
import { useMemo as c } from "react";
|
|
3
|
+
import { Label as m } from "@inspirecn/ui/components/label/Label";
|
|
4
|
+
import { Separator as p } from "@inspirecn/ui/components/separator/Separator";
|
|
5
|
+
import { cn as d } from "@inspirecn/ui/lib/utils";
|
|
6
|
+
import { jsx as a, jsxs as g } from "react/jsx-runtime";
|
|
7
|
+
function F({
|
|
8
|
+
className: e,
|
|
9
|
+
...t
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ a("fieldset", {
|
|
12
|
+
"data-slot": "field-set",
|
|
13
|
+
className: d("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", e),
|
|
14
|
+
...t
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function y({
|
|
18
|
+
className: e,
|
|
19
|
+
variant: t = "legend",
|
|
20
|
+
...l
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ a("legend", {
|
|
23
|
+
"data-slot": "field-legend",
|
|
24
|
+
"data-variant": t,
|
|
25
|
+
className: d("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", e),
|
|
26
|
+
...l
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function L({
|
|
30
|
+
className: e,
|
|
31
|
+
...t
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ a("div", {
|
|
34
|
+
"data-slot": "field-group",
|
|
35
|
+
className: d("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", e),
|
|
36
|
+
...t
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const x = u("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
|
|
40
|
+
variants: {
|
|
41
|
+
orientation: {
|
|
42
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
43
|
+
horizontal: ["flex-row items-center", "[&>[data-slot=field-label]]:flex-auto", "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],
|
|
44
|
+
responsive: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto", "@md/field-group:[&>[data-slot=field-label]]:flex-auto", "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
orientation: "vertical"
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
function S({
|
|
52
|
+
className: e,
|
|
53
|
+
orientation: t = "vertical",
|
|
54
|
+
...l
|
|
55
|
+
}) {
|
|
56
|
+
return /* @__PURE__ */ a("div", {
|
|
57
|
+
role: "group",
|
|
58
|
+
"data-slot": "field",
|
|
59
|
+
"data-orientation": t,
|
|
60
|
+
className: d(x({
|
|
61
|
+
orientation: t
|
|
62
|
+
}), e),
|
|
63
|
+
...l
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function j({
|
|
67
|
+
className: e,
|
|
68
|
+
...t
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ a("div", {
|
|
71
|
+
"data-slot": "field-content",
|
|
72
|
+
className: d("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", e),
|
|
73
|
+
...t
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function z({
|
|
77
|
+
className: e,
|
|
78
|
+
...t
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ a(m, {
|
|
81
|
+
"data-slot": "field-label",
|
|
82
|
+
className: d("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", e),
|
|
83
|
+
...t
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function M({
|
|
87
|
+
className: e,
|
|
88
|
+
...t
|
|
89
|
+
}) {
|
|
90
|
+
return /* @__PURE__ */ a("div", {
|
|
91
|
+
"data-slot": "field-label",
|
|
92
|
+
className: d("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", e),
|
|
93
|
+
...t
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function V({
|
|
97
|
+
className: e,
|
|
98
|
+
...t
|
|
99
|
+
}) {
|
|
100
|
+
return /* @__PURE__ */ a("p", {
|
|
101
|
+
"data-slot": "field-description",
|
|
102
|
+
className: d("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", e),
|
|
103
|
+
...t
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function C({
|
|
107
|
+
children: e,
|
|
108
|
+
className: t,
|
|
109
|
+
...l
|
|
110
|
+
}) {
|
|
111
|
+
return /* @__PURE__ */ g("div", {
|
|
112
|
+
"data-slot": "field-separator",
|
|
113
|
+
"data-content": !!e,
|
|
114
|
+
className: d("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", t),
|
|
115
|
+
...l,
|
|
116
|
+
children: [/* @__PURE__ */ a(p, {
|
|
117
|
+
className: "absolute inset-0 top-1/2"
|
|
118
|
+
}), e && /* @__PURE__ */ a("span", {
|
|
119
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
120
|
+
"data-slot": "field-separator-content",
|
|
121
|
+
children: e
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function D({
|
|
126
|
+
className: e,
|
|
127
|
+
children: t,
|
|
128
|
+
errors: l,
|
|
129
|
+
...r
|
|
130
|
+
}) {
|
|
131
|
+
const n = c(() => {
|
|
132
|
+
var s;
|
|
133
|
+
if (t)
|
|
134
|
+
return t;
|
|
135
|
+
if (!(l != null && l.length))
|
|
136
|
+
return null;
|
|
137
|
+
const i = [...new Map(l.map((o) => [o == null ? void 0 : o.message, o])).values()];
|
|
138
|
+
return (i == null ? void 0 : i.length) == 1 ? (s = i[0]) == null ? void 0 : s.message : /* @__PURE__ */ a("ul", {
|
|
139
|
+
className: "ml-4 flex list-disc flex-col gap-1",
|
|
140
|
+
children: i.map((o, f) => (o == null ? void 0 : o.message) && /* @__PURE__ */ a("li", {
|
|
141
|
+
children: o.message
|
|
142
|
+
}, f))
|
|
143
|
+
});
|
|
144
|
+
}, [t, l]);
|
|
145
|
+
return n ? /* @__PURE__ */ a("div", {
|
|
146
|
+
role: "alert",
|
|
147
|
+
"data-slot": "field-error",
|
|
148
|
+
className: d("text-destructive text-sm font-normal", e),
|
|
149
|
+
...r,
|
|
150
|
+
children: n
|
|
151
|
+
}) : null;
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
S as Field,
|
|
155
|
+
j as FieldContent,
|
|
156
|
+
V as FieldDescription,
|
|
157
|
+
D as FieldError,
|
|
158
|
+
L as FieldGroup,
|
|
159
|
+
z as FieldLabel,
|
|
160
|
+
y as FieldLegend,
|
|
161
|
+
C as FieldSeparator,
|
|
162
|
+
F as FieldSet,
|
|
163
|
+
M as FieldTitle
|
|
164
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FileUploaderProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A provider-agnostic file uploader component that handles file selection, preview, and validation.
|
|
5
|
+
* The actual upload logic is handled by the consumer through the onUpload callback.
|
|
6
|
+
*
|
|
7
|
+
* @param config - Configuration for the file uploader
|
|
8
|
+
* @param onUpload - Callback function that receives the files to upload
|
|
9
|
+
* @param onFilesChange - Callback function that receives the current files when they change
|
|
10
|
+
* @param disabled - Whether the uploader is disabled
|
|
11
|
+
* @param className - Additional CSS classes
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <FileUploader
|
|
16
|
+
* config={{
|
|
17
|
+
* maxFiles: 4,
|
|
18
|
+
* maxSize: 1000000,
|
|
19
|
+
* resourceType: 'IMAGE'
|
|
20
|
+
* }}
|
|
21
|
+
* onUpload={async (files) => {
|
|
22
|
+
* // Upload to your preferred provider (Supabase, S3, Bunny.net, etc.)
|
|
23
|
+
* const uploadPromises = files.map(file => uploadToProvider(file.file));
|
|
24
|
+
* await Promise.all(uploadPromises);
|
|
25
|
+
* }}
|
|
26
|
+
* onFilesChange={(files) => {
|
|
27
|
+
* console.log('Files changed:', files);
|
|
28
|
+
* }}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare const FileUploader: React.FC<Omit<FileUploaderProps, 'mode'>>;
|
|
33
|
+
export type { FileConfiguration, FileUploaderProps, ResourceType, UploadedFile } from './types';
|
|
34
|
+
//# sourceMappingURL=FileUploader.d.ts.map
|