@questpie/admin 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/README.md +439 -424
  2. package/dist/auth-layout-M8K8_q5R.mjs +181 -0
  3. package/dist/auth-layout-M8K8_q5R.mjs.map +1 -0
  4. package/dist/bulk-upload-dialog-D7w7W1Hl.mjs +273 -0
  5. package/dist/bulk-upload-dialog-D7w7W1Hl.mjs.map +1 -0
  6. package/dist/{components/ui/card.mjs → card-BKHjBQfw.mjs} +8 -8
  7. package/dist/card-BKHjBQfw.mjs.map +1 -0
  8. package/dist/client/styles/index.css +434 -0
  9. package/dist/client-DbpZKSgH.d.mts +13585 -0
  10. package/dist/client-DbpZKSgH.d.mts.map +1 -0
  11. package/dist/client-njX1rZmi.mjs +22612 -0
  12. package/dist/client-njX1rZmi.mjs.map +1 -0
  13. package/dist/client.d.mts +3 -0
  14. package/dist/client.mjs +13 -0
  15. package/dist/content-locales-provider-BXvuIgfg.mjs +1650 -0
  16. package/dist/content-locales-provider-BXvuIgfg.mjs.map +1 -0
  17. package/dist/dashboard-page-B4PGEdc2.mjs +2500 -0
  18. package/dist/dashboard-page-B4PGEdc2.mjs.map +1 -0
  19. package/dist/dashboard-page-mCY0pgZv.mjs +3 -0
  20. package/dist/dropzone-Do3awXKd.mjs +634 -0
  21. package/dist/dropzone-Do3awXKd.mjs.map +1 -0
  22. package/dist/{views/auth/forgot-password-form.mjs → forgot-password-page-Bcp-An4Y.mjs} +87 -14
  23. package/dist/forgot-password-page-Bcp-An4Y.mjs.map +1 -0
  24. package/dist/forgot-password-page-CEwsdLwn.mjs +3 -0
  25. package/dist/index-B9Xwk4hi.d.mts +2753 -0
  26. package/dist/index-B9Xwk4hi.d.mts.map +1 -0
  27. package/dist/index.d.mts +3 -0
  28. package/dist/index.mjs +13 -0
  29. package/dist/login-page-BUnpCbCa.mjs +3 -0
  30. package/dist/login-page-CP4gA-dl.mjs +298 -0
  31. package/dist/login-page-CP4gA-dl.mjs.map +1 -0
  32. package/dist/preview-utils-BKQ9-TMa.mjs +65 -0
  33. package/dist/preview-utils-BKQ9-TMa.mjs.map +1 -0
  34. package/dist/{views/auth/reset-password-form.mjs → reset-password-page-BqfDmLxA.mjs} +111 -14
  35. package/dist/reset-password-page-BqfDmLxA.mjs.map +1 -0
  36. package/dist/reset-password-page-CufHz3h3.mjs +3 -0
  37. package/dist/runtime-6VZM878K.mjs +69 -0
  38. package/dist/runtime-6VZM878K.mjs.map +1 -0
  39. package/dist/saved-views.types-BMsz5mCy.d.mts +42 -0
  40. package/dist/saved-views.types-BMsz5mCy.d.mts.map +1 -0
  41. package/dist/server.d.mts +250 -0
  42. package/dist/server.d.mts.map +1 -0
  43. package/dist/server.mjs +832 -0
  44. package/dist/server.mjs.map +1 -0
  45. package/dist/setup-page-BNNzt_Z6.mjs +3 -0
  46. package/dist/setup-page-YAP_fzqh.mjs +264 -0
  47. package/dist/setup-page-YAP_fzqh.mjs.map +1 -0
  48. package/dist/shared.d.mts +57 -0
  49. package/dist/shared.d.mts.map +1 -0
  50. package/dist/shared.mjs +3 -0
  51. package/dist/{hooks/use-auth.mjs → use-auth-BoLmWtmU.mjs} +42 -30
  52. package/dist/use-auth-BoLmWtmU.mjs.map +1 -0
  53. package/package.json +48 -198
  54. package/.turbo/turbo-build.log +0 -108
  55. package/CHANGELOG.md +0 -10
  56. package/STATUS.md +0 -917
  57. package/VALIDATION.md +0 -602
  58. package/components.json +0 -24
  59. package/dist/__tests__/setup.mjs +0 -38
  60. package/dist/__tests__/test-utils.mjs +0 -45
  61. package/dist/__tests__/vitest.d.mjs +0 -3
  62. package/dist/components/admin-app.mjs +0 -69
  63. package/dist/components/fields/array-field.mjs +0 -190
  64. package/dist/components/fields/checkbox-field.mjs +0 -34
  65. package/dist/components/fields/custom-field.mjs +0 -32
  66. package/dist/components/fields/date-field.mjs +0 -41
  67. package/dist/components/fields/datetime-field.mjs +0 -42
  68. package/dist/components/fields/email-field.mjs +0 -37
  69. package/dist/components/fields/embedded-collection.mjs +0 -253
  70. package/dist/components/fields/field-types.mjs +0 -1
  71. package/dist/components/fields/field-utils.mjs +0 -10
  72. package/dist/components/fields/field-wrapper.mjs +0 -34
  73. package/dist/components/fields/index.mjs +0 -23
  74. package/dist/components/fields/json-field.mjs +0 -243
  75. package/dist/components/fields/locale-badge.mjs +0 -16
  76. package/dist/components/fields/number-field.mjs +0 -39
  77. package/dist/components/fields/password-field.mjs +0 -37
  78. package/dist/components/fields/relation-field.mjs +0 -104
  79. package/dist/components/fields/relation-picker.mjs +0 -229
  80. package/dist/components/fields/relation-select.mjs +0 -188
  81. package/dist/components/fields/rich-text-editor/index.mjs +0 -897
  82. package/dist/components/fields/select-field.mjs +0 -41
  83. package/dist/components/fields/switch-field.mjs +0 -34
  84. package/dist/components/fields/text-field.mjs +0 -38
  85. package/dist/components/fields/textarea-field.mjs +0 -38
  86. package/dist/components/index.mjs +0 -59
  87. package/dist/components/primitives/checkbox-input.mjs +0 -127
  88. package/dist/components/primitives/date-input.mjs +0 -303
  89. package/dist/components/primitives/index.mjs +0 -12
  90. package/dist/components/primitives/number-input.mjs +0 -104
  91. package/dist/components/primitives/select-input.mjs +0 -177
  92. package/dist/components/primitives/tag-input.mjs +0 -135
  93. package/dist/components/primitives/text-input.mjs +0 -39
  94. package/dist/components/primitives/textarea-input.mjs +0 -37
  95. package/dist/components/primitives/toggle-input.mjs +0 -31
  96. package/dist/components/primitives/types.mjs +0 -12
  97. package/dist/components/ui/accordion.mjs +0 -55
  98. package/dist/components/ui/avatar.mjs +0 -54
  99. package/dist/components/ui/badge.mjs +0 -34
  100. package/dist/components/ui/button.mjs +0 -48
  101. package/dist/components/ui/checkbox.mjs +0 -21
  102. package/dist/components/ui/combobox.mjs +0 -163
  103. package/dist/components/ui/dialog.mjs +0 -95
  104. package/dist/components/ui/dropdown-menu.mjs +0 -138
  105. package/dist/components/ui/field.mjs +0 -113
  106. package/dist/components/ui/input-group.mjs +0 -82
  107. package/dist/components/ui/input.mjs +0 -17
  108. package/dist/components/ui/label.mjs +0 -15
  109. package/dist/components/ui/popover.mjs +0 -56
  110. package/dist/components/ui/scroll-area.mjs +0 -38
  111. package/dist/components/ui/select.mjs +0 -100
  112. package/dist/components/ui/separator.mjs +0 -16
  113. package/dist/components/ui/sheet.mjs +0 -90
  114. package/dist/components/ui/sidebar.mjs +0 -387
  115. package/dist/components/ui/skeleton.mjs +0 -14
  116. package/dist/components/ui/spinner.mjs +0 -16
  117. package/dist/components/ui/switch.mjs +0 -22
  118. package/dist/components/ui/table.mjs +0 -68
  119. package/dist/components/ui/tabs.mjs +0 -48
  120. package/dist/components/ui/textarea.mjs +0 -15
  121. package/dist/components/ui/tooltip.mjs +0 -44
  122. package/dist/config/component-registry.mjs +0 -38
  123. package/dist/config/index.mjs +0 -129
  124. package/dist/hooks/admin-provider.mjs +0 -70
  125. package/dist/hooks/index.mjs +0 -7
  126. package/dist/hooks/store.mjs +0 -178
  127. package/dist/hooks/use-collection-db.mjs +0 -146
  128. package/dist/hooks/use-collection.mjs +0 -112
  129. package/dist/hooks/use-global.mjs +0 -46
  130. package/dist/hooks/use-mobile.mjs +0 -20
  131. package/dist/lib/utils.mjs +0 -10
  132. package/dist/styles/index.css +0 -336
  133. package/dist/styles/index.mjs +0 -1
  134. package/dist/utils/index.mjs +0 -9
  135. package/dist/views/auth/auth-layout.mjs +0 -52
  136. package/dist/views/auth/index.mjs +0 -6
  137. package/dist/views/auth/login-form.mjs +0 -156
  138. package/dist/views/collection/auto-form-fields.mjs +0 -525
  139. package/dist/views/collection/collection-form.mjs +0 -91
  140. package/dist/views/collection/collection-list.mjs +0 -76
  141. package/dist/views/collection/form-field.mjs +0 -42
  142. package/dist/views/collection/index.mjs +0 -6
  143. package/dist/views/common/index.mjs +0 -4
  144. package/dist/views/common/locale-switcher.mjs +0 -39
  145. package/dist/views/common/version-history.mjs +0 -272
  146. package/dist/views/index.mjs +0 -9
  147. package/dist/views/layout/admin-layout.mjs +0 -40
  148. package/dist/views/layout/admin-router.mjs +0 -95
  149. package/dist/views/layout/admin-sidebar.mjs +0 -63
  150. package/dist/views/layout/index.mjs +0 -5
  151. package/src/__tests__/setup.ts +0 -44
  152. package/src/__tests__/test-utils.tsx +0 -49
  153. package/src/__tests__/vitest.d.ts +0 -9
  154. package/src/components/admin-app.tsx +0 -221
  155. package/src/components/fields/array-field.tsx +0 -237
  156. package/src/components/fields/checkbox-field.tsx +0 -47
  157. package/src/components/fields/custom-field.tsx +0 -50
  158. package/src/components/fields/date-field.tsx +0 -65
  159. package/src/components/fields/datetime-field.tsx +0 -67
  160. package/src/components/fields/email-field.tsx +0 -51
  161. package/src/components/fields/embedded-collection.tsx +0 -315
  162. package/src/components/fields/field-types.ts +0 -162
  163. package/src/components/fields/field-utils.ts +0 -6
  164. package/src/components/fields/field-wrapper.tsx +0 -52
  165. package/src/components/fields/index.ts +0 -66
  166. package/src/components/fields/json-field.tsx +0 -440
  167. package/src/components/fields/locale-badge.tsx +0 -15
  168. package/src/components/fields/number-field.tsx +0 -57
  169. package/src/components/fields/password-field.tsx +0 -51
  170. package/src/components/fields/relation-field.tsx +0 -243
  171. package/src/components/fields/relation-picker.tsx +0 -402
  172. package/src/components/fields/relation-select.tsx +0 -327
  173. package/src/components/fields/rich-text-editor/index.tsx +0 -1337
  174. package/src/components/fields/select-field.tsx +0 -61
  175. package/src/components/fields/switch-field.tsx +0 -47
  176. package/src/components/fields/text-field.tsx +0 -55
  177. package/src/components/fields/textarea-field.tsx +0 -55
  178. package/src/components/index.ts +0 -40
  179. package/src/components/primitives/checkbox-input.tsx +0 -193
  180. package/src/components/primitives/date-input.tsx +0 -401
  181. package/src/components/primitives/index.ts +0 -24
  182. package/src/components/primitives/number-input.tsx +0 -132
  183. package/src/components/primitives/select-input.tsx +0 -296
  184. package/src/components/primitives/tag-input.tsx +0 -200
  185. package/src/components/primitives/text-input.tsx +0 -49
  186. package/src/components/primitives/textarea-input.tsx +0 -46
  187. package/src/components/primitives/toggle-input.tsx +0 -36
  188. package/src/components/primitives/types.ts +0 -235
  189. package/src/components/ui/accordion.tsx +0 -72
  190. package/src/components/ui/avatar.tsx +0 -106
  191. package/src/components/ui/badge.tsx +0 -48
  192. package/src/components/ui/button.tsx +0 -53
  193. package/src/components/ui/card.tsx +0 -94
  194. package/src/components/ui/checkbox.tsx +0 -27
  195. package/src/components/ui/combobox.tsx +0 -290
  196. package/src/components/ui/dialog.tsx +0 -151
  197. package/src/components/ui/dropdown-menu.tsx +0 -254
  198. package/src/components/ui/field.tsx +0 -227
  199. package/src/components/ui/input-group.tsx +0 -149
  200. package/src/components/ui/input.tsx +0 -20
  201. package/src/components/ui/label.tsx +0 -18
  202. package/src/components/ui/popover.tsx +0 -88
  203. package/src/components/ui/scroll-area.tsx +0 -53
  204. package/src/components/ui/select.tsx +0 -192
  205. package/src/components/ui/separator.tsx +0 -23
  206. package/src/components/ui/sheet.tsx +0 -127
  207. package/src/components/ui/sidebar.tsx +0 -723
  208. package/src/components/ui/skeleton.tsx +0 -13
  209. package/src/components/ui/spinner.tsx +0 -10
  210. package/src/components/ui/switch.tsx +0 -32
  211. package/src/components/ui/table.tsx +0 -99
  212. package/src/components/ui/tabs.tsx +0 -82
  213. package/src/components/ui/textarea.tsx +0 -18
  214. package/src/components/ui/tooltip.tsx +0 -70
  215. package/src/config/component-registry.ts +0 -190
  216. package/src/config/index.ts +0 -1099
  217. package/src/hooks/README.md +0 -269
  218. package/src/hooks/admin-provider.tsx +0 -110
  219. package/src/hooks/index.ts +0 -41
  220. package/src/hooks/store.ts +0 -248
  221. package/src/hooks/use-auth.ts +0 -168
  222. package/src/hooks/use-collection-db.ts +0 -209
  223. package/src/hooks/use-collection.ts +0 -156
  224. package/src/hooks/use-global.ts +0 -69
  225. package/src/hooks/use-mobile.ts +0 -21
  226. package/src/lib/utils.ts +0 -6
  227. package/src/styles/index.css +0 -340
  228. package/src/utils/index.ts +0 -6
  229. package/src/views/auth/auth-layout.tsx +0 -77
  230. package/src/views/auth/forgot-password-form.tsx +0 -192
  231. package/src/views/auth/index.ts +0 -21
  232. package/src/views/auth/login-form.tsx +0 -229
  233. package/src/views/auth/reset-password-form.tsx +0 -232
  234. package/src/views/collection/auto-form-fields.tsx +0 -982
  235. package/src/views/collection/collection-form.tsx +0 -186
  236. package/src/views/collection/collection-list.tsx +0 -223
  237. package/src/views/collection/form-field.tsx +0 -52
  238. package/src/views/collection/index.ts +0 -15
  239. package/src/views/common/index.ts +0 -8
  240. package/src/views/common/locale-switcher.tsx +0 -45
  241. package/src/views/common/version-history.tsx +0 -406
  242. package/src/views/index.ts +0 -25
  243. package/src/views/layout/admin-layout.tsx +0 -117
  244. package/src/views/layout/admin-router.tsx +0 -206
  245. package/src/views/layout/admin-sidebar.tsx +0 -185
  246. package/src/views/layout/index.ts +0 -12
  247. package/tsconfig.json +0 -13
  248. package/tsconfig.tsbuildinfo +0 -1
  249. package/tsdown.config.ts +0 -13
  250. package/vitest.config.ts +0 -29
@@ -1,10 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- //#region src/lib/utils.ts
5
- function cn(...inputs) {
6
- return twMerge(clsx(inputs));
7
- }
8
-
9
- //#endregion
10
- export { cn };
@@ -1,336 +0,0 @@
1
-
2
- @custom-variant dark (&:is(.dark *));
3
-
4
- /* =============================================================================
5
- QUESTPIE Design System - Cyber-Minimalist Theme
6
-
7
- Core principles:
8
- - Zero radius (sharp corners)
9
- - Neon purple accents with glow effects
10
- - Pitch-black foundation
11
- - Backdrop blur for depth
12
- ============================================================================= */
13
-
14
- :root {
15
- /* Core Colors (Light mode - for completeness, but dark is primary) */
16
- --background: oklch(1 0 0);
17
- --foreground: oklch(0.145 0 0);
18
- --card: oklch(0.98 0 0);
19
- --card-foreground: oklch(0.145 0 0);
20
- --popover: oklch(1 0 0);
21
- --popover-foreground: oklch(0.145 0 0);
22
- --primary: oklch(0.55 0.3 300);
23
- --primary-foreground: oklch(1 0 0);
24
- --secondary: oklch(0.96 0 0);
25
- --secondary-foreground: oklch(0.55 0.3 300);
26
- --muted: oklch(0.96 0 0);
27
- --muted-foreground: oklch(0.5 0 0);
28
- --accent: oklch(0.96 0 0);
29
- --accent-foreground: oklch(0.2 0 0);
30
- --destructive: oklch(0.58 0.22 27);
31
- --border: oklch(0.9 0 0);
32
- --input: oklch(0.9 0 0);
33
- --ring: oklch(0.55 0.3 300 / 50%);
34
-
35
- /* Chart Colors */
36
- --chart-1: oklch(0.7 0.25 300);
37
- --chart-2: oklch(0.65 0.28 310);
38
- --chart-3: oklch(0.6 0.3 300);
39
- --chart-4: oklch(0.55 0.3 300);
40
- --chart-5: oklch(0.5 0.28 300);
41
-
42
- /* QUESTPIE: Zero Radius */
43
- --radius: 0px;
44
-
45
- /* Sidebar */
46
- --sidebar: oklch(0.98 0 0);
47
- --sidebar-foreground: oklch(0.145 0 0);
48
- --sidebar-primary: oklch(0.55 0.3 300);
49
- --sidebar-primary-foreground: oklch(1 0 0);
50
- --sidebar-accent: oklch(0.96 0 0);
51
- --sidebar-accent-foreground: oklch(0.2 0 0);
52
- --sidebar-border: oklch(0.9 0 0);
53
- --sidebar-ring: oklch(0.55 0.3 300 / 50%);
54
- }
55
-
56
- /* Dark Mode - QUESTPIE Primary Theme */
57
- .dark {
58
- /* Depth Black Foundation */
59
- --background: oklch(0.14 0 0);
60
- --foreground: oklch(0.92 0.01 255);
61
-
62
- /* Surface Black */
63
- --card: oklch(0.18 0 0);
64
- --card-foreground: oklch(0.92 0.01 255);
65
-
66
- /* Popover */
67
- --popover: oklch(0.18 0 0);
68
- --popover-foreground: oklch(0.92 0.01 255);
69
-
70
- /* Neon Purple Accent */
71
- --primary: oklch(0.55 0.3 300);
72
- --primary-foreground: oklch(1 0 0);
73
-
74
- /* Neutral Surface */
75
- --secondary: oklch(0.22 0 0);
76
- --secondary-foreground: oklch(0.55 0.3 300);
77
-
78
- /* Muted */
79
- --muted: oklch(0.25 0 0);
80
- --muted-foreground: oklch(0.7 0 0);
81
-
82
- /* Accent */
83
- --accent: oklch(0.25 0 0);
84
- --accent-foreground: oklch(0.92 0.01 255);
85
-
86
- /* Destructive */
87
- --destructive: oklch(0.65 0.22 27);
88
-
89
- /* Technical Border */
90
- --border: oklch(0.32 0 0);
91
- --input: oklch(0.28 0 0);
92
-
93
- /* Glow Focus Ring */
94
- --ring: oklch(0.55 0.3 300 / 50%);
95
-
96
- /* Chart Colors */
97
- --chart-1: oklch(0.7 0.25 300);
98
- --chart-2: oklch(0.65 0.28 310);
99
- --chart-3: oklch(0.6 0.3 300);
100
- --chart-4: oklch(0.55 0.3 300);
101
- --chart-5: oklch(0.5 0.28 300);
102
-
103
- /* Sidebar */
104
- --sidebar: oklch(0.16 0 0);
105
- --sidebar-foreground: oklch(0.92 0.01 255);
106
- --sidebar-primary: oklch(0.55 0.3 300);
107
- --sidebar-primary-foreground: oklch(1 0 0);
108
- --sidebar-accent: oklch(0.22 0 0);
109
- --sidebar-accent-foreground: oklch(0.92 0.01 255);
110
- --sidebar-border: oklch(0.32 0 0);
111
- --sidebar-ring: oklch(0.55 0.3 300 / 50%);
112
- }
113
-
114
- @theme inline {
115
- /* Typography */
116
- --font-sans: "DM Sans Variable", ui-sans-serif, system-ui, sans-serif;
117
- --font-mono: "JetBrains Mono Variable", ui-monospace, monospace;
118
-
119
- /* Color Variables */
120
- --color-sidebar-ring: var(--sidebar-ring);
121
- --color-sidebar-border: var(--sidebar-border);
122
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
123
- --color-sidebar-accent: var(--sidebar-accent);
124
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
125
- --color-sidebar-primary: var(--sidebar-primary);
126
- --color-sidebar-foreground: var(--sidebar-foreground);
127
- --color-sidebar: var(--sidebar);
128
- --color-chart-5: var(--chart-5);
129
- --color-chart-4: var(--chart-4);
130
- --color-chart-3: var(--chart-3);
131
- --color-chart-2: var(--chart-2);
132
- --color-chart-1: var(--chart-1);
133
- --color-ring: var(--ring);
134
- --color-input: var(--input);
135
- --color-border: var(--border);
136
- --color-destructive: var(--destructive);
137
- --color-accent-foreground: var(--accent-foreground);
138
- --color-accent: var(--accent);
139
- --color-muted-foreground: var(--muted-foreground);
140
- --color-muted: var(--muted);
141
- --color-secondary-foreground: var(--secondary-foreground);
142
- --color-secondary: var(--secondary);
143
- --color-primary-foreground: var(--primary-foreground);
144
- --color-primary: var(--primary);
145
- --color-popover-foreground: var(--popover-foreground);
146
- --color-popover: var(--popover);
147
- --color-card-foreground: var(--card-foreground);
148
- --color-card: var(--card);
149
- --color-foreground: var(--foreground);
150
- --color-background: var(--background);
151
-
152
- /* QUESTPIE: Zero Radius */
153
- --radius-sm: 0px;
154
- --radius-md: 0px;
155
- --radius-lg: 0px;
156
- --radius-xl: 0px;
157
- --radius-2xl: 0px;
158
- --radius-3xl: 0px;
159
- --radius-4xl: 0px;
160
- }
161
-
162
- @layer base {
163
- * {
164
- @apply border-border outline-ring/50;
165
- }
166
- body {
167
- @apply bg-background font-sans text-foreground;
168
- }
169
- html {
170
- @apply font-sans;
171
- }
172
- }
173
-
174
- /* =============================================================================
175
- QUESTPIE Atmospheric Utilities
176
- ============================================================================= */
177
-
178
- @utility bg-grid-quest {
179
- background-image:
180
- linear-gradient(to right, oklch(0.55 0.3 300 / 5%) 1px, transparent 1px),
181
- linear-gradient(to bottom, oklch(0.55 0.3 300 / 5%) 1px, transparent 1px);
182
- background-size: 24px 24px;
183
- }
184
-
185
- @utility glow-primary {
186
- box-shadow: 0 0 20px oklch(0.55 0.3 300 / 30%);
187
- }
188
-
189
- @utility glow-primary-sm {
190
- box-shadow: 0 0 8px oklch(0.55 0.3 300 / 25%);
191
- }
192
-
193
- @utility glow-destructive {
194
- box-shadow: 0 0 20px oklch(0.65 0.22 27 / 30%);
195
- }
196
-
197
- @utility ambient-beam {
198
- background: radial-gradient(
199
- circle,
200
- oklch(0.55 0.3 300 / 15%) 0%,
201
- transparent 70%
202
- );
203
- filter: blur(100px);
204
- }
205
-
206
- /* =============================================================================
207
- Rich Text Editor Styles
208
- ============================================================================= */
209
-
210
- .qp-rich-text-editor__content {
211
- min-height: 200px;
212
- padding: 0.75rem;
213
- outline: none;
214
- }
215
-
216
- .qp-rich-text-editor__content > *:first-child {
217
- margin-top: 0;
218
- }
219
-
220
- .qp-rich-text-editor__content > *:last-child {
221
- margin-bottom: 0;
222
- }
223
-
224
- .qp-rich-text-editor__content p {
225
- margin: 0 0 0.75rem;
226
- }
227
-
228
- .qp-rich-text-editor__content h1 {
229
- font-size: 1.5rem;
230
- font-weight: 600;
231
- margin: 1rem 0 0.75rem;
232
- }
233
-
234
- .qp-rich-text-editor__content h2 {
235
- font-size: 1.25rem;
236
- font-weight: 600;
237
- margin: 1rem 0 0.75rem;
238
- }
239
-
240
- .qp-rich-text-editor__content h3 {
241
- font-size: 1.125rem;
242
- font-weight: 600;
243
- margin: 1rem 0 0.75rem;
244
- }
245
-
246
- .qp-rich-text-editor__content ul,
247
- .qp-rich-text-editor__content ol {
248
- padding-left: 1.5rem;
249
- margin: 0.75rem 0;
250
- }
251
-
252
- .qp-rich-text-editor__content blockquote {
253
- border-left: 2px solid var(--border);
254
- padding-left: 0.75rem;
255
- color: var(--muted-foreground);
256
- margin: 0.75rem 0;
257
- }
258
-
259
- .qp-rich-text-editor__content code {
260
- background: var(--muted);
261
- padding: 0.1rem 0.25rem;
262
- font-size: 0.875em;
263
- font-family: var(--font-mono);
264
- }
265
-
266
- .qp-rich-text-editor__content pre {
267
- background: var(--muted);
268
- padding: 0.75rem;
269
- overflow-x: auto;
270
- font-family: var(--font-mono);
271
- }
272
-
273
- .qp-rich-text-editor__content hr {
274
- border: none;
275
- border-top: 1px solid var(--border);
276
- margin: 1rem 0;
277
- }
278
-
279
- .qp-rich-text-editor__content table {
280
- border-collapse: collapse;
281
- margin: 1rem 0;
282
- width: 100%;
283
- }
284
-
285
- .qp-rich-text-editor__content th,
286
- .qp-rich-text-editor__content td {
287
- border: 1px solid var(--border);
288
- padding: 0.5rem;
289
- text-align: left;
290
- }
291
-
292
- .tippy-box[data-theme~="qp-rich-text-editor"] {
293
- background: var(--popover);
294
- color: var(--popover-foreground);
295
- border: 1px solid var(--border);
296
- box-shadow: 0 0 20px oklch(0 0 0 / 40%);
297
- }
298
-
299
- .qp-rich-text-editor__slash {
300
- display: flex;
301
- flex-direction: column;
302
- gap: 0.25rem;
303
- padding: 0.5rem;
304
- min-width: 220px;
305
- }
306
-
307
- .qp-rich-text-editor__slash-item {
308
- display: flex;
309
- flex-direction: column;
310
- align-items: flex-start;
311
- gap: 0.125rem;
312
- padding: 0.5rem;
313
- font-size: 0.75rem;
314
- line-height: 1.2;
315
- color: var(--foreground);
316
- }
317
-
318
- .qp-rich-text-editor__slash-item--active,
319
- .qp-rich-text-editor__slash-item:hover {
320
- background: var(--muted);
321
- }
322
-
323
- .qp-rich-text-editor__slash-title {
324
- font-weight: 600;
325
- }
326
-
327
- .qp-rich-text-editor__slash-description {
328
- color: var(--muted-foreground);
329
- }
330
-
331
- .qp-rich-text-editor__slash-empty {
332
- padding: 0.5rem;
333
- font-size: 0.75rem;
334
- color: var(--muted-foreground);
335
- }
336
-
@@ -1 +0,0 @@
1
- export { };
@@ -1,9 +0,0 @@
1
- import { cn } from "../lib/utils";
2
-
3
- //#region src/utils/index.ts
4
- /**
5
- * Utility functions for admin package
6
- */
7
-
8
- //#endregion
9
- export { cn };
@@ -1,52 +0,0 @@
1
- import "react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../components/ui/card";
4
- import { cn } from "../../lib/utils";
5
-
6
- //#region src/views/auth/auth-layout.tsx
7
- /**
8
- * Centered layout for authentication pages (login, register, forgot password, etc.)
9
- *
10
- * @example
11
- * ```tsx
12
- * <AuthLayout
13
- * title="Sign in"
14
- * description="Enter your credentials to access the admin panel"
15
- * logo={<Logo />}
16
- * footer={<Link to="/forgot-password">Forgot password?</Link>}
17
- * >
18
- * <LoginForm />
19
- * </AuthLayout>
20
- * ```
21
- */
22
- function AuthLayout({ title, description, logo, footer, children, className }) {
23
- return /* @__PURE__ */ jsx("div", {
24
- className: "bg-background flex min-h-screen flex-col items-center justify-center p-4",
25
- children: /* @__PURE__ */ jsxs("div", {
26
- className: "w-full max-w-sm space-y-6",
27
- children: [
28
- logo && /* @__PURE__ */ jsx("div", {
29
- className: "flex justify-center",
30
- children: logo
31
- }),
32
- /* @__PURE__ */ jsxs(Card, {
33
- className: cn("w-full", className),
34
- children: [/* @__PURE__ */ jsxs(CardHeader, {
35
- className: "text-center",
36
- children: [/* @__PURE__ */ jsx(CardTitle, {
37
- className: "text-lg",
38
- children: title
39
- }), description && /* @__PURE__ */ jsx(CardDescription, { children: description })]
40
- }), /* @__PURE__ */ jsx(CardContent, { children })]
41
- }),
42
- footer && /* @__PURE__ */ jsx("div", {
43
- className: "text-muted-foreground text-center text-xs",
44
- children: footer
45
- })
46
- ]
47
- })
48
- });
49
- }
50
-
51
- //#endregion
52
- export { AuthLayout };
@@ -1,6 +0,0 @@
1
- import { AuthLayout } from "./auth-layout";
2
- import { LoginForm } from "./login-form";
3
- import { ForgotPasswordForm } from "./forgot-password-form";
4
- import { ResetPasswordForm } from "./reset-password-form";
5
-
6
- export { AuthLayout, ForgotPasswordForm, LoginForm, ResetPasswordForm };
@@ -1,156 +0,0 @@
1
- import "react";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { Button } from "../../components/ui/button";
4
- import { Field, FieldContent, FieldError, FieldGroup, FieldLabel } from "../../components/ui/field";
5
- import { Input } from "../../components/ui/input";
6
- import { cn } from "../../lib/utils";
7
- import { Envelope, Lock, SpinnerGap } from "@phosphor-icons/react";
8
- import { useForm } from "react-hook-form";
9
-
10
- //#region src/views/auth/login-form.tsx
11
- /**
12
- * Login form with email and password fields
13
- *
14
- * @example
15
- * ```tsx
16
- * const authClient = createAdminAuthClient<typeof cms>({ baseURL: '...' })
17
- *
18
- * function LoginPage() {
19
- * const [error, setError] = useState<string | null>(null)
20
- *
21
- * const handleLogin = async (values: LoginFormValues) => {
22
- * const result = await authClient.signIn.email({
23
- * email: values.email,
24
- * password: values.password,
25
- * })
26
- * if (result.error) {
27
- * setError(result.error.message)
28
- * }
29
- * }
30
- *
31
- * return (
32
- * <AuthLayout title="Sign in">
33
- * <LoginForm onSubmit={handleLogin} error={error} />
34
- * </AuthLayout>
35
- * )
36
- * }
37
- * ```
38
- */
39
- function LoginForm({ onSubmit, onSignUpClick, onForgotPasswordClick, showRememberMe = false, showSignUp = true, showForgotPassword = true, defaultValues, className, error }) {
40
- const { register, handleSubmit, formState: { errors, isSubmitting } } = useForm({ defaultValues: {
41
- email: "",
42
- password: "",
43
- rememberMe: false,
44
- ...defaultValues
45
- } });
46
- return /* @__PURE__ */ jsxs("form", {
47
- onSubmit: handleSubmit(async (values) => {
48
- await onSubmit(values);
49
- }),
50
- className: cn("space-y-4", className),
51
- children: [
52
- /* @__PURE__ */ jsxs(FieldGroup, { children: [
53
- /* @__PURE__ */ jsxs(Field, {
54
- "data-invalid": !!errors.email,
55
- children: [/* @__PURE__ */ jsx(FieldLabel, {
56
- htmlFor: "email",
57
- children: "Email"
58
- }), /* @__PURE__ */ jsxs(FieldContent, { children: [/* @__PURE__ */ jsxs("div", {
59
- className: "relative",
60
- children: [/* @__PURE__ */ jsx(Envelope, {
61
- className: "text-muted-foreground absolute left-2 top-1/2 size-4 -translate-y-1/2",
62
- weight: "duotone"
63
- }), /* @__PURE__ */ jsx(Input, {
64
- id: "email",
65
- type: "email",
66
- placeholder: "you@example.com",
67
- className: "pl-8",
68
- autoComplete: "email",
69
- "aria-invalid": !!errors.email,
70
- ...register("email", {
71
- required: "Email is required",
72
- pattern: {
73
- value: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
74
- message: "Invalid email address"
75
- }
76
- })
77
- })]
78
- }), /* @__PURE__ */ jsx(FieldError, { children: errors.email?.message })] })]
79
- }),
80
- /* @__PURE__ */ jsxs(Field, {
81
- "data-invalid": !!errors.password,
82
- children: [/* @__PURE__ */ jsx(FieldLabel, {
83
- htmlFor: "password",
84
- children: "Password"
85
- }), /* @__PURE__ */ jsxs(FieldContent, { children: [/* @__PURE__ */ jsxs("div", {
86
- className: "relative",
87
- children: [/* @__PURE__ */ jsx(Lock, {
88
- className: "text-muted-foreground absolute left-2 top-1/2 size-4 -translate-y-1/2",
89
- weight: "duotone"
90
- }), /* @__PURE__ */ jsx(Input, {
91
- id: "password",
92
- type: "password",
93
- placeholder: "Enter your password",
94
- className: "pl-8",
95
- autoComplete: "current-password",
96
- "aria-invalid": !!errors.password,
97
- ...register("password", {
98
- required: "Password is required",
99
- minLength: {
100
- value: 6,
101
- message: "Password must be at least 6 characters"
102
- }
103
- })
104
- })]
105
- }), /* @__PURE__ */ jsx(FieldError, { children: errors.password?.message })] })]
106
- }),
107
- (showRememberMe || showForgotPassword) && /* @__PURE__ */ jsxs("div", {
108
- className: "flex items-center justify-between",
109
- children: [showRememberMe && /* @__PURE__ */ jsxs("label", {
110
- className: "text-muted-foreground flex items-center gap-2 text-xs",
111
- children: [/* @__PURE__ */ jsx("input", {
112
- type: "checkbox",
113
- className: "rounded border-gray-300",
114
- ...register("rememberMe")
115
- }), "Remember me"]
116
- }), showForgotPassword && /* @__PURE__ */ jsx("button", {
117
- type: "button",
118
- onClick: onForgotPasswordClick,
119
- className: "text-primary text-xs hover:underline",
120
- children: "Forgot password?"
121
- })]
122
- })
123
- ] }),
124
- error && /* @__PURE__ */ jsx("div", {
125
- className: "bg-destructive/10 text-destructive rounded-md p-3 text-xs",
126
- children: error
127
- }),
128
- /* @__PURE__ */ jsx(Button, {
129
- type: "submit",
130
- className: "w-full",
131
- size: "lg",
132
- disabled: isSubmitting,
133
- children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerGap, {
134
- className: "animate-spin",
135
- weight: "bold"
136
- }), "Signing in..."] }) : "Sign in"
137
- }),
138
- showSignUp && /* @__PURE__ */ jsxs("p", {
139
- className: "text-muted-foreground text-center text-xs",
140
- children: [
141
- "Don't have an account?",
142
- " ",
143
- /* @__PURE__ */ jsx("button", {
144
- type: "button",
145
- onClick: onSignUpClick,
146
- className: "text-primary hover:underline",
147
- children: "Sign up"
148
- })
149
- ]
150
- })
151
- ]
152
- });
153
- }
154
-
155
- //#endregion
156
- export { LoginForm };