@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,39 @@
|
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import * as a from "@radix-ui/react-slider";
|
|
3
|
+
import { cn as i } from "@inspirecn/ui/lib/utils";
|
|
4
|
+
import { jsxs as b, jsx as n } from "react/jsx-runtime";
|
|
5
|
+
function u({
|
|
6
|
+
className: l,
|
|
7
|
+
defaultValue: r,
|
|
8
|
+
value: t,
|
|
9
|
+
min: o = 0,
|
|
10
|
+
max: e = 100,
|
|
11
|
+
...d
|
|
12
|
+
}) {
|
|
13
|
+
const s = h.useMemo(() => Array.isArray(t) ? t : Array.isArray(r) ? r : [o, e], [t, r, o, e]);
|
|
14
|
+
return /* @__PURE__ */ b(a.Root, {
|
|
15
|
+
"data-slot": "slider",
|
|
16
|
+
defaultValue: r,
|
|
17
|
+
value: t,
|
|
18
|
+
min: o,
|
|
19
|
+
max: e,
|
|
20
|
+
className: i("relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50", "bg-background! hover:bg-accent! hover:text-accent-foreground! dark:hover:bg-accent/50!", l),
|
|
21
|
+
...d,
|
|
22
|
+
children: [/* @__PURE__ */ n(a.Track, {
|
|
23
|
+
"data-slot": "slider-track",
|
|
24
|
+
className: i("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5"),
|
|
25
|
+
children: /* @__PURE__ */ n(a.Range, {
|
|
26
|
+
"data-slot": "slider-range",
|
|
27
|
+
className: i("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
28
|
+
})
|
|
29
|
+
}), Array.from({
|
|
30
|
+
length: s.length
|
|
31
|
+
}, (m, c) => /* @__PURE__ */ n(a.Thumb, {
|
|
32
|
+
"data-slot": "slider-thumb",
|
|
33
|
+
className: "border-primary bg-background ring-ring/50 focus-visible:outline-hidden block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50"
|
|
34
|
+
}, c))]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
u as Slider
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sonner.d.ts","sourceRoot":"","sources":["../../../src/components/sonner/Sonner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,YAAY,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEhE,QAAA,MAAM,OAAO,GAAI,cAAc,YAAY,4CAoD1C,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useTheme as t } from "next-themes";
|
|
2
|
+
import { Toaster as e } from "sonner";
|
|
3
|
+
import { toast as l } from "sonner";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
const n = ({
|
|
6
|
+
...r
|
|
7
|
+
}) => {
|
|
8
|
+
const {
|
|
9
|
+
theme: o = "system"
|
|
10
|
+
} = t();
|
|
11
|
+
return /* @__PURE__ */ a(e, {
|
|
12
|
+
theme: o,
|
|
13
|
+
className: "toaster group",
|
|
14
|
+
style: {
|
|
15
|
+
// Default/Normal Toast
|
|
16
|
+
"--normal-bg": "var(--surface-white)",
|
|
17
|
+
"--normal-text": "var(--text-primary)",
|
|
18
|
+
"--normal-border": "var(--border-primary)",
|
|
19
|
+
// Success (Lima colors)
|
|
20
|
+
"--success-bg": "var(--color-lima-500)",
|
|
21
|
+
"--success-text": "var(--color-grey-25)",
|
|
22
|
+
// White
|
|
23
|
+
"--success-border": "var(--color-lima-600)",
|
|
24
|
+
// Error (Pomegranate colors)
|
|
25
|
+
"--error-bg": "var(--color-pomegranate-500)",
|
|
26
|
+
"--error-text": "var(--color-grey-25)",
|
|
27
|
+
// White
|
|
28
|
+
"--error-border": "var(--color-pomegranate-600)",
|
|
29
|
+
// Warning (Flush Orange colors)
|
|
30
|
+
"--warning-bg": "var(--color-flush-orange-500)",
|
|
31
|
+
"--warning-text": "var(--color-grey-25)",
|
|
32
|
+
// White
|
|
33
|
+
"--warning-border": "var(--color-flush-orange-600)",
|
|
34
|
+
// Info (Primary colors)
|
|
35
|
+
"--info-bg": "var(--color-primary-500)",
|
|
36
|
+
"--info-text": "var(--color-grey-25)",
|
|
37
|
+
// White
|
|
38
|
+
"--info-border": "var(--color-primary-600)"
|
|
39
|
+
},
|
|
40
|
+
toastOptions: {
|
|
41
|
+
classNames: {
|
|
42
|
+
toast: "group toast group-[.toaster]:shadow-lg group-[.toaster]:border-border font-sans",
|
|
43
|
+
title: "group-[[data-rich-colors=true]]:text-inherit",
|
|
44
|
+
description: "group-[.toast]:text-text-tertiary group-[[data-rich-colors=true]]:text-inherit opacity-90",
|
|
45
|
+
actionButton: "group-[.toast]:bg-cta-primary! group-[.toast]:text-white! ",
|
|
46
|
+
closeButton: "group-[.toast]:bg-inherit! group-[.toast]:text-inherit! group-[.toast]:border-inherit! group-[.toast]:hover:bg-bg-inherit! group-[.toast]:hover:text-bg-inherit! group-[.toast]:hover:border-bg-inherit!"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
...r
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
n as Toaster,
|
|
54
|
+
l as toast
|
|
55
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const spinnerVariants: (props?: ({
|
|
4
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
5
|
+
variant?: "default" | "secondary" | "primary" | "muted" | "info" | "warning" | "success" | "danger" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface SpinnerProps extends React.HTMLAttributes<SVGSVGElement>, VariantProps<typeof spinnerVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare function Spinner({ className, size, variant, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Spinner, spinnerVariants };
|
|
11
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/Spinner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,QAAA,MAAM,eAAe;;;8EAuBnB,CAAA;AAEF,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,EAC3C,YAAY,CAAC,OAAO,eAAe,CAAC;CAAI;AAE1C,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CASpE;AAED,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn as n } from "@inspirecn/ui/lib/utils";
|
|
2
|
+
import { cva as d } from "class-variance-authority";
|
|
3
|
+
import { Loader2 as o } from "lucide-react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
const m = d("animate-spin text-muted-foreground", {
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
default: "h-5 w-5",
|
|
9
|
+
sm: "h-4 w-4",
|
|
10
|
+
lg: "h-6 w-6",
|
|
11
|
+
xl: "h-8 w-8"
|
|
12
|
+
},
|
|
13
|
+
variant: {
|
|
14
|
+
default: "text-muted-foreground",
|
|
15
|
+
primary: "text-primary",
|
|
16
|
+
secondary: "text-secondary",
|
|
17
|
+
danger: "text-red-500 dark:text-red-400",
|
|
18
|
+
warning: "text-amber-500 dark:text-amber-400",
|
|
19
|
+
success: "text-emerald-500 dark:text-emerald-400",
|
|
20
|
+
info: "text-blue-500 dark:text-blue-400",
|
|
21
|
+
muted: "text-muted-foreground"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
size: "default",
|
|
26
|
+
variant: "default"
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
function f({
|
|
30
|
+
className: t,
|
|
31
|
+
size: e,
|
|
32
|
+
variant: r,
|
|
33
|
+
...a
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ i(o, {
|
|
36
|
+
role: "status",
|
|
37
|
+
"aria-label": "Loading",
|
|
38
|
+
className: n(m({
|
|
39
|
+
size: e,
|
|
40
|
+
variant: r,
|
|
41
|
+
className: t
|
|
42
|
+
})),
|
|
43
|
+
...a
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
f as Spinner,
|
|
48
|
+
m as spinnerVariants
|
|
49
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type StackProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
orientation?: 'vertical' | 'horizontal';
|
|
5
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
6
|
+
align?: 'items-start' | 'items-center' | 'items-end' | 'items-between' | 'items-around' | 'items-evenly';
|
|
7
|
+
justify?: 'justify-start' | 'justify-center' | 'justify-end' | 'justify-between' | 'justify-around' | 'justify-evenly';
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
};
|
|
12
|
+
export declare const Stack: React.FC<StackProps>;
|
|
13
|
+
export default Stack;
|
|
14
|
+
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/components/stack/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IACxD,KAAK,CAAC,EACF,aAAa,GACb,cAAc,GACd,WAAW,GACX,eAAe,GACf,cAAc,GACd,cAAc,CAAC;IACnB,OAAO,CAAC,EACJ,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,CAAC;AAYF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA0BtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
+
const c = {
|
|
3
|
+
none: "gap-0",
|
|
4
|
+
xs: "gap-1",
|
|
5
|
+
sm: "gap-2",
|
|
6
|
+
md: "gap-4",
|
|
7
|
+
lg: "gap-[24px]",
|
|
8
|
+
xl: "gap-[32px]",
|
|
9
|
+
xxl: "gap-[40px]"
|
|
10
|
+
}, g = ({
|
|
11
|
+
children: a,
|
|
12
|
+
orientation: t = "vertical",
|
|
13
|
+
gap: s = "md",
|
|
14
|
+
align: e = "items-start",
|
|
15
|
+
justify: l = "justify-start",
|
|
16
|
+
wrap: o = !1,
|
|
17
|
+
className: p = "",
|
|
18
|
+
as: r = "div"
|
|
19
|
+
}) => {
|
|
20
|
+
const i = ["flex", t === "vertical" ? "flex-col" : "flex-row", s && c[s], e, l, o && "flex-wrap", p].filter(Boolean).join(" ");
|
|
21
|
+
return /* @__PURE__ */ x(r, {
|
|
22
|
+
className: i,
|
|
23
|
+
children: a
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
g as Stack,
|
|
28
|
+
g as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
|
+
declare const subText: (props?: ({
|
|
4
|
+
size?: "xs" | null | undefined;
|
|
5
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
6
|
+
weight?: "bold" | "medium" | "normal" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
interface SubheadingProps extends HTMLAttributes<HTMLParagraphElement>, VariantProps<typeof subText> {
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function Subtext({ size, align, className, weight, children, ...props }: SubheadingProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=SubText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubText.d.ts","sourceRoot":"","sources":["../../../src/components/subText/SubText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,QAAA,MAAM,OAAO;;;;8EAwBX,CAAC;AAEH,UAAU,eACR,SAAQ,cAAc,CAAC,oBAAoB,CAAC,EAC1C,YAAY,CAAC,OAAO,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CAMjB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn as m } from "@inspirecn/ui/lib/utils";
|
|
2
|
+
import { cva as a } from "class-variance-authority";
|
|
3
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
4
|
+
const f = a("font-medium tracking-tight text-muted-foreground", {
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
xs: "text-text-xxs"
|
|
8
|
+
// sm: 'text-sm',
|
|
9
|
+
// md: 'text-base',
|
|
10
|
+
// lg: 'text-lg',
|
|
11
|
+
},
|
|
12
|
+
align: {
|
|
13
|
+
left: "text-left",
|
|
14
|
+
center: "text-center",
|
|
15
|
+
right: "text-right"
|
|
16
|
+
},
|
|
17
|
+
weight: {
|
|
18
|
+
bold: "font-bold",
|
|
19
|
+
medium: "font-medium",
|
|
20
|
+
normal: "font-normal"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
size: "xs",
|
|
25
|
+
align: "center",
|
|
26
|
+
weight: "normal"
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
function c({
|
|
30
|
+
size: t,
|
|
31
|
+
align: e,
|
|
32
|
+
className: r,
|
|
33
|
+
weight: n,
|
|
34
|
+
children: o,
|
|
35
|
+
...i
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ x("p", {
|
|
38
|
+
className: m(f({
|
|
39
|
+
size: t,
|
|
40
|
+
align: e,
|
|
41
|
+
className: r,
|
|
42
|
+
weight: n
|
|
43
|
+
})),
|
|
44
|
+
...i,
|
|
45
|
+
children: o
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
c as Subtext
|
|
50
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Switch };
|
|
5
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch/Switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAkCnD;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as t from "@radix-ui/react-switch";
|
|
2
|
+
import { cn as e } from "@inspirecn/ui/lib/utils";
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
function s({
|
|
5
|
+
className: r,
|
|
6
|
+
...n
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ a(t.Root, {
|
|
9
|
+
"data-slot": "switch",
|
|
10
|
+
className: e(
|
|
11
|
+
// Base styles - keeping original size
|
|
12
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-[100px] p-0.5 transition-all outline-none",
|
|
13
|
+
// Focus styles
|
|
14
|
+
// "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
15
|
+
// Disabled styles
|
|
16
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
17
|
+
// Checked state - improved contrast
|
|
18
|
+
"data-[state=checked]:bg-cta-primary",
|
|
19
|
+
// Unchecked state - better visibility with border
|
|
20
|
+
"data-[state=unchecked]:bg-cta-secondary",
|
|
21
|
+
r
|
|
22
|
+
),
|
|
23
|
+
...n,
|
|
24
|
+
children: /* @__PURE__ */ a(t.Thumb, {
|
|
25
|
+
"data-slot": "switch-thumb",
|
|
26
|
+
className: e(
|
|
27
|
+
// Base thumb styles - keeping original size
|
|
28
|
+
"pointer-events-none block size-4 rounded-full ring-0 transition-transform",
|
|
29
|
+
// Background colors with better contrast
|
|
30
|
+
"bg-white",
|
|
31
|
+
// Position when unchecked
|
|
32
|
+
"data-[state=unchecked]:translate-x-0",
|
|
33
|
+
// Position when checked - improved calculation for original size
|
|
34
|
+
"data-[state=checked]:translate-x-[calc(100%-0px)]"
|
|
35
|
+
)
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
s as Switch
|
|
41
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Table({ className, showCheckbox, showActions, ...props }: React.ComponentProps<'table'> & {
|
|
3
|
+
showCheckbox?: boolean;
|
|
4
|
+
showActions?: boolean;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface TableHeadProps extends React.ComponentProps<'th'> {
|
|
8
|
+
showCheckbox?: boolean;
|
|
9
|
+
showText?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function TableHead({ className, showText, children, ...props }: TableHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface TableRowProps extends React.ComponentProps<'tr'> {
|
|
15
|
+
showCheckbox?: boolean;
|
|
16
|
+
rowId?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function TableRow({ className, showCheckbox: localShowCheckbox, rowId, children, ...props }: TableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface TableCellProps extends React.ComponentProps<'td'> {
|
|
20
|
+
state?: 'default' | 'hover';
|
|
21
|
+
showLeftIcon?: boolean;
|
|
22
|
+
hideText?: boolean;
|
|
23
|
+
leftIcon?: 'checkbox' | 'menu' | React.ReactNode;
|
|
24
|
+
enableCopy?: boolean;
|
|
25
|
+
copyText?: string;
|
|
26
|
+
variant?: 'default' | 'link';
|
|
27
|
+
}
|
|
28
|
+
declare function TableCell({ className, state, showLeftIcon, hideText, leftIcon, enableCopy, copyText, variant, children, ...props }: TableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function StatusCell({ children, className, ...props }: React.ComponentProps<typeof TableCell>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, StatusCell, TableCell, TableCaption, };
|
|
32
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/table/Table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,YAAoB,EACpB,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,2CA+CnF;AACD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAW1E;AACD,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,QAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,2CAahB;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQxE;AACD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAW1E;AACD,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,YAAY,EAAE,iBAAiB,EAC/B,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,aAAa,2CAqFf;AACD,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;IACzD,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,KAAiB,EACjB,YAAoB,EACpB,QAAgB,EAChB,QAAQ,EACR,UAAkB,EAClB,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,2CA6GhB;AACD,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,2CAQjC;AAED,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CAS5F;AACD,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,YAAY,GACb,CAAC"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import { cn as i } from "@inspirecn/ui/lib/utils";
|
|
3
|
+
import { Checkbox as S } from "../checkbox/Checkbox.js";
|
|
4
|
+
import { Check as R, Copy as _ } from "lucide-react";
|
|
5
|
+
import { jsx as e, jsxs as N } from "react/jsx-runtime";
|
|
6
|
+
const v = c.createContext({});
|
|
7
|
+
function z({
|
|
8
|
+
className: t,
|
|
9
|
+
showCheckbox: a = !1,
|
|
10
|
+
showActions: o = !1,
|
|
11
|
+
...b
|
|
12
|
+
}) {
|
|
13
|
+
const [x, f] = c.useState(/* @__PURE__ */ new Set()), n = c.useCallback((s) => {
|
|
14
|
+
if (s) {
|
|
15
|
+
const l = /* @__PURE__ */ new Set(), d = document.querySelector('[data-slot="table-body"]');
|
|
16
|
+
d && d.querySelectorAll('[data-slot="table-row"]').forEach((h) => {
|
|
17
|
+
const y = h.getAttribute("data-row-id");
|
|
18
|
+
y && l.add(y);
|
|
19
|
+
}), f(l);
|
|
20
|
+
} else
|
|
21
|
+
f(/* @__PURE__ */ new Set());
|
|
22
|
+
}, []), m = c.useCallback((s, l) => {
|
|
23
|
+
f((d) => {
|
|
24
|
+
const r = new Set(d);
|
|
25
|
+
return l ? r.add(s) : r.delete(s), r;
|
|
26
|
+
});
|
|
27
|
+
}, []);
|
|
28
|
+
return /* @__PURE__ */ e(v.Provider, {
|
|
29
|
+
value: {
|
|
30
|
+
showCheckbox: a,
|
|
31
|
+
showActions: o,
|
|
32
|
+
selectedRows: x,
|
|
33
|
+
onSelectAll: n,
|
|
34
|
+
onSelectRow: m
|
|
35
|
+
},
|
|
36
|
+
children: /* @__PURE__ */ e("div", {
|
|
37
|
+
"data-slot": "table-container",
|
|
38
|
+
className: "relative overflow-x-auto",
|
|
39
|
+
children: /* @__PURE__ */ e("table", {
|
|
40
|
+
"data-slot": "table",
|
|
41
|
+
className: i("text-heading-xs caption-bottom", t),
|
|
42
|
+
...b
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function P({
|
|
48
|
+
className: t,
|
|
49
|
+
...a
|
|
50
|
+
}) {
|
|
51
|
+
const o = c.useContext(v);
|
|
52
|
+
return /* @__PURE__ */ e(v.Provider, {
|
|
53
|
+
value: {
|
|
54
|
+
...o,
|
|
55
|
+
isInHeader: !0
|
|
56
|
+
},
|
|
57
|
+
children: /* @__PURE__ */ e("thead", {
|
|
58
|
+
"data-slot": "table-header",
|
|
59
|
+
className: i("[&_tr]:border-b", t),
|
|
60
|
+
...a
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function F({
|
|
65
|
+
className: t,
|
|
66
|
+
showText: a = !0,
|
|
67
|
+
children: o,
|
|
68
|
+
...b
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ e("th", {
|
|
71
|
+
"data-slot": "table-head",
|
|
72
|
+
className: i("text-text-tertiary h-8 px-4 py-2 text-left align-middle font-normal whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[0px]", t),
|
|
73
|
+
...b,
|
|
74
|
+
children: a && o
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function B({
|
|
78
|
+
className: t,
|
|
79
|
+
...a
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ e("tbody", {
|
|
82
|
+
"data-slot": "table-body",
|
|
83
|
+
className: i("text-heading-xs [&_tr:last-child]:border-0", t),
|
|
84
|
+
...a
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function V({
|
|
88
|
+
className: t,
|
|
89
|
+
...a
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ e("tfoot", {
|
|
92
|
+
"data-slot": "table-footer",
|
|
93
|
+
className: i("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", t),
|
|
94
|
+
...a
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function D({
|
|
98
|
+
className: t,
|
|
99
|
+
showCheckbox: a,
|
|
100
|
+
rowId: o,
|
|
101
|
+
children: b,
|
|
102
|
+
...x
|
|
103
|
+
}) {
|
|
104
|
+
const {
|
|
105
|
+
showCheckbox: f,
|
|
106
|
+
selectedRows: n,
|
|
107
|
+
onSelectRow: m,
|
|
108
|
+
onSelectAll: s,
|
|
109
|
+
isInHeader: l
|
|
110
|
+
} = c.useContext(v), d = a ?? f ?? !1, r = o && n ? n.has(o) : !1, [h, y] = c.useState(0);
|
|
111
|
+
c.useEffect(() => {
|
|
112
|
+
if (d && l) {
|
|
113
|
+
const p = document.querySelector('[data-slot="table-body"]');
|
|
114
|
+
if (p) {
|
|
115
|
+
const T = p.querySelectorAll('[data-slot="table-row"]');
|
|
116
|
+
y(T.length);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}, [d, l]);
|
|
120
|
+
const k = h > 0 && n && n.size === h, C = n && n.size > 0 && n.size < h, g = (p) => {
|
|
121
|
+
o && m && m(o, p);
|
|
122
|
+
}, u = (p) => {
|
|
123
|
+
s && s(p);
|
|
124
|
+
}, w = c.useRef(null);
|
|
125
|
+
return c.useEffect(() => {
|
|
126
|
+
if (w.current && l) {
|
|
127
|
+
const p = w.current.querySelector('input[type="checkbox"]');
|
|
128
|
+
p && (p.indeterminate = C || !1);
|
|
129
|
+
}
|
|
130
|
+
}, [C, l]), /* @__PURE__ */ N("tr", {
|
|
131
|
+
"data-slot": "table-row",
|
|
132
|
+
"data-row-id": o,
|
|
133
|
+
className: i("data-[state=selected]:bg-muted shadow-[inset_0_-1px_0_0_var(--border-primary)] transition-colors", t),
|
|
134
|
+
"data-state": r ? "selected" : void 0,
|
|
135
|
+
...x,
|
|
136
|
+
children: [d && (l ? /* @__PURE__ */ e("th", {
|
|
137
|
+
"data-slot": "table-head",
|
|
138
|
+
className: "text-text-tertiary h-8 px-4 py-2 text-left align-middle font-normal whitespace-nowrap [&:has([role=checkbox])]:pr-4 [&>[role=checkbox]]:translate-y-[0px]",
|
|
139
|
+
children: /* @__PURE__ */ e(S, {
|
|
140
|
+
ref: w,
|
|
141
|
+
className: "cursor-pointer",
|
|
142
|
+
checked: k,
|
|
143
|
+
onCheckedChange: u
|
|
144
|
+
})
|
|
145
|
+
}) : /* @__PURE__ */ e("td", {
|
|
146
|
+
"data-slot": "table-cell",
|
|
147
|
+
className: "text-heading-xs text-text-primary w-12 px-4 [tr:not(:has(th))_&]:py-4 align-middle font-normal whitespace-nowrap",
|
|
148
|
+
children: /* @__PURE__ */ e(S, {
|
|
149
|
+
className: "cursor-pointer",
|
|
150
|
+
checked: r,
|
|
151
|
+
onCheckedChange: g
|
|
152
|
+
})
|
|
153
|
+
})), b]
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function A({
|
|
157
|
+
className: t,
|
|
158
|
+
state: a = "default",
|
|
159
|
+
showLeftIcon: o = !1,
|
|
160
|
+
hideText: b = !1,
|
|
161
|
+
leftIcon: x,
|
|
162
|
+
enableCopy: f = !1,
|
|
163
|
+
copyText: n,
|
|
164
|
+
variant: m = "default",
|
|
165
|
+
children: s,
|
|
166
|
+
...l
|
|
167
|
+
}) {
|
|
168
|
+
const [d, r] = c.useState(!1), h = n || (typeof s == "string" ? s : ""), y = (g) => {
|
|
169
|
+
g.stopPropagation(), f && (navigator.clipboard && navigator.clipboard.writeText ? navigator.clipboard.writeText(h).then(() => {
|
|
170
|
+
r(!0), setTimeout(() => r(!1), 2e3);
|
|
171
|
+
}).catch(() => {
|
|
172
|
+
k(h);
|
|
173
|
+
}) : k(h));
|
|
174
|
+
}, k = (g) => {
|
|
175
|
+
const u = document.createElement("textarea");
|
|
176
|
+
u.value = g, u.style.position = "fixed", u.style.left = "-999999px", u.style.top = "-999999px", document.body.appendChild(u), u.focus(), u.select();
|
|
177
|
+
try {
|
|
178
|
+
document.execCommand("copy") && (r(!0), setTimeout(() => r(!1), 2e3));
|
|
179
|
+
} catch (w) {
|
|
180
|
+
console.error("Fallback copy failed:", w);
|
|
181
|
+
}
|
|
182
|
+
document.body.removeChild(u);
|
|
183
|
+
}, C = f;
|
|
184
|
+
return /* @__PURE__ */ e("td", {
|
|
185
|
+
"data-slot": "table-cell",
|
|
186
|
+
className: i("text-heading-xs text-text-primary p-4 align-middle font-normal whitespace-nowrap", "group relative", "hover:bg-hover-secondary transition-colors", a === "hover" && "bg-hover-secondary", t),
|
|
187
|
+
...l,
|
|
188
|
+
children: /* @__PURE__ */ N("div", {
|
|
189
|
+
className: i("flex items-center gap-2", C && "justify-between w-full"),
|
|
190
|
+
children: [/* @__PURE__ */ N("div", {
|
|
191
|
+
className: "flex items-center gap-2 flex-1 min-w-0",
|
|
192
|
+
children: [o && x && (x === "checkbox" ? /* @__PURE__ */ e(S, {
|
|
193
|
+
className: "cursor-pointer"
|
|
194
|
+
}) : x), !b && (m === "link" ? /* @__PURE__ */ e("span", {
|
|
195
|
+
className: "underline text-text-primary group-hover:text-text-brand cursor-pointer transition-colors",
|
|
196
|
+
children: s
|
|
197
|
+
}) : s)]
|
|
198
|
+
}), C && /* @__PURE__ */ e("button", {
|
|
199
|
+
onClick: y,
|
|
200
|
+
type: "button",
|
|
201
|
+
className: i("opacity-0 group-hover:opacity-100", "transition-opacity duration-150", "inline-flex items-center justify-center", "-mr-1 ", "text-text-brand cursor-pointer"),
|
|
202
|
+
title: "Copy",
|
|
203
|
+
children: d ? /* @__PURE__ */ e(R, {
|
|
204
|
+
className: "h-4 w-4 text-delivered"
|
|
205
|
+
}) : /* @__PURE__ */ e(_, {
|
|
206
|
+
className: "h-4 w-4"
|
|
207
|
+
})
|
|
208
|
+
})]
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function G({
|
|
213
|
+
className: t,
|
|
214
|
+
...a
|
|
215
|
+
}) {
|
|
216
|
+
return /* @__PURE__ */ e("caption", {
|
|
217
|
+
"data-slot": "table-caption",
|
|
218
|
+
className: i("text-muted-foreground text-heading-xs mt-4", t),
|
|
219
|
+
...a
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function J({
|
|
223
|
+
children: t,
|
|
224
|
+
className: a,
|
|
225
|
+
...o
|
|
226
|
+
}) {
|
|
227
|
+
return /* @__PURE__ */ e(A, {
|
|
228
|
+
className: i("", a),
|
|
229
|
+
...o,
|
|
230
|
+
children: t
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
export {
|
|
234
|
+
J as StatusCell,
|
|
235
|
+
z as Table,
|
|
236
|
+
B as TableBody,
|
|
237
|
+
G as TableCaption,
|
|
238
|
+
A as TableCell,
|
|
239
|
+
V as TableFooter,
|
|
240
|
+
F as TableHead,
|
|
241
|
+
P as TableHeader,
|
|
242
|
+
D as TableRow
|
|
243
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TableEmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
actionLabel?: string;
|
|
7
|
+
onAction?: () => void;
|
|
8
|
+
actionIcon?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function TableEmptyState({ title, description, icon, actionLabel, onAction, actionIcon, className, ...props }: TableEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=TableEmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableEmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/table-empty-state/TableEmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,wBAAgB,eAAe,CAAC,EAC5B,KAA4B,EAC5B,WAAoF,EACpF,IAAI,EACJ,WAA0B,EAC1B,QAAQ,EACR,UAAgD,EAChD,SAAS,EACT,GAAG,KAAK,EACX,EAAE,oBAAoB,2CA2CtB"}
|