shadcn-packaged 0.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.
Files changed (106) hide show
  1. package/README.md +50 -0
  2. package/hooks/use-mobile.d.ts +1 -0
  3. package/hooks/use-mobile.jsx +15 -0
  4. package/hooks/use-toast.d.ts +44 -0
  5. package/hooks/use-toast.js +128 -0
  6. package/index.d.ts +51 -0
  7. package/lib/utils.d.ts +2 -0
  8. package/lib/utils.js +5 -0
  9. package/package.json +76 -0
  10. package/tailwind.config.js +89 -0
  11. package/ui/accordion.d.ts +7 -0
  12. package/ui/accordion.jsx +20 -0
  13. package/ui/alert-dialog.d.ts +20 -0
  14. package/ui/alert-dialog.jsx +29 -0
  15. package/ui/alert.d.ts +8 -0
  16. package/ui/alert.jsx +21 -0
  17. package/ui/aspect-ratio.d.ts +3 -0
  18. package/ui/aspect-ratio.jsx +4 -0
  19. package/ui/avatar.d.ts +6 -0
  20. package/ui/avatar.jsx +11 -0
  21. package/ui/badge.d.ts +9 -0
  22. package/ui/badge.jsx +20 -0
  23. package/ui/breadcrumb.d.ts +19 -0
  24. package/ui/breadcrumb.jsx +27 -0
  25. package/ui/button.d.ts +11 -0
  26. package/ui/button.jsx +32 -0
  27. package/ui/calendar.d.ts +8 -0
  28. package/ui/calendar.jsx +37 -0
  29. package/ui/card.d.ts +8 -0
  30. package/ui/card.jsx +15 -0
  31. package/ui/carousel.d.ts +18 -0
  32. package/ui/carousel.jsx +110 -0
  33. package/ui/chart.d.ts +62 -0
  34. package/ui/chart.jsx +164 -0
  35. package/ui/checkbox.d.ts +4 -0
  36. package/ui/checkbox.jsx +12 -0
  37. package/ui/collapsible.d.ts +5 -0
  38. package/ui/collapsible.jsx +6 -0
  39. package/ui/command.d.ts +80 -0
  40. package/ui/command.jsx +37 -0
  41. package/ui/context-menu.d.ts +27 -0
  42. package/ui/context-menu.jsx +52 -0
  43. package/ui/dialog.d.ts +19 -0
  44. package/ui/dialog.jsx +31 -0
  45. package/ui/drawer.d.ts +22 -0
  46. package/ui/drawer.jsx +28 -0
  47. package/ui/dropdown-menu.d.ts +27 -0
  48. package/ui/dropdown-menu.jsx +54 -0
  49. package/ui/form.d.ts +23 -0
  50. package/ui/form.jsx +68 -0
  51. package/ui/hover-card.d.ts +6 -0
  52. package/ui/hover-card.jsx +9 -0
  53. package/ui/input-otp.d.ts +34 -0
  54. package/ui/input-otp.jsx +25 -0
  55. package/ui/input.d.ts +3 -0
  56. package/ui/input.jsx +7 -0
  57. package/ui/label.d.ts +5 -0
  58. package/ui/label.jsx +9 -0
  59. package/ui/menubar.d.ts +33 -0
  60. package/ui/menubar.jsx +54 -0
  61. package/ui/navigation-menu.d.ts +12 -0
  62. package/ui/navigation-menu.jsx +33 -0
  63. package/ui/pagination.d.ts +28 -0
  64. package/ui/pagination.jsx +31 -0
  65. package/ui/popover.d.ts +6 -0
  66. package/ui/popover.jsx +11 -0
  67. package/ui/progress.d.ts +4 -0
  68. package/ui/progress.jsx +9 -0
  69. package/ui/radio-group.d.ts +5 -0
  70. package/ui/radio-group.jsx +18 -0
  71. package/ui/resizable.d.ts +23 -0
  72. package/ui/resizable.jsx +12 -0
  73. package/ui/scroll-area.d.ts +5 -0
  74. package/ui/scroll-area.jsx +19 -0
  75. package/ui/select.d.ts +13 -0
  76. package/ui/select.jsx +51 -0
  77. package/ui/separator.d.ts +4 -0
  78. package/ui/separator.jsx +7 -0
  79. package/ui/sheet.d.ts +25 -0
  80. package/ui/sheet.jsx +45 -0
  81. package/ui/sidebar.d.ts +66 -0
  82. package/ui/sidebar.jsx +253 -0
  83. package/ui/skeleton.d.ts +2 -0
  84. package/ui/skeleton.jsx +5 -0
  85. package/ui/slider.d.ts +4 -0
  86. package/ui/slider.jsx +12 -0
  87. package/ui/sonner.d.ts +4 -0
  88. package/ui/sonner.jsx +15 -0
  89. package/ui/switch.d.ts +4 -0
  90. package/ui/switch.jsx +9 -0
  91. package/ui/table.d.ts +10 -0
  92. package/ui/table.jsx +21 -0
  93. package/ui/tabs.d.ts +7 -0
  94. package/ui/tabs.jsx +12 -0
  95. package/ui/textarea.d.ts +3 -0
  96. package/ui/textarea.jsx +7 -0
  97. package/ui/toast.d.ts +15 -0
  98. package/ui/toast.jsx +35 -0
  99. package/ui/toaster.d.ts +1 -0
  100. package/ui/toaster.jsx +19 -0
  101. package/ui/toggle-group.d.ts +12 -0
  102. package/ui/toggle-group.jsx +26 -0
  103. package/ui/toggle.d.ts +12 -0
  104. package/ui/toggle.jsx +25 -0
  105. package/ui/tooltip.d.ts +7 -0
  106. package/ui/tooltip.jsx +10 -0
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+
14
+ - Configure the top-level `parserOptions` property like this:
15
+
16
+ ```js
17
+ export default tseslint.config({
18
+ languageOptions: {
19
+ // other options...
20
+ parserOptions: {
21
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
+ tsconfigRootDir: import.meta.dirname,
23
+ },
24
+ },
25
+ })
26
+ ```
27
+
28
+ - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
+ - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
+
32
+ ```js
33
+ // eslint.config.js
34
+ import react from 'eslint-plugin-react'
35
+
36
+ export default tseslint.config({
37
+ // Set the react version
38
+ settings: { react: { version: '18.3' } },
39
+ plugins: {
40
+ // Add the react plugin
41
+ react,
42
+ },
43
+ rules: {
44
+ // other rules...
45
+ // Enable its recommended rules
46
+ ...react.configs.recommended.rules,
47
+ ...react.configs['jsx-runtime'].rules,
48
+ },
49
+ })
50
+ ```
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ const MOBILE_BREAKPOINT = 768;
3
+ export function useIsMobile() {
4
+ const [isMobile, setIsMobile] = React.useState(undefined);
5
+ React.useEffect(() => {
6
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
7
+ const onChange = () => {
8
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
9
+ };
10
+ mql.addEventListener("change", onChange);
11
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
12
+ return () => mql.removeEventListener("change", onChange);
13
+ }, []);
14
+ return !!isMobile;
15
+ }
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ import type { ToastActionElement, ToastProps } from "../ui/toast";
3
+ type ToasterToast = ToastProps & {
4
+ id: string;
5
+ title?: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ action?: ToastActionElement;
8
+ };
9
+ declare const actionTypes: {
10
+ readonly ADD_TOAST: "ADD_TOAST";
11
+ readonly UPDATE_TOAST: "UPDATE_TOAST";
12
+ readonly DISMISS_TOAST: "DISMISS_TOAST";
13
+ readonly REMOVE_TOAST: "REMOVE_TOAST";
14
+ };
15
+ type ActionType = typeof actionTypes;
16
+ type Action = {
17
+ type: ActionType["ADD_TOAST"];
18
+ toast: ToasterToast;
19
+ } | {
20
+ type: ActionType["UPDATE_TOAST"];
21
+ toast: Partial<ToasterToast>;
22
+ } | {
23
+ type: ActionType["DISMISS_TOAST"];
24
+ toastId?: ToasterToast["id"];
25
+ } | {
26
+ type: ActionType["REMOVE_TOAST"];
27
+ toastId?: ToasterToast["id"];
28
+ };
29
+ interface State {
30
+ toasts: ToasterToast[];
31
+ }
32
+ export declare const reducer: (state: State, action: Action) => State;
33
+ type Toast = Omit<ToasterToast, "id">;
34
+ declare function toast({ ...props }: Toast): {
35
+ id: string;
36
+ dismiss: () => void;
37
+ update: (props: ToasterToast) => void;
38
+ };
39
+ declare function useToast(): {
40
+ toast: typeof toast;
41
+ dismiss: (toastId?: string) => void;
42
+ toasts: ToasterToast[];
43
+ };
44
+ export { useToast, toast };
@@ -0,0 +1,128 @@
1
+ "use client";
2
+ // Inspired by react-hot-toast library
3
+ import * as React from "react";
4
+ const TOAST_LIMIT = 1;
5
+ const TOAST_REMOVE_DELAY = 1000000;
6
+ const actionTypes = {
7
+ ADD_TOAST: "ADD_TOAST",
8
+ UPDATE_TOAST: "UPDATE_TOAST",
9
+ DISMISS_TOAST: "DISMISS_TOAST",
10
+ REMOVE_TOAST: "REMOVE_TOAST",
11
+ };
12
+ let count = 0;
13
+ function genId() {
14
+ count = (count + 1) % Number.MAX_SAFE_INTEGER;
15
+ return count.toString();
16
+ }
17
+ const toastTimeouts = new Map();
18
+ const addToRemoveQueue = (toastId) => {
19
+ if (toastTimeouts.has(toastId)) {
20
+ return;
21
+ }
22
+ const timeout = setTimeout(() => {
23
+ toastTimeouts.delete(toastId);
24
+ dispatch({
25
+ type: "REMOVE_TOAST",
26
+ toastId: toastId,
27
+ });
28
+ }, TOAST_REMOVE_DELAY);
29
+ toastTimeouts.set(toastId, timeout);
30
+ };
31
+ export const reducer = (state, action) => {
32
+ switch (action.type) {
33
+ case "ADD_TOAST":
34
+ return {
35
+ ...state,
36
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
37
+ };
38
+ case "UPDATE_TOAST":
39
+ return {
40
+ ...state,
41
+ toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t),
42
+ };
43
+ case "DISMISS_TOAST": {
44
+ const { toastId } = action;
45
+ // ! Side effects ! - This could be extracted into a dismissToast() action,
46
+ // but I'll keep it here for simplicity
47
+ if (toastId) {
48
+ addToRemoveQueue(toastId);
49
+ }
50
+ else {
51
+ state.toasts.forEach((toast) => {
52
+ addToRemoveQueue(toast.id);
53
+ });
54
+ }
55
+ return {
56
+ ...state,
57
+ toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined
58
+ ? {
59
+ ...t,
60
+ open: false,
61
+ }
62
+ : t),
63
+ };
64
+ }
65
+ case "REMOVE_TOAST":
66
+ if (action.toastId === undefined) {
67
+ return {
68
+ ...state,
69
+ toasts: [],
70
+ };
71
+ }
72
+ return {
73
+ ...state,
74
+ toasts: state.toasts.filter((t) => t.id !== action.toastId),
75
+ };
76
+ }
77
+ };
78
+ const listeners = [];
79
+ let memoryState = { toasts: [] };
80
+ function dispatch(action) {
81
+ memoryState = reducer(memoryState, action);
82
+ listeners.forEach((listener) => {
83
+ listener(memoryState);
84
+ });
85
+ }
86
+ function toast({ ...props }) {
87
+ const id = genId();
88
+ const update = (props) => dispatch({
89
+ type: "UPDATE_TOAST",
90
+ toast: { ...props, id },
91
+ });
92
+ const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
93
+ dispatch({
94
+ type: "ADD_TOAST",
95
+ toast: {
96
+ ...props,
97
+ id,
98
+ open: true,
99
+ onOpenChange: (open) => {
100
+ if (!open)
101
+ dismiss();
102
+ },
103
+ },
104
+ });
105
+ return {
106
+ id: id,
107
+ dismiss,
108
+ update,
109
+ };
110
+ }
111
+ function useToast() {
112
+ const [state, setState] = React.useState(memoryState);
113
+ React.useEffect(() => {
114
+ listeners.push(setState);
115
+ return () => {
116
+ const index = listeners.indexOf(setState);
117
+ if (index > -1) {
118
+ listeners.splice(index, 1);
119
+ }
120
+ };
121
+ }, [state]);
122
+ return {
123
+ ...state,
124
+ toast,
125
+ dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId }),
126
+ };
127
+ }
128
+ export { useToast, toast };
package/index.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ /// <reference path="./hooks/use-mobile.d.ts" />;
2
+ /// <reference path="./hooks/use-toast.d.ts" />;
3
+ /// <reference path="./lib/utils.d.ts" />;
4
+ /// <reference path="./ui/accordion.d.ts" />;
5
+ /// <reference path="./ui/alert-dialog.d.ts" />;
6
+ /// <reference path="./ui/alert.d.ts" />;
7
+ /// <reference path="./ui/aspect-ratio.d.ts" />;
8
+ /// <reference path="./ui/avatar.d.ts" />;
9
+ /// <reference path="./ui/badge.d.ts" />;
10
+ /// <reference path="./ui/breadcrumb.d.ts" />;
11
+ /// <reference path="./ui/button.d.ts" />;
12
+ /// <reference path="./ui/calendar.d.ts" />;
13
+ /// <reference path="./ui/card.d.ts" />;
14
+ /// <reference path="./ui/carousel.d.ts" />;
15
+ /// <reference path="./ui/chart.d.ts" />;
16
+ /// <reference path="./ui/checkbox.d.ts" />;
17
+ /// <reference path="./ui/collapsible.d.ts" />;
18
+ /// <reference path="./ui/command.d.ts" />;
19
+ /// <reference path="./ui/context-menu.d.ts" />;
20
+ /// <reference path="./ui/dialog.d.ts" />;
21
+ /// <reference path="./ui/drawer.d.ts" />;
22
+ /// <reference path="./ui/dropdown-menu.d.ts" />;
23
+ /// <reference path="./ui/form.d.ts" />;
24
+ /// <reference path="./ui/hover-card.d.ts" />;
25
+ /// <reference path="./ui/input-otp.d.ts" />;
26
+ /// <reference path="./ui/input.d.ts" />;
27
+ /// <reference path="./ui/label.d.ts" />;
28
+ /// <reference path="./ui/menubar.d.ts" />;
29
+ /// <reference path="./ui/navigation-menu.d.ts" />;
30
+ /// <reference path="./ui/pagination.d.ts" />;
31
+ /// <reference path="./ui/popover.d.ts" />;
32
+ /// <reference path="./ui/progress.d.ts" />;
33
+ /// <reference path="./ui/radio-group.d.ts" />;
34
+ /// <reference path="./ui/resizable.d.ts" />;
35
+ /// <reference path="./ui/scroll-area.d.ts" />;
36
+ /// <reference path="./ui/select.d.ts" />;
37
+ /// <reference path="./ui/separator.d.ts" />;
38
+ /// <reference path="./ui/sheet.d.ts" />;
39
+ /// <reference path="./ui/sidebar.d.ts" />;
40
+ /// <reference path="./ui/skeleton.d.ts" />;
41
+ /// <reference path="./ui/slider.d.ts" />;
42
+ /// <reference path="./ui/sonner.d.ts" />;
43
+ /// <reference path="./ui/switch.d.ts" />;
44
+ /// <reference path="./ui/table.d.ts" />;
45
+ /// <reference path="./ui/tabs.d.ts" />;
46
+ /// <reference path="./ui/textarea.d.ts" />;
47
+ /// <reference path="./ui/toast.d.ts" />;
48
+ /// <reference path="./ui/toaster.d.ts" />;
49
+ /// <reference path="./ui/toggle-group.d.ts" />;
50
+ /// <reference path="./ui/toggle.d.ts" />;
51
+ /// <reference path="./ui/tooltip.d.ts" />;
package/lib/utils.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
package/lib/utils.js ADDED
@@ -0,0 +1,5 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "shadcn-packaged",
3
+ "private": false,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "npm run shadcn:generate && npm run shadcn:tsc && npm run shadcn:move",
9
+ "shadcn:generate": "npx shadcn@latest add -a -y -o && node ./modify.mjs",
10
+ "shadcn:tsc": "tsc -p tsconfig.json && node ./types.mjs",
11
+ "shadcn:move": "mv dist/* ./"
12
+ },
13
+ "types": "index.d.ts",
14
+ "files": [
15
+ "ui",
16
+ "hooks",
17
+ "lib",
18
+ "index.d.ts",
19
+ "tailwind.config.js"
20
+ ],
21
+ "dependencies": {
22
+ "@hookform/resolvers": "^3.10.0",
23
+ "@radix-ui/react-accordion": "^1.2.2",
24
+ "@radix-ui/react-alert-dialog": "^1.1.4",
25
+ "@radix-ui/react-aspect-ratio": "^1.1.1",
26
+ "@radix-ui/react-avatar": "^1.1.2",
27
+ "@radix-ui/react-checkbox": "^1.1.3",
28
+ "@radix-ui/react-collapsible": "^1.1.2",
29
+ "@radix-ui/react-context-menu": "^2.2.4",
30
+ "@radix-ui/react-dialog": "^1.1.4",
31
+ "@radix-ui/react-dropdown-menu": "^2.1.4",
32
+ "@radix-ui/react-hover-card": "^1.1.4",
33
+ "@radix-ui/react-label": "^2.1.1",
34
+ "@radix-ui/react-menubar": "^1.1.4",
35
+ "@radix-ui/react-navigation-menu": "^1.2.3",
36
+ "@radix-ui/react-popover": "^1.1.4",
37
+ "@radix-ui/react-progress": "^1.1.1",
38
+ "@radix-ui/react-radio-group": "^1.2.2",
39
+ "@radix-ui/react-scroll-area": "^1.2.2",
40
+ "@radix-ui/react-select": "^2.1.4",
41
+ "@radix-ui/react-separator": "^1.1.1",
42
+ "@radix-ui/react-slider": "^1.2.2",
43
+ "@radix-ui/react-slot": "^1.1.1",
44
+ "@radix-ui/react-switch": "^1.1.2",
45
+ "@radix-ui/react-tabs": "^1.1.2",
46
+ "@radix-ui/react-toast": "^1.2.4",
47
+ "@radix-ui/react-toggle": "^1.1.1",
48
+ "@radix-ui/react-toggle-group": "^1.1.1",
49
+ "@radix-ui/react-tooltip": "^1.1.6",
50
+ "class-variance-authority": "^0.7.1",
51
+ "clsx": "^2.1.1",
52
+ "cmdk": "^1.0.0",
53
+ "date-fns": "^4.1.0",
54
+ "embla-carousel-react": "^8.5.2",
55
+ "input-otp": "^1.4.2",
56
+ "lucide-react": "^0.473.0",
57
+ "next-themes": "^0.4.4",
58
+ "react-day-picker": "^8.10.1",
59
+ "react-hook-form": "^7.54.2",
60
+ "react-resizable-panels": "^2.1.7",
61
+ "recharts": "^2.15.0",
62
+ "sonner": "^1.7.2",
63
+ "tailwind-merge": "^2.6.0",
64
+ "tailwindcss-animate": "^1.0.7",
65
+ "vaul": "^1.1.2",
66
+ "zod": "^3.24.1"
67
+ },
68
+ "devDependencies": {
69
+ "@types/node": "^22.10.7",
70
+ "@types/react": "^18.3.18",
71
+ "@types/react-dom": "^18.3.5",
72
+ "globals": "^15.14.0",
73
+ "tailwindcss": "^3.4.17",
74
+ "typescript": "~5.6.2"
75
+ }
76
+ }
@@ -0,0 +1,89 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ darkMode: ["class"],
4
+ content: ["./index.html", "./src/**/*.{ts,tsx,js,jsx}", "./~shadcn-packaged/**/*.{ts,tsx,js,jsx}"],
5
+ theme: {
6
+ extend: {
7
+ borderRadius: {
8
+ lg: 'var(--radius)',
9
+ md: 'calc(var(--radius) - 2px)',
10
+ sm: 'calc(var(--radius) - 4px)'
11
+ },
12
+ colors: {
13
+ background: 'hsl(var(--background))',
14
+ foreground: 'hsl(var(--foreground))',
15
+ card: {
16
+ DEFAULT: 'hsl(var(--card))',
17
+ foreground: 'hsl(var(--card-foreground))'
18
+ },
19
+ popover: {
20
+ DEFAULT: 'hsl(var(--popover))',
21
+ foreground: 'hsl(var(--popover-foreground))'
22
+ },
23
+ primary: {
24
+ DEFAULT: 'hsl(var(--primary))',
25
+ foreground: 'hsl(var(--primary-foreground))'
26
+ },
27
+ secondary: {
28
+ DEFAULT: 'hsl(var(--secondary))',
29
+ foreground: 'hsl(var(--secondary-foreground))'
30
+ },
31
+ muted: {
32
+ DEFAULT: 'hsl(var(--muted))',
33
+ foreground: 'hsl(var(--muted-foreground))'
34
+ },
35
+ accent: {
36
+ DEFAULT: 'hsl(var(--accent))',
37
+ foreground: 'hsl(var(--accent-foreground))'
38
+ },
39
+ destructive: {
40
+ DEFAULT: 'hsl(var(--destructive))',
41
+ foreground: 'hsl(var(--destructive-foreground))'
42
+ },
43
+ border: 'hsl(var(--border))',
44
+ input: 'hsl(var(--input))',
45
+ ring: 'hsl(var(--ring))',
46
+ chart: {
47
+ '1': 'hsl(var(--chart-1))',
48
+ '2': 'hsl(var(--chart-2))',
49
+ '3': 'hsl(var(--chart-3))',
50
+ '4': 'hsl(var(--chart-4))',
51
+ '5': 'hsl(var(--chart-5))'
52
+ },
53
+ sidebar: {
54
+ DEFAULT: 'hsl(var(--sidebar-background))',
55
+ foreground: 'hsl(var(--sidebar-foreground))',
56
+ primary: 'hsl(var(--sidebar-primary))',
57
+ 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
58
+ accent: 'hsl(var(--sidebar-accent))',
59
+ 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
60
+ border: 'hsl(var(--sidebar-border))',
61
+ ring: 'hsl(var(--sidebar-ring))'
62
+ }
63
+ },
64
+ keyframes: {
65
+ 'accordion-down': {
66
+ from: {
67
+ height: '0'
68
+ },
69
+ to: {
70
+ height: 'var(--radix-accordion-content-height)'
71
+ }
72
+ },
73
+ 'accordion-up': {
74
+ from: {
75
+ height: 'var(--radix-accordion-content-height)'
76
+ },
77
+ to: {
78
+ height: '0'
79
+ }
80
+ }
81
+ },
82
+ animation: {
83
+ 'accordion-down': 'accordion-down 0.2s ease-out',
84
+ 'accordion-up': 'accordion-up 0.2s ease-out'
85
+ }
86
+ }
87
+ },
88
+ plugins: [require("tailwindcss-animate")],
89
+ }
@@ -0,0 +1,7 @@
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 };
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
+ import { ChevronDown } from "lucide-react";
5
+ import { cn } from "../lib/utils";
6
+ const Accordion = AccordionPrimitive.Root;
7
+ const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (<AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props}/>));
8
+ AccordionItem.displayName = "AccordionItem";
9
+ const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (<AccordionPrimitive.Header className="flex">
10
+ <AccordionPrimitive.Trigger ref={ref} className={cn("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)} {...props}>
11
+ {children}
12
+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200"/>
13
+ </AccordionPrimitive.Trigger>
14
+ </AccordionPrimitive.Header>));
15
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
16
+ const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (<AccordionPrimitive.Content ref={ref} className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down" {...props}>
17
+ <div className={cn("pb-4 pt-0", className)}>{children}</div>
18
+ </AccordionPrimitive.Content>));
19
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
20
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
+ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertDialogHeader: {
9
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
10
+ displayName: string;
11
+ };
12
+ declare const AlertDialogFooter: {
13
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
20
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
+ import { cn } from "../lib/utils";
5
+ import { buttonVariants } from "../ui/button";
6
+ const AlertDialog = AlertDialogPrimitive.Root;
7
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
8
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
9
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Overlay className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)} {...props} ref={ref}/>));
10
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
11
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPortal>
12
+ <AlertDialogOverlay />
13
+ <AlertDialogPrimitive.Content ref={ref} className={cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)} {...props}/>
14
+ </AlertDialogPortal>));
15
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
16
+ const AlertDialogHeader = ({ className, ...props }) => (<div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props}/>);
17
+ AlertDialogHeader.displayName = "AlertDialogHeader";
18
+ const AlertDialogFooter = ({ className, ...props }) => (<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props}/>);
19
+ AlertDialogFooter.displayName = "AlertDialogFooter";
20
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold", className)} {...props}/>));
21
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
22
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props}/>));
23
+ AlertDialogDescription.displayName =
24
+ AlertDialogPrimitive.Description.displayName;
25
+ const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props}/>));
26
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
27
+ const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Cancel ref={ref} className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)} {...props}/>));
28
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
29
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
package/ui/alert.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: {
4
+ variant?: "default" | "destructive";
5
+ } & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
+ export { Alert, AlertTitle, AlertDescription };
package/ui/alert.jsx ADDED
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../lib/utils";
4
+ const alertVariants = cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
5
+ variants: {
6
+ variant: {
7
+ default: "bg-background text-foreground",
8
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
9
+ },
10
+ },
11
+ defaultVariants: {
12
+ variant: "default",
13
+ },
14
+ });
15
+ const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (<div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props}/>));
16
+ Alert.displayName = "Alert";
17
+ const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (<h5 ref={ref} className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props}/>));
18
+ AlertTitle.displayName = "AlertTitle";
19
+ const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (<div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props}/>));
20
+ AlertDescription.displayName = "AlertDescription";
21
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,3 @@
1
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
+ declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export { AspectRatio };
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
3
+ const AspectRatio = AspectRatioPrimitive.Root;
4
+ export { AspectRatio };
package/ui/avatar.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ export { Avatar, AvatarImage, AvatarFallback };
package/ui/avatar.jsx ADDED
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
4
+ import { cn } from "../lib/utils";
5
+ const Avatar = React.forwardRef(({ className, ...props }, ref) => (<AvatarPrimitive.Root ref={ref} className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)} {...props}/>));
6
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
7
+ const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (<AvatarPrimitive.Image ref={ref} className={cn("aspect-square h-full w-full", className)} {...props}/>));
8
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
9
+ const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (<AvatarPrimitive.Fallback ref={ref} className={cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className)} {...props}/>));
10
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
11
+ export { Avatar, AvatarImage, AvatarFallback };
package/ui/badge.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: {
4
+ variant?: "default" | "outline" | "destructive" | "secondary";
5
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ }
8
+ declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
9
+ export { Badge, badgeVariants };