@hexclave/ui 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/LICENSE +7 -0
- package/dist/chunk-BE-pF4vm.js +34 -0
- package/dist/components/action-dialog.d.ts +33 -0
- package/dist/components/action-dialog.d.ts.map +1 -0
- package/dist/components/action-dialog.js +93 -0
- package/dist/components/action-dialog.js.map +1 -0
- package/dist/components/brand-icons.d.ts +78 -0
- package/dist/components/brand-icons.d.ts.map +1 -0
- package/dist/components/brand-icons.js +336 -0
- package/dist/components/brand-icons.js.map +1 -0
- package/dist/components/browser-frame/index.d.ts +21 -0
- package/dist/components/browser-frame/index.d.ts.map +1 -0
- package/dist/components/browser-frame/index.js +48 -0
- package/dist/components/browser-frame/index.js.map +1 -0
- package/dist/components/copy-button.d.ts +22 -0
- package/dist/components/copy-button.d.ts.map +1 -0
- package/dist/components/copy-button.js +42 -0
- package/dist/components/copy-button.js.map +1 -0
- package/dist/components/copy-field.d.ts +18 -0
- package/dist/components/copy-field.d.ts.map +1 -0
- package/dist/components/copy-field.js +42 -0
- package/dist/components/copy-field.js.map +1 -0
- package/dist/components/data-table/cells.d.ts +35 -0
- package/dist/components/data-table/cells.d.ts.map +1 -0
- package/dist/components/data-table/cells.js +114 -0
- package/dist/components/data-table/cells.js.map +1 -0
- package/dist/components/data-table/column-header.d.ts +16 -0
- package/dist/components/data-table/column-header.d.ts.map +1 -0
- package/dist/components/data-table/column-header.js +48 -0
- package/dist/components/data-table/column-header.js.map +1 -0
- package/dist/components/data-table/data-table.d.ts +59 -0
- package/dist/components/data-table/data-table.d.ts.map +1 -0
- package/dist/components/data-table/data-table.js +193 -0
- package/dist/components/data-table/data-table.js.map +1 -0
- package/dist/components/data-table/faceted-filter.d.ts +24 -0
- package/dist/components/data-table/faceted-filter.d.ts.map +1 -0
- package/dist/components/data-table/faceted-filter.js +88 -0
- package/dist/components/data-table/faceted-filter.js.map +1 -0
- package/dist/components/data-table/index.d.ts +10 -0
- package/dist/components/data-table/index.js +73 -0
- package/dist/components/data-table/pagination.d.ts +13 -0
- package/dist/components/data-table/pagination.d.ts.map +1 -0
- package/dist/components/data-table/pagination.js +78 -0
- package/dist/components/data-table/pagination.js.map +1 -0
- package/dist/components/data-table/toolbar-items.d.ts +13 -0
- package/dist/components/data-table/toolbar-items.d.ts.map +1 -0
- package/dist/components/data-table/toolbar-items.js +18 -0
- package/dist/components/data-table/toolbar-items.js.map +1 -0
- package/dist/components/data-table/toolbar.d.ts +23 -0
- package/dist/components/data-table/toolbar.d.ts.map +1 -0
- package/dist/components/data-table/toolbar.js +71 -0
- package/dist/components/data-table/toolbar.js.map +1 -0
- package/dist/components/data-table/utils.d.ts +6 -0
- package/dist/components/data-table/utils.d.ts.map +1 -0
- package/dist/components/data-table/utils.js +14 -0
- package/dist/components/data-table/utils.js.map +1 -0
- package/dist/components/data-table/view-options.d.ts +19 -0
- package/dist/components/data-table/view-options.d.ts.map +1 -0
- package/dist/components/data-table/view-options.js +39 -0
- package/dist/components/data-table/view-options.js.map +1 -0
- package/dist/components/simple-tooltip.d.ts +14 -0
- package/dist/components/simple-tooltip.d.ts.map +1 -0
- package/dist/components/simple-tooltip.js +32 -0
- package/dist/components/simple-tooltip.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +17 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +48 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert.d.ts +19 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +43 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +8 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +16 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +37 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +17 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +32 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +41 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +75 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +32 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +71 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +18 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +52 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +27 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +58 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +10 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +28 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +10 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +17 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/command.d.ts +28 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +91 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +51 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +103 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +45 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +77 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +54 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +156 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/form.d.ts +42 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +107 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +12 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +29 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/inline-code.d.ts +9 -0
- package/dist/components/ui/inline-code.d.ts.map +1 -0
- package/dist/components/ui/inline-code.js +48 -0
- package/dist/components/ui/inline-code.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +20 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +53 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +24 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +57 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +15 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +32 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +38 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +118 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +29 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +79 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/password-input.d.ts +11 -0
- package/dist/components/ui/password-input.d.ts.map +1 -0
- package/dist/components/ui/password-input.js +46 -0
- package/dist/components/ui/password-input.js.map +1 -0
- package/dist/components/ui/popover.d.ts +13 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +31 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +10 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +27 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +13 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +39 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +36 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +13 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +40 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +33 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +91 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +10 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +25 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +44 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +82 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +12 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +24 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +10 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +27 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +11 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +27 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +14 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +54 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +30 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +71 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +17 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +39 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +21 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +32 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +74 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.d.ts +7 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +29 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +21 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +49 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +19 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +46 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +15 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +34 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/typography.d.ts +14 -0
- package/dist/components/ui/typography.d.ts.map +1 -0
- package/dist/components/ui/typography.js +50 -0
- package/dist/components/ui/typography.js.map +1 -0
- package/dist/components/ui/use-toast.d.ts +50 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +127 -0
- package/dist/components/ui/use-toast.js.map +1 -0
- package/dist/esm/components/action-dialog.d.ts +33 -0
- package/dist/esm/components/action-dialog.d.ts.map +1 -0
- package/dist/esm/components/action-dialog.js +90 -0
- package/dist/esm/components/action-dialog.js.map +1 -0
- package/dist/esm/components/brand-icons.d.ts +75 -0
- package/dist/esm/components/brand-icons.d.ts.map +1 -0
- package/dist/esm/components/brand-icons.js +320 -0
- package/dist/esm/components/brand-icons.js.map +1 -0
- package/dist/esm/components/browser-frame/index.d.ts +21 -0
- package/dist/esm/components/browser-frame/index.d.ts.map +1 -0
- package/dist/esm/components/browser-frame/index.js +45 -0
- package/dist/esm/components/browser-frame/index.js.map +1 -0
- package/dist/esm/components/copy-button.d.ts +22 -0
- package/dist/esm/components/copy-button.d.ts.map +1 -0
- package/dist/esm/components/copy-button.js +39 -0
- package/dist/esm/components/copy-button.js.map +1 -0
- package/dist/esm/components/copy-field.d.ts +18 -0
- package/dist/esm/components/copy-field.d.ts.map +1 -0
- package/dist/esm/components/copy-field.js +40 -0
- package/dist/esm/components/copy-field.js.map +1 -0
- package/dist/esm/components/data-table/cells.d.ts +35 -0
- package/dist/esm/components/data-table/cells.d.ts.map +1 -0
- package/dist/esm/components/data-table/cells.js +107 -0
- package/dist/esm/components/data-table/cells.js.map +1 -0
- package/dist/esm/components/data-table/column-header.d.ts +16 -0
- package/dist/esm/components/data-table/column-header.d.ts.map +1 -0
- package/dist/esm/components/data-table/column-header.js +46 -0
- package/dist/esm/components/data-table/column-header.js.map +1 -0
- package/dist/esm/components/data-table/data-table.d.ts +59 -0
- package/dist/esm/components/data-table/data-table.d.ts.map +1 -0
- package/dist/esm/components/data-table/data-table.js +188 -0
- package/dist/esm/components/data-table/data-table.js.map +1 -0
- package/dist/esm/components/data-table/faceted-filter.d.ts +24 -0
- package/dist/esm/components/data-table/faceted-filter.d.ts.map +1 -0
- package/dist/esm/components/data-table/faceted-filter.js +85 -0
- package/dist/esm/components/data-table/faceted-filter.js.map +1 -0
- package/dist/esm/components/data-table/index.d.ts +9 -0
- package/dist/esm/components/data-table/index.js +19 -0
- package/dist/esm/components/data-table/pagination.d.ts +13 -0
- package/dist/esm/components/data-table/pagination.d.ts.map +1 -0
- package/dist/esm/components/data-table/pagination.js +76 -0
- package/dist/esm/components/data-table/pagination.js.map +1 -0
- package/dist/esm/components/data-table/toolbar-items.d.ts +13 -0
- package/dist/esm/components/data-table/toolbar-items.d.ts.map +1 -0
- package/dist/esm/components/data-table/toolbar-items.js +16 -0
- package/dist/esm/components/data-table/toolbar-items.js.map +1 -0
- package/dist/esm/components/data-table/toolbar.d.ts +23 -0
- package/dist/esm/components/data-table/toolbar.d.ts.map +1 -0
- package/dist/esm/components/data-table/toolbar.js +69 -0
- package/dist/esm/components/data-table/toolbar.js.map +1 -0
- package/dist/esm/components/data-table/utils.d.ts +6 -0
- package/dist/esm/components/data-table/utils.d.ts.map +1 -0
- package/dist/esm/components/data-table/utils.js +11 -0
- package/dist/esm/components/data-table/utils.js.map +1 -0
- package/dist/esm/components/data-table/view-options.d.ts +19 -0
- package/dist/esm/components/data-table/view-options.d.ts.map +1 -0
- package/dist/esm/components/data-table/view-options.js +37 -0
- package/dist/esm/components/data-table/view-options.js.map +1 -0
- package/dist/esm/components/simple-tooltip.d.ts +14 -0
- package/dist/esm/components/simple-tooltip.d.ts.map +1 -0
- package/dist/esm/components/simple-tooltip.js +30 -0
- package/dist/esm/components/simple-tooltip.js.map +1 -0
- package/dist/esm/components/ui/accordion.d.ts +17 -0
- package/dist/esm/components/ui/accordion.d.ts.map +1 -0
- package/dist/esm/components/ui/accordion.js +41 -0
- package/dist/esm/components/ui/accordion.js.map +1 -0
- package/dist/esm/components/ui/alert.d.ts +19 -0
- package/dist/esm/components/ui/alert.d.ts.map +1 -0
- package/dist/esm/components/ui/alert.js +38 -0
- package/dist/esm/components/ui/alert.js.map +1 -0
- package/dist/esm/components/ui/aspect-ratio.d.ts +8 -0
- package/dist/esm/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/esm/components/ui/aspect-ratio.js +10 -0
- package/dist/esm/components/ui/aspect-ratio.js.map +1 -0
- package/dist/esm/components/ui/avatar.d.ts +16 -0
- package/dist/esm/components/ui/avatar.d.ts.map +1 -0
- package/dist/esm/components/ui/avatar.js +31 -0
- package/dist/esm/components/ui/avatar.js.map +1 -0
- package/dist/esm/components/ui/badge.d.ts +17 -0
- package/dist/esm/components/ui/badge.d.ts.map +1 -0
- package/dist/esm/components/ui/badge.js +28 -0
- package/dist/esm/components/ui/badge.js.map +1 -0
- package/dist/esm/components/ui/breadcrumb.d.ts +41 -0
- package/dist/esm/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/esm/components/ui/breadcrumb.js +66 -0
- package/dist/esm/components/ui/breadcrumb.js.map +1 -0
- package/dist/esm/components/ui/button.d.ts +32 -0
- package/dist/esm/components/ui/button.d.ts.map +1 -0
- package/dist/esm/components/ui/button.js +67 -0
- package/dist/esm/components/ui/button.js.map +1 -0
- package/dist/esm/components/ui/calendar.d.ts +18 -0
- package/dist/esm/components/ui/calendar.d.ts.map +1 -0
- package/dist/esm/components/ui/calendar.js +49 -0
- package/dist/esm/components/ui/calendar.js.map +1 -0
- package/dist/esm/components/ui/card.d.ts +27 -0
- package/dist/esm/components/ui/card.d.ts.map +1 -0
- package/dist/esm/components/ui/card.js +50 -0
- package/dist/esm/components/ui/card.js.map +1 -0
- package/dist/esm/components/ui/checkbox.d.ts +10 -0
- package/dist/esm/components/ui/checkbox.d.ts.map +1 -0
- package/dist/esm/components/ui/checkbox.js +24 -0
- package/dist/esm/components/ui/checkbox.js.map +1 -0
- package/dist/esm/components/ui/collapsible.d.ts +10 -0
- package/dist/esm/components/ui/collapsible.d.ts.map +1 -0
- package/dist/esm/components/ui/collapsible.js +12 -0
- package/dist/esm/components/ui/collapsible.js.map +1 -0
- package/dist/esm/components/ui/command.d.ts +28 -0
- package/dist/esm/components/ui/command.d.ts.map +1 -0
- package/dist/esm/components/ui/command.js +80 -0
- package/dist/esm/components/ui/command.js.map +1 -0
- package/dist/esm/components/ui/context-menu.d.ts +51 -0
- package/dist/esm/components/ui/context-menu.d.ts.map +1 -0
- package/dist/esm/components/ui/context-menu.js +85 -0
- package/dist/esm/components/ui/context-menu.js.map +1 -0
- package/dist/esm/components/ui/dialog.d.ts +45 -0
- package/dist/esm/components/ui/dialog.d.ts.map +1 -0
- package/dist/esm/components/ui/dialog.js +63 -0
- package/dist/esm/components/ui/dialog.js.map +1 -0
- package/dist/esm/components/ui/dropdown-menu.d.ts +54 -0
- package/dist/esm/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/esm/components/ui/dropdown-menu.js +138 -0
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -0
- package/dist/esm/components/ui/form.d.ts +42 -0
- package/dist/esm/components/ui/form.d.ts.map +1 -0
- package/dist/esm/components/ui/form.js +97 -0
- package/dist/esm/components/ui/form.js.map +1 -0
- package/dist/esm/components/ui/hover-card.d.ts +12 -0
- package/dist/esm/components/ui/hover-card.d.ts.map +1 -0
- package/dist/esm/components/ui/hover-card.js +23 -0
- package/dist/esm/components/ui/hover-card.js.map +1 -0
- package/dist/esm/components/ui/inline-code.d.ts +9 -0
- package/dist/esm/components/ui/inline-code.d.ts.map +1 -0
- package/dist/esm/components/ui/inline-code.js +45 -0
- package/dist/esm/components/ui/inline-code.js.map +1 -0
- package/dist/esm/components/ui/input-otp.d.ts +20 -0
- package/dist/esm/components/ui/input-otp.d.ts.map +1 -0
- package/dist/esm/components/ui/input-otp.js +47 -0
- package/dist/esm/components/ui/input-otp.js.map +1 -0
- package/dist/esm/components/ui/input.d.ts +24 -0
- package/dist/esm/components/ui/input.d.ts.map +1 -0
- package/dist/esm/components/ui/input.js +53 -0
- package/dist/esm/components/ui/input.js.map +1 -0
- package/dist/esm/components/ui/label.d.ts +15 -0
- package/dist/esm/components/ui/label.d.ts.map +1 -0
- package/dist/esm/components/ui/label.js +27 -0
- package/dist/esm/components/ui/label.js.map +1 -0
- package/dist/esm/components/ui/menubar.d.ts +38 -0
- package/dist/esm/components/ui/menubar.d.ts.map +1 -0
- package/dist/esm/components/ui/menubar.js +99 -0
- package/dist/esm/components/ui/menubar.js.map +1 -0
- package/dist/esm/components/ui/navigation-menu.d.ts +29 -0
- package/dist/esm/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/esm/components/ui/navigation-menu.js +67 -0
- package/dist/esm/components/ui/navigation-menu.js.map +1 -0
- package/dist/esm/components/ui/password-input.d.ts +11 -0
- package/dist/esm/components/ui/password-input.d.ts.map +1 -0
- package/dist/esm/components/ui/password-input.js +44 -0
- package/dist/esm/components/ui/password-input.js.map +1 -0
- package/dist/esm/components/ui/popover.d.ts +13 -0
- package/dist/esm/components/ui/popover.d.ts.map +1 -0
- package/dist/esm/components/ui/popover.js +24 -0
- package/dist/esm/components/ui/popover.js.map +1 -0
- package/dist/esm/components/ui/progress.d.ts +10 -0
- package/dist/esm/components/ui/progress.d.ts.map +1 -0
- package/dist/esm/components/ui/progress.js +23 -0
- package/dist/esm/components/ui/progress.js.map +1 -0
- package/dist/esm/components/ui/radio-group.d.ts +13 -0
- package/dist/esm/components/ui/radio-group.d.ts.map +1 -0
- package/dist/esm/components/ui/radio-group.js +34 -0
- package/dist/esm/components/ui/radio-group.js.map +1 -0
- package/dist/esm/components/ui/resizable.d.ts +36 -0
- package/dist/esm/components/ui/resizable.d.ts.map +1 -0
- package/dist/esm/components/ui/resizable.js +25 -0
- package/dist/esm/components/ui/resizable.js.map +1 -0
- package/dist/esm/components/ui/scroll-area.d.ts +13 -0
- package/dist/esm/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/esm/components/ui/scroll-area.js +35 -0
- package/dist/esm/components/ui/scroll-area.js.map +1 -0
- package/dist/esm/components/ui/select.d.ts +33 -0
- package/dist/esm/components/ui/select.d.ts.map +1 -0
- package/dist/esm/components/ui/select.js +78 -0
- package/dist/esm/components/ui/select.js.map +1 -0
- package/dist/esm/components/ui/separator.d.ts +10 -0
- package/dist/esm/components/ui/separator.d.ts.map +1 -0
- package/dist/esm/components/ui/separator.js +21 -0
- package/dist/esm/components/ui/separator.js.map +1 -0
- package/dist/esm/components/ui/sheet.d.ts +44 -0
- package/dist/esm/components/ui/sheet.d.ts.map +1 -0
- package/dist/esm/components/ui/sheet.js +69 -0
- package/dist/esm/components/ui/sheet.js.map +1 -0
- package/dist/esm/components/ui/skeleton.d.ts +12 -0
- package/dist/esm/components/ui/skeleton.d.ts.map +1 -0
- package/dist/esm/components/ui/skeleton.js +21 -0
- package/dist/esm/components/ui/skeleton.js.map +1 -0
- package/dist/esm/components/ui/slider.d.ts +10 -0
- package/dist/esm/components/ui/slider.d.ts.map +1 -0
- package/dist/esm/components/ui/slider.js +23 -0
- package/dist/esm/components/ui/slider.js.map +1 -0
- package/dist/esm/components/ui/spinner.d.ts +11 -0
- package/dist/esm/components/ui/spinner.d.ts.map +1 -0
- package/dist/esm/components/ui/spinner.js +24 -0
- package/dist/esm/components/ui/spinner.js.map +1 -0
- package/dist/esm/components/ui/switch.d.ts +14 -0
- package/dist/esm/components/ui/switch.d.ts.map +1 -0
- package/dist/esm/components/ui/switch.js +50 -0
- package/dist/esm/components/ui/switch.js.map +1 -0
- package/dist/esm/components/ui/table.d.ts +30 -0
- package/dist/esm/components/ui/table.d.ts.map +1 -0
- package/dist/esm/components/ui/table.js +61 -0
- package/dist/esm/components/ui/table.js.map +1 -0
- package/dist/esm/components/ui/tabs.d.ts +17 -0
- package/dist/esm/components/ui/tabs.d.ts.map +1 -0
- package/dist/esm/components/ui/tabs.js +32 -0
- package/dist/esm/components/ui/tabs.js.map +1 -0
- package/dist/esm/components/ui/textarea.d.ts +10 -0
- package/dist/esm/components/ui/textarea.d.ts.map +1 -0
- package/dist/esm/components/ui/textarea.js +18 -0
- package/dist/esm/components/ui/textarea.js.map +1 -0
- package/dist/esm/components/ui/toast.d.ts +32 -0
- package/dist/esm/components/ui/toast.d.ts.map +1 -0
- package/dist/esm/components/ui/toast.js +64 -0
- package/dist/esm/components/ui/toast.js.map +1 -0
- package/dist/esm/components/ui/toaster.d.ts +7 -0
- package/dist/esm/components/ui/toaster.d.ts.map +1 -0
- package/dist/esm/components/ui/toaster.js +27 -0
- package/dist/esm/components/ui/toaster.js.map +1 -0
- package/dist/esm/components/ui/toggle-group.d.ts +21 -0
- package/dist/esm/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/esm/components/ui/toggle-group.js +44 -0
- package/dist/esm/components/ui/toggle-group.js.map +1 -0
- package/dist/esm/components/ui/toggle.d.ts +19 -0
- package/dist/esm/components/ui/toggle.d.ts.map +1 -0
- package/dist/esm/components/ui/toggle.js +41 -0
- package/dist/esm/components/ui/toggle.js.map +1 -0
- package/dist/esm/components/ui/tooltip.d.ts +15 -0
- package/dist/esm/components/ui/tooltip.d.ts.map +1 -0
- package/dist/esm/components/ui/tooltip.js +27 -0
- package/dist/esm/components/ui/tooltip.js.map +1 -0
- package/dist/esm/components/ui/typography.d.ts +14 -0
- package/dist/esm/components/ui/typography.d.ts.map +1 -0
- package/dist/esm/components/ui/typography.js +47 -0
- package/dist/esm/components/ui/typography.js.map +1 -0
- package/dist/esm/components/ui/use-toast.d.ts +50 -0
- package/dist/esm/components/ui/use-toast.d.ts.map +1 -0
- package/dist/esm/components/ui/use-toast.js +122 -0
- package/dist/esm/components/ui/use-toast.js.map +1 -0
- package/dist/esm/index.d.ts +54 -0
- package/dist/esm/index.js +106 -0
- package/dist/esm/lib/utils.d.ts +7 -0
- package/dist/esm/lib/utils.d.ts.map +1 -0
- package/dist/esm/lib/utils.js +11 -0
- package/dist/esm/lib/utils.js.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +425 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +13 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +101 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRefIfNeeded } from "@hexclave/shared/dist/utils/react";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
|
|
8
|
+
import { useAsyncCallback } from "@hexclave/shared/dist/hooks/use-async-callback";
|
|
9
|
+
import { Spinner } from "./spinner.js";
|
|
10
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
11
|
+
|
|
12
|
+
//#region src/components/ui/switch.tsx
|
|
13
|
+
const OriginalSwitch = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SwitchPrimitives.Root, {
|
|
14
|
+
className: cn("stack-scope peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className),
|
|
15
|
+
...props,
|
|
16
|
+
ref,
|
|
17
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0") })
|
|
18
|
+
}));
|
|
19
|
+
OriginalSwitch.displayName = SwitchPrimitives.Root.displayName;
|
|
20
|
+
const Switch = forwardRefIfNeeded(({ loading: loadingProp, onClick, onCheckedChange, ...props }, ref) => {
|
|
21
|
+
const [handleClick, isLoadingClick] = useAsyncCallback(async (e) => {
|
|
22
|
+
await onClick?.(e);
|
|
23
|
+
}, [onClick]);
|
|
24
|
+
const [handleCheckedChange, isLoadingCheckedChange] = useAsyncCallback(async (checked) => {
|
|
25
|
+
await onCheckedChange?.(checked);
|
|
26
|
+
}, [onCheckedChange]);
|
|
27
|
+
const loading = loadingProp || isLoadingClick || isLoadingCheckedChange;
|
|
28
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
29
|
+
className: "relative leading-[0]",
|
|
30
|
+
children: [/* @__PURE__ */ jsx(OriginalSwitch, {
|
|
31
|
+
...props,
|
|
32
|
+
ref,
|
|
33
|
+
onClick: (e) => runAsynchronouslyWithAlert(handleClick(e)),
|
|
34
|
+
onCheckedChange: (checked) => runAsynchronouslyWithAlert(handleCheckedChange(checked)),
|
|
35
|
+
disabled: props.disabled || loading,
|
|
36
|
+
style: {
|
|
37
|
+
visibility: loading ? "hidden" : "visible",
|
|
38
|
+
...props.style
|
|
39
|
+
}
|
|
40
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: cn("absolute inset-0 flex items-center justify-center", !loading && "hidden"),
|
|
42
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
Switch.displayName = "Switch";
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { Switch };
|
|
50
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","names":[],"sources":["../../../../src/components/ui/switch.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\n\nimport { cn } from \"../../lib/utils\";\nimport { runAsynchronouslyWithAlert } from \"@stackframe/stack-shared/dist/utils/promises\";\nimport { useAsyncCallback } from \"@stackframe/stack-shared/dist/hooks/use-async-callback\";\nimport { Spinner } from \"./spinner\";\n\ntype OriginalSwitchProps = {} & React.ComponentProps<typeof SwitchPrimitives.Root>\n\nconst OriginalSwitch = forwardRefIfNeeded<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n OriginalSwitchProps\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"stack-scope peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitives.Root>\n));\nOriginalSwitch.displayName = SwitchPrimitives.Root.displayName;\ntype AsyncSwitchProps = {\n onCheckedChange?: (checked: boolean) => Promise<void> | void,\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void,\n loading?: boolean,\n} & OriginalSwitchProps\n\nconst Switch = forwardRefIfNeeded<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n AsyncSwitchProps\n>(({ loading: loadingProp, onClick, onCheckedChange, ...props }, ref) => {\n const [handleClick, isLoadingClick] = useAsyncCallback(async (e: React.MouseEvent<HTMLButtonElement>) => {\n await onClick?.(e);\n }, [onClick]);\n\n const [handleCheckedChange, isLoadingCheckedChange] = useAsyncCallback(async (checked: boolean) => {\n await onCheckedChange?.(checked);\n }, [onCheckedChange]);\n\n const loading = loadingProp || isLoadingClick || isLoadingCheckedChange;\n\n return (\n <span className=\"relative leading-[0]\">\n <OriginalSwitch\n {...props}\n ref={ref}\n onClick={(e) => runAsynchronouslyWithAlert(handleClick(e))}\n onCheckedChange={(checked) => runAsynchronouslyWithAlert(handleCheckedChange(checked))}\n disabled={props.disabled || loading}\n style={{\n visibility: loading ? \"hidden\" : \"visible\",\n ...props.style,\n }}\n />\n <span className={cn(\"absolute inset-0 flex items-center justify-center\", !loading && \"hidden\")}>\n <Spinner />\n </span>\n </span>\n );\n});\nSwitch.displayName = \"Switch\";\n\nexport { Switch };\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,iBAAiB,oBAGpB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,iBAAiB;CAChB,WAAW,GACT,2YACA,UACD;CACD,GAAI;CACC;WAEL,oBAAC,iBAAiB,SAChB,WAAW,GACT,6KACD,GACD;EACoB,CACxB;AACF,eAAe,cAAc,iBAAiB,KAAK;AAOnD,MAAM,SAAS,oBAGZ,EAAE,SAAS,aAAa,SAAS,iBAAiB,GAAG,SAAS,QAAQ;CACvE,MAAM,CAAC,aAAa,kBAAkB,iBAAiB,OAAO,MAA2C;AACvG,QAAM,UAAU,EAAE;IACjB,CAAC,QAAQ,CAAC;CAEb,MAAM,CAAC,qBAAqB,0BAA0B,iBAAiB,OAAO,YAAqB;AACjG,QAAM,kBAAkB,QAAQ;IAC/B,CAAC,gBAAgB,CAAC;CAErB,MAAM,UAAU,eAAe,kBAAkB;AAEjD,QACE,qBAAC;EAAK,WAAU;aACd,oBAAC;GACC,GAAI;GACC;GACL,UAAU,MAAM,2BAA2B,YAAY,EAAE,CAAC;GAC1D,kBAAkB,YAAY,2BAA2B,oBAAoB,QAAQ,CAAC;GACtF,UAAU,MAAM,YAAY;GAC5B,OAAO;IACL,YAAY,UAAU,WAAW;IACjC,GAAG,MAAM;IACV;IACD,EACF,oBAAC;GAAK,WAAW,GAAG,qDAAqD,CAAC,WAAW,SAAS;aAC5F,oBAAC,YAAU;IACN;GACF;EAET;AACF,OAAO,cAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/ui/table.d.ts
|
|
4
|
+
declare const Table: React.FC<React.HTMLAttributes<HTMLTableElement> & {
|
|
5
|
+
ref?: React.Ref<HTMLTableElement> | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
declare const TableHeader: React.FC<React.HTMLAttributes<HTMLTableSectionElement> & {
|
|
8
|
+
ref?: React.Ref<HTMLTableSectionElement> | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
declare const TableBody: React.FC<React.HTMLAttributes<HTMLTableSectionElement> & {
|
|
11
|
+
ref?: React.Ref<HTMLTableSectionElement> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
declare const TableFooter: React.FC<React.HTMLAttributes<HTMLTableSectionElement> & {
|
|
14
|
+
ref?: React.Ref<HTMLTableSectionElement> | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
declare const TableRow: React.FC<React.HTMLAttributes<HTMLTableRowElement> & {
|
|
17
|
+
ref?: React.Ref<HTMLTableRowElement> | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
declare const TableHead: React.FC<React.ThHTMLAttributes<HTMLTableCellElement> & {
|
|
20
|
+
ref?: React.Ref<HTMLTableCellElement> | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
declare const TableCell: React.FC<React.TdHTMLAttributes<HTMLTableCellElement> & {
|
|
23
|
+
ref?: React.Ref<HTMLTableCellElement> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
declare const TableCaption: React.FC<React.HTMLAttributes<HTMLTableCaptionElement> & {
|
|
26
|
+
ref?: React.Ref<HTMLTableCaptionElement> | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
30
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../../src/components/ui/table.tsx"],"mappings":";;;cAKM,KAAA,EAAK,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,cAAA,CAAA,gBAAA;;;cAcL,WAAA,EAAW,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,cAAA,CAAA,uBAAA;;;cAQX,SAAA,EAAS,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,cAAA,CAAA,uBAAA;;;cAYT,WAAA,EAAW,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,cAAA,CAAA,uBAAA;;;cAeX,QAAA,EAAQ,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,cAAA,CAAA,mBAAA;;;cAgBR,SAAA,EAAS,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,gBAAA,CAAA,oBAAA;;;cAeT,SAAA,EAAS,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,gBAAA,CAAA,oBAAA;;;cAeT,YAAA,EAAY,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,cAAA,CAAA,uBAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRefIfNeeded } from "@hexclave/shared/dist/utils/react";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/table.tsx
|
|
7
|
+
const Table = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
8
|
+
className: "relative w-full overflow-auto",
|
|
9
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
10
|
+
ref,
|
|
11
|
+
className: cn("stack-scope w-full caption-bottom text-sm", className),
|
|
12
|
+
...props
|
|
13
|
+
})
|
|
14
|
+
}));
|
|
15
|
+
Table.displayName = "Table";
|
|
16
|
+
const TableHeader = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", {
|
|
17
|
+
ref,
|
|
18
|
+
className: cn("[&_tr]:border-b", className),
|
|
19
|
+
...props
|
|
20
|
+
}));
|
|
21
|
+
TableHeader.displayName = "TableHeader";
|
|
22
|
+
const TableBody = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", {
|
|
23
|
+
ref,
|
|
24
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
25
|
+
...props
|
|
26
|
+
}));
|
|
27
|
+
TableBody.displayName = "TableBody";
|
|
28
|
+
const TableFooter = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", {
|
|
29
|
+
ref,
|
|
30
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
31
|
+
...props
|
|
32
|
+
}));
|
|
33
|
+
TableFooter.displayName = "TableFooter";
|
|
34
|
+
const TableRow = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", {
|
|
35
|
+
ref,
|
|
36
|
+
className: cn("border-b data-[state=selected]:bg-muted", props.onClick ? "hover:bg-muted/50 cursor-pointer" : "", className),
|
|
37
|
+
...props
|
|
38
|
+
}));
|
|
39
|
+
TableRow.displayName = "TableRow";
|
|
40
|
+
const TableHead = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", {
|
|
41
|
+
ref,
|
|
42
|
+
className: cn("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
43
|
+
...props
|
|
44
|
+
}));
|
|
45
|
+
TableHead.displayName = "TableHead";
|
|
46
|
+
const TableCell = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", {
|
|
47
|
+
ref,
|
|
48
|
+
className: cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
49
|
+
...props
|
|
50
|
+
}));
|
|
51
|
+
TableCell.displayName = "TableCell";
|
|
52
|
+
const TableCaption = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", {
|
|
53
|
+
ref,
|
|
54
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
55
|
+
...props
|
|
56
|
+
}));
|
|
57
|
+
TableCaption.displayName = "TableCaption";
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
61
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","names":[],"sources":["../../../../src/components/ui/table.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Table = forwardRefIfNeeded<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\"stack-scope w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = forwardRefIfNeeded<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = forwardRefIfNeeded<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n));\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = forwardRefIfNeeded<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = forwardRefIfNeeded<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n \"border-b data-[state=selected]:bg-muted\",\n props.onClick ? \"hover:bg-muted/50 cursor-pointer\" : \"\",\n className\n )}\n {...props}\n />\n));\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = forwardRefIfNeeded<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n));\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = forwardRefIfNeeded<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n \"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n));\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = forwardRefIfNeeded<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n Table, TableBody, TableCaption, TableCell, TableFooter,\n TableHead, TableHeader, TableRow\n};\n\n"],"mappings":";;;;;;AAKA,MAAM,QAAQ,oBAGX,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAI,WAAU;WACb,oBAAC;EACM;EACL,WAAW,GAAG,6CAA6C,UAAU;EACrE,GAAI;GACJ;EACE,CACN;AACF,MAAM,cAAc;AAEpB,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAW;CAAK,WAAW,GAAG,mBAAmB,UAAU;CAAE,GAAI;EAAS,CAC3E;AACF,YAAY,cAAc;AAE1B,MAAM,YAAY,oBAGf,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GAAG,8BAA8B,UAAU;CACtD,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,2DACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc;AAE1B,MAAM,WAAW,oBAGd,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,2CACA,MAAM,UAAU,qCAAqC,IACrD,UACD;CACD,GAAI;EACJ,CACF;AACF,SAAS,cAAc;AAEvB,MAAM,YAAY,oBAGf,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,0IACA,UACD;CACD,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,YAAY,oBAGf,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GACT,wFACA,UACD;CACD,GAAI;EACJ,CACF;AACF,UAAU,cAAc;AAExB,MAAM,eAAe,oBAGlB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CACM;CACL,WAAW,GAAG,sCAAsC,UAAU;CAC9D,GAAI;EACJ,CACF;AACF,aAAa,cAAc"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ui/tabs.d.ts
|
|
5
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const TabsList: React.FC<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
declare const TabsTrigger: React.FC<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
10
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
declare const TabsContent: React.FC<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
17
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","names":[],"sources":["../../../../src/components/ui/tabs.tsx"],"mappings":";;;;cAQM,IAAA,EAAI,KAAA,CAAA,yBAAA,CAAA,aAAA,CAAA,SAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAEJ,QAAA,EAAQ,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAA,aAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;;;cAeR,WAAA,EAAW,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAA,gBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA;;;cAeX,WAAA,EAAW,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,aAAA,CAAA,gBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRefIfNeeded } from "@hexclave/shared/dist/utils/react";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
8
|
+
|
|
9
|
+
//#region src/components/ui/tabs.tsx
|
|
10
|
+
const Tabs = TabsPrimitive.Root;
|
|
11
|
+
const TabsList = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
12
|
+
ref,
|
|
13
|
+
className: cn("stack-scope inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", className),
|
|
14
|
+
...props
|
|
15
|
+
}));
|
|
16
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
17
|
+
const TabsTrigger = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
|
|
18
|
+
ref,
|
|
19
|
+
className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className),
|
|
20
|
+
...props
|
|
21
|
+
}));
|
|
22
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
23
|
+
const TabsContent = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, {
|
|
24
|
+
ref,
|
|
25
|
+
className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className),
|
|
26
|
+
...props
|
|
27
|
+
}));
|
|
28
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
32
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","names":[],"sources":["../../../../src/components/ui/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = forwardRefIfNeeded<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"stack-scope inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground\",\n className\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = forwardRefIfNeeded<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = forwardRefIfNeeded<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":";;;;;;;;;AAQA,MAAM,OAAO,cAAc;AAE3B,MAAM,WAAW,oBAGd,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,cAAc;CACR;CACL,WAAW,GACT,yGACA,UACD;CACD,GAAI;EACJ,CACF;AACF,SAAS,cAAc,cAAc,KAAK;AAE1C,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,cAAc;CACR;CACL,WAAW,GACT,qYACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,cAAc,QAAQ;AAEhD,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,cAAc;CACR;CACL,WAAW,GACT,mIACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,cAAc,QAAQ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/ui/textarea.d.ts
|
|
4
|
+
type TextareaProps = {} & React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
5
|
+
declare const Textarea: React.FC<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
6
|
+
ref?: React.Ref<HTMLTextAreaElement> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Textarea, TextareaProps };
|
|
10
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","names":[],"sources":["../../../../src/components/ui/textarea.tsx"],"mappings":";;;KAKY,aAAA,QAAqB,KAAA,CAAM,sBAAA,CAAuB,mBAAA;AAAA,cAExD,QAAA,EAAQ,KAAA,CAAA,EAAA,CAAA,KAAA,CAAA,sBAAA,CAAA,mBAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRefIfNeeded } from "@hexclave/shared/dist/utils/react";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/textarea.tsx
|
|
7
|
+
const Textarea = forwardRefIfNeeded(({ className, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
9
|
+
className: cn("stack-scope flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
Textarea.displayName = "Textarea";
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Textarea };
|
|
18
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","names":[],"sources":["../../../../src/components/ui/textarea.tsx"],"sourcesContent":["import { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nexport type TextareaProps = {} & React.TextareaHTMLAttributes<HTMLTextAreaElement>\n\nconst Textarea = forwardRefIfNeeded<HTMLTextAreaElement, TextareaProps>(\n ({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"stack-scope flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n"],"mappings":";;;;;;AAOA,MAAM,WAAW,oBACd,EAAE,WAAW,GAAG,SAAS,QAAQ;AAChC,QACE,oBAAC;EACC,WAAW,GACT,4QACA,UACD;EACI;EACL,GAAI;GACJ;EAGP;AACD,SAAS,cAAc"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/toast.d.ts
|
|
7
|
+
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
8
|
+
declare const ToastViewport: React.FC<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & {
|
|
9
|
+
ref?: React.Ref<HTMLOListElement> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
declare const Toast: React.FC<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
12
|
+
variant?: "default" | "destructive" | "success" | null | undefined;
|
|
13
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string> & {
|
|
14
|
+
ref?: React.Ref<HTMLLIElement> | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
declare const ToastAction: React.FC<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
17
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
declare const ToastClose: React.FC<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
20
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
declare const ToastTitle: React.FC<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
23
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
declare const ToastDescription: React.FC<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
26
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
29
|
+
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport };
|
|
32
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","names":[],"sources":["../../../../src/components/ui/toast.tsx"],"mappings":";;;;;;cAUM,aAAA,EAAa,KAAA,CAAA,EAAA,CAAA,eAAA,CAAA,kBAAA;AAAA,cAEb,aAAA,EAAa,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAA,kBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,gBAAA;;;cAkCb,KAAA,EAAK,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAA,UAAA,GAAA,KAAA,CAAA,aAAA,CAAA,aAAA,YAAA,YAAA,EAAA,KAAA;;IAAA,+BAAA,CAAA,SAAA;;;cAeL,WAAA,EAAW,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAA,gBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA;;;cAeX,UAAA,EAAU,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAA,eAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA;;;cAoBV,UAAA,EAAU,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAA,eAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;;;cAYV,gBAAA,EAAgB,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAA,qBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA;;;KAYjB,UAAA,GAAa,KAAA,CAAM,wBAAA,QAAgC,KAAA;AAAA,KAEnD,kBAAA,GAAqB,KAAA,CAAM,YAAA,QAAoB,WAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRefIfNeeded } from "@hexclave/shared/dist/utils/react";
|
|
6
|
+
import { Cross2Icon } from "@radix-ui/react-icons";
|
|
7
|
+
import { cn } from "../../lib/utils.js";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
10
|
+
|
|
11
|
+
//#region src/components/ui/toast.tsx
|
|
12
|
+
const ToastProvider = ToastPrimitives.Provider;
|
|
13
|
+
const ToastViewport = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Viewport, {
|
|
14
|
+
ref,
|
|
15
|
+
className: cn("stack-scope fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className),
|
|
16
|
+
...props
|
|
17
|
+
}));
|
|
18
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
19
|
+
const toastVariants = cva("stack-scope group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
|
|
20
|
+
variants: { variant: {
|
|
21
|
+
default: "border border-border bg-background text-foreground shadow-lg dark:border-gray-600 dark:bg-gray-800 dark:text-foreground",
|
|
22
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
|
|
23
|
+
success: "success group border-success bg-success text-success-foreground"
|
|
24
|
+
} },
|
|
25
|
+
defaultVariants: { variant: "default" }
|
|
26
|
+
});
|
|
27
|
+
const Toast = forwardRefIfNeeded(({ className, variant, ...props }, ref) => {
|
|
28
|
+
return /* @__PURE__ */ jsx(ToastPrimitives.Root, {
|
|
29
|
+
ref,
|
|
30
|
+
className: cn(toastVariants({ variant }), className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
35
|
+
const ToastAction = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Action, {
|
|
36
|
+
ref,
|
|
37
|
+
className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className),
|
|
38
|
+
...props
|
|
39
|
+
}));
|
|
40
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
41
|
+
const ToastClose = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Close, {
|
|
42
|
+
ref,
|
|
43
|
+
className: cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100", "group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", "group-[.success]:text-green-300 group-[.success]:hover:text-green-50 group-[.success]:focus:ring-green-400 group-[.success]:focus:ring-offset-green-600", className),
|
|
44
|
+
"toast-close": "",
|
|
45
|
+
...props,
|
|
46
|
+
children: /* @__PURE__ */ jsx(Cross2Icon, { className: "h-4 w-4" })
|
|
47
|
+
}));
|
|
48
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
49
|
+
const ToastTitle = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, {
|
|
50
|
+
ref,
|
|
51
|
+
className: cn("text-sm font-semibold [&+div]:text-xs", className),
|
|
52
|
+
...props
|
|
53
|
+
}));
|
|
54
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
55
|
+
const ToastDescription = forwardRefIfNeeded(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Description, {
|
|
56
|
+
ref,
|
|
57
|
+
className: cn("text-sm opacity-90", className),
|
|
58
|
+
...props
|
|
59
|
+
}));
|
|
60
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport };
|
|
64
|
+
//# sourceMappingURL=toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.js","names":[],"sources":["../../../../src/components/ui/toast.tsx"],"sourcesContent":["'use client';\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport { Cross2Icon } from \"@radix-ui/react-icons\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"stack-scope fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"stack-scope group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default:\n \"border border-border bg-background text-foreground shadow-lg dark:border-gray-600 dark:bg-gray-800 dark:text-foreground\",\n destructive:\n 'destructive group border-destructive bg-destructive text-destructive-foreground',\n success:\n 'success group border-success bg-success text-success-foreground',\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Toast = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\n\nconst ToastAction = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\nconst ToastClose = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n 'absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100',\n 'group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',\n 'group-[.success]:text-green-300 group-[.success]:hover:text-green-50 group-[.success]:focus:ring-green-400 group-[.success]:focus:ring-offset-green-600',\n className\n )}\n toast-close=''\n {...props}\n >\n <Cross2Icon className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\nconst ToastTitle = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold [&+div]:text-xs\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\nconst ToastDescription = forwardRefIfNeeded<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n"],"mappings":";;;;;;;;;;;AAUA,MAAM,gBAAgB,gBAAgB;AAEtC,MAAM,gBAAgB,oBAGnB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,iJACA,UACD;CACD,GAAI;EACJ,CACF;AACF,cAAc,cAAc,gBAAgB,SAAS;AAErD,MAAM,gBAAgB,IACpB,ymBACA;CACE,UAAU,EACR,SAAS;EACP,SACE;EACF,aACE;EACF,SACE;EACH,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAED,MAAM,QAAQ,oBAIX,EAAE,WAAW,SAAS,GAAG,SAAS,QAAQ;AAC3C,QACE,oBAAC,gBAAgB;EACV;EACL,WAAW,GAAG,cAAc,EAAE,SAAS,CAAC,EAAE,UAAU;EACpD,GAAI;GACJ;EAEJ;AACF,MAAM,cAAc,gBAAgB,KAAK;AAEzC,MAAM,cAAc,oBAGjB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,2dACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,gBAAgB,OAAO;AAEjD,MAAM,aAAa,oBAGhB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,yLACA,mKACA,2JACA,UACD;CACD,eAAY;CACZ,GAAI;WAEJ,oBAAC,cAAW,WAAU,YAAY;EACZ,CACxB;AACF,WAAW,cAAc,gBAAgB,MAAM;AAE/C,MAAM,aAAa,oBAGhB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,yCAAyC,UAAU;CACjE,GAAI;EACJ,CACF;AACF,WAAW,cAAc,gBAAgB,MAAM;AAE/C,MAAM,mBAAmB,oBAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,sBAAsB,UAAU;CAC9C,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,gBAAgB,YAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster.d.ts","names":[],"sources":["../../../../src/components/ui/toaster.tsx"],"mappings":";;;iBAYgB,OAAA,CAAA,GAAO,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useToast } from "./use-toast.js";
|
|
5
|
+
import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from "./toast.js";
|
|
6
|
+
|
|
7
|
+
//#region src/components/ui/toaster.tsx
|
|
8
|
+
function Toaster() {
|
|
9
|
+
const { toasts } = useToast();
|
|
10
|
+
return /* @__PURE__ */ jsxs(ToastProvider, { children: [toasts.map(function({ id, title, description, action, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsxs(Toast, {
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsxs("div", {
|
|
15
|
+
className: "stack-scope grid gap-1",
|
|
16
|
+
children: [title && /* @__PURE__ */ jsx(ToastTitle, { children: title }), description && /* @__PURE__ */ jsx(ToastDescription, { children: description })]
|
|
17
|
+
}),
|
|
18
|
+
action,
|
|
19
|
+
/* @__PURE__ */ jsx(ToastClose, {})
|
|
20
|
+
]
|
|
21
|
+
}, id);
|
|
22
|
+
}), /* @__PURE__ */ jsx(ToastViewport, {})] });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Toaster };
|
|
27
|
+
//# sourceMappingURL=toaster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster.js","names":[],"sources":["../../../../src/components/ui/toaster.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"./toast\";\nimport { useToast } from \"./use-toast\";\n\nexport function Toaster() {\n const { toasts } = useToast();\n\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n <Toast key={id} {...props}>\n <div className=\"stack-scope grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n );\n })}\n <ToastViewport />\n </ToastProvider>\n );\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,UAAU;CACxB,MAAM,EAAE,WAAW,UAAU;AAE7B,QACE,qBAAC,4BACE,OAAO,IAAI,SAAU,EAAE,IAAI,OAAO,aAAa,QAAQ,GAAG,SAAS;AAClE,SACE,qBAAC;GAAe,GAAI;;IAClB,qBAAC;KAAI,WAAU;gBACZ,SAAS,oBAAC,wBAAY,QAAmB,EACzC,eACC,oBAAC,8BAAkB,cAA+B;MAEhD;IACL;IACD,oBAAC,eAAa;;KARJ,GASJ;GAEV,EACF,oBAAC,kBAAgB,IACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/toggle-group.d.ts
|
|
7
|
+
declare const ToggleGroup: React.FC<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
8
|
+
variant?: "default" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string>) & {
|
|
11
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
declare const ToggleGroupItem: React.FC<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
14
|
+
variant?: "default" | "outline" | null | undefined;
|
|
15
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string> & {
|
|
17
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
21
|
+
//# sourceMappingURL=toggle-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","names":[],"sources":["../../../../src/components/ui/toggle-group.tsx"],"mappings":";;;;;;cAiBM,WAAA,EAAW,KAAA,CAAA,EAAA,GAAA,IAAA,CAAA,oBAAA,CAAA,sBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA,YAAA,IAAA,CAAA,oBAAA,CAAA,wBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA,aAAA,YAAA,EAAA,KAAA;;;IAAA,+BAAA,CAAA,SAAA;;;cAkBX,eAAA,EAAe,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,oBAAA,CAAA,oBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA,YAAA,YAAA,EAAA,KAAA;;;IAAA,+BAAA,CAAA,SAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRefIfNeeded } from "@hexclave/shared/dist/utils/react";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
8
|
+
import { toggleVariants } from "./toggle.js";
|
|
9
|
+
|
|
10
|
+
//#region src/components/ui/toggle-group.tsx
|
|
11
|
+
const ToggleGroupContext = React.createContext({
|
|
12
|
+
size: "default",
|
|
13
|
+
variant: "default"
|
|
14
|
+
});
|
|
15
|
+
const ToggleGroup = forwardRefIfNeeded(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, {
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("flex items-center justify-center gap-1", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
20
|
+
value: {
|
|
21
|
+
variant,
|
|
22
|
+
size
|
|
23
|
+
},
|
|
24
|
+
children
|
|
25
|
+
})
|
|
26
|
+
}));
|
|
27
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
28
|
+
const ToggleGroupItem = forwardRefIfNeeded(({ className, children, variant, size, ...props }, ref) => {
|
|
29
|
+
const context = React.useContext(ToggleGroupContext);
|
|
30
|
+
return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, {
|
|
31
|
+
ref,
|
|
32
|
+
className: cn(toggleVariants({
|
|
33
|
+
variant: context.variant || variant,
|
|
34
|
+
size: context.size || size
|
|
35
|
+
}), className),
|
|
36
|
+
...props,
|
|
37
|
+
children
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
44
|
+
//# sourceMappingURL=toggle-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.js","names":[],"sources":["../../../../src/components/ui/toggle-group.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport { VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\nimport { toggleVariants } from \"./toggle\";\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants>\n>({\n size: \"default\",\n variant: \"default\",\n});\n\nconst ToggleGroup = forwardRefIfNeeded<\n React.ElementRef<typeof ToggleGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, children, ...props }, ref) => (\n <ToggleGroupPrimitive.Root\n ref={ref}\n className={cn(\"flex items-center justify-center gap-1\", className)}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = forwardRefIfNeeded<\n React.ElementRef<typeof ToggleGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &\n VariantProps<typeof toggleVariants>\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n <ToggleGroupPrimitive.Item\n ref={ref}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n className\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"mappings":";;;;;;;;;;AAUA,MAAM,qBAAqB,MAAM,cAE/B;CACA,MAAM;CACN,SAAS;CACV,CAAC;AAEF,MAAM,cAAc,oBAIjB,EAAE,WAAW,SAAS,MAAM,UAAU,GAAG,SAAS,QACnD,oBAAC,qBAAqB;CACf;CACL,WAAW,GAAG,0CAA0C,UAAU;CAClE,GAAI;WAEJ,oBAAC,mBAAmB;EAAS,OAAO;GAAE;GAAS;GAAM;EAClD;GAC2B;EACJ,CAC5B;AAEF,YAAY,cAAc,qBAAqB,KAAK;AAEpD,MAAM,kBAAkB,oBAIrB,EAAE,WAAW,UAAU,SAAS,MAAM,GAAG,SAAS,QAAQ;CAC3D,MAAM,UAAU,MAAM,WAAW,mBAAmB;AAEpD,QACE,oBAAC,qBAAqB;EACf;EACL,WAAW,GACT,eAAe;GACb,SAAS,QAAQ,WAAW;GAC5B,MAAM,QAAQ,QAAQ;GACvB,CAAC,EACF,UACD;EACD,GAAI;EAEH;GACyB;EAE9B;AAEF,gBAAgB,cAAc,qBAAqB,KAAK"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/toggle.d.ts
|
|
7
|
+
declare const toggleVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
|
+
declare const Toggle: React.FC<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
12
|
+
variant?: "default" | "outline" | null | undefined;
|
|
13
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string> & {
|
|
15
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Toggle, toggleVariants };
|
|
19
|
+
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","names":[],"sources":["../../../../src/components/ui/toggle.tsx"],"mappings":";;;;;;cASM,cAAA,GAAc,KAAA;;;IAoBnB,+BAAA,CAAA,SAAA;AAAA,cAEK,MAAA,EAAM,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,eAAA,CAAA,WAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA,YAAA,YAAA,EAAA,KAAA;;;IAAA,+BAAA,CAAA,SAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRefIfNeeded } from "@hexclave/shared/dist/utils/react";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
9
|
+
|
|
10
|
+
//#region src/components/ui/toggle.tsx
|
|
11
|
+
const toggleVariants = cva("stack-scope inline-flex items-center justify-center rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground", {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-transparent",
|
|
15
|
+
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "h-9 px-3",
|
|
19
|
+
sm: "h-8 px-2",
|
|
20
|
+
lg: "h-10 px-3"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: "default",
|
|
25
|
+
size: "default"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const Toggle = forwardRefIfNeeded(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(TogglePrimitive.Root, {
|
|
29
|
+
ref,
|
|
30
|
+
className: cn(toggleVariants({
|
|
31
|
+
variant,
|
|
32
|
+
size,
|
|
33
|
+
className
|
|
34
|
+
})),
|
|
35
|
+
...props
|
|
36
|
+
}));
|
|
37
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Toggle, toggleVariants };
|
|
41
|
+
//# sourceMappingURL=toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.js","names":[],"sources":["../../../../src/components/ui/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { forwardRefIfNeeded } from \"@stackframe/stack-shared/dist/utils/react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst toggleVariants = cva(\n \"stack-scope inline-flex items-center justify-center rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n },\n size: {\n default: \"h-9 px-3\",\n sm: \"h-8 px-2\",\n lg: \"h-10 px-3\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nconst Toggle = forwardRefIfNeeded<\n React.ElementRef<typeof TogglePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root\n ref={ref}\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n"],"mappings":";;;;;;;;;;AASA,MAAM,iBAAiB,IACrB,2TACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACH;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,MAAM,SAAS,oBAIZ,EAAE,WAAW,SAAS,MAAM,GAAG,SAAS,QACzC,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,eAAe;EAAE;EAAS;EAAM;EAAW,CAAC,CAAC;CAC3D,GAAI;EACJ,CACF;AAEF,OAAO,cAAc,gBAAgB,KAAK"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ui/tooltip.d.ts
|
|
5
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps & {
|
|
6
|
+
ref?: React.Ref<void> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
9
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const TooltipContent: React.FC<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
11
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
15
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../../../src/components/ui/tooltip.tsx"],"mappings":";;;;cAQM,eAAA,EAAe,KAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,oBAAA;;;cAWf,OAAA,EAAO,KAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,YAAA;AAAA,cAEP,cAAA,EAAc,KAAA,CAAA,yBAAA,CAAA,gBAAA,CAAA,mBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA;AAAA,cAEd,cAAA,EAAc,KAAA,CAAA,EAAA,CAAA,IAAA,CAAA,gBAAA,CAAA,mBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,cAAA"}
|