@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,340 +0,0 @@
1
- @import "tailwindcss";
2
- @import "tw-animate-css";
3
- @import "shadcn/tailwind.css";
4
- @import "@fontsource-variable/dm-sans";
5
- @import "@fontsource-variable/jetbrains-mono";
6
-
7
- @custom-variant dark (&:is(.dark *));
8
-
9
- /* =============================================================================
10
- QUESTPIE Design System - Cyber-Minimalist Theme
11
-
12
- Core principles:
13
- - Zero radius (sharp corners)
14
- - Neon purple accents with glow effects
15
- - Pitch-black foundation
16
- - Backdrop blur for depth
17
- ============================================================================= */
18
-
19
- :root {
20
- /* Core Colors (Light mode - for completeness, but dark is primary) */
21
- --background: oklch(1 0 0);
22
- --foreground: oklch(0.145 0 0);
23
- --card: oklch(0.98 0 0);
24
- --card-foreground: oklch(0.145 0 0);
25
- --popover: oklch(1 0 0);
26
- --popover-foreground: oklch(0.145 0 0);
27
- --primary: oklch(0.55 0.3 300);
28
- --primary-foreground: oklch(1 0 0);
29
- --secondary: oklch(0.96 0 0);
30
- --secondary-foreground: oklch(0.55 0.3 300);
31
- --muted: oklch(0.96 0 0);
32
- --muted-foreground: oklch(0.5 0 0);
33
- --accent: oklch(0.96 0 0);
34
- --accent-foreground: oklch(0.2 0 0);
35
- --destructive: oklch(0.58 0.22 27);
36
- --border: oklch(0.9 0 0);
37
- --input: oklch(0.9 0 0);
38
- --ring: oklch(0.55 0.3 300 / 50%);
39
-
40
- /* Chart Colors */
41
- --chart-1: oklch(0.7 0.25 300);
42
- --chart-2: oklch(0.65 0.28 310);
43
- --chart-3: oklch(0.6 0.3 300);
44
- --chart-4: oklch(0.55 0.3 300);
45
- --chart-5: oklch(0.5 0.28 300);
46
-
47
- /* QUESTPIE: Zero Radius */
48
- --radius: 0px;
49
-
50
- /* Sidebar */
51
- --sidebar: oklch(0.98 0 0);
52
- --sidebar-foreground: oklch(0.145 0 0);
53
- --sidebar-primary: oklch(0.55 0.3 300);
54
- --sidebar-primary-foreground: oklch(1 0 0);
55
- --sidebar-accent: oklch(0.96 0 0);
56
- --sidebar-accent-foreground: oklch(0.2 0 0);
57
- --sidebar-border: oklch(0.9 0 0);
58
- --sidebar-ring: oklch(0.55 0.3 300 / 50%);
59
- }
60
-
61
- /* Dark Mode - QUESTPIE Primary Theme */
62
- .dark {
63
- /* Depth Black Foundation */
64
- --background: oklch(0.14 0 0);
65
- --foreground: oklch(0.92 0.01 255);
66
-
67
- /* Surface Black */
68
- --card: oklch(0.18 0 0);
69
- --card-foreground: oklch(0.92 0.01 255);
70
-
71
- /* Popover */
72
- --popover: oklch(0.18 0 0);
73
- --popover-foreground: oklch(0.92 0.01 255);
74
-
75
- /* Neon Purple Accent */
76
- --primary: oklch(0.55 0.3 300);
77
- --primary-foreground: oklch(1 0 0);
78
-
79
- /* Neutral Surface */
80
- --secondary: oklch(0.22 0 0);
81
- --secondary-foreground: oklch(0.55 0.3 300);
82
-
83
- /* Muted */
84
- --muted: oklch(0.25 0 0);
85
- --muted-foreground: oklch(0.7 0 0);
86
-
87
- /* Accent */
88
- --accent: oklch(0.25 0 0);
89
- --accent-foreground: oklch(0.92 0.01 255);
90
-
91
- /* Destructive */
92
- --destructive: oklch(0.65 0.22 27);
93
-
94
- /* Technical Border */
95
- --border: oklch(0.32 0 0);
96
- --input: oklch(0.28 0 0);
97
-
98
- /* Glow Focus Ring */
99
- --ring: oklch(0.55 0.3 300 / 50%);
100
-
101
- /* Chart Colors */
102
- --chart-1: oklch(0.7 0.25 300);
103
- --chart-2: oklch(0.65 0.28 310);
104
- --chart-3: oklch(0.6 0.3 300);
105
- --chart-4: oklch(0.55 0.3 300);
106
- --chart-5: oklch(0.5 0.28 300);
107
-
108
- /* Sidebar */
109
- --sidebar: oklch(0.16 0 0);
110
- --sidebar-foreground: oklch(0.92 0.01 255);
111
- --sidebar-primary: oklch(0.55 0.3 300);
112
- --sidebar-primary-foreground: oklch(1 0 0);
113
- --sidebar-accent: oklch(0.22 0 0);
114
- --sidebar-accent-foreground: oklch(0.92 0.01 255);
115
- --sidebar-border: oklch(0.32 0 0);
116
- --sidebar-ring: oklch(0.55 0.3 300 / 50%);
117
- }
118
-
119
- @theme inline {
120
- /* Typography */
121
- --font-sans: "DM Sans Variable", ui-sans-serif, system-ui, sans-serif;
122
- --font-mono: "JetBrains Mono Variable", ui-monospace, monospace;
123
-
124
- /* Color Variables */
125
- --color-sidebar-ring: var(--sidebar-ring);
126
- --color-sidebar-border: var(--sidebar-border);
127
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
128
- --color-sidebar-accent: var(--sidebar-accent);
129
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
130
- --color-sidebar-primary: var(--sidebar-primary);
131
- --color-sidebar-foreground: var(--sidebar-foreground);
132
- --color-sidebar: var(--sidebar);
133
- --color-chart-5: var(--chart-5);
134
- --color-chart-4: var(--chart-4);
135
- --color-chart-3: var(--chart-3);
136
- --color-chart-2: var(--chart-2);
137
- --color-chart-1: var(--chart-1);
138
- --color-ring: var(--ring);
139
- --color-input: var(--input);
140
- --color-border: var(--border);
141
- --color-destructive: var(--destructive);
142
- --color-accent-foreground: var(--accent-foreground);
143
- --color-accent: var(--accent);
144
- --color-muted-foreground: var(--muted-foreground);
145
- --color-muted: var(--muted);
146
- --color-secondary-foreground: var(--secondary-foreground);
147
- --color-secondary: var(--secondary);
148
- --color-primary-foreground: var(--primary-foreground);
149
- --color-primary: var(--primary);
150
- --color-popover-foreground: var(--popover-foreground);
151
- --color-popover: var(--popover);
152
- --color-card-foreground: var(--card-foreground);
153
- --color-card: var(--card);
154
- --color-foreground: var(--foreground);
155
- --color-background: var(--background);
156
-
157
- /* QUESTPIE: Zero Radius */
158
- --radius-sm: 0px;
159
- --radius-md: 0px;
160
- --radius-lg: 0px;
161
- --radius-xl: 0px;
162
- --radius-2xl: 0px;
163
- --radius-3xl: 0px;
164
- --radius-4xl: 0px;
165
- }
166
-
167
- @layer base {
168
- * {
169
- @apply border-border outline-ring/50;
170
- }
171
- body {
172
- @apply bg-background font-sans text-foreground;
173
- }
174
- html {
175
- @apply font-sans;
176
- }
177
- }
178
-
179
- /* =============================================================================
180
- QUESTPIE Atmospheric Utilities
181
- ============================================================================= */
182
-
183
- @utility bg-grid-quest {
184
- background-image:
185
- linear-gradient(to right, oklch(0.55 0.3 300 / 5%) 1px, transparent 1px),
186
- linear-gradient(to bottom, oklch(0.55 0.3 300 / 5%) 1px, transparent 1px);
187
- background-size: 24px 24px;
188
- }
189
-
190
- @utility glow-primary {
191
- box-shadow: 0 0 20px oklch(0.55 0.3 300 / 30%);
192
- }
193
-
194
- @utility glow-primary-sm {
195
- box-shadow: 0 0 8px oklch(0.55 0.3 300 / 25%);
196
- }
197
-
198
- @utility glow-destructive {
199
- box-shadow: 0 0 20px oklch(0.65 0.22 27 / 30%);
200
- }
201
-
202
- @utility ambient-beam {
203
- background: radial-gradient(
204
- circle,
205
- oklch(0.55 0.3 300 / 15%) 0%,
206
- transparent 70%
207
- );
208
- filter: blur(100px);
209
- }
210
-
211
- /* =============================================================================
212
- Rich Text Editor Styles
213
- ============================================================================= */
214
-
215
- .qp-rich-text-editor__content {
216
- min-height: 200px;
217
- padding: 0.75rem;
218
- outline: none;
219
- }
220
-
221
- .qp-rich-text-editor__content > *:first-child {
222
- margin-top: 0;
223
- }
224
-
225
- .qp-rich-text-editor__content > *:last-child {
226
- margin-bottom: 0;
227
- }
228
-
229
- .qp-rich-text-editor__content p {
230
- margin: 0 0 0.75rem;
231
- }
232
-
233
- .qp-rich-text-editor__content h1 {
234
- font-size: 1.5rem;
235
- font-weight: 600;
236
- margin: 1rem 0 0.75rem;
237
- }
238
-
239
- .qp-rich-text-editor__content h2 {
240
- font-size: 1.25rem;
241
- font-weight: 600;
242
- margin: 1rem 0 0.75rem;
243
- }
244
-
245
- .qp-rich-text-editor__content h3 {
246
- font-size: 1.125rem;
247
- font-weight: 600;
248
- margin: 1rem 0 0.75rem;
249
- }
250
-
251
- .qp-rich-text-editor__content ul,
252
- .qp-rich-text-editor__content ol {
253
- padding-left: 1.5rem;
254
- margin: 0.75rem 0;
255
- }
256
-
257
- .qp-rich-text-editor__content blockquote {
258
- border-left: 2px solid var(--border);
259
- padding-left: 0.75rem;
260
- color: var(--muted-foreground);
261
- margin: 0.75rem 0;
262
- }
263
-
264
- .qp-rich-text-editor__content code {
265
- background: var(--muted);
266
- padding: 0.1rem 0.25rem;
267
- font-size: 0.875em;
268
- font-family: var(--font-mono);
269
- }
270
-
271
- .qp-rich-text-editor__content pre {
272
- background: var(--muted);
273
- padding: 0.75rem;
274
- overflow-x: auto;
275
- font-family: var(--font-mono);
276
- }
277
-
278
- .qp-rich-text-editor__content hr {
279
- border: none;
280
- border-top: 1px solid var(--border);
281
- margin: 1rem 0;
282
- }
283
-
284
- .qp-rich-text-editor__content table {
285
- border-collapse: collapse;
286
- margin: 1rem 0;
287
- width: 100%;
288
- }
289
-
290
- .qp-rich-text-editor__content th,
291
- .qp-rich-text-editor__content td {
292
- border: 1px solid var(--border);
293
- padding: 0.5rem;
294
- text-align: left;
295
- }
296
-
297
- .tippy-box[data-theme~="qp-rich-text-editor"] {
298
- background: var(--popover);
299
- color: var(--popover-foreground);
300
- border: 1px solid var(--border);
301
- box-shadow: 0 0 20px oklch(0 0 0 / 40%);
302
- }
303
-
304
- .qp-rich-text-editor__slash {
305
- display: flex;
306
- flex-direction: column;
307
- gap: 0.25rem;
308
- padding: 0.5rem;
309
- min-width: 220px;
310
- }
311
-
312
- .qp-rich-text-editor__slash-item {
313
- display: flex;
314
- flex-direction: column;
315
- align-items: flex-start;
316
- gap: 0.125rem;
317
- padding: 0.5rem;
318
- font-size: 0.75rem;
319
- line-height: 1.2;
320
- color: var(--foreground);
321
- }
322
-
323
- .qp-rich-text-editor__slash-item--active,
324
- .qp-rich-text-editor__slash-item:hover {
325
- background: var(--muted);
326
- }
327
-
328
- .qp-rich-text-editor__slash-title {
329
- font-weight: 600;
330
- }
331
-
332
- .qp-rich-text-editor__slash-description {
333
- color: var(--muted-foreground);
334
- }
335
-
336
- .qp-rich-text-editor__slash-empty {
337
- padding: 0.5rem;
338
- font-size: 0.75rem;
339
- color: var(--muted-foreground);
340
- }
@@ -1,6 +0,0 @@
1
- // Re-export cn helper from lib/utils
2
- export { cn } from "../lib/utils";
3
-
4
- /**
5
- * Utility functions for admin package
6
- */
@@ -1,77 +0,0 @@
1
- /**
2
- * Auth Layout - centered card layout for authentication pages
3
- */
4
-
5
- import * as React from "react";
6
- import {
7
- Card,
8
- CardContent,
9
- CardDescription,
10
- CardHeader,
11
- CardTitle,
12
- } from "../../components/ui/card";
13
- import { cn } from "../../lib/utils";
14
-
15
- export type AuthLayoutProps = {
16
- /** Page title */
17
- title: string;
18
- /** Page description */
19
- description?: string;
20
- /** Logo component or element */
21
- logo?: React.ReactNode;
22
- /** Footer content (e.g., links to other auth pages) */
23
- footer?: React.ReactNode;
24
- /** Form content */
25
- children: React.ReactNode;
26
- /** Additional class name for the card */
27
- className?: string;
28
- };
29
-
30
- /**
31
- * Centered layout for authentication pages (login, register, forgot password, etc.)
32
- *
33
- * @example
34
- * ```tsx
35
- * <AuthLayout
36
- * title="Sign in"
37
- * description="Enter your credentials to access the admin panel"
38
- * logo={<Logo />}
39
- * footer={<Link to="/forgot-password">Forgot password?</Link>}
40
- * >
41
- * <LoginForm />
42
- * </AuthLayout>
43
- * ```
44
- */
45
- export function AuthLayout({
46
- title,
47
- description,
48
- logo,
49
- footer,
50
- children,
51
- className,
52
- }: AuthLayoutProps) {
53
- return (
54
- <div className="bg-background flex min-h-screen flex-col items-center justify-center p-4">
55
- <div className="w-full max-w-sm space-y-6">
56
- {/* Logo */}
57
- {logo && <div className="flex justify-center">{logo}</div>}
58
-
59
- {/* Main Card */}
60
- <Card className={cn("w-full", className)}>
61
- <CardHeader className="text-center">
62
- <CardTitle className="text-lg">{title}</CardTitle>
63
- {description && <CardDescription>{description}</CardDescription>}
64
- </CardHeader>
65
- <CardContent>{children}</CardContent>
66
- </Card>
67
-
68
- {/* Footer */}
69
- {footer && (
70
- <div className="text-muted-foreground text-center text-xs">
71
- {footer}
72
- </div>
73
- )}
74
- </div>
75
- </div>
76
- );
77
- }
@@ -1,192 +0,0 @@
1
- /**
2
- * Forgot Password Form - request password reset email
3
- */
4
-
5
- import * as React from "react";
6
- import { useForm } from "react-hook-form";
7
- import { Envelope, SpinnerGap, CheckCircle } from "@phosphor-icons/react";
8
- import { Button } from "../../components/ui/button";
9
- import { Input } from "../../components/ui/input";
10
- import {
11
- Field,
12
- FieldContent,
13
- FieldError,
14
- FieldGroup,
15
- FieldLabel,
16
- } from "../../components/ui/field";
17
- import { cn } from "../../lib/utils";
18
-
19
- export type ForgotPasswordFormValues = {
20
- email: string;
21
- };
22
-
23
- export type ForgotPasswordFormProps = {
24
- /** Called when form is submitted with valid data */
25
- onSubmit: (values: ForgotPasswordFormValues) => Promise<void>;
26
- /** Called when back to login link is clicked */
27
- onBackToLoginClick?: () => void;
28
- /** Default values */
29
- defaultValues?: Partial<ForgotPasswordFormValues>;
30
- /** Additional class name */
31
- className?: string;
32
- /** Error message from auth */
33
- error?: string | null;
34
- };
35
-
36
- /**
37
- * Forgot password form with email field
38
- *
39
- * @example
40
- * ```tsx
41
- * const authClient = createAdminAuthClient<typeof cms>({ baseURL: '...' })
42
- *
43
- * function ForgotPasswordPage() {
44
- * const [error, setError] = useState<string | null>(null)
45
- *
46
- * const handleSubmit = async (values: ForgotPasswordFormValues) => {
47
- * const result = await authClient.forgetPassword({
48
- * email: values.email,
49
- * redirectTo: '/reset-password',
50
- * })
51
- * if (result.error) {
52
- * setError(result.error.message)
53
- * }
54
- * }
55
- *
56
- * return (
57
- * <AuthLayout title="Forgot password">
58
- * <ForgotPasswordForm onSubmit={handleSubmit} error={error} />
59
- * </AuthLayout>
60
- * )
61
- * }
62
- * ```
63
- */
64
- export function ForgotPasswordForm({
65
- onSubmit,
66
- onBackToLoginClick,
67
- defaultValues,
68
- className,
69
- error,
70
- }: ForgotPasswordFormProps) {
71
- const [isSuccess, setIsSuccess] = React.useState(false);
72
-
73
- const {
74
- register,
75
- handleSubmit,
76
- formState: { errors, isSubmitting },
77
- } = useForm<ForgotPasswordFormValues>({
78
- defaultValues: {
79
- email: "",
80
- ...defaultValues,
81
- },
82
- });
83
-
84
- const handleFormSubmit = handleSubmit(async (values) => {
85
- await onSubmit(values);
86
- if (!error) {
87
- setIsSuccess(true);
88
- }
89
- });
90
-
91
- // Success state
92
- if (isSuccess) {
93
- return (
94
- <div className={cn("space-y-4 text-center", className)}>
95
- <div className="bg-primary/10 mx-auto flex size-12 items-center justify-center rounded-full">
96
- <CheckCircle className="text-primary size-6" weight="duotone" />
97
- </div>
98
- <div className="space-y-2">
99
- <h3 className="text-sm font-medium">Check your email</h3>
100
- <p className="text-muted-foreground text-xs">
101
- We've sent a password reset link to your email address. Please check
102
- your inbox and follow the instructions.
103
- </p>
104
- </div>
105
- <Button
106
- type="button"
107
- variant="outline"
108
- className="w-full"
109
- onClick={onBackToLoginClick}
110
- >
111
- Back to login
112
- </Button>
113
- </div>
114
- );
115
- }
116
-
117
- return (
118
- <form onSubmit={handleFormSubmit} className={cn("space-y-4", className)}>
119
- <p className="text-muted-foreground text-xs">
120
- Enter your email address and we'll send you a link to reset your
121
- password.
122
- </p>
123
-
124
- <FieldGroup>
125
- {/* Email Field */}
126
- <Field data-invalid={!!errors.email}>
127
- <FieldLabel htmlFor="email">Email</FieldLabel>
128
- <FieldContent>
129
- <div className="relative">
130
- <Envelope
131
- className="text-muted-foreground absolute left-2 top-1/2 size-4 -translate-y-1/2"
132
- weight="duotone"
133
- />
134
- <Input
135
- id="email"
136
- type="email"
137
- placeholder="you@example.com"
138
- className="pl-8"
139
- autoComplete="email"
140
- aria-invalid={!!errors.email}
141
- {...register("email", {
142
- required: "Email is required",
143
- pattern: {
144
- value: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
145
- message: "Invalid email address",
146
- },
147
- })}
148
- />
149
- </div>
150
- <FieldError>{errors.email?.message}</FieldError>
151
- </FieldContent>
152
- </Field>
153
- </FieldGroup>
154
-
155
- {/* Error Message */}
156
- {error && (
157
- <div className="bg-destructive/10 text-destructive rounded-md p-3 text-xs">
158
- {error}
159
- </div>
160
- )}
161
-
162
- {/* Submit Button */}
163
- <Button
164
- type="submit"
165
- className="w-full"
166
- size="lg"
167
- disabled={isSubmitting}
168
- >
169
- {isSubmitting ? (
170
- <>
171
- <SpinnerGap className="animate-spin" weight="bold" />
172
- Sending...
173
- </>
174
- ) : (
175
- "Send reset link"
176
- )}
177
- </Button>
178
-
179
- {/* Back to Login Link */}
180
- <p className="text-muted-foreground text-center text-xs">
181
- Remember your password?{" "}
182
- <button
183
- type="button"
184
- onClick={onBackToLoginClick}
185
- className="text-primary hover:underline"
186
- >
187
- Back to login
188
- </button>
189
- </p>
190
- </form>
191
- );
192
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * Auth views - authentication related components
3
- */
4
-
5
- export { AuthLayout } from "./auth-layout";
6
- export type { AuthLayoutProps } from "./auth-layout";
7
-
8
- export { LoginForm } from "./login-form";
9
- export type { LoginFormProps, LoginFormValues } from "./login-form";
10
-
11
- export { ForgotPasswordForm } from "./forgot-password-form";
12
- export type {
13
- ForgotPasswordFormProps,
14
- ForgotPasswordFormValues,
15
- } from "./forgot-password-form";
16
-
17
- export { ResetPasswordForm } from "./reset-password-form";
18
- export type {
19
- ResetPasswordFormProps,
20
- ResetPasswordFormValues,
21
- } from "./reset-password-form";