@automa8e/ui 0.2.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 +21 -0
- package/README.md +2 -0
- package/dist/_virtual/index.js +6 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/automa8e-ui.css +226 -0
- package/dist/components/automation/metric-card.d.ts +19 -0
- package/dist/components/automation/metric-card.d.ts.map +1 -0
- package/dist/components/automation/metric-card.js +59 -0
- package/dist/components/automation/metric-card.js.map +1 -0
- package/dist/components/automation/status-badge.d.ts +27 -0
- package/dist/components/automation/status-badge.d.ts.map +1 -0
- package/dist/components/automation/status-badge.js +112 -0
- package/dist/components/automation/status-badge.js.map +1 -0
- package/dist/components/automation/task-card.d.ts +14 -0
- package/dist/components/automation/task-card.d.ts.map +1 -0
- package/dist/components/automation/task-card.js +114 -0
- package/dist/components/automation/task-card.js.map +1 -0
- package/dist/components/automation/workflow-node.d.ts +20 -0
- package/dist/components/automation/workflow-node.d.ts.map +1 -0
- package/dist/components/automation/workflow-node.js +132 -0
- package/dist/components/automation/workflow-node.js.map +1 -0
- package/dist/components/layout/app-shell.d.ts +21 -0
- package/dist/components/layout/app-shell.d.ts.map +1 -0
- package/dist/components/layout/app-shell.js +35 -0
- package/dist/components/layout/app-shell.js.map +1 -0
- package/dist/components/layout/header.d.ts +16 -0
- package/dist/components/layout/header.d.ts.map +1 -0
- package/dist/components/layout/header.js +30 -0
- package/dist/components/layout/header.js.map +1 -0
- package/dist/components/layout/page-header.d.ts +16 -0
- package/dist/components/layout/page-header.d.ts.map +1 -0
- package/dist/components/layout/page-header.js +29 -0
- package/dist/components/layout/page-header.js.map +1 -0
- package/dist/components/layout/sidebar.d.ts +35 -0
- package/dist/components/layout/sidebar.d.ts.map +1 -0
- package/dist/components/layout/sidebar.js +103 -0
- package/dist/components/layout/sidebar.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +51 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert.d.ts +18 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +89 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +20 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +72 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +13 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +54 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.d.ts +15 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +96 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.d.ts +16 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +96 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +9 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +29 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +28 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +105 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +160 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +14 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +60 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +13 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +26 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +29 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +17 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +80 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +39 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +131 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +9 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +50 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +10 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +30 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +14 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +44 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +43 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +95 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +20 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +92 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +12 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +41 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +113 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +28 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/hooks/use-debounce.d.ts +15 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/hooks/use-debounce.js +15 -0
- package/dist/hooks/use-debounce.js.map +1 -0
- package/dist/hooks/use-local-storage.d.ts +9 -0
- package/dist/hooks/use-local-storage.d.ts.map +1 -0
- package/dist/hooks/use-local-storage.js +49 -0
- package/dist/hooks/use-local-storage.js.map +1 -0
- package/dist/hooks/use-media-query.d.ts +9 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +20 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/colors.d.ts +73 -0
- package/dist/lib/colors.d.ts.map +1 -0
- package/dist/lib/colors.js +64 -0
- package/dist/lib/colors.js.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +729 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +630 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +325 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +177 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +152 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +319 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +26 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +124 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +66 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +280 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +152 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +71 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +82 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +342 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +217 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +299 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +209 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +27 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +881 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +314 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +294 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +44 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +97 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +66 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +228 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +728 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +1200 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +31 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +107 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +156 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +195 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.js +645 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +501 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +72 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +123 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.js +46 -0
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +10 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ban.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ban.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-minus.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-minus.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/clock.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/clock.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-branch.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-branch.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pause.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pause.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/play.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/play.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/send.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/send.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tag.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tag.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +181 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +20 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +103 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +48 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +11 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +38 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +14 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +17 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +49 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2467 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +40 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +12 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +36 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +30 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +22 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +89 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +78 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +63 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +18 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/types/automation.d.ts +59 -0
- package/dist/types/automation.d.ts.map +1 -0
- package/dist/types/common.d.ts +38 -0
- package/dist/types/common.d.ts.map +1 -0
- package/package.json +119 -0
- package/registry/registry.json +218 -0
- package/src/components/automation/metric-card.tsx +113 -0
- package/src/components/automation/status-badge.tsx +136 -0
- package/src/components/automation/task-card.tsx +164 -0
- package/src/components/automation/workflow-node.tsx +186 -0
- package/src/components/layout/app-shell.tsx +58 -0
- package/src/components/layout/header.tsx +39 -0
- package/src/components/layout/page-header.tsx +42 -0
- package/src/components/layout/sidebar.tsx +190 -0
- package/src/components/ui/accordion.tsx +57 -0
- package/src/components/ui/alert.tsx +93 -0
- package/src/components/ui/avatar.tsx +94 -0
- package/src/components/ui/badge.tsx +69 -0
- package/src/components/ui/button.tsx +106 -0
- package/src/components/ui/card.tsx +96 -0
- package/src/components/ui/checkbox.tsx +40 -0
- package/src/components/ui/dialog.tsx +129 -0
- package/src/components/ui/dropdown-menu.tsx +194 -0
- package/src/components/ui/input.tsx +80 -0
- package/src/components/ui/label.tsx +37 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/progress.tsx +92 -0
- package/src/components/ui/scroll-area.tsx +43 -0
- package/src/components/ui/select.tsx +157 -0
- package/src/components/ui/separator.tsx +56 -0
- package/src/components/ui/skeleton.tsx +41 -0
- package/src/components/ui/spinner.tsx +50 -0
- package/src/components/ui/switch.tsx +46 -0
- package/src/components/ui/table.tsx +117 -0
- package/src/components/ui/tabs.tsx +107 -0
- package/src/components/ui/textarea.tsx +50 -0
- package/src/components/ui/toast.tsx +139 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/hooks/use-debounce.ts +28 -0
- package/src/hooks/use-local-storage.ts +63 -0
- package/src/hooks/use-media-query.ts +29 -0
- package/src/index.ts +197 -0
- package/src/lib/colors.ts +102 -0
- package/src/lib/utils.ts +10 -0
- package/src/styles/globals.css +230 -0
- package/src/types/automation.ts +74 -0
- package/src/types/common.ts +48 -0
- package/tailwind/preset.cjs +98 -0
- package/tailwind/preset.css +5 -0
- package/tailwind/preset.ts +159 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { Button } from "../ui/button.js";
|
|
5
|
+
import { Separator } from "../ui/separator.js";
|
|
6
|
+
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from "../ui/tooltip.js";
|
|
7
|
+
import ChevronRight from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
8
|
+
import ChevronLeft from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
9
|
+
function SidebarNavItemComponent({
|
|
10
|
+
item,
|
|
11
|
+
collapsed
|
|
12
|
+
}) {
|
|
13
|
+
const content = /* @__PURE__ */ jsxs(
|
|
14
|
+
"button",
|
|
15
|
+
{
|
|
16
|
+
onClick: item.onClick,
|
|
17
|
+
disabled: item.disabled,
|
|
18
|
+
className: cn(
|
|
19
|
+
"flex w-full items-center gap-3 rounded-md px-2.5 py-2 text-sm font-medium transition-colors duration-150",
|
|
20
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
21
|
+
item.active ? "bg-primary/15 text-primary border border-primary/20" : "text-muted-foreground hover:bg-muted hover:text-foreground border border-transparent",
|
|
22
|
+
item.disabled && "pointer-events-none opacity-50",
|
|
23
|
+
collapsed && "justify-center px-2"
|
|
24
|
+
),
|
|
25
|
+
children: [
|
|
26
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0 [&>svg]:h-4 [&>svg]:w-4", item.active && "text-primary"), children: item.icon }),
|
|
27
|
+
!collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left", children: item.label }),
|
|
29
|
+
item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: cn(
|
|
30
|
+
"ml-auto flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[10px] font-semibold",
|
|
31
|
+
item.active ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
|
|
32
|
+
), children: item.badge })
|
|
33
|
+
] })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
if (collapsed && item.label) {
|
|
38
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
39
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: content }),
|
|
40
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: item.label })
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
return content;
|
|
44
|
+
}
|
|
45
|
+
const Sidebar = React.forwardRef(
|
|
46
|
+
({
|
|
47
|
+
className,
|
|
48
|
+
sections = [],
|
|
49
|
+
collapsed = false,
|
|
50
|
+
onCollapsedChange,
|
|
51
|
+
collapsible = true,
|
|
52
|
+
width = "240px",
|
|
53
|
+
header,
|
|
54
|
+
footer,
|
|
55
|
+
...props
|
|
56
|
+
}, ref) => {
|
|
57
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
ref,
|
|
61
|
+
style: { width: collapsed ? "56px" : width },
|
|
62
|
+
className: cn(
|
|
63
|
+
"flex h-full flex-col border-r border-border bg-background transition-all duration-200",
|
|
64
|
+
className
|
|
65
|
+
),
|
|
66
|
+
...props,
|
|
67
|
+
children: [
|
|
68
|
+
header && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex items-center px-3 py-4", collapsed && "justify-center"), children: header }),
|
|
70
|
+
/* @__PURE__ */ jsx(Separator, {})
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto py-2 px-2 space-y-4", children: sections.map((section, idx) => /* @__PURE__ */ jsxs("div", { children: [
|
|
73
|
+
section.label && !collapsed && /* @__PURE__ */ jsx("p", { className: "mb-1 px-2.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: section.label }),
|
|
74
|
+
section.label && collapsed && idx > 0 && /* @__PURE__ */ jsx(Separator, { className: "my-2" }),
|
|
75
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: section.items.map((item) => /* @__PURE__ */ jsx(SidebarNavItemComponent, { item, collapsed }, item.id)) })
|
|
76
|
+
] }, section.id)) }),
|
|
77
|
+
footer && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
79
|
+
/* @__PURE__ */ jsx("div", { className: cn("p-3", collapsed && "flex justify-center"), children: footer })
|
|
80
|
+
] }),
|
|
81
|
+
collapsible && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
82
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
83
|
+
/* @__PURE__ */ jsx("div", { className: "p-2 flex justify-end", children: /* @__PURE__ */ jsx(
|
|
84
|
+
Button,
|
|
85
|
+
{
|
|
86
|
+
variant: "ghost",
|
|
87
|
+
size: "icon-sm",
|
|
88
|
+
onClick: () => onCollapsedChange == null ? void 0 : onCollapsedChange(!collapsed),
|
|
89
|
+
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
90
|
+
children: collapsed ? /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
91
|
+
}
|
|
92
|
+
) })
|
|
93
|
+
] })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
) });
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
Sidebar.displayName = "Sidebar";
|
|
100
|
+
export {
|
|
101
|
+
Sidebar
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=sidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.js","sources":["../../../src/components/layout/sidebar.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Button } from '@/components/ui/button'\nimport { Separator } from '@/components/ui/separator'\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'\n\nexport interface SidebarNavItem {\n id: string\n label: string\n icon?: React.ReactNode\n href?: string\n badge?: string | number\n active?: boolean\n disabled?: boolean\n onClick?: () => void\n children?: SidebarNavItem[]\n}\n\nexport interface SidebarSection {\n id: string\n label?: string\n items: SidebarNavItem[]\n}\n\nexport interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {\n sections?: SidebarSection[]\n /** Whether sidebar is collapsed to icon-only mode */\n collapsed?: boolean\n /** Called when collapse toggle is pressed */\n onCollapsedChange?: (collapsed: boolean) => void\n /** Show collapse toggle button */\n collapsible?: boolean\n /** Width when expanded */\n width?: string\n /** Slot for logo/brand area */\n header?: React.ReactNode\n /** Slot for footer content (user menu, etc.) */\n footer?: React.ReactNode\n}\n\nfunction SidebarNavItemComponent({\n item,\n collapsed,\n}: {\n item: SidebarNavItem\n collapsed: boolean\n}) {\n const content = (\n <button\n onClick={item.onClick}\n disabled={item.disabled}\n className={cn(\n 'flex w-full items-center gap-3 rounded-md px-2.5 py-2 text-sm font-medium transition-colors duration-150',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n item.active\n ? 'bg-primary/15 text-primary border border-primary/20'\n : 'text-muted-foreground hover:bg-muted hover:text-foreground border border-transparent',\n item.disabled && 'pointer-events-none opacity-50',\n collapsed && 'justify-center px-2'\n )}\n >\n {item.icon && (\n <span className={cn('shrink-0 [&>svg]:h-4 [&>svg]:w-4', item.active && 'text-primary')}>\n {item.icon}\n </span>\n )}\n {!collapsed && (\n <>\n <span className=\"flex-1 truncate text-left\">{item.label}</span>\n {item.badge !== undefined && (\n <span className={cn(\n 'ml-auto flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[10px] font-semibold',\n item.active ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground'\n )}>\n {item.badge}\n </span>\n )}\n </>\n )}\n </button>\n )\n\n if (collapsed && item.label) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>{content}</TooltipTrigger>\n <TooltipContent side=\"right\">{item.label}</TooltipContent>\n </Tooltip>\n )\n }\n\n return content\n}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>(\n (\n {\n className,\n sections = [],\n collapsed = false,\n onCollapsedChange,\n collapsible = true,\n width = '240px',\n header,\n footer,\n ...props\n },\n ref\n ) => {\n return (\n <TooltipProvider delayDuration={0}>\n <div\n ref={ref}\n style={{ width: collapsed ? '56px' : width }}\n className={cn(\n 'flex h-full flex-col border-r border-border bg-background transition-all duration-200',\n className\n )}\n {...props}\n >\n {/* Header slot */}\n {header && (\n <>\n <div className={cn('flex items-center px-3 py-4', collapsed && 'justify-center')}>\n {header}\n </div>\n <Separator />\n </>\n )}\n\n {/* Nav sections */}\n <div className=\"flex-1 overflow-y-auto py-2 px-2 space-y-4\">\n {sections.map((section, idx) => (\n <div key={section.id}>\n {section.label && !collapsed && (\n <p className=\"mb-1 px-2.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground\">\n {section.label}\n </p>\n )}\n {section.label && collapsed && idx > 0 && (\n <Separator className=\"my-2\" />\n )}\n <div className=\"space-y-0.5\">\n {section.items.map((item) => (\n <SidebarNavItemComponent key={item.id} item={item} collapsed={collapsed} />\n ))}\n </div>\n </div>\n ))}\n </div>\n\n {/* Footer slot */}\n {footer && (\n <>\n <Separator />\n <div className={cn('p-3', collapsed && 'flex justify-center')}>\n {footer}\n </div>\n </>\n )}\n\n {/* Collapse toggle */}\n {collapsible && (\n <>\n <Separator />\n <div className=\"p-2 flex justify-end\">\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n onClick={() => onCollapsedChange?.(!collapsed)}\n aria-label={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}\n >\n {collapsed ? (\n <ChevronRight className=\"h-4 w-4\" />\n ) : (\n <ChevronLeft className=\"h-4 w-4\" />\n )}\n </Button>\n </div>\n </>\n )}\n </div>\n </TooltipProvider>\n )\n }\n)\nSidebar.displayName = 'Sidebar'\n\nexport { Sidebar }\n"],"names":[],"mappings":";;;;;;;;AAyCA,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA;AACF,GAGG;AACD,QAAM,UACJ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAS,KAAK;AAAA,MACd,UAAU,KAAK;AAAA,MACf,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,KAAK,SACD,wDACA;AAAA,QACJ,KAAK,YAAY;AAAA,QACjB,aAAa;AAAA,MAAA;AAAA,MAGd,UAAA;AAAA,QAAA,KAAK,QACJ,oBAAC,QAAA,EAAK,WAAW,GAAG,oCAAoC,KAAK,UAAU,cAAc,GAClF,UAAA,KAAK,KAAA,CACR;AAAA,QAED,CAAC,aACA,qBAAA,UAAA,EACE,UAAA;AAAA,UAAA,oBAAC,QAAA,EAAK,WAAU,6BAA6B,UAAA,KAAK,OAAM;AAAA,UACvD,KAAK,UAAU,UACd,oBAAC,UAAK,WAAW;AAAA,YACf;AAAA,YACA,KAAK,SAAS,uCAAuC;AAAA,UAAA,GAEpD,eAAK,MAAA,CACR;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKN,MAAI,aAAa,KAAK,OAAO;AAC3B,gCACG,SAAA,EACC,UAAA;AAAA,MAAA,oBAAC,gBAAA,EAAe,SAAO,MAAE,UAAA,SAAQ;AAAA,MACjC,oBAAC,gBAAA,EAAe,MAAK,SAAS,eAAK,MAAA,CAAM;AAAA,IAAA,GAC3C;AAAA,EAEJ;AAEA,SAAO;AACT;AAEA,MAAM,UAAU,MAAM;AAAA,EACpB,CACE;AAAA,IACE;AAAA,IACA,WAAW,CAAA;AAAA,IACX,YAAY;AAAA,IACZ;AAAA,IACA,cAAc;AAAA,IACd,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,WACE,oBAAC,iBAAA,EAAgB,eAAe,GAC9B,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,OAAO,EAAE,OAAO,YAAY,SAAS,MAAA;AAAA,QACrC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAGH,UAAA;AAAA,UAAA,UACC,qBAAA,UAAA,EACE,UAAA;AAAA,YAAA,oBAAC,SAAI,WAAW,GAAG,+BAA+B,aAAa,gBAAgB,GAC5E,UAAA,QACH;AAAA,gCACC,WAAA,CAAA,CAAU;AAAA,UAAA,GACb;AAAA,UAIF,oBAAC,OAAA,EAAI,WAAU,8CACZ,UAAA,SAAS,IAAI,CAAC,SAAS,QACtB,qBAAC,OAAA,EACE,UAAA;AAAA,YAAA,QAAQ,SAAS,CAAC,aACjB,oBAAC,OAAE,WAAU,wFACV,kBAAQ,MAAA,CACX;AAAA,YAED,QAAQ,SAAS,aAAa,MAAM,KACnC,oBAAC,WAAA,EAAU,WAAU,QAAO;AAAA,gCAE7B,OAAA,EAAI,WAAU,eACZ,UAAA,QAAQ,MAAM,IAAI,CAAC,SAClB,oBAAC,2BAAsC,MAAY,UAAA,GAArB,KAAK,EAAsC,CAC1E,EAAA,CACH;AAAA,UAAA,EAAA,GAbQ,QAAQ,EAclB,CACD,GACH;AAAA,UAGC,UACC,qBAAA,UAAA,EACE,UAAA;AAAA,YAAA,oBAAC,WAAA,EAAU;AAAA,YACX,oBAAC,SAAI,WAAW,GAAG,OAAO,aAAa,qBAAqB,GACzD,UAAA,OAAA,CACH;AAAA,UAAA,GACF;AAAA,UAID,eACC,qBAAA,UAAA,EACE,UAAA;AAAA,YAAA,oBAAC,WAAA,EAAU;AAAA,YACX,oBAAC,OAAA,EAAI,WAAU,wBACb,UAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,SAAS,MAAM,uDAAoB,CAAC;AAAA,gBACpC,cAAY,YAAY,mBAAmB;AAAA,gBAE1C,UAAA,gCACE,cAAA,EAAa,WAAU,WAAU,IAElC,oBAAC,aAAA,EAAY,WAAU,UAAA,CAAU;AAAA,cAAA;AAAA,YAAA,EAErC,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,EAEJ;AACF;AACA,QAAQ,cAAc;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
8
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/ui/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAI/D,QAAA,MAAM,SAAS,8JAA0B,CAAA;AAEzC,QAAA,MAAM,aAAa,iKASjB,CAAA;AAGF,QAAA,MAAM,gBAAgB,0KAoBpB,CAAA;AAGF,QAAA,MAAM,gBAAgB,oKAWpB,CAAA;AAGF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Root as Root2, Content as Content2, Item, Header, Trigger as Trigger2 } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import ChevronDown from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
6
|
+
const Accordion = Root2;
|
|
7
|
+
const AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8
|
+
Item,
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
className: cn("border-b border-border", className),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
));
|
|
15
|
+
AccordionItem.displayName = "AccordionItem";
|
|
16
|
+
const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
17
|
+
Trigger2,
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
className: cn(
|
|
21
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium",
|
|
22
|
+
"transition-all hover:underline",
|
|
23
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded",
|
|
24
|
+
"[&[data-state=open]>svg]:rotate-180",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
...props,
|
|
28
|
+
children: [
|
|
29
|
+
children,
|
|
30
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
) }));
|
|
34
|
+
AccordionTrigger.displayName = Trigger2.displayName;
|
|
35
|
+
const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
36
|
+
Content2,
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
40
|
+
...props,
|
|
41
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
|
|
42
|
+
}
|
|
43
|
+
));
|
|
44
|
+
AccordionContent.displayName = Content2.displayName;
|
|
45
|
+
export {
|
|
46
|
+
Accordion,
|
|
47
|
+
AccordionContent,
|
|
48
|
+
AccordionItem,
|
|
49
|
+
AccordionTrigger
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","sources":["../../../src/components/ui/accordion.tsx"],"sourcesContent":["import * as React from 'react'\nimport * as AccordionPrimitive from '@radix-ui/react-accordion'\nimport { ChevronDown } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn('border-b border-border', className)}\n {...props}\n />\n))\nAccordionItem.displayName = 'AccordionItem'\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex flex-1 items-center justify-between py-4 text-sm font-medium',\n 'transition-all hover:underline',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded',\n '[&[data-state=open]>svg]:rotate-180',\n className\n )}\n {...props}\n >\n {children}\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn('pb-4 pt-0', className)}>{children}</div>\n </AccordionPrimitive.Content>\n))\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"],"names":["AccordionPrimitive.Root","AccordionPrimitive.Item","AccordionPrimitive.Header","AccordionPrimitive.Trigger","AccordionPrimitive.Content"],"mappings":";;;;;AAKA,MAAM,YAAYA;AAElB,MAAM,gBAAgB,MAAM,WAG1B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,0BAA0B,SAAS;AAAA,IAChD,GAAG;AAAA,EAAA;AACN,CACD;AACD,cAAc,cAAc;AAE5B,MAAM,mBAAmB,MAAM,WAG7B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAA,GAAS,QACpC,oBAACC,QAAA,EAA0B,WAAU,QACnC,UAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,IAEH,UAAA;AAAA,MAAA;AAAA,MACD,oBAAC,aAAA,EAAY,WAAU,2EAAA,CAA2E;AAAA,IAAA;AAAA,EAAA;AACpG,GACF,CACD;AACD,iBAAiB,cAAcA,SAA2B;AAE1D,MAAM,mBAAmB,MAAM,WAG7B,CAAC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAU;AAAA,IACT,GAAG;AAAA,IAEJ,8BAAC,OAAA,EAAI,WAAW,GAAG,aAAa,SAAS,GAAI,SAAA,CAAS;AAAA,EAAA;AACxD,CACD;AACD,iBAAiB,cAAcA,SAA2B;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "default" | "warning" | "destructive" | "info" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
7
|
+
/** Whether the alert can be dismissed */
|
|
8
|
+
dismissible?: boolean;
|
|
9
|
+
/** Called when the dismiss button is clicked */
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
/** Hide the auto-icon */
|
|
12
|
+
hideIcon?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
16
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
17
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
18
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa;;8EAgBlB,CAAA;AAUD,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,KAAK,mFAyBV,CAAA;AAGD,QAAA,MAAM,UAAU,uHAQf,CAAA;AAGD,QAAA,MAAM,gBAAgB,yHAQrB,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import CircleAlert from "../../node_modules/lucide-react/dist/esm/icons/circle-alert.js";
|
|
6
|
+
import TriangleAlert from "../../node_modules/lucide-react/dist/esm/icons/triangle-alert.js";
|
|
7
|
+
import CircleCheck from "../../node_modules/lucide-react/dist/esm/icons/circle-check.js";
|
|
8
|
+
import Info from "../../node_modules/lucide-react/dist/esm/icons/info.js";
|
|
9
|
+
import X from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
10
|
+
const alertVariants = cva(
|
|
11
|
+
"relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:pl-7",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: "border-border bg-background text-foreground",
|
|
16
|
+
info: "border-info/30 bg-info/10 text-foreground [&>svg]:text-info",
|
|
17
|
+
success: "border-success/30 bg-success/10 text-foreground [&>svg]:text-success",
|
|
18
|
+
warning: "border-warning/30 bg-warning/10 text-foreground [&>svg]:text-warning",
|
|
19
|
+
destructive: "border-destructive/30 bg-destructive/10 text-foreground [&>svg]:text-destructive"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const ALERT_ICONS = {
|
|
28
|
+
default: CircleAlert,
|
|
29
|
+
info: Info,
|
|
30
|
+
success: CircleCheck,
|
|
31
|
+
warning: TriangleAlert,
|
|
32
|
+
destructive: CircleAlert
|
|
33
|
+
};
|
|
34
|
+
const Alert = React.forwardRef(
|
|
35
|
+
({ className, variant = "default", dismissible = false, onDismiss, hideIcon = false, children, ...props }, ref) => {
|
|
36
|
+
const Icon = ALERT_ICONS[variant ?? "default"];
|
|
37
|
+
return /* @__PURE__ */ jsxs(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
role: "alert",
|
|
42
|
+
className: cn(alertVariants({ variant }), className),
|
|
43
|
+
...props,
|
|
44
|
+
children: [
|
|
45
|
+
!hideIcon && /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }),
|
|
46
|
+
/* @__PURE__ */ jsx("div", { children }),
|
|
47
|
+
dismissible && /* @__PURE__ */ jsx(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
onClick: onDismiss,
|
|
51
|
+
className: "absolute right-3 top-3 rounded p-0.5 opacity-60 hover:opacity-100 transition-opacity",
|
|
52
|
+
"aria-label": "Dismiss alert",
|
|
53
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
Alert.displayName = "Alert";
|
|
62
|
+
const AlertTitle = React.forwardRef(
|
|
63
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
64
|
+
"h5",
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
);
|
|
72
|
+
AlertTitle.displayName = "AlertTitle";
|
|
73
|
+
const AlertDescription = React.forwardRef(
|
|
74
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
ref,
|
|
78
|
+
className: cn("text-sm [&_p]:leading-relaxed text-muted-foreground", className),
|
|
79
|
+
...props
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
);
|
|
83
|
+
AlertDescription.displayName = "AlertDescription";
|
|
84
|
+
export {
|
|
85
|
+
Alert,
|
|
86
|
+
AlertDescription,
|
|
87
|
+
AlertTitle
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sources":["../../../src/components/ui/alert.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { AlertCircle, CheckCircle2, Info, TriangleAlert, X } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nconst alertVariants = cva(\n 'relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:pl-7',\n {\n variants: {\n variant: {\n default: 'border-border bg-background text-foreground',\n info: 'border-info/30 bg-info/10 text-foreground [&>svg]:text-info',\n success: 'border-success/30 bg-success/10 text-foreground [&>svg]:text-success',\n warning: 'border-warning/30 bg-warning/10 text-foreground [&>svg]:text-warning',\n destructive: 'border-destructive/30 bg-destructive/10 text-foreground [&>svg]:text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nconst ALERT_ICONS = {\n default: AlertCircle,\n info: Info,\n success: CheckCircle2,\n warning: TriangleAlert,\n destructive: AlertCircle,\n} as const\n\nexport interface AlertProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof alertVariants> {\n /** Whether the alert can be dismissed */\n dismissible?: boolean\n /** Called when the dismiss button is clicked */\n onDismiss?: () => void\n /** Hide the auto-icon */\n hideIcon?: boolean\n}\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n ({ className, variant = 'default', dismissible = false, onDismiss, hideIcon = false, children, ...props }, ref) => {\n const Icon = ALERT_ICONS[variant ?? 'default']\n\n return (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n >\n {!hideIcon && <Icon className=\"h-4 w-4\" />}\n <div>{children}</div>\n {dismissible && (\n <button\n onClick={onDismiss}\n className=\"absolute right-3 top-3 rounded p-0.5 opacity-60 hover:opacity-100 transition-opacity\"\n aria-label=\"Dismiss alert\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n )}\n </div>\n )\n }\n)\nAlert.displayName = 'Alert'\n\nconst AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn('mb-1 font-medium leading-none tracking-tight', className)}\n {...props}\n />\n )\n)\nAlertTitle.displayName = 'AlertTitle'\n\nconst AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('text-sm [&_p]:leading-relaxed text-muted-foreground', className)}\n {...props}\n />\n )\n)\nAlertDescription.displayName = 'AlertDescription'\n\nexport { Alert, AlertTitle, AlertDescription }\n"],"names":["AlertCircle","CheckCircle2"],"mappings":";;;;;;;;;AAKA,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,aAAa;AAAA,MAAA;AAAA,IACf;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAEA,MAAM,cAAc;AAAA,EAClB,SAASA;AAAAA,EACT,MAAM;AAAA,EACN,SAASC;AAAAA,EACT,SAAS;AAAA,EACT,aAAaD;AACf;AAaA,MAAM,QAAQ,MAAM;AAAA,EAClB,CAAC,EAAE,WAAW,UAAU,WAAW,cAAc,OAAO,WAAW,WAAW,OAAO,UAAU,GAAG,MAAA,GAAS,QAAQ;AACjH,UAAM,OAAO,YAAY,WAAW,SAAS;AAE7C,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,WAAW,GAAG,cAAc,EAAE,QAAA,CAAS,GAAG,SAAS;AAAA,QAClD,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,CAAC,YAAY,oBAAC,MAAA,EAAK,WAAU,UAAA,CAAU;AAAA,UACxC,oBAAC,SAAK,UAAS;AAAA,UACd,eACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAS;AAAA,cACT,WAAU;AAAA,cACV,cAAW;AAAA,cAEX,UAAA,oBAAC,GAAA,EAAE,WAAU,UAAA,CAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACzB;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AACA,MAAM,cAAc;AAEpB,MAAM,aAAa,MAAM;AAAA,EACvB,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,gDAAgD,SAAS;AAAA,MACtE,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AACA,WAAW,cAAc;AAEzB,MAAM,mBAAmB,MAAM;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,uDAAuD,SAAS;AAAA,MAC7E,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AACA,iBAAiB,cAAc;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
4
|
+
declare const avatarVariants: (props?: ({
|
|
5
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
11
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
/** Convenience wrapper for a group of overlapping avatars */
|
|
13
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
/** Max number of avatars to show before showing a +N indicator */
|
|
15
|
+
max?: number;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare function AvatarGroup({ className, max, children, ...props }: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup };
|
|
20
|
+
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,cAAc;;8EAiBnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EACjE,YAAY,CAAC,OAAO,cAAc,CAAC;CAAG;AAE1C,QAAA,MAAM,MAAM,qFASV,CAAA;AAGF,QAAA,MAAM,WAAW,gKASf,CAAA;AAGF,QAAA,MAAM,cAAc,iKAYlB,CAAA;AAGF,6DAA6D;AAC7D,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAiB5E;AAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Root, Fallback, Image } from "../../node_modules/@radix-ui/react-avatar/dist/index.js";
|
|
4
|
+
import { cva } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
const avatarVariants = cva(
|
|
7
|
+
"relative flex shrink-0 overflow-hidden rounded-full",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xs: "h-6 w-6",
|
|
12
|
+
sm: "h-8 w-8",
|
|
13
|
+
md: "h-10 w-10",
|
|
14
|
+
lg: "h-12 w-12",
|
|
15
|
+
xl: "h-16 w-16",
|
|
16
|
+
"2xl": "h-20 w-20"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
size: "md"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
const Avatar = React.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
25
|
+
Root,
|
|
26
|
+
{
|
|
27
|
+
ref,
|
|
28
|
+
className: cn(avatarVariants({ size }), className),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
));
|
|
32
|
+
Avatar.displayName = Root.displayName;
|
|
33
|
+
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
34
|
+
Image,
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: cn("aspect-square h-full w-full object-cover", className),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
));
|
|
41
|
+
AvatarImage.displayName = Image.displayName;
|
|
42
|
+
const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
43
|
+
Fallback,
|
|
44
|
+
{
|
|
45
|
+
ref,
|
|
46
|
+
className: cn(
|
|
47
|
+
"flex h-full w-full items-center justify-center rounded-full bg-secondary text-secondary-foreground text-xs font-medium",
|
|
48
|
+
className
|
|
49
|
+
),
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
));
|
|
53
|
+
AvatarFallback.displayName = Fallback.displayName;
|
|
54
|
+
function AvatarGroup({ className, max, children, ...props }) {
|
|
55
|
+
const childrenArray = React.Children.toArray(children);
|
|
56
|
+
const shown = max ? childrenArray.slice(0, max) : childrenArray;
|
|
57
|
+
const hidden = max ? childrenArray.length - max : 0;
|
|
58
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex -space-x-2", className), ...props, children: [
|
|
59
|
+
shown,
|
|
60
|
+
hidden > 0 && /* @__PURE__ */ jsx("div", { className: "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border-2 border-background bg-secondary", children: /* @__PURE__ */ jsxs("span", { className: "flex h-full w-full items-center justify-center text-xs font-medium text-secondary-foreground", children: [
|
|
61
|
+
"+",
|
|
62
|
+
hidden
|
|
63
|
+
] }) })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
Avatar,
|
|
68
|
+
AvatarFallback,
|
|
69
|
+
AvatarGroup,
|
|
70
|
+
AvatarImage
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","sources":["../../../src/components/ui/avatar.tsx"],"sourcesContent":["import * as React from 'react'\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils'\n\nconst avatarVariants = cva(\n 'relative flex shrink-0 overflow-hidden rounded-full',\n {\n variants: {\n size: {\n xs: 'h-6 w-6',\n sm: 'h-8 w-8',\n md: 'h-10 w-10',\n lg: 'h-12 w-12',\n xl: 'h-16 w-16',\n '2xl': 'h-20 w-20',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n }\n)\n\nexport interface AvatarProps\n extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n VariantProps<typeof avatarVariants> {}\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n AvatarProps\n>(({ className, size, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(avatarVariants({ size }), className)}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn('aspect-square h-full w-full object-cover', className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n 'flex h-full w-full items-center justify-center rounded-full bg-secondary text-secondary-foreground text-xs font-medium',\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\n/** Convenience wrapper for a group of overlapping avatars */\ninterface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Max number of avatars to show before showing a +N indicator */\n max?: number\n children: React.ReactNode\n}\n\nfunction AvatarGroup({ className, max, children, ...props }: AvatarGroupProps) {\n const childrenArray = React.Children.toArray(children)\n const shown = max ? childrenArray.slice(0, max) : childrenArray\n const hidden = max ? childrenArray.length - max : 0\n\n return (\n <div className={cn('flex -space-x-2', className)} {...props}>\n {shown}\n {hidden > 0 && (\n <div className=\"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border-2 border-background bg-secondary\">\n <span className=\"flex h-full w-full items-center justify-center text-xs font-medium text-secondary-foreground\">\n +{hidden}\n </span>\n </div>\n )}\n </div>\n )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback, AvatarGroup }\n"],"names":["AvatarPrimitive.Root","AvatarPrimitive.Image","AvatarPrimitive.Fallback"],"mappings":";;;;;AAKA,MAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;AAMA,MAAM,SAAS,MAAM,WAGnB,CAAC,EAAE,WAAW,MAAM,GAAG,SAAS,QAChC;AAAA,EAACA;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,eAAe,EAAE,KAAA,CAAM,GAAG,SAAS;AAAA,IAChD,GAAG;AAAA,EAAA;AACN,CACD;AACD,OAAO,cAAcA,KAAqB;AAE1C,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,4CAA4C,SAAS;AAAA,IAClE,GAAG;AAAA,EAAA;AACN,CACD;AACD,YAAY,cAAcA,MAAsB;AAEhD,MAAM,iBAAiB,MAAM,WAG3B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN,CACD;AACD,eAAe,cAAcA,SAAyB;AAStD,SAAS,YAAY,EAAE,WAAW,KAAK,UAAU,GAAG,SAA2B;AAC7E,QAAM,gBAAgB,MAAM,SAAS,QAAQ,QAAQ;AACrD,QAAM,QAAQ,MAAM,cAAc,MAAM,GAAG,GAAG,IAAI;AAClD,QAAM,SAAS,MAAM,cAAc,SAAS,MAAM;AAElD,SACE,qBAAC,SAAI,WAAW,GAAG,mBAAmB,SAAS,GAAI,GAAG,OACnD,UAAA;AAAA,IAAA;AAAA,IACA,SAAS,KACR,oBAAC,OAAA,EAAI,WAAU,yGACb,UAAA,qBAAC,QAAA,EAAK,WAAU,gGAA+F,UAAA;AAAA,MAAA;AAAA,MAC3G;AAAA,IAAA,EAAA,CACJ,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "default" | "secondary" | "warning" | "destructive" | "info" | "muted" | "outline" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
8
|
+
/** Optional dot indicator */
|
|
9
|
+
dot?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function Badge({ className, variant, size, dot, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { Badge, badgeVariants };
|
|
13
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;;8EAiClB,CAAA;AAED,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,6BAA6B;IAC7B,GAAG,CAAC,EAAE,OAAO,CAAA;CACd;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAoB/E;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
const badgeVariants = cva(
|
|
5
|
+
"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
11
|
+
outline: "border-border text-foreground bg-transparent",
|
|
12
|
+
destructive: "border-transparent bg-destructive/20 text-destructive border-destructive/30",
|
|
13
|
+
success: "border-transparent bg-success/20 text-success border-success/30",
|
|
14
|
+
warning: "border-transparent bg-warning/20 text-warning-foreground border-warning/30",
|
|
15
|
+
info: "border-transparent bg-info/20 text-info border-info/30",
|
|
16
|
+
muted: "border-transparent bg-muted text-muted-foreground"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
sm: "px-2 py-0 text-[10px]",
|
|
20
|
+
md: "px-2.5 py-0.5 text-xs",
|
|
21
|
+
lg: "px-3 py-1 text-sm"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "md"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
function Badge({ className, variant, size, dot, children, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(badgeVariants({ variant, size }), className), ...props, children: [
|
|
32
|
+
dot && /* @__PURE__ */ jsx(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
className: cn(
|
|
36
|
+
"inline-block h-1.5 w-1.5 rounded-full",
|
|
37
|
+
variant === "destructive" && "bg-destructive",
|
|
38
|
+
variant === "success" && "bg-success",
|
|
39
|
+
variant === "warning" && "bg-warning",
|
|
40
|
+
variant === "info" && "bg-info",
|
|
41
|
+
(!variant || variant === "default") && "bg-primary-foreground",
|
|
42
|
+
variant === "secondary" && "bg-secondary-foreground",
|
|
43
|
+
variant === "muted" && "bg-muted-foreground"
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
children
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
Badge,
|
|
52
|
+
badgeVariants
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sources":["../../../src/components/ui/badge.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva(\n 'inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n {\n variants: {\n variant: {\n default:\n 'border-transparent bg-primary text-primary-foreground',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground',\n outline:\n 'border-border text-foreground bg-transparent',\n destructive:\n 'border-transparent bg-destructive/20 text-destructive border-destructive/30',\n success:\n 'border-transparent bg-success/20 text-success border-success/30',\n warning:\n 'border-transparent bg-warning/20 text-warning-foreground border-warning/30',\n info:\n 'border-transparent bg-info/20 text-info border-info/30',\n muted:\n 'border-transparent bg-muted text-muted-foreground',\n },\n size: {\n sm: 'px-2 py-0 text-[10px]',\n md: 'px-2.5 py-0.5 text-xs',\n lg: 'px-3 py-1 text-sm',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {\n /** Optional dot indicator */\n dot?: boolean\n}\n\nfunction Badge({ className, variant, size, dot, children, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant, size }), className)} {...props}>\n {dot && (\n <span\n className={cn(\n 'inline-block h-1.5 w-1.5 rounded-full',\n variant === 'destructive' && 'bg-destructive',\n variant === 'success' && 'bg-success',\n variant === 'warning' && 'bg-warning',\n variant === 'info' && 'bg-info',\n (!variant || variant === 'default') && 'bg-primary-foreground',\n variant === 'secondary' && 'bg-secondary-foreground',\n variant === 'muted' && 'bg-muted-foreground',\n )}\n />\n )}\n {children}\n </div>\n )\n}\n\nexport { Badge, badgeVariants }\n"],"names":[],"mappings":";;;AAIA,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,WACE;AAAA,QACF,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,SACE;AAAA,QACF,MACE;AAAA,QACF,OACE;AAAA,MAAA;AAAA,MAEJ,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;AASA,SAAS,MAAM,EAAE,WAAW,SAAS,MAAM,KAAK,UAAU,GAAG,SAAqB;AAChF,SACE,qBAAC,OAAA,EAAI,WAAW,GAAG,cAAc,EAAE,SAAS,KAAA,CAAM,GAAG,SAAS,GAAI,GAAG,OAClE,UAAA;AAAA,IAAA,OACC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAY,iBAAiB;AAAA,UAC7B,YAAY,aAAa;AAAA,UACzB,YAAY,aAAa;AAAA,UACzB,YAAY,UAAU;AAAA,WACrB,CAAC,WAAW,YAAY,cAAc;AAAA,UACvC,YAAY,eAAe;AAAA,UAC3B,YAAY,WAAW;AAAA,QAAA;AAAA,MACzB;AAAA,IAAA;AAAA,IAGH;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "link" | "default" | "secondary" | "warning" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
/** Renders as child element (Radix Slot pattern) */
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
/** Shows a loading spinner and disables the button */
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export { Button, buttonVariants };
|
|
15
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,cAAc;;;8EA4CnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,MAAM,uFA0CX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Root as Slot } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
|
+
import { cva } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
[
|
|
8
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium",
|
|
9
|
+
"ring-offset-background transition-all duration-150",
|
|
10
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
11
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
12
|
+
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
|
|
13
|
+
],
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm hover:shadow-glow-primary",
|
|
18
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
19
|
+
outline: "border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
22
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
23
|
+
success: "bg-success text-success-foreground hover:bg-success/90",
|
|
24
|
+
warning: "bg-warning text-warning-foreground hover:bg-warning/90"
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
xs: "h-7 rounded px-2.5 text-xs",
|
|
28
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
29
|
+
md: "h-9 px-4 py-2",
|
|
30
|
+
lg: "h-10 rounded-md px-6",
|
|
31
|
+
xl: "h-12 rounded-md px-8 text-base",
|
|
32
|
+
icon: "h-9 w-9",
|
|
33
|
+
"icon-sm": "h-7 w-7",
|
|
34
|
+
"icon-lg": "h-10 w-10"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "default",
|
|
39
|
+
size: "md"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
const Button = React.forwardRef(
|
|
44
|
+
({ className, variant, size, asChild = false, loading = false, children, disabled, ...props }, ref) => {
|
|
45
|
+
const Comp = asChild ? Slot : "button";
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
Comp,
|
|
48
|
+
{
|
|
49
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
50
|
+
ref,
|
|
51
|
+
disabled: disabled || loading,
|
|
52
|
+
...props,
|
|
53
|
+
children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
54
|
+
/* @__PURE__ */ jsxs(
|
|
55
|
+
"svg",
|
|
56
|
+
{
|
|
57
|
+
className: "animate-spin h-4 w-4",
|
|
58
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
+
fill: "none",
|
|
60
|
+
viewBox: "0 0 24 24",
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
"circle",
|
|
65
|
+
{
|
|
66
|
+
className: "opacity-25",
|
|
67
|
+
cx: "12",
|
|
68
|
+
cy: "12",
|
|
69
|
+
r: "10",
|
|
70
|
+
stroke: "currentColor",
|
|
71
|
+
strokeWidth: "4"
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
"path",
|
|
76
|
+
{
|
|
77
|
+
className: "opacity-75",
|
|
78
|
+
fill: "currentColor",
|
|
79
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
children
|
|
86
|
+
] }) : children
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
Button.displayName = "Button";
|
|
92
|
+
export {
|
|
93
|
+
Button,
|
|
94
|
+
buttonVariants
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=button.js.map
|