@health-samurai/react-components 0.0.0-alpha.1
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 +1 -0
- package/dist/bundle.css +5525 -0
- package/dist/src/components/code-editor/index.d.ts +5 -0
- package/dist/src/components/code-editor/index.d.ts.map +1 -0
- package/dist/src/components/code-editor/index.js +109 -0
- package/dist/src/components/code-editor/index.js.map +1 -0
- package/dist/src/components/code-editor.stories.d.ts +7 -0
- package/dist/src/components/code-editor.stories.d.ts.map +1 -0
- package/dist/src/components/code-editor.stories.js +23 -0
- package/dist/src/components/code-editor.stories.js.map +1 -0
- package/dist/src/components/copy-icon.d.ts +6 -0
- package/dist/src/components/copy-icon.d.ts.map +1 -0
- package/dist/src/components/copy-icon.js +21 -0
- package/dist/src/components/copy-icon.js.map +1 -0
- package/dist/src/components/request-line-editor.d.ts +38 -0
- package/dist/src/components/request-line-editor.d.ts.map +1 -0
- package/dist/src/components/request-line-editor.js +40 -0
- package/dist/src/components/request-line-editor.js.map +1 -0
- package/dist/src/components/request-line-editor.stories.d.ts +11 -0
- package/dist/src/components/request-line-editor.stories.d.ts.map +1 -0
- package/dist/src/components/request-line-editor.stories.js +67 -0
- package/dist/src/components/request-line-editor.stories.js.map +1 -0
- package/dist/src/deps.css +3 -0
- package/dist/src/full.css +2 -0
- package/dist/src/index.css +98 -0
- package/dist/src/index.d.ts +51 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +53 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.stories.d.ts +14 -0
- package/dist/src/index.stories.d.ts.map +1 -0
- package/dist/src/index.stories.js +16 -0
- package/dist/src/index.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/accordion.d.ts +8 -0
- package/dist/src/shadcn/components/ui/accordion.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/accordion.js +18 -0
- package/dist/src/shadcn/components/ui/accordion.js.map +1 -0
- package/dist/src/shadcn/components/ui/accordion.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/accordion.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/accordion.stories.js +10 -0
- package/dist/src/shadcn/components/ui/accordion.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts +15 -0
- package/dist/src/shadcn/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/alert-dialog.js +39 -0
- package/dist/src/shadcn/components/ui/alert-dialog.js.map +1 -0
- package/dist/src/shadcn/components/ui/alert-dialog.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/alert-dialog.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/alert-dialog.stories.js +11 -0
- package/dist/src/shadcn/components/ui/alert-dialog.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/alert.d.ts +10 -0
- package/dist/src/shadcn/components/ui/alert.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/alert.js +25 -0
- package/dist/src/shadcn/components/ui/alert.js.map +1 -0
- package/dist/src/shadcn/components/ui/alert.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/alert.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/alert.stories.js +11 -0
- package/dist/src/shadcn/components/ui/alert.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.js +7 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.js.map +1 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.js +10 -0
- package/dist/src/shadcn/components/ui/aspect-ratio.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/avatar.d.ts +7 -0
- package/dist/src/shadcn/components/ui/avatar.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/avatar.js +14 -0
- package/dist/src/shadcn/components/ui/avatar.js.map +1 -0
- package/dist/src/shadcn/components/ui/avatar.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/avatar.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/avatar.stories.js +10 -0
- package/dist/src/shadcn/components/ui/avatar.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/badge.d.ts +10 -0
- package/dist/src/shadcn/components/ui/badge.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/badge.js +23 -0
- package/dist/src/shadcn/components/ui/badge.js.map +1 -0
- package/dist/src/shadcn/components/ui/badge.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/badge.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/badge.stories.js +11 -0
- package/dist/src/shadcn/components/ui/badge.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/breadcrumb.d.ts +12 -0
- package/dist/src/shadcn/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/breadcrumb.js +31 -0
- package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -0
- package/dist/src/shadcn/components/ui/breadcrumb.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/breadcrumb.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/breadcrumb.stories.js +11 -0
- package/dist/src/shadcn/components/ui/breadcrumb.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/button.d.ts +13 -0
- package/dist/src/shadcn/components/ui/button.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/button.js +55 -0
- package/dist/src/shadcn/components/ui/button.js.map +1 -0
- package/dist/src/shadcn/components/ui/button.stories.d.ts +23 -0
- package/dist/src/shadcn/components/ui/button.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/button.stories.js +26 -0
- package/dist/src/shadcn/components/ui/button.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/calendar.d.ts +9 -0
- package/dist/src/shadcn/components/ui/calendar.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/calendar.js +74 -0
- package/dist/src/shadcn/components/ui/calendar.js.map +1 -0
- package/dist/src/shadcn/components/ui/calendar.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/calendar.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/calendar.stories.js +14 -0
- package/dist/src/shadcn/components/ui/calendar.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/card.d.ts +10 -0
- package/dist/src/shadcn/components/ui/card.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/card.js +25 -0
- package/dist/src/shadcn/components/ui/card.js.map +1 -0
- package/dist/src/shadcn/components/ui/card.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/card.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/card.stories.js +13 -0
- package/dist/src/shadcn/components/ui/card.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/carousel.d.ts +20 -0
- package/dist/src/shadcn/components/ui/carousel.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/carousel.js +93 -0
- package/dist/src/shadcn/components/ui/carousel.js.map +1 -0
- package/dist/src/shadcn/components/ui/carousel.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/carousel.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/carousel.stories.js +13 -0
- package/dist/src/shadcn/components/ui/carousel.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/chart.d.ts +41 -0
- package/dist/src/shadcn/components/ui/chart.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/chart.js +130 -0
- package/dist/src/shadcn/components/ui/chart.js.map +1 -0
- package/dist/src/shadcn/components/ui/chart.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/chart.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/chart.stories.js +29 -0
- package/dist/src/shadcn/components/ui/chart.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/checkbox.d.ts +5 -0
- package/dist/src/shadcn/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/checkbox.js +9 -0
- package/dist/src/shadcn/components/ui/checkbox.js.map +1 -0
- package/dist/src/shadcn/components/ui/checkbox.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/checkbox.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/checkbox.stories.js +11 -0
- package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/collapsible.d.ts +6 -0
- package/dist/src/shadcn/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/collapsible.js +13 -0
- package/dist/src/shadcn/components/ui/collapsible.js.map +1 -0
- package/dist/src/shadcn/components/ui/collapsible.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/collapsible.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/collapsible.stories.js +16 -0
- package/dist/src/shadcn/components/ui/collapsible.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/command.d.ts +19 -0
- package/dist/src/shadcn/components/ui/command.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/command.js +34 -0
- package/dist/src/shadcn/components/ui/command.js.map +1 -0
- package/dist/src/shadcn/components/ui/command.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/command.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/command.stories.js +11 -0
- package/dist/src/shadcn/components/ui/command.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/context-menu.d.ts +26 -0
- package/dist/src/shadcn/components/ui/context-menu.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/context-menu.js +51 -0
- package/dist/src/shadcn/components/ui/context-menu.js.map +1 -0
- package/dist/src/shadcn/components/ui/context-menu.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/context-menu.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/context-menu.stories.js +10 -0
- package/dist/src/shadcn/components/ui/context-menu.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/dialog.d.ts +16 -0
- package/dist/src/shadcn/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/dialog.js +36 -0
- package/dist/src/shadcn/components/ui/dialog.js.map +1 -0
- package/dist/src/shadcn/components/ui/dialog.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/dialog.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/dialog.stories.js +13 -0
- package/dist/src/shadcn/components/ui/dialog.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/drawer.d.ts +14 -0
- package/dist/src/shadcn/components/ui/drawer.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/drawer.js +35 -0
- package/dist/src/shadcn/components/ui/drawer.js.map +1 -0
- package/dist/src/shadcn/components/ui/drawer.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/drawer.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/drawer.stories.js +38 -0
- package/dist/src/shadcn/components/ui/drawer.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.js +51 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.js +11 -0
- package/dist/src/shadcn/components/ui/dropdown-menu.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/form.d.ts +25 -0
- package/dist/src/shadcn/components/ui/form.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/form.js +59 -0
- package/dist/src/shadcn/components/ui/form.js.map +1 -0
- package/dist/src/shadcn/components/ui/form.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/form.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/form.stories.js +31 -0
- package/dist/src/shadcn/components/ui/form.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/hover-card.d.ts +7 -0
- package/dist/src/shadcn/components/ui/hover-card.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/hover-card.js +14 -0
- package/dist/src/shadcn/components/ui/hover-card.js.map +1 -0
- package/dist/src/shadcn/components/ui/hover-card.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/hover-card.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/hover-card.stories.js +12 -0
- package/dist/src/shadcn/components/ui/hover-card.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/input-otp.d.ts +12 -0
- package/dist/src/shadcn/components/ui/input-otp.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/input-otp.js +25 -0
- package/dist/src/shadcn/components/ui/input-otp.js.map +1 -0
- package/dist/src/shadcn/components/ui/input-otp.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/input-otp.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/input-otp.stories.js +10 -0
- package/dist/src/shadcn/components/ui/input-otp.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/input.d.ts +18 -0
- package/dist/src/shadcn/components/ui/input.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/input.js +79 -0
- package/dist/src/shadcn/components/ui/input.js.map +1 -0
- package/dist/src/shadcn/components/ui/input.stories.d.ts +18 -0
- package/dist/src/shadcn/components/ui/input.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/input.stories.js +39 -0
- package/dist/src/shadcn/components/ui/input.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/label.d.ts +5 -0
- package/dist/src/shadcn/components/ui/label.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/label.js +8 -0
- package/dist/src/shadcn/components/ui/label.js.map +1 -0
- package/dist/src/shadcn/components/ui/label.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/label.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/label.stories.js +11 -0
- package/dist/src/shadcn/components/ui/label.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/menubar.d.ts +27 -0
- package/dist/src/shadcn/components/ui/menubar.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/menubar.js +54 -0
- package/dist/src/shadcn/components/ui/menubar.js.map +1 -0
- package/dist/src/shadcn/components/ui/menubar.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/menubar.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/menubar.stories.js +10 -0
- package/dist/src/shadcn/components/ui/menubar.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/navigation-menu.d.ts +15 -0
- package/dist/src/shadcn/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/navigation-menu.js +32 -0
- package/dist/src/shadcn/components/ui/navigation-menu.js.map +1 -0
- package/dist/src/shadcn/components/ui/navigation-menu.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/navigation-menu.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/navigation-menu.stories.js +46 -0
- package/dist/src/shadcn/components/ui/navigation-menu.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/pagination.d.ts +14 -0
- package/dist/src/shadcn/components/ui/pagination.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/pagination.js +34 -0
- package/dist/src/shadcn/components/ui/pagination.js.map +1 -0
- package/dist/src/shadcn/components/ui/pagination.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/pagination.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/pagination.stories.js +10 -0
- package/dist/src/shadcn/components/ui/pagination.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/popover.d.ts +8 -0
- package/dist/src/shadcn/components/ui/popover.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/popover.js +17 -0
- package/dist/src/shadcn/components/ui/popover.js.map +1 -0
- package/dist/src/shadcn/components/ui/popover.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/popover.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/popover.stories.js +13 -0
- package/dist/src/shadcn/components/ui/popover.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/progress.d.ts +5 -0
- package/dist/src/shadcn/components/ui/progress.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/progress.js +8 -0
- package/dist/src/shadcn/components/ui/progress.js.map +1 -0
- package/dist/src/shadcn/components/ui/progress.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/progress.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/progress.stories.js +18 -0
- package/dist/src/shadcn/components/ui/progress.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/radio-group.d.ts +6 -0
- package/dist/src/shadcn/components/ui/radio-group.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/radio-group.js +12 -0
- package/dist/src/shadcn/components/ui/radio-group.js.map +1 -0
- package/dist/src/shadcn/components/ui/radio-group.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/radio-group.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/radio-group.stories.js +11 -0
- package/dist/src/shadcn/components/ui/radio-group.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/resizable.d.ts +9 -0
- package/dist/src/shadcn/components/ui/resizable.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/resizable.js +15 -0
- package/dist/src/shadcn/components/ui/resizable.js.map +1 -0
- package/dist/src/shadcn/components/ui/resizable.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/resizable.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/resizable.stories.js +10 -0
- package/dist/src/shadcn/components/ui/resizable.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/scroll-area.d.ts +6 -0
- package/dist/src/shadcn/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/scroll-area.js +13 -0
- package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -0
- package/dist/src/shadcn/components/ui/scroll-area.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/scroll-area.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/scroll-area.stories.js +13 -0
- package/dist/src/shadcn/components/ui/scroll-area.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/select.d.ts +19 -0
- package/dist/src/shadcn/components/ui/select.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/select.js +55 -0
- package/dist/src/shadcn/components/ui/select.js.map +1 -0
- package/dist/src/shadcn/components/ui/select.stories.d.ts +11 -0
- package/dist/src/shadcn/components/ui/select.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/select.stories.js +14 -0
- package/dist/src/shadcn/components/ui/select.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/separator.d.ts +5 -0
- package/dist/src/shadcn/components/ui/separator.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/separator.js +8 -0
- package/dist/src/shadcn/components/ui/separator.js.map +1 -0
- package/dist/src/shadcn/components/ui/separator.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/separator.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/separator.stories.js +10 -0
- package/dist/src/shadcn/components/ui/separator.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/sheet.d.ts +14 -0
- package/dist/src/shadcn/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/sheet.js +40 -0
- package/dist/src/shadcn/components/ui/sheet.js.map +1 -0
- package/dist/src/shadcn/components/ui/sheet.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/sheet.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/sheet.stories.js +13 -0
- package/dist/src/shadcn/components/ui/sheet.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/sidebar.d.ts +70 -0
- package/dist/src/shadcn/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/sidebar.js +215 -0
- package/dist/src/shadcn/components/ui/sidebar.js.map +1 -0
- package/dist/src/shadcn/components/ui/sidebar.stories.d.ts +11 -0
- package/dist/src/shadcn/components/ui/sidebar.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/sidebar.stories.js +178 -0
- package/dist/src/shadcn/components/ui/sidebar.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/skeleton.d.ts +3 -0
- package/dist/src/shadcn/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/skeleton.js +7 -0
- package/dist/src/shadcn/components/ui/skeleton.js.map +1 -0
- package/dist/src/shadcn/components/ui/skeleton.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/skeleton.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/skeleton.stories.js +10 -0
- package/dist/src/shadcn/components/ui/skeleton.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/slider.d.ts +5 -0
- package/dist/src/shadcn/components/ui/slider.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/slider.js +14 -0
- package/dist/src/shadcn/components/ui/slider.js.map +1 -0
- package/dist/src/shadcn/components/ui/slider.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/slider.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/slider.stories.js +10 -0
- package/dist/src/shadcn/components/ui/slider.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/sonner.d.ts +4 -0
- package/dist/src/shadcn/components/ui/sonner.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/sonner.js +13 -0
- package/dist/src/shadcn/components/ui/sonner.js.map +1 -0
- package/dist/src/shadcn/components/ui/sonner.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/sonner.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/sonner.stories.js +17 -0
- package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/switch.d.ts +5 -0
- package/dist/src/shadcn/components/ui/switch.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/switch.js +8 -0
- package/dist/src/shadcn/components/ui/switch.js.map +1 -0
- package/dist/src/shadcn/components/ui/switch.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/switch.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/switch.stories.js +11 -0
- package/dist/src/shadcn/components/ui/switch.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/table.d.ts +11 -0
- package/dist/src/shadcn/components/ui/table.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/table.js +28 -0
- package/dist/src/shadcn/components/ui/table.js.map +1 -0
- package/dist/src/shadcn/components/ui/table.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/table.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/table.stories.js +54 -0
- package/dist/src/shadcn/components/ui/table.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/tabs.d.ts +12 -0
- package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tabs.js +29 -0
- package/dist/src/shadcn/components/ui/tabs.js.map +1 -0
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts +26 -0
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tabs.stories.js +20 -0
- package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/textarea.d.ts +4 -0
- package/dist/src/shadcn/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/textarea.js +7 -0
- package/dist/src/shadcn/components/ui/textarea.js.map +1 -0
- package/dist/src/shadcn/components/ui/textarea.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/textarea.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/textarea.stories.js +10 -0
- package/dist/src/shadcn/components/ui/textarea.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/toggle-group.d.ts +8 -0
- package/dist/src/shadcn/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/toggle-group.js +21 -0
- package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -0
- package/dist/src/shadcn/components/ui/toggle-group.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/toggle-group.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/toggle-group.stories.js +11 -0
- package/dist/src/shadcn/components/ui/toggle-group.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/toggle.d.ts +10 -0
- package/dist/src/shadcn/components/ui/toggle.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/toggle.js +26 -0
- package/dist/src/shadcn/components/ui/toggle.js.map +1 -0
- package/dist/src/shadcn/components/ui/toggle.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/toggle.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/toggle.stories.js +11 -0
- package/dist/src/shadcn/components/ui/toggle.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/tooltip.d.ts +8 -0
- package/dist/src/shadcn/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tooltip.js +17 -0
- package/dist/src/shadcn/components/ui/tooltip.js.map +1 -0
- package/dist/src/shadcn/components/ui/tooltip.stories.d.ts +8 -0
- package/dist/src/shadcn/components/ui/tooltip.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tooltip.stories.js +11 -0
- package/dist/src/shadcn/components/ui/tooltip.stories.js.map +1 -0
- package/dist/src/shadcn/hooks/use-mobile.d.ts +2 -0
- package/dist/src/shadcn/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/shadcn/hooks/use-mobile.js +16 -0
- package/dist/src/shadcn/hooks/use-mobile.js.map +1 -0
- package/dist/src/shadcn/lib/utils.d.ts +3 -0
- package/dist/src/shadcn/lib/utils.d.ts.map +1 -0
- package/dist/src/shadcn/lib/utils.js +6 -0
- package/dist/src/shadcn/lib/utils.js.map +1 -0
- package/dist/src/shadcn/shadcn.css +122 -0
- package/dist/src/tokens.css +179 -0
- package/dist/src/typography.css +98 -0
- package/package.json +109 -0
- package/src/components/code-editor/index.tsx +143 -0
- package/src/components/code-editor.stories.tsx +34 -0
- package/src/components/copy-icon.tsx +30 -0
- package/src/components/request-line-editor.stories.tsx +90 -0
- package/src/components/request-line-editor.tsx +103 -0
- package/src/deps.css +3 -0
- package/src/full.css +2 -0
- package/src/global.d.ts +1 -0
- package/src/index.css +98 -0
- package/src/index.stories.tsx +21 -0
- package/src/index.tsx +54 -0
- package/src/shadcn/components/ui/accordion.stories.tsx +69 -0
- package/src/shadcn/components/ui/accordion.tsx +64 -0
- package/src/shadcn/components/ui/alert-dialog.stories.tsx +43 -0
- package/src/shadcn/components/ui/alert-dialog.tsx +154 -0
- package/src/shadcn/components/ui/alert.stories.tsx +46 -0
- package/src/shadcn/components/ui/alert.tsx +66 -0
- package/src/shadcn/components/ui/aspect-ratio.stories.tsx +21 -0
- package/src/shadcn/components/ui/aspect-ratio.tsx +9 -0
- package/src/shadcn/components/ui/avatar.stories.tsx +48 -0
- package/src/shadcn/components/ui/avatar.tsx +51 -0
- package/src/shadcn/components/ui/badge.stories.tsx +47 -0
- package/src/shadcn/components/ui/badge.tsx +46 -0
- package/src/shadcn/components/ui/breadcrumb.stories.tsx +62 -0
- package/src/shadcn/components/ui/breadcrumb.tsx +119 -0
- package/src/shadcn/components/ui/button.stories.tsx +125 -0
- package/src/shadcn/components/ui/button.tsx +92 -0
- package/src/shadcn/components/ui/calendar.stories.tsx +26 -0
- package/src/shadcn/components/ui/calendar.tsx +214 -0
- package/src/shadcn/components/ui/card.stories.tsx +67 -0
- package/src/shadcn/components/ui/card.tsx +92 -0
- package/src/shadcn/components/ui/carousel.stories.tsx +39 -0
- package/src/shadcn/components/ui/carousel.tsx +240 -0
- package/src/shadcn/components/ui/chart.stories.tsx +58 -0
- package/src/shadcn/components/ui/chart.tsx +352 -0
- package/src/shadcn/components/ui/checkbox.stories.tsx +49 -0
- package/src/shadcn/components/ui/checkbox.tsx +30 -0
- package/src/shadcn/components/ui/collapsible.stories.tsx +53 -0
- package/src/shadcn/components/ui/collapsible.tsx +31 -0
- package/src/shadcn/components/ui/command.stories.tsx +69 -0
- package/src/shadcn/components/ui/command.tsx +185 -0
- package/src/shadcn/components/ui/context-menu.stories.tsx +72 -0
- package/src/shadcn/components/ui/context-menu.tsx +248 -0
- package/src/shadcn/components/ui/dialog.stories.tsx +58 -0
- package/src/shadcn/components/ui/dialog.tsx +141 -0
- package/src/shadcn/components/ui/drawer.stories.tsx +119 -0
- package/src/shadcn/components/ui/drawer.tsx +133 -0
- package/src/shadcn/components/ui/dropdown-menu.stories.tsx +82 -0
- package/src/shadcn/components/ui/dropdown-menu.tsx +281 -0
- package/src/shadcn/components/ui/form.stories.tsx +67 -0
- package/src/shadcn/components/ui/form.tsx +165 -0
- package/src/shadcn/components/ui/hover-card.stories.tsx +46 -0
- package/src/shadcn/components/ui/hover-card.tsx +42 -0
- package/src/shadcn/components/ui/input-otp.stories.tsx +32 -0
- package/src/shadcn/components/ui/input-otp.tsx +78 -0
- package/src/shadcn/components/ui/input.stories.tsx +393 -0
- package/src/shadcn/components/ui/input.tsx +173 -0
- package/src/shadcn/components/ui/label.stories.tsx +21 -0
- package/src/shadcn/components/ui/label.tsx +22 -0
- package/src/shadcn/components/ui/menubar.stories.tsx +115 -0
- package/src/shadcn/components/ui/menubar.tsx +272 -0
- package/src/shadcn/components/ui/navigation-menu.stories.tsx +217 -0
- package/src/shadcn/components/ui/navigation-menu.tsx +168 -0
- package/src/shadcn/components/ui/pagination.stories.tsx +47 -0
- package/src/shadcn/components/ui/pagination.tsx +134 -0
- package/src/shadcn/components/ui/popover.stories.tsx +70 -0
- package/src/shadcn/components/ui/popover.tsx +46 -0
- package/src/shadcn/components/ui/progress.stories.tsx +23 -0
- package/src/shadcn/components/ui/progress.tsx +29 -0
- package/src/shadcn/components/ui/radio-group.stories.tsx +29 -0
- package/src/shadcn/components/ui/radio-group.tsx +43 -0
- package/src/shadcn/components/ui/resizable.stories.tsx +44 -0
- package/src/shadcn/components/ui/resizable.tsx +54 -0
- package/src/shadcn/components/ui/scroll-area.stories.tsx +31 -0
- package/src/shadcn/components/ui/scroll-area.tsx +56 -0
- package/src/shadcn/components/ui/select.stories.tsx +61 -0
- package/src/shadcn/components/ui/select.tsx +208 -0
- package/src/shadcn/components/ui/separator.stories.tsx +30 -0
- package/src/shadcn/components/ui/separator.tsx +27 -0
- package/src/shadcn/components/ui/sheet.stories.tsx +55 -0
- package/src/shadcn/components/ui/sheet.tsx +137 -0
- package/src/shadcn/components/ui/sidebar.stories.tsx +384 -0
- package/src/shadcn/components/ui/sidebar.tsx +737 -0
- package/src/shadcn/components/ui/skeleton.stories.tsx +21 -0
- package/src/shadcn/components/ui/skeleton.tsx +13 -0
- package/src/shadcn/components/ui/slider.stories.tsx +15 -0
- package/src/shadcn/components/ui/slider.tsx +62 -0
- package/src/shadcn/components/ui/sonner.stories.tsx +29 -0
- package/src/shadcn/components/ui/sonner.tsx +23 -0
- package/src/shadcn/components/ui/switch.stories.tsx +19 -0
- package/src/shadcn/components/ui/switch.tsx +29 -0
- package/src/shadcn/components/ui/table.stories.tsx +95 -0
- package/src/shadcn/components/ui/table.tsx +114 -0
- package/src/shadcn/components/ui/tabs.stories.tsx +92 -0
- package/src/shadcn/components/ui/tabs.tsx +84 -0
- package/src/shadcn/components/ui/textarea.stories.tsx +13 -0
- package/src/shadcn/components/ui/textarea.tsx +18 -0
- package/src/shadcn/components/ui/toggle-group.stories.tsx +29 -0
- package/src/shadcn/components/ui/toggle-group.tsx +70 -0
- package/src/shadcn/components/ui/toggle.stories.tsx +18 -0
- package/src/shadcn/components/ui/toggle.tsx +45 -0
- package/src/shadcn/components/ui/tooltip.stories.tsx +27 -0
- package/src/shadcn/components/ui/tooltip.tsx +62 -0
- package/src/shadcn/hooks/use-mobile.ts +21 -0
- package/src/shadcn/lib/utils.ts +6 -0
- package/src/shadcn/shadcn.css +122 -0
- package/src/tokens.css +179 -0
- package/src/typography.css +98 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ScrollArea } from "#shadcn/components/ui/scroll-area";
|
|
4
|
+
import { Separator } from "#shadcn/components/ui/separator";
|
|
5
|
+
|
|
6
|
+
const tags = Array.from({ length: 50 }).map(
|
|
7
|
+
(_, i, a) => `v1.2.0-beta.${a.length - i}`,
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
const meta = {
|
|
11
|
+
title: "Component/Scroll area",
|
|
12
|
+
} satisfies Meta;
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Demo = {
|
|
18
|
+
render: () => (
|
|
19
|
+
<ScrollArea className="h-72 w-48 rounded-md border">
|
|
20
|
+
<div className="p-4">
|
|
21
|
+
<h4 className="mb-4 text-sm leading-none font-medium">Tags</h4>
|
|
22
|
+
{tags.map((tag) => (
|
|
23
|
+
<React.Fragment key={tag}>
|
|
24
|
+
<div className="text-sm">{tag}</div>
|
|
25
|
+
<Separator className="my-2" />
|
|
26
|
+
</React.Fragment>
|
|
27
|
+
))}
|
|
28
|
+
</div>
|
|
29
|
+
</ScrollArea>
|
|
30
|
+
),
|
|
31
|
+
} satisfies Story;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "#shadcn/lib/utils";
|
|
5
|
+
|
|
6
|
+
function ScrollArea({
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
|
|
11
|
+
return (
|
|
12
|
+
<ScrollAreaPrimitive.Root
|
|
13
|
+
data-slot="scroll-area"
|
|
14
|
+
className={cn("relative", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
<ScrollAreaPrimitive.Viewport
|
|
18
|
+
data-slot="scroll-area-viewport"
|
|
19
|
+
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</ScrollAreaPrimitive.Viewport>
|
|
23
|
+
<ScrollBar />
|
|
24
|
+
<ScrollAreaPrimitive.Corner />
|
|
25
|
+
</ScrollAreaPrimitive.Root>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function ScrollBar({
|
|
30
|
+
className,
|
|
31
|
+
orientation = "vertical",
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
|
|
34
|
+
return (
|
|
35
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
36
|
+
data-slot="scroll-area-scrollbar"
|
|
37
|
+
orientation={orientation}
|
|
38
|
+
className={cn(
|
|
39
|
+
"flex touch-none p-px transition-colors select-none",
|
|
40
|
+
orientation === "vertical" &&
|
|
41
|
+
"h-full w-2.5 border-l border-l-transparent",
|
|
42
|
+
orientation === "horizontal" &&
|
|
43
|
+
"h-2.5 flex-col border-t border-t-transparent",
|
|
44
|
+
className,
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
<ScrollAreaPrimitive.ScrollAreaThumb
|
|
49
|
+
data-slot="scroll-area-thumb"
|
|
50
|
+
className="bg-border relative flex-1 rounded-full"
|
|
51
|
+
/>
|
|
52
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Label } from "#shadcn/components/ui/label";
|
|
3
|
+
import {
|
|
4
|
+
Select,
|
|
5
|
+
SelectContent,
|
|
6
|
+
SelectGroup,
|
|
7
|
+
SelectItem,
|
|
8
|
+
SelectLabel,
|
|
9
|
+
SelectTrigger,
|
|
10
|
+
SelectValue,
|
|
11
|
+
} from "#shadcn/components/ui/select";
|
|
12
|
+
|
|
13
|
+
const meta = {
|
|
14
|
+
title: "Component/Select",
|
|
15
|
+
} satisfies Meta;
|
|
16
|
+
export default meta;
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
|
|
20
|
+
export const Demo = {
|
|
21
|
+
render: () => (
|
|
22
|
+
<Select>
|
|
23
|
+
<SelectTrigger className="w-[180px]">
|
|
24
|
+
<SelectValue placeholder="Select a fruit" />
|
|
25
|
+
</SelectTrigger>
|
|
26
|
+
<SelectContent>
|
|
27
|
+
<SelectGroup>
|
|
28
|
+
<SelectLabel>Fruits</SelectLabel>
|
|
29
|
+
<SelectItem value="apple">Apple</SelectItem>
|
|
30
|
+
<SelectItem value="banana">Banana</SelectItem>
|
|
31
|
+
<SelectItem value="blueberry">Blueberry</SelectItem>
|
|
32
|
+
<SelectItem value="grapes">Grapes</SelectItem>
|
|
33
|
+
<SelectItem value="pineapple">Pineapple</SelectItem>
|
|
34
|
+
</SelectGroup>
|
|
35
|
+
</SelectContent>
|
|
36
|
+
</Select>
|
|
37
|
+
),
|
|
38
|
+
} satisfies Story;
|
|
39
|
+
|
|
40
|
+
export const CompoundSelectWrite: Story = {
|
|
41
|
+
render: () => (
|
|
42
|
+
<div className="grid w-full max-w-sm items-center gap-1.5">
|
|
43
|
+
<Label htmlFor="compound-select">Compound Select Write</Label>
|
|
44
|
+
<Select>
|
|
45
|
+
<SelectTrigger
|
|
46
|
+
id="compound-select"
|
|
47
|
+
variant="compound"
|
|
48
|
+
className="w-[180px]"
|
|
49
|
+
>
|
|
50
|
+
<SelectValue placeholder="Select option" />
|
|
51
|
+
</SelectTrigger>
|
|
52
|
+
<SelectContent>
|
|
53
|
+
<SelectItem value="option1">Option 1</SelectItem>
|
|
54
|
+
<SelectItem value="option2">Option 2</SelectItem>
|
|
55
|
+
<SelectItem value="option3">Option 3</SelectItem>
|
|
56
|
+
<SelectItem value="option4">Option 4</SelectItem>
|
|
57
|
+
</SelectContent>
|
|
58
|
+
</Select>
|
|
59
|
+
</div>
|
|
60
|
+
),
|
|
61
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
+
import type * as React from "react";
|
|
5
|
+
import { cn } from "#shadcn/lib/utils";
|
|
6
|
+
|
|
7
|
+
const selectTriggerVariants = cva(
|
|
8
|
+
cn(
|
|
9
|
+
"border-border-primary hover:border-border-primary_hover data-[placeholder]:text-text-quternary selection:bg-bg-primary",
|
|
10
|
+
"selection:text-text-primary-foreground [&_svg:not([class*='text-'])]:text-text-quternary flex w-fit items-center justify-between",
|
|
11
|
+
"gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none",
|
|
12
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-text-disabled focus-visible:ring-2 focus-visible:ring-border-link",
|
|
13
|
+
"data-[state=open]:ring-2 data-[state=open]:ring-border-link disabled:bg-bg-disabled aria-invalid:ring-destructive",
|
|
14
|
+
"aria-invalid:text-text-error-primary aria-invalid:border-border-error-primary *:data-[slot=select-value]:line-clamp-1",
|
|
15
|
+
"*:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
16
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
17
|
+
),
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
size: {
|
|
21
|
+
regular: "h-9",
|
|
22
|
+
small: "h-8",
|
|
23
|
+
},
|
|
24
|
+
variant: {
|
|
25
|
+
default: "",
|
|
26
|
+
compound: "border-r-0 typo-label",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
size: "regular",
|
|
31
|
+
variant: "default",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
function Select({
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
39
|
+
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function SelectGroup({
|
|
43
|
+
...props
|
|
44
|
+
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
45
|
+
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function SelectValue({
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
51
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function SelectTrigger({
|
|
55
|
+
className,
|
|
56
|
+
size,
|
|
57
|
+
variant,
|
|
58
|
+
children,
|
|
59
|
+
...props
|
|
60
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> &
|
|
61
|
+
VariantProps<typeof selectTriggerVariants>) {
|
|
62
|
+
return (
|
|
63
|
+
<SelectPrimitive.Trigger
|
|
64
|
+
data-slot="select-trigger"
|
|
65
|
+
className={cn(selectTriggerVariants({ variant, size, className }))}
|
|
66
|
+
{...props}
|
|
67
|
+
>
|
|
68
|
+
{children}
|
|
69
|
+
<SelectPrimitive.Icon asChild>
|
|
70
|
+
<ChevronDownIcon className="size-4 opacity-50" />
|
|
71
|
+
</SelectPrimitive.Icon>
|
|
72
|
+
</SelectPrimitive.Trigger>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function SelectContent({
|
|
77
|
+
className,
|
|
78
|
+
children,
|
|
79
|
+
position = "popper",
|
|
80
|
+
...props
|
|
81
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
82
|
+
return (
|
|
83
|
+
<SelectPrimitive.Portal>
|
|
84
|
+
<SelectPrimitive.Content
|
|
85
|
+
data-slot="select-content"
|
|
86
|
+
className={cn(
|
|
87
|
+
"bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
88
|
+
position === "popper" &&
|
|
89
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
90
|
+
className,
|
|
91
|
+
)}
|
|
92
|
+
position={position}
|
|
93
|
+
{...props}
|
|
94
|
+
>
|
|
95
|
+
<SelectScrollUpButton />
|
|
96
|
+
<SelectPrimitive.Viewport
|
|
97
|
+
className={cn(
|
|
98
|
+
"p-1",
|
|
99
|
+
position === "popper" &&
|
|
100
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1",
|
|
101
|
+
)}
|
|
102
|
+
>
|
|
103
|
+
{children}
|
|
104
|
+
</SelectPrimitive.Viewport>
|
|
105
|
+
<SelectScrollDownButton />
|
|
106
|
+
</SelectPrimitive.Content>
|
|
107
|
+
</SelectPrimitive.Portal>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function SelectLabel({
|
|
112
|
+
className,
|
|
113
|
+
...props
|
|
114
|
+
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
115
|
+
return (
|
|
116
|
+
<SelectPrimitive.Label
|
|
117
|
+
data-slot="select-label"
|
|
118
|
+
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
119
|
+
{...props}
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function SelectItem({
|
|
125
|
+
className,
|
|
126
|
+
children,
|
|
127
|
+
...props
|
|
128
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
129
|
+
return (
|
|
130
|
+
<SelectPrimitive.Item
|
|
131
|
+
data-slot="select-item"
|
|
132
|
+
className={cn(
|
|
133
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
134
|
+
className,
|
|
135
|
+
)}
|
|
136
|
+
{...props}
|
|
137
|
+
>
|
|
138
|
+
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
139
|
+
<SelectPrimitive.ItemIndicator>
|
|
140
|
+
<CheckIcon className="size-4" />
|
|
141
|
+
</SelectPrimitive.ItemIndicator>
|
|
142
|
+
</span>
|
|
143
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
144
|
+
</SelectPrimitive.Item>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function SelectSeparator({
|
|
149
|
+
className,
|
|
150
|
+
...props
|
|
151
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
152
|
+
return (
|
|
153
|
+
<SelectPrimitive.Separator
|
|
154
|
+
data-slot="select-separator"
|
|
155
|
+
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
|
|
156
|
+
{...props}
|
|
157
|
+
/>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function SelectScrollUpButton({
|
|
162
|
+
className,
|
|
163
|
+
...props
|
|
164
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
165
|
+
return (
|
|
166
|
+
<SelectPrimitive.ScrollUpButton
|
|
167
|
+
data-slot="select-scroll-up-button"
|
|
168
|
+
className={cn(
|
|
169
|
+
"flex cursor-default items-center justify-center py-1",
|
|
170
|
+
className,
|
|
171
|
+
)}
|
|
172
|
+
{...props}
|
|
173
|
+
>
|
|
174
|
+
<ChevronUpIcon className="size-4" />
|
|
175
|
+
</SelectPrimitive.ScrollUpButton>
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function SelectScrollDownButton({
|
|
180
|
+
className,
|
|
181
|
+
...props
|
|
182
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
183
|
+
return (
|
|
184
|
+
<SelectPrimitive.ScrollDownButton
|
|
185
|
+
data-slot="select-scroll-down-button"
|
|
186
|
+
className={cn(
|
|
187
|
+
"flex cursor-default items-center justify-center py-1",
|
|
188
|
+
className,
|
|
189
|
+
)}
|
|
190
|
+
{...props}
|
|
191
|
+
>
|
|
192
|
+
<ChevronDownIcon className="size-4" />
|
|
193
|
+
</SelectPrimitive.ScrollDownButton>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export {
|
|
198
|
+
Select,
|
|
199
|
+
SelectContent,
|
|
200
|
+
SelectGroup,
|
|
201
|
+
SelectItem,
|
|
202
|
+
SelectLabel,
|
|
203
|
+
SelectScrollDownButton,
|
|
204
|
+
SelectScrollUpButton,
|
|
205
|
+
SelectSeparator,
|
|
206
|
+
SelectTrigger,
|
|
207
|
+
SelectValue,
|
|
208
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Separator } from "#shadcn/components/ui/separator";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Component/Separator",
|
|
6
|
+
} satisfies Meta;
|
|
7
|
+
export default meta;
|
|
8
|
+
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
|
|
11
|
+
export const Demo = {
|
|
12
|
+
render: () => (
|
|
13
|
+
<div>
|
|
14
|
+
<div className="space-y-1">
|
|
15
|
+
<h4 className="text-sm leading-none font-medium">Radix Primitives</h4>
|
|
16
|
+
<p className="text-muted-foreground text-sm">
|
|
17
|
+
An open-source UI component library.
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
<Separator className="my-4" />
|
|
21
|
+
<div className="flex h-5 items-center space-x-4 text-sm">
|
|
22
|
+
<div>Blog</div>
|
|
23
|
+
<Separator orientation="vertical" />
|
|
24
|
+
<div>Docs</div>
|
|
25
|
+
<Separator orientation="vertical" />
|
|
26
|
+
<div>Source</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
),
|
|
30
|
+
} satisfies Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "#shadcn/lib/utils";
|
|
5
|
+
|
|
6
|
+
function Separator({
|
|
7
|
+
className,
|
|
8
|
+
orientation = "horizontal",
|
|
9
|
+
decorative = true,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
12
|
+
return (
|
|
13
|
+
<SeparatorPrimitive.Root
|
|
14
|
+
data-slot="separator"
|
|
15
|
+
decorative={decorative}
|
|
16
|
+
orientation={orientation}
|
|
17
|
+
className={cn(
|
|
18
|
+
"bg-bg-quaternary shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full",
|
|
19
|
+
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
20
|
+
className,
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Separator };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Button } from "#shadcn/components/ui/button";
|
|
3
|
+
import { Input } from "#shadcn/components/ui/input";
|
|
4
|
+
import { Label } from "#shadcn/components/ui/label";
|
|
5
|
+
import {
|
|
6
|
+
Sheet,
|
|
7
|
+
SheetClose,
|
|
8
|
+
SheetContent,
|
|
9
|
+
SheetDescription,
|
|
10
|
+
SheetFooter,
|
|
11
|
+
SheetHeader,
|
|
12
|
+
SheetTitle,
|
|
13
|
+
SheetTrigger,
|
|
14
|
+
} from "#shadcn/components/ui/sheet";
|
|
15
|
+
|
|
16
|
+
const meta = {
|
|
17
|
+
title: "Component/Sheet",
|
|
18
|
+
} satisfies Meta;
|
|
19
|
+
export default meta;
|
|
20
|
+
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
|
|
23
|
+
export const Demo = {
|
|
24
|
+
render: () => (
|
|
25
|
+
<Sheet>
|
|
26
|
+
<SheetTrigger asChild>
|
|
27
|
+
<Button variant="secondary">Open</Button>
|
|
28
|
+
</SheetTrigger>
|
|
29
|
+
<SheetContent>
|
|
30
|
+
<SheetHeader>
|
|
31
|
+
<SheetTitle>Edit profile</SheetTitle>
|
|
32
|
+
<SheetDescription>
|
|
33
|
+
Make changes to your profile here. Click save when you're done.
|
|
34
|
+
</SheetDescription>
|
|
35
|
+
</SheetHeader>
|
|
36
|
+
<div className="grid flex-1 auto-rows-min gap-6 px-4">
|
|
37
|
+
<div className="grid gap-3">
|
|
38
|
+
<Label htmlFor="sheet-demo-name">Name</Label>
|
|
39
|
+
<Input id="sheet-demo-name" defaultValue="Pedro Duarte" />
|
|
40
|
+
</div>
|
|
41
|
+
<div className="grid gap-3">
|
|
42
|
+
<Label htmlFor="sheet-demo-username">Username</Label>
|
|
43
|
+
<Input id="sheet-demo-username" defaultValue="@peduarte" />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<SheetFooter>
|
|
47
|
+
<Button type="submit">Save changes</Button>
|
|
48
|
+
<SheetClose asChild>
|
|
49
|
+
<Button variant="secondary">Close</Button>
|
|
50
|
+
</SheetClose>
|
|
51
|
+
</SheetFooter>
|
|
52
|
+
</SheetContent>
|
|
53
|
+
</Sheet>
|
|
54
|
+
),
|
|
55
|
+
} satisfies Story;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import { XIcon } from "lucide-react";
|
|
3
|
+
import type * as React from "react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "#shadcn/lib/utils";
|
|
6
|
+
|
|
7
|
+
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
8
|
+
return <SheetPrimitive.Root data-slot="sheet" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function SheetTrigger({
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
|
|
14
|
+
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function SheetClose({
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<typeof SheetPrimitive.Close>) {
|
|
20
|
+
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function SheetPortal({
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof SheetPrimitive.Portal>) {
|
|
26
|
+
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function SheetOverlay({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
|
|
33
|
+
return (
|
|
34
|
+
<SheetPrimitive.Overlay
|
|
35
|
+
data-slot="sheet-overlay"
|
|
36
|
+
className={cn(
|
|
37
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function SheetContent({
|
|
46
|
+
className,
|
|
47
|
+
children,
|
|
48
|
+
side = "right",
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
51
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
52
|
+
}) {
|
|
53
|
+
return (
|
|
54
|
+
<SheetPortal>
|
|
55
|
+
<SheetOverlay />
|
|
56
|
+
<SheetPrimitive.Content
|
|
57
|
+
data-slot="sheet-content"
|
|
58
|
+
className={cn(
|
|
59
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
60
|
+
side === "right" &&
|
|
61
|
+
"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
62
|
+
side === "left" &&
|
|
63
|
+
"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
64
|
+
side === "top" &&
|
|
65
|
+
"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
66
|
+
side === "bottom" &&
|
|
67
|
+
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
68
|
+
className,
|
|
69
|
+
)}
|
|
70
|
+
{...props}
|
|
71
|
+
>
|
|
72
|
+
{children}
|
|
73
|
+
<SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
|
|
74
|
+
<XIcon className="size-4" />
|
|
75
|
+
<span className="sr-only">Close</span>
|
|
76
|
+
</SheetPrimitive.Close>
|
|
77
|
+
</SheetPrimitive.Content>
|
|
78
|
+
</SheetPortal>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
83
|
+
return (
|
|
84
|
+
<div
|
|
85
|
+
data-slot="sheet-header"
|
|
86
|
+
className={cn("flex flex-col gap-1.5 p-4", className)}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
93
|
+
return (
|
|
94
|
+
<div
|
|
95
|
+
data-slot="sheet-footer"
|
|
96
|
+
className={cn("mt-auto flex flex-col gap-2 p-4", className)}
|
|
97
|
+
{...props}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function SheetTitle({
|
|
103
|
+
className,
|
|
104
|
+
...props
|
|
105
|
+
}: React.ComponentProps<typeof SheetPrimitive.Title>) {
|
|
106
|
+
return (
|
|
107
|
+
<SheetPrimitive.Title
|
|
108
|
+
data-slot="sheet-title"
|
|
109
|
+
className={cn("text-foreground font-semibold", className)}
|
|
110
|
+
{...props}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function SheetDescription({
|
|
116
|
+
className,
|
|
117
|
+
...props
|
|
118
|
+
}: React.ComponentProps<typeof SheetPrimitive.Description>) {
|
|
119
|
+
return (
|
|
120
|
+
<SheetPrimitive.Description
|
|
121
|
+
data-slot="sheet-description"
|
|
122
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
123
|
+
{...props}
|
|
124
|
+
/>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export {
|
|
129
|
+
Sheet,
|
|
130
|
+
SheetTrigger,
|
|
131
|
+
SheetClose,
|
|
132
|
+
SheetContent,
|
|
133
|
+
SheetHeader,
|
|
134
|
+
SheetFooter,
|
|
135
|
+
SheetTitle,
|
|
136
|
+
SheetDescription,
|
|
137
|
+
};
|