@create-lft-app/nextjs 3.2.0 → 3.3.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 (133) hide show
  1. package/README.md +549 -549
  2. package/package.json +48 -48
  3. package/template/.claude/skills/anti-patterns.md +150 -0
  4. package/template/.claude/skills/drizzle-schema.md +178 -0
  5. package/template/.claude/skills/formatting.md +56 -0
  6. package/template/.claude/skills/module-architecture.md +143 -0
  7. package/template/.claude/skills/supabase-server-actions.md +199 -0
  8. package/template/.claude/skills/ui-patterns.md +161 -0
  9. package/template/CLAUDE.md +114 -1239
  10. package/template/drizzle.config.ts +12 -12
  11. package/template/eslint.config.mjs +16 -16
  12. package/template/gitignore +36 -36
  13. package/template/next.config.ts +7 -7
  14. package/template/package.json +86 -86
  15. package/template/postcss.config.mjs +7 -7
  16. package/template/proxy.ts +12 -12
  17. package/template/public/logolft.svg +11 -11
  18. package/template/src/app/(auth)/dashboard/dashboard-content.tsx +124 -124
  19. package/template/src/app/(auth)/dashboard/page.tsx +9 -9
  20. package/template/src/app/(auth)/layout.tsx +7 -7
  21. package/template/src/app/(auth)/users/page.tsx +9 -9
  22. package/template/src/app/(auth)/users/users-content.tsx +26 -26
  23. package/template/src/app/(public)/layout.tsx +7 -7
  24. package/template/src/app/(public)/login/page.tsx +17 -17
  25. package/template/src/app/api/webhooks/route.ts +20 -20
  26. package/template/src/app/globals.css +249 -249
  27. package/template/src/app/layout.tsx +37 -37
  28. package/template/src/app/page.tsx +5 -5
  29. package/template/src/app/providers.tsx +27 -27
  30. package/template/src/components/layout/main-content.tsx +28 -28
  31. package/template/src/components/layout/sidebar-context.tsx +33 -33
  32. package/template/src/components/layout/sidebar.tsx +141 -141
  33. package/template/src/components/tables/data-table-column-header.tsx +68 -68
  34. package/template/src/components/tables/data-table-date-filter.tsx +203 -203
  35. package/template/src/components/tables/data-table-faceted-filter.tsx +185 -185
  36. package/template/src/components/tables/data-table-filters-dropdown.tsx +130 -130
  37. package/template/src/components/tables/data-table-number-filter.tsx +295 -295
  38. package/template/src/components/tables/data-table-pagination.tsx +99 -99
  39. package/template/src/components/tables/data-table-toolbar.tsx +140 -140
  40. package/template/src/components/tables/data-table-view-options.tsx +63 -63
  41. package/template/src/components/tables/data-table.tsx +148 -148
  42. package/template/src/components/tables/index.ts +9 -9
  43. package/template/src/components/ui/accordion.tsx +58 -58
  44. package/template/src/components/ui/alert-dialog.tsx +165 -165
  45. package/template/src/components/ui/alert.tsx +66 -66
  46. package/template/src/components/ui/animations/index.ts +44 -44
  47. package/template/src/components/ui/avatar.tsx +55 -55
  48. package/template/src/components/ui/badge.tsx +50 -50
  49. package/template/src/components/ui/button.tsx +118 -118
  50. package/template/src/components/ui/calendar.tsx +220 -220
  51. package/template/src/components/ui/card.tsx +113 -113
  52. package/template/src/components/ui/checkbox.tsx +38 -38
  53. package/template/src/components/ui/collapsible.tsx +33 -33
  54. package/template/src/components/ui/command.tsx +196 -196
  55. package/template/src/components/ui/dialog.tsx +156 -156
  56. package/template/src/components/ui/dropdown-menu.tsx +280 -280
  57. package/template/src/components/ui/form.tsx +171 -171
  58. package/template/src/components/ui/icons.tsx +167 -167
  59. package/template/src/components/ui/input.tsx +28 -28
  60. package/template/src/components/ui/label.tsx +25 -25
  61. package/template/src/components/ui/motion.tsx +197 -197
  62. package/template/src/components/ui/page-transition.tsx +166 -166
  63. package/template/src/components/ui/popover.tsx +59 -59
  64. package/template/src/components/ui/progress.tsx +32 -32
  65. package/template/src/components/ui/radio-group.tsx +45 -45
  66. package/template/src/components/ui/scroll-area.tsx +63 -63
  67. package/template/src/components/ui/select.tsx +208 -208
  68. package/template/src/components/ui/separator.tsx +28 -28
  69. package/template/src/components/ui/sheet.tsx +170 -170
  70. package/template/src/components/ui/sidebar.tsx +726 -726
  71. package/template/src/components/ui/skeleton.tsx +15 -15
  72. package/template/src/components/ui/slider.tsx +58 -58
  73. package/template/src/components/ui/sonner.tsx +47 -47
  74. package/template/src/components/ui/spinner.tsx +27 -27
  75. package/template/src/components/ui/submit-button.tsx +47 -47
  76. package/template/src/components/ui/switch.tsx +31 -31
  77. package/template/src/components/ui/table.tsx +120 -120
  78. package/template/src/components/ui/tabs.tsx +75 -75
  79. package/template/src/components/ui/textarea.tsx +26 -26
  80. package/template/src/components/ui/tooltip.tsx +70 -70
  81. package/template/src/config/navigation.ts +59 -59
  82. package/template/src/config/roles.ts +27 -27
  83. package/template/src/config/site.ts +12 -12
  84. package/template/src/db/index.ts +12 -12
  85. package/template/src/db/schema/index.ts +1 -1
  86. package/template/src/db/schema/users.ts +16 -16
  87. package/template/src/db/seed.ts +39 -39
  88. package/template/src/hooks/index.ts +3 -3
  89. package/template/src/hooks/use-mobile.ts +21 -21
  90. package/template/src/hooks/useDataTable.ts +82 -82
  91. package/template/src/hooks/useDebounce.ts +49 -49
  92. package/template/src/hooks/useMediaQuery.ts +36 -36
  93. package/template/src/lib/date/config.ts +36 -36
  94. package/template/src/lib/date/formatters.ts +127 -127
  95. package/template/src/lib/date/index.ts +26 -26
  96. package/template/src/lib/excel/exporter.ts +89 -89
  97. package/template/src/lib/excel/index.ts +14 -14
  98. package/template/src/lib/excel/parser.ts +96 -96
  99. package/template/src/lib/query-client.ts +35 -35
  100. package/template/src/lib/supabase/admin.ts +23 -23
  101. package/template/src/lib/supabase/client.ts +11 -11
  102. package/template/src/lib/supabase/proxy.ts +67 -67
  103. package/template/src/lib/supabase/server.ts +38 -38
  104. package/template/src/lib/supabase/types.ts +53 -53
  105. package/template/src/lib/utils.ts +6 -6
  106. package/template/src/lib/validations/common.ts +75 -75
  107. package/template/src/lib/validations/index.ts +20 -20
  108. package/template/src/modules/auth/actions/auth-actions.ts +59 -59
  109. package/template/src/modules/auth/components/login-form.tsx +68 -68
  110. package/template/src/modules/auth/hooks/useAuth.ts +38 -38
  111. package/template/src/modules/auth/hooks/useAuthMutations.ts +43 -43
  112. package/template/src/modules/auth/hooks/useAuthQueries.ts +43 -43
  113. package/template/src/modules/auth/index.ts +12 -12
  114. package/template/src/modules/auth/schemas/auth.schema.ts +32 -32
  115. package/template/src/modules/auth/stores/useAuthStore.ts +37 -37
  116. package/template/src/modules/users/actions/users-actions.ts +166 -166
  117. package/template/src/modules/users/columns.tsx +106 -106
  118. package/template/src/modules/users/components/users-list.tsx +48 -48
  119. package/template/src/modules/users/hooks/useUsers.ts +39 -39
  120. package/template/src/modules/users/hooks/useUsersMutations.ts +55 -55
  121. package/template/src/modules/users/hooks/useUsersQueries.ts +35 -35
  122. package/template/src/modules/users/index.ts +30 -30
  123. package/template/src/modules/users/schemas/users.schema.ts +51 -51
  124. package/template/src/modules/users/stores/useUsersStore.ts +60 -60
  125. package/template/src/modules/users/types/auth-user.types.ts +42 -42
  126. package/template/src/modules/users/utils/user-mapper.ts +32 -32
  127. package/template/src/stores/index.ts +1 -1
  128. package/template/src/stores/useUiStore.ts +55 -55
  129. package/template/src/types/api.ts +28 -28
  130. package/template/src/types/index.ts +2 -2
  131. package/template/src/types/table.ts +34 -34
  132. package/template/supabase/config.toml +94 -94
  133. package/template/tsconfig.json +42 -42
@@ -1,167 +1,167 @@
1
- 'use client'
2
-
3
- import * as React from 'react'
4
- import { cn } from '@/lib/utils'
5
-
6
- interface SVGIconProps extends React.SVGProps<SVGSVGElement> {
7
- size?: number
8
- }
9
-
10
- const SVGIcon = React.forwardRef<SVGSVGElement, SVGIconProps>(
11
- ({ size = 20, className, children, viewBox = '0 0 20 20', ...props }, ref) => (
12
- <svg
13
- ref={ref}
14
- width={size}
15
- height={size}
16
- viewBox={viewBox}
17
- fill="currentColor"
18
- className={cn('shrink-0', className)}
19
- {...props}
20
- >
21
- {children}
22
- </svg>
23
- )
24
- )
25
- SVGIcon.displayName = 'SVGIcon'
26
-
27
- export const Icons = {
28
- Logo: ({ size = 28, className, ...props }: SVGIconProps) => (
29
- <SVGIcon size={size} viewBox="0 0 28 28" className={className} {...props}>
30
- <rect width="28" height="28" rx="6" fill="currentColor" />
31
- <text x="50%" y="55%" dominantBaseline="middle" textAnchor="middle" fill="white" fontSize="14" fontWeight="bold">
32
- R
33
- </text>
34
- </SVGIcon>
35
- ),
36
-
37
- Dashboard: ({ size = 20, className, ...props }: SVGIconProps) => (
38
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
39
- <path strokeLinecap="round" strokeLinejoin="round" d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z" />
40
- </SVGIcon>
41
- ),
42
-
43
- Users: ({ size = 20, className, ...props }: SVGIconProps) => (
44
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
45
- <path strokeLinecap="round" strokeLinejoin="round" d="M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" />
46
- </SVGIcon>
47
- ),
48
-
49
- Documents: ({ size = 20, className, ...props }: SVGIconProps) => (
50
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
51
- <path strokeLinecap="round" strokeLinejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
52
- </SVGIcon>
53
- ),
54
-
55
- Alert: ({ size = 20, className, ...props }: SVGIconProps) => (
56
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
57
- <path strokeLinecap="round" strokeLinejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z" />
58
- </SVGIcon>
59
- ),
60
-
61
- Operations: ({ size = 20, className, ...props }: SVGIconProps) => (
62
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
63
- <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
64
- </SVGIcon>
65
- ),
66
-
67
- Calendar: ({ size = 20, className, ...props }: SVGIconProps) => (
68
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
69
- <path strokeLinecap="round" strokeLinejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5" />
70
- </SVGIcon>
71
- ),
72
-
73
- Settings: ({ size = 20, className, ...props }: SVGIconProps) => (
74
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
75
- <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
76
- <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
77
- </SVGIcon>
78
- ),
79
-
80
- Building: ({ size = 20, className, ...props }: SVGIconProps) => (
81
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
82
- <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3H21m-3.75 3H21" />
83
- </SVGIcon>
84
- ),
85
-
86
- Shield: ({ size = 20, className, ...props }: SVGIconProps) => (
87
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
88
- <path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" />
89
- </SVGIcon>
90
- ),
91
-
92
- ChevronRight: ({ size = 16, className, ...props }: SVGIconProps) => (
93
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
94
- <path strokeLinecap="round" strokeLinejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
95
- </SVGIcon>
96
- ),
97
-
98
- ChevronDown: ({ size = 16, className, ...props }: SVGIconProps) => (
99
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
100
- <path strokeLinecap="round" strokeLinejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" />
101
- </SVGIcon>
102
- ),
103
-
104
- User: ({ size = 20, className, ...props }: SVGIconProps) => (
105
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
106
- <path strokeLinecap="round" strokeLinejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />
107
- </SVGIcon>
108
- ),
109
-
110
- LogOut: ({ size = 20, className, ...props }: SVGIconProps) => (
111
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
112
- <path strokeLinecap="round" strokeLinejoin="round" d="M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15" />
113
- </SVGIcon>
114
- ),
115
-
116
- Add: ({ size = 16, className, ...props }: SVGIconProps) => (
117
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
118
- <path strokeLinecap="round" strokeLinejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
119
- </SVGIcon>
120
- ),
121
-
122
- Close: ({ size = 16, className, ...props }: SVGIconProps) => (
123
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
124
- <path strokeLinecap="round" strokeLinejoin="round" d="M6 18 18 6M6 6l12 12" />
125
- </SVGIcon>
126
- ),
127
-
128
- Search: ({ size = 20, className, ...props }: SVGIconProps) => (
129
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
130
- <path strokeLinecap="round" strokeLinejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
131
- </SVGIcon>
132
- ),
133
-
134
- MoreVertical: ({ size = 20, className, ...props }: SVGIconProps) => (
135
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
136
- <path strokeLinecap="round" strokeLinejoin="round" d="M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z" />
137
- </SVGIcon>
138
- ),
139
-
140
- Check: ({ size = 16, className, ...props }: SVGIconProps) => (
141
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
142
- <path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" />
143
- </SVGIcon>
144
- ),
145
-
146
- Spinner: ({ size = 20, className, ...props }: SVGIconProps) => (
147
- <SVGIcon
148
- size={size}
149
- viewBox="0 0 24 24"
150
- className={cn('animate-spin', className)}
151
- fill="none"
152
- stroke="currentColor"
153
- strokeWidth={1.5}
154
- {...props}
155
- >
156
- <path d="M12 3v3m6.366-.366-2.12 2.12M21 12h-3m.366 6.366-2.12-2.12M12 21v-3m-6.366.366 2.12-2.12M3 12h3m-.366-6.366 2.12 2.12" />
157
- </SVGIcon>
158
- ),
159
-
160
- UserPlus: ({ size = 20, className, ...props }: SVGIconProps) => (
161
- <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
162
- <path strokeLinecap="round" strokeLinejoin="round" d="M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z" />
163
- </SVGIcon>
164
- ),
165
- }
166
-
167
- export type IconName = keyof typeof Icons
1
+ 'use client'
2
+
3
+ import * as React from 'react'
4
+ import { cn } from '@/lib/utils'
5
+
6
+ interface SVGIconProps extends React.SVGProps<SVGSVGElement> {
7
+ size?: number
8
+ }
9
+
10
+ const SVGIcon = React.forwardRef<SVGSVGElement, SVGIconProps>(
11
+ ({ size = 20, className, children, viewBox = '0 0 20 20', ...props }, ref) => (
12
+ <svg
13
+ ref={ref}
14
+ width={size}
15
+ height={size}
16
+ viewBox={viewBox}
17
+ fill="currentColor"
18
+ className={cn('shrink-0', className)}
19
+ {...props}
20
+ >
21
+ {children}
22
+ </svg>
23
+ )
24
+ )
25
+ SVGIcon.displayName = 'SVGIcon'
26
+
27
+ export const Icons = {
28
+ Logo: ({ size = 28, className, ...props }: SVGIconProps) => (
29
+ <SVGIcon size={size} viewBox="0 0 28 28" className={className} {...props}>
30
+ <rect width="28" height="28" rx="6" fill="currentColor" />
31
+ <text x="50%" y="55%" dominantBaseline="middle" textAnchor="middle" fill="white" fontSize="14" fontWeight="bold">
32
+ R
33
+ </text>
34
+ </SVGIcon>
35
+ ),
36
+
37
+ Dashboard: ({ size = 20, className, ...props }: SVGIconProps) => (
38
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
39
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z" />
40
+ </SVGIcon>
41
+ ),
42
+
43
+ Users: ({ size = 20, className, ...props }: SVGIconProps) => (
44
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
45
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" />
46
+ </SVGIcon>
47
+ ),
48
+
49
+ Documents: ({ size = 20, className, ...props }: SVGIconProps) => (
50
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
51
+ <path strokeLinecap="round" strokeLinejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
52
+ </SVGIcon>
53
+ ),
54
+
55
+ Alert: ({ size = 20, className, ...props }: SVGIconProps) => (
56
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
57
+ <path strokeLinecap="round" strokeLinejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z" />
58
+ </SVGIcon>
59
+ ),
60
+
61
+ Operations: ({ size = 20, className, ...props }: SVGIconProps) => (
62
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
63
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
64
+ </SVGIcon>
65
+ ),
66
+
67
+ Calendar: ({ size = 20, className, ...props }: SVGIconProps) => (
68
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
69
+ <path strokeLinecap="round" strokeLinejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5" />
70
+ </SVGIcon>
71
+ ),
72
+
73
+ Settings: ({ size = 20, className, ...props }: SVGIconProps) => (
74
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
75
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
76
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
77
+ </SVGIcon>
78
+ ),
79
+
80
+ Building: ({ size = 20, className, ...props }: SVGIconProps) => (
81
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
82
+ <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3H21m-3.75 3H21" />
83
+ </SVGIcon>
84
+ ),
85
+
86
+ Shield: ({ size = 20, className, ...props }: SVGIconProps) => (
87
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
88
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" />
89
+ </SVGIcon>
90
+ ),
91
+
92
+ ChevronRight: ({ size = 16, className, ...props }: SVGIconProps) => (
93
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
94
+ <path strokeLinecap="round" strokeLinejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
95
+ </SVGIcon>
96
+ ),
97
+
98
+ ChevronDown: ({ size = 16, className, ...props }: SVGIconProps) => (
99
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
100
+ <path strokeLinecap="round" strokeLinejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" />
101
+ </SVGIcon>
102
+ ),
103
+
104
+ User: ({ size = 20, className, ...props }: SVGIconProps) => (
105
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
106
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />
107
+ </SVGIcon>
108
+ ),
109
+
110
+ LogOut: ({ size = 20, className, ...props }: SVGIconProps) => (
111
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
112
+ <path strokeLinecap="round" strokeLinejoin="round" d="M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15" />
113
+ </SVGIcon>
114
+ ),
115
+
116
+ Add: ({ size = 16, className, ...props }: SVGIconProps) => (
117
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
118
+ <path strokeLinecap="round" strokeLinejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
119
+ </SVGIcon>
120
+ ),
121
+
122
+ Close: ({ size = 16, className, ...props }: SVGIconProps) => (
123
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
124
+ <path strokeLinecap="round" strokeLinejoin="round" d="M6 18 18 6M6 6l12 12" />
125
+ </SVGIcon>
126
+ ),
127
+
128
+ Search: ({ size = 20, className, ...props }: SVGIconProps) => (
129
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
130
+ <path strokeLinecap="round" strokeLinejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
131
+ </SVGIcon>
132
+ ),
133
+
134
+ MoreVertical: ({ size = 20, className, ...props }: SVGIconProps) => (
135
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
136
+ <path strokeLinecap="round" strokeLinejoin="round" d="M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z" />
137
+ </SVGIcon>
138
+ ),
139
+
140
+ Check: ({ size = 16, className, ...props }: SVGIconProps) => (
141
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={2} {...props}>
142
+ <path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" />
143
+ </SVGIcon>
144
+ ),
145
+
146
+ Spinner: ({ size = 20, className, ...props }: SVGIconProps) => (
147
+ <SVGIcon
148
+ size={size}
149
+ viewBox="0 0 24 24"
150
+ className={cn('animate-spin', className)}
151
+ fill="none"
152
+ stroke="currentColor"
153
+ strokeWidth={1.5}
154
+ {...props}
155
+ >
156
+ <path d="M12 3v3m6.366-.366-2.12 2.12M21 12h-3m.366 6.366-2.12-2.12M12 21v-3m-6.366.366 2.12-2.12M3 12h3m-.366-6.366 2.12 2.12" />
157
+ </SVGIcon>
158
+ ),
159
+
160
+ UserPlus: ({ size = 20, className, ...props }: SVGIconProps) => (
161
+ <SVGIcon size={size} viewBox="0 0 24 24" className={className} fill="none" stroke="currentColor" strokeWidth={1.5} {...props}>
162
+ <path strokeLinecap="round" strokeLinejoin="round" d="M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z" />
163
+ </SVGIcon>
164
+ ),
165
+ }
166
+
167
+ export type IconName = keyof typeof Icons
@@ -1,28 +1,28 @@
1
- import * as React from "react"
2
-
3
- import { cn } from "@/lib/utils"
4
-
5
- function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
- return (
7
- <input
8
- type={type}
9
- data-slot="input"
10
- className={cn(
11
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1",
12
- "text-base md:text-sm",
13
- "transition-colors",
14
- "file:border-0 file:bg-transparent file:text-sm file:font-medium",
15
- "placeholder:text-muted-foreground",
16
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
17
- "disabled:cursor-not-allowed disabled:opacity-50",
18
- "[&:-webkit-autofill]:[-webkit-text-fill-color:hsl(var(--foreground))]",
19
- "[&:-webkit-autofill]:[caret-color:hsl(var(--foreground))]",
20
- "[&:-webkit-autofill]:shadow-[inset_0_0_0px_1000px_hsl(var(--background))]",
21
- className
22
- )}
23
- {...props}
24
- />
25
- )
26
- }
27
-
28
- export { Input }
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
+ return (
7
+ <input
8
+ type={type}
9
+ data-slot="input"
10
+ className={cn(
11
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1",
12
+ "text-base md:text-sm",
13
+ "transition-colors",
14
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
15
+ "placeholder:text-muted-foreground",
16
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
17
+ "disabled:cursor-not-allowed disabled:opacity-50",
18
+ "[&:-webkit-autofill]:[-webkit-text-fill-color:hsl(var(--foreground))]",
19
+ "[&:-webkit-autofill]:[caret-color:hsl(var(--foreground))]",
20
+ "[&:-webkit-autofill]:shadow-[inset_0_0_0px_1000px_hsl(var(--background))]",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ export { Input }
@@ -1,25 +1,25 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as LabelPrimitive from "@radix-ui/react-label"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- function Label({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof LabelPrimitive.Root>) {
12
- return (
13
- <LabelPrimitive.Root
14
- data-slot="label"
15
- className={cn(
16
- "text-sm font-medium leading-none",
17
- "peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
18
- className
19
- )}
20
- {...props}
21
- />
22
- )
23
- }
24
-
25
- export { Label }
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as LabelPrimitive from "@radix-ui/react-label"
5
+
6
+ import { cn } from "@/lib/utils"
7
+
8
+ function Label({
9
+ className,
10
+ ...props
11
+ }: React.ComponentProps<typeof LabelPrimitive.Root>) {
12
+ return (
13
+ <LabelPrimitive.Root
14
+ data-slot="label"
15
+ className={cn(
16
+ "text-sm font-medium leading-none",
17
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ export { Label }