@questpie/admin 3.0.3 → 3.0.5

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 (253) hide show
  1. package/README.md +34 -5
  2. package/dist/client/blocks/block-renderer.d.mts +2 -2
  3. package/dist/client/blocks/block-renderer.mjs +4 -1
  4. package/dist/client/builder/types/action-types.d.mts +31 -3
  5. package/dist/client/builder/types/collection-types.d.mts +140 -0
  6. package/dist/client/builder/types/ui-config.d.mts +16 -2
  7. package/dist/client/builder/types/views.d.mts +57 -0
  8. package/dist/client/builder/types/widget-types.d.mts +5 -0
  9. package/dist/client/components/actions/action-button.mjs +137 -199
  10. package/dist/client/components/actions/action-dialog.mjs +198 -156
  11. package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
  12. package/dist/client/components/actions/header-actions.mjs +52 -53
  13. package/dist/client/components/admin-link.d.mts +2 -2
  14. package/dist/client/components/auth/auth-loading.mjs +41 -18
  15. package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
  16. package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
  17. package/dist/client/components/blocks/block-insert-button.mjs +4 -4
  18. package/dist/client/components/blocks/block-item.mjs +2 -2
  19. package/dist/client/components/blocks/block-library-sidebar.mjs +91 -63
  20. package/dist/client/components/component-renderer.mjs +1 -1
  21. package/dist/client/components/fields/array-field.mjs +14 -14
  22. package/dist/client/components/fields/asset-preview-field.mjs +1 -1
  23. package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
  24. package/dist/client/components/fields/json-field.mjs +2 -2
  25. package/dist/client/components/fields/object-array-field.mjs +22 -22
  26. package/dist/client/components/fields/object-field.mjs +5 -5
  27. package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
  28. package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
  29. package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
  30. package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
  31. package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
  32. package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
  33. package/dist/client/components/fields/relation-picker.mjs +7 -6
  34. package/dist/client/components/fields/relation-select.mjs +71 -47
  35. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
  36. package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
  37. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
  38. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
  39. package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
  40. package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
  41. package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
  42. package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
  43. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
  44. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
  45. package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
  46. package/dist/client/components/fields/upload-field.mjs +45 -49
  47. package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
  48. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
  49. package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
  50. package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
  51. package/dist/client/components/history-sidebar.mjs +850 -340
  52. package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
  53. package/dist/client/components/locale-switcher.mjs +8 -8
  54. package/dist/client/components/media/media-grid.mjs +106 -86
  55. package/dist/client/components/media/media-picker-dialog.mjs +242 -230
  56. package/dist/client/components/preview/live-preview-mode.mjs +1 -1
  57. package/dist/client/components/primitives/asset-preview.mjs +37 -22
  58. package/dist/client/components/primitives/date-input.mjs +212 -249
  59. package/dist/client/components/primitives/dropzone.mjs +192 -159
  60. package/dist/client/components/primitives/field-select-control.mjs +93 -0
  61. package/dist/client/components/primitives/select-multi.mjs +406 -365
  62. package/dist/client/components/primitives/select-single.mjs +391 -323
  63. package/dist/client/components/primitives/time-input.mjs +2 -2
  64. package/dist/client/components/sheets/resource-sheet.mjs +2 -0
  65. package/dist/client/components/ui/accordion.mjs +4 -4
  66. package/dist/client/components/ui/alert.mjs +3 -3
  67. package/dist/client/components/ui/badge.mjs +4 -4
  68. package/dist/client/components/ui/button.mjs +47 -37
  69. package/dist/client/components/ui/card.mjs +2 -2
  70. package/dist/client/components/ui/checkbox.mjs +1 -1
  71. package/dist/client/components/ui/command.mjs +5 -5
  72. package/dist/client/components/ui/dialog.mjs +3 -3
  73. package/dist/client/components/ui/drawer.mjs +1 -1
  74. package/dist/client/components/ui/dropdown-menu.mjs +157 -15
  75. package/dist/client/components/ui/empty-state.mjs +88 -59
  76. package/dist/client/components/ui/field.mjs +2 -2
  77. package/dist/client/components/ui/input-group.mjs +3 -3
  78. package/dist/client/components/ui/input.mjs +1 -1
  79. package/dist/client/components/ui/kbd.mjs +1 -1
  80. package/dist/client/components/ui/label.mjs +1 -1
  81. package/dist/client/components/ui/popover.mjs +19 -11
  82. package/dist/client/components/ui/scroll-fade.mjs +170 -0
  83. package/dist/client/components/ui/search-input.mjs +1 -1
  84. package/dist/client/components/ui/select.mjs +129 -27
  85. package/dist/client/components/ui/sheet.mjs +54 -34
  86. package/dist/client/components/ui/sidebar.mjs +15 -14
  87. package/dist/client/components/ui/skeleton.mjs +28 -12
  88. package/dist/client/components/ui/switch.mjs +2 -2
  89. package/dist/client/components/ui/table.mjs +82 -74
  90. package/dist/client/components/ui/tabs.mjs +26 -31
  91. package/dist/client/components/ui/textarea.mjs +1 -1
  92. package/dist/client/components/ui/tooltip.mjs +1 -1
  93. package/dist/client/components/widgets/chart-widget.mjs +154 -100
  94. package/dist/client/components/widgets/progress-widget.mjs +63 -36
  95. package/dist/client/components/widgets/quick-actions-widget.mjs +207 -115
  96. package/dist/client/components/widgets/recent-items-widget.mjs +147 -103
  97. package/dist/client/components/widgets/stats-widget.mjs +91 -72
  98. package/dist/client/components/widgets/table-widget.mjs +161 -247
  99. package/dist/client/components/widgets/timeline-widget.mjs +119 -78
  100. package/dist/client/components/widgets/value-widget.mjs +286 -157
  101. package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
  102. package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
  103. package/dist/client/contexts/focus-context.d.mts +2 -2
  104. package/dist/client/hooks/use-action.mjs +63 -55
  105. package/dist/client/hooks/use-audit-history.mjs +1 -65
  106. package/dist/client/hooks/use-collection-validation.mjs +36 -23
  107. package/dist/client/hooks/use-collection.mjs +96 -1
  108. package/dist/client/hooks/use-saved-views.mjs +70 -49
  109. package/dist/client/hooks/use-server-actions.mjs +70 -46
  110. package/dist/client/hooks/use-server-validation.mjs +156 -41
  111. package/dist/client/hooks/use-server-widget-data.mjs +1 -1
  112. package/dist/client/hooks/use-setup-status.d.mts +3 -3
  113. package/dist/client/hooks/use-setup-status.mjs +2 -2
  114. package/dist/client/hooks/use-transition-stage.mjs +2 -10
  115. package/dist/client/hooks/use-validation-error-map.mjs +31 -13
  116. package/dist/client/hooks/use-view-state.mjs +238 -174
  117. package/dist/client/i18n/date-locale.mjs +33 -0
  118. package/dist/client/i18n/hooks.mjs +17 -1
  119. package/dist/client/lib/utils.mjs +3 -2
  120. package/dist/client/preview/block-scope-context.d.mts +2 -2
  121. package/dist/client/preview/preview-banner.d.mts +2 -2
  122. package/dist/client/preview/preview-banner.mjs +75 -46
  123. package/dist/client/preview/preview-field.d.mts +4 -4
  124. package/dist/client/preview/preview-field.mjs +2 -2
  125. package/dist/client/runtime/provider.mjs +8 -1
  126. package/dist/client/runtime/translations-provider.mjs +1 -1
  127. package/dist/client/scope/picker.d.mts +2 -2
  128. package/dist/client/scope/provider.d.mts +2 -2
  129. package/dist/client/styles/base.css +1022 -0
  130. package/dist/client/styles/index.css +3 -589
  131. package/dist/client/utils/auto-expand-fields.mjs +4 -2
  132. package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
  133. package/dist/client/utils/use-lazy-component.mjs +80 -0
  134. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  135. package/dist/client/views/auth/auth-layout.d.mts +17 -10
  136. package/dist/client/views/auth/auth-layout.mjs +291 -80
  137. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  138. package/dist/client/views/auth/forgot-password-form.mjs +2 -2
  139. package/dist/client/views/auth/login-form.d.mts +2 -2
  140. package/dist/client/views/auth/login-form.mjs +1 -1
  141. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  142. package/dist/client/views/auth/reset-password-form.mjs +2 -2
  143. package/dist/client/views/auth/setup-form.d.mts +2 -2
  144. package/dist/client/views/collection/auto-form-fields.mjs +11 -9
  145. package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
  146. package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
  147. package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
  148. package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
  149. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
  150. package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
  151. package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
  152. package/dist/client/views/collection/columns/build-columns.mjs +29 -9
  153. package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
  154. package/dist/client/views/collection/field-renderer.mjs +50 -89
  155. package/dist/client/views/collection/form-view.mjs +237 -227
  156. package/dist/client/views/collection/table-view.mjs +1167 -234
  157. package/dist/client/views/collection/view-skeletons.mjs +222 -79
  158. package/dist/client/views/common/global-search.mjs +29 -18
  159. package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
  160. package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
  161. package/dist/client/views/dashboard/widget-card.mjs +23 -14
  162. package/dist/client/views/globals/global-form-view.mjs +634 -589
  163. package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
  164. package/dist/client/views/layout/admin-layout.d.mts +3 -6
  165. package/dist/client/views/layout/admin-layout.mjs +152 -155
  166. package/dist/client/views/layout/admin-router.mjs +936 -616
  167. package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
  168. package/dist/client/views/layout/admin-sidebar.mjs +762 -592
  169. package/dist/client/views/layout/admin-theme.d.mts +10 -0
  170. package/dist/client/views/layout/admin-theme.mjs +84 -0
  171. package/dist/client/views/layout/admin-view-layout.mjs +161 -0
  172. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  173. package/dist/client/views/pages/accept-invite-page.mjs +49 -26
  174. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  175. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  176. package/dist/client/views/pages/forgot-password-page.mjs +2 -19
  177. package/dist/client/views/pages/invite-page.d.mts +2 -2
  178. package/dist/client/views/pages/invite-page.mjs +2 -19
  179. package/dist/client/views/pages/login-page.d.mts +3 -3
  180. package/dist/client/views/pages/login-page.mjs +4 -21
  181. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  182. package/dist/client/views/pages/reset-password-page.mjs +3 -20
  183. package/dist/client/views/pages/setup-page.d.mts +2 -2
  184. package/dist/client/views/pages/setup-page.mjs +70 -71
  185. package/dist/client.d.mts +6 -2
  186. package/dist/client.mjs +2 -1
  187. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  188. package/dist/index.d.mts +6 -2
  189. package/dist/index.mjs +2 -1
  190. package/dist/server/augmentation/dashboard.d.mts +67 -3
  191. package/dist/server/augmentation/form-layout.d.mts +21 -0
  192. package/dist/server/augmentation/index.d.mts +1 -1
  193. package/dist/server/codegen/admin-client-template.mjs +4 -0
  194. package/dist/server/fields/blocks.d.mts +1 -1
  195. package/dist/server/fields/blocks.mjs +12 -0
  196. package/dist/server/fields/rich-text.d.mts +1 -1
  197. package/dist/server/fields/rich-text.mjs +8 -0
  198. package/dist/server/i18n/index.mjs +29 -7
  199. package/dist/server/i18n/messages/cs.mjs +414 -1
  200. package/dist/server/i18n/messages/de.mjs +412 -1
  201. package/dist/server/i18n/messages/en.mjs +166 -1
  202. package/dist/server/i18n/messages/es.mjs +412 -1
  203. package/dist/server/i18n/messages/fr.mjs +412 -1
  204. package/dist/server/i18n/messages/pl.mjs +416 -1
  205. package/dist/server/i18n/messages/pt.mjs +409 -1
  206. package/dist/server/i18n/messages/sk.mjs +216 -2
  207. package/dist/server/modules/admin/block/introspection.mjs +4 -1
  208. package/dist/server/modules/admin/block/prefetch.mjs +12 -2
  209. package/dist/server/modules/admin/collections/account.d.mts +2 -2
  210. package/dist/server/modules/admin/collections/admin-locks.d.mts +2 -2
  211. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  212. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  213. package/dist/server/modules/admin/collections/apikey.d.mts +42 -42
  214. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  215. package/dist/server/modules/admin/collections/assets.mjs +0 -1
  216. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  217. package/dist/server/modules/admin/collections/user.d.mts +40 -28
  218. package/dist/server/modules/admin/collections/user.mjs +40 -9
  219. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  220. package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
  221. package/dist/server/modules/admin/factories.mjs +7 -18
  222. package/dist/server/modules/admin/index.d.mts +1 -1
  223. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  224. package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
  225. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  226. package/dist/server/modules/admin/routes/execute-action.mjs +67 -28
  227. package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
  228. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  229. package/dist/server/modules/admin/routes/preview.mjs +25 -17
  230. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  231. package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
  232. package/dist/server/modules/admin/routes/setup.d.mts +10 -10
  233. package/dist/server/modules/admin/routes/setup.mjs +16 -13
  234. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  235. package/dist/server/modules/admin/routes/translations.mjs +5 -1
  236. package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
  237. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +2 -2
  238. package/dist/server/modules/audit/.generated/module.d.mts +1 -1
  239. package/dist/server/modules/audit/.generated/module.mjs +1 -1
  240. package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
  241. package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
  242. package/dist/server/modules/audit/config/app.mjs +99 -42
  243. package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
  244. package/dist/server/plugin.mjs +4 -2
  245. package/dist/server/proxy-factories.d.mts +4 -3
  246. package/dist/server/proxy-factories.mjs +34 -8
  247. package/dist/shared/types/saved-views.types.d.mts +2 -0
  248. package/package.json +6 -4
  249. package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
  250. package/dist/client/components/ui/spinner.mjs +0 -52
  251. package/dist/client/components/ui/toolbar.mjs +0 -136
  252. package/dist/client/contexts/breadcrumb-context.mjs +0 -60
  253. package/dist/client/views/layout/admin-topbar.mjs +0 -236
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/accept-invite-form.d.ts
4
4
  /**
@@ -67,6 +67,6 @@ declare function AcceptInviteForm({
67
67
  className,
68
68
  error,
69
69
  minPasswordLength
70
- }: AcceptInviteFormProps): react_jsx_runtime0.JSX.Element;
70
+ }: AcceptInviteFormProps): react_jsx_runtime2.JSX.Element;
71
71
  //#endregion
72
72
  export { AcceptInviteForm };
@@ -2,6 +2,12 @@ import * as React from "react";
2
2
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/auth/auth-layout.d.ts
5
+
6
+ /**
7
+ * Props for the auth layout — and for any custom `adminAuthLayout` override.
8
+ *
9
+ * Export path: `@questpie/admin/client`
10
+ */
5
11
  type AuthLayoutProps = {
6
12
  /** Page title */
7
13
  title: string;
@@ -17,7 +23,15 @@ type AuthLayoutProps = {
17
23
  className?: string;
18
24
  };
19
25
  /**
20
- * Centered layout for authentication pages (login, register, forgot password, etc.)
26
+ * Minimal split layout for authentication pages (login, register, forgot password, etc.)
27
+ *
28
+ * Checks `adminAuthLayout` in the component registry (registered via
29
+ * `questpie/admin/components/admin-auth-layout.tsx`) and renders it when present,
30
+ * falling back to the built-in minimal split layout.
31
+ *
32
+ * Works without `<AdminProvider>` and falls back to the built-in layout.
33
+ * When used inside `<AdminProvider>`, a registered `adminAuthLayout` override
34
+ * can replace the built-in layout.
21
35
  *
22
36
  * @example
23
37
  * ```tsx
@@ -31,13 +45,6 @@ type AuthLayoutProps = {
31
45
  * </AuthLayout>
32
46
  * ```
33
47
  */
34
- declare function AuthLayout({
35
- title,
36
- description,
37
- logo,
38
- footer,
39
- children,
40
- className
41
- }: AuthLayoutProps): react_jsx_runtime0.JSX.Element;
48
+ declare function AuthLayout(props: AuthLayoutProps): react_jsx_runtime0.JSX.Element;
42
49
  //#endregion
43
- export { AuthLayout };
50
+ export { AuthLayout, AuthLayoutProps };
@@ -1,116 +1,327 @@
1
1
  import { cn } from "../../lib/utils.mjs";
2
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../components/ui/card.mjs";
2
+ import { useAdminStoreRaw } from "../../runtime/provider.mjs";
3
+ import { Card, CardContent } from "../../components/ui/card.mjs";
4
+ import { useLazyComponent } from "../../utils/use-lazy-component.mjs";
5
+ import { useHasManagedAdminTheme, useManagedAdminTheme } from "../layout/admin-theme.mjs";
3
6
  import { c } from "react/compiler-runtime";
7
+ import * as React from "react";
4
8
  import { jsx, jsxs } from "react/jsx-runtime";
5
9
 
6
10
  //#region src/client/views/auth/auth-layout.tsx
7
11
  /**
8
- * Centered layout for authentication pages (login, register, forgot password, etc.)
12
+ * Auth Layout - minimal shell for authentication pages
9
13
  *
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
- * ```
14
+ * Supports a file-first override via `questpie/admin/components/admin-auth-layout.tsx`.
15
+ * When that component is registered in the admin-client registry under the reserved
16
+ * key `adminAuthLayout`, it replaces the entire layout — all existing auth pages
17
+ * using `AuthLayout` are automatically affected.
18
+ *
19
+ * Works without `AdminProvider`. When an AdminProvider is present, a registered
20
+ * `adminAuthLayout` override can replace the built-in layout.
21
21
  */
22
- function AuthLayout(t0) {
23
- const $ = c(23);
24
- const { title, description, logo, footer, children, className } = t0;
22
+ function AuthBrandMark(t0) {
23
+ const $ = c(9);
24
+ const { className, decorative: t1 } = t0;
25
+ const decorative = t1 === void 0 ? false : t1;
26
+ let t2;
27
+ if ($[0] !== className) {
28
+ t2 = cn("text-foreground size-16 shrink-0", className);
29
+ $[0] = className;
30
+ $[1] = t2;
31
+ } else t2 = $[1];
32
+ const t3 = decorative ? true : void 0;
33
+ const t4 = decorative ? void 0 : "QUESTPIE";
34
+ let t5;
35
+ let t6;
36
+ let t7;
37
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
38
+ t5 = /* @__PURE__ */ jsx("path", {
39
+ d: "M2 2H22V10",
40
+ stroke: "currentColor",
41
+ strokeWidth: "2",
42
+ strokeLinecap: "square"
43
+ });
44
+ t6 = /* @__PURE__ */ jsx("path", {
45
+ d: "M2 2V22H10",
46
+ stroke: "currentColor",
47
+ strokeWidth: "2",
48
+ strokeLinecap: "square"
49
+ });
50
+ t7 = /* @__PURE__ */ jsx("path", {
51
+ d: "M23 13H13V23H23V13Z",
52
+ fill: "currentColor",
53
+ opacity: "0.72"
54
+ });
55
+ $[2] = t5;
56
+ $[3] = t6;
57
+ $[4] = t7;
58
+ } else {
59
+ t5 = $[2];
60
+ t6 = $[3];
61
+ t7 = $[4];
62
+ }
63
+ let t8;
64
+ if ($[5] !== t2 || $[6] !== t3 || $[7] !== t4) {
65
+ t8 = /* @__PURE__ */ jsxs("svg", {
66
+ xmlns: "http://www.w3.org/2000/svg",
67
+ viewBox: "0 0 24 24",
68
+ fill: "none",
69
+ className: t2,
70
+ "aria-hidden": t3,
71
+ "aria-label": t4,
72
+ children: [
73
+ t5,
74
+ t6,
75
+ t7
76
+ ]
77
+ });
78
+ $[5] = t2;
79
+ $[6] = t3;
80
+ $[7] = t4;
81
+ $[8] = t8;
82
+ } else t8 = $[8];
83
+ return t8;
84
+ }
85
+ function AuthDefaultLogo(t0) {
86
+ const $ = c(3);
87
+ const { brandName } = t0;
25
88
  let t1;
26
- if ($[0] !== logo) {
27
- t1 = logo && /* @__PURE__ */ jsx("div", {
28
- className: "qa-auth-layout__logo flex justify-center",
29
- children: logo
89
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
90
+ t1 = /* @__PURE__ */ jsx(AuthBrandMark, {
91
+ className: "size-9",
92
+ decorative: true
30
93
  });
31
- $[0] = logo;
94
+ $[0] = t1;
95
+ } else t1 = $[0];
96
+ let t2;
97
+ if ($[1] !== brandName) {
98
+ t2 = /* @__PURE__ */ jsxs("div", {
99
+ className: "qa-auth-layout__default-logo flex max-w-full min-w-0 items-center gap-3 text-left",
100
+ children: [t1, /* @__PURE__ */ jsx("div", {
101
+ className: "min-w-0",
102
+ children: /* @__PURE__ */ jsx("div", {
103
+ className: "text-foreground truncate text-sm font-semibold tracking-tight",
104
+ children: brandName
105
+ })
106
+ })]
107
+ });
108
+ $[1] = brandName;
109
+ $[2] = t2;
110
+ } else t2 = $[2];
111
+ return t2;
112
+ }
113
+ function AuthLogo(t0) {
114
+ const $ = c(7);
115
+ const { logo, className } = t0;
116
+ let t1;
117
+ if ($[0] !== className) {
118
+ t1 = cn("qa-auth-layout__logo flex min-w-0 items-center justify-start text-left", className);
119
+ $[0] = className;
32
120
  $[1] = t1;
33
121
  } else t1 = $[1];
34
122
  let t2;
35
- if ($[2] !== className) {
36
- t2 = cn("qa-auth-layout__card w-full", className);
37
- $[2] = className;
123
+ if ($[2] !== logo) {
124
+ t2 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName: "QUESTPIE" });
125
+ $[2] = logo;
38
126
  $[3] = t2;
39
127
  } else t2 = $[3];
40
128
  let t3;
41
- if ($[4] !== title) {
42
- t3 = /* @__PURE__ */ jsx(CardTitle, {
43
- className: "text-lg",
44
- children: title
45
- });
46
- $[4] = title;
47
- $[5] = t3;
48
- } else t3 = $[5];
129
+ if ($[4] !== t1 || $[5] !== t2) {
130
+ t3 = /* @__PURE__ */ jsx("div", {
131
+ className: t1,
132
+ children: t2
133
+ });
134
+ $[4] = t1;
135
+ $[5] = t2;
136
+ $[6] = t3;
137
+ } else t3 = $[6];
138
+ return t3;
139
+ }
140
+ /** Built-in minimal split layout (fallback when no override is registered). */
141
+ function AuthLayoutBuiltIn(t0) {
142
+ const $ = c(21);
143
+ const { logo, footer, children, className } = t0;
144
+ let t1;
145
+ if ($[0] !== logo) {
146
+ t1 = /* @__PURE__ */ jsx(AuthLogo, {
147
+ logo,
148
+ className: "max-w-[calc(100vw-2.5rem)]"
149
+ });
150
+ $[0] = logo;
151
+ $[1] = t1;
152
+ } else t1 = $[1];
153
+ let t2;
154
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
155
+ t2 = /* @__PURE__ */ jsx("p", {
156
+ className: "text-muted-foreground hidden text-xs tracking-[0.14em] uppercase lg:block",
157
+ children: "Built with QUESTPIE"
158
+ });
159
+ $[2] = t2;
160
+ } else t2 = $[2];
161
+ let t3;
162
+ if ($[3] !== t1) {
163
+ t3 = /* @__PURE__ */ jsxs("aside", {
164
+ className: "qa-auth-layout__brand flex flex-col items-center justify-center gap-8",
165
+ children: [t1, t2]
166
+ });
167
+ $[3] = t1;
168
+ $[4] = t3;
169
+ } else t3 = $[4];
49
170
  let t4;
50
- if ($[6] !== description) {
51
- t4 = description && /* @__PURE__ */ jsx(CardDescription, { children: description });
52
- $[6] = description;
53
- $[7] = t4;
54
- } else t4 = $[7];
171
+ if ($[5] !== className) {
172
+ t4 = cn("qa-auth-layout__card border-border-subtle w-full shadow-none", className);
173
+ $[5] = className;
174
+ $[6] = t4;
175
+ } else t4 = $[6];
55
176
  let t5;
56
- if ($[8] !== t3 || $[9] !== t4) {
57
- t5 = /* @__PURE__ */ jsxs(CardHeader, {
58
- className: "qa-auth-layout__card-header text-center",
59
- children: [t3, t4]
60
- });
61
- $[8] = t3;
62
- $[9] = t4;
63
- $[10] = t5;
64
- } else t5 = $[10];
65
- let t6;
66
- if ($[11] !== children) {
67
- t6 = /* @__PURE__ */ jsx(CardContent, {
177
+ if ($[7] !== children) {
178
+ t5 = /* @__PURE__ */ jsx(CardContent, {
68
179
  className: "qa-auth-layout__card-content",
69
180
  children
70
181
  });
71
- $[11] = children;
72
- $[12] = t6;
73
- } else t6 = $[12];
74
- let t7;
75
- if ($[13] !== t2 || $[14] !== t5 || $[15] !== t6) {
76
- t7 = /* @__PURE__ */ jsxs(Card, {
77
- className: t2,
78
- children: [t5, t6]
182
+ $[7] = children;
183
+ $[8] = t5;
184
+ } else t5 = $[8];
185
+ let t6;
186
+ if ($[9] !== t4 || $[10] !== t5) {
187
+ t6 = /* @__PURE__ */ jsx(Card, {
188
+ className: t4,
189
+ children: t5
79
190
  });
80
- $[13] = t2;
81
- $[14] = t5;
82
- $[15] = t6;
83
- $[16] = t7;
84
- } else t7 = $[16];
85
- let t8;
86
- if ($[17] !== footer) {
87
- t8 = footer && /* @__PURE__ */ jsx("div", {
191
+ $[9] = t4;
192
+ $[10] = t5;
193
+ $[11] = t6;
194
+ } else t6 = $[11];
195
+ let t7;
196
+ if ($[12] !== footer) {
197
+ t7 = footer && /* @__PURE__ */ jsx("div", {
88
198
  className: "qa-auth-layout__footer text-muted-foreground text-center text-xs",
89
199
  children: footer
90
200
  });
91
- $[17] = footer;
92
- $[18] = t8;
93
- } else t8 = $[18];
201
+ $[12] = footer;
202
+ $[13] = t7;
203
+ } else t7 = $[13];
204
+ let t8;
205
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
206
+ t8 = /* @__PURE__ */ jsx("div", {
207
+ className: "text-muted-foreground text-center text-[11px] tracking-[0.14em] uppercase lg:hidden",
208
+ children: "Built with QUESTPIE"
209
+ });
210
+ $[14] = t8;
211
+ } else t8 = $[14];
94
212
  let t9;
95
- if ($[19] !== t1 || $[20] !== t7 || $[21] !== t8) {
96
- t9 = /* @__PURE__ */ jsx("div", {
97
- className: "qa-auth-layout bg-background flex min-h-screen flex-col items-center justify-center p-4",
213
+ if ($[15] !== t6 || $[16] !== t7) {
214
+ t9 = /* @__PURE__ */ jsx("main", {
215
+ className: "qa-auth-layout__form-panel flex items-center justify-center",
98
216
  children: /* @__PURE__ */ jsxs("div", {
99
- className: "qa-auth-layout__content w-full max-w-sm space-y-6",
217
+ className: "qa-auth-layout__content w-full max-w-sm space-y-5",
100
218
  children: [
101
- t1,
219
+ t6,
102
220
  t7,
103
221
  t8
104
222
  ]
105
223
  })
106
224
  });
107
- $[19] = t1;
108
- $[20] = t7;
109
- $[21] = t8;
110
- $[22] = t9;
111
- } else t9 = $[22];
112
- return t9;
225
+ $[15] = t6;
226
+ $[16] = t7;
227
+ $[17] = t9;
228
+ } else t9 = $[17];
229
+ let t10;
230
+ if ($[18] !== t3 || $[19] !== t9) {
231
+ t10 = /* @__PURE__ */ jsx("div", {
232
+ className: "qa-auth-layout bg-background text-foreground relative flex min-h-screen items-center justify-center overflow-hidden px-5 py-8 sm:px-8",
233
+ children: /* @__PURE__ */ jsxs("div", {
234
+ className: "qa-auth-layout__shell grid w-full max-w-4xl items-center gap-10 lg:grid-cols-[minmax(220px,280px)_minmax(360px,384px)] lg:gap-16",
235
+ children: [t3, t9]
236
+ })
237
+ });
238
+ $[18] = t3;
239
+ $[19] = t9;
240
+ $[20] = t10;
241
+ } else t10 = $[20];
242
+ return t10;
243
+ }
244
+ /**
245
+ * Minimal split layout for authentication pages (login, register, forgot password, etc.)
246
+ *
247
+ * Checks `adminAuthLayout` in the component registry (registered via
248
+ * `questpie/admin/components/admin-auth-layout.tsx`) and renders it when present,
249
+ * falling back to the built-in minimal split layout.
250
+ *
251
+ * Works without `<AdminProvider>` and falls back to the built-in layout.
252
+ * When used inside `<AdminProvider>`, a registered `adminAuthLayout` override
253
+ * can replace the built-in layout.
254
+ *
255
+ * @example
256
+ * ```tsx
257
+ * <AuthLayout
258
+ * title="Sign in"
259
+ * description="Enter your credentials to access the admin panel"
260
+ * logo={<Logo />}
261
+ * footer={<Link to="/forgot-password">Forgot password?</Link>}
262
+ * >
263
+ * <LoginForm />
264
+ * </AuthLayout>
265
+ * ```
266
+ */
267
+ function AuthLayout(props) {
268
+ const $ = c(15);
269
+ const t0 = !useHasManagedAdminTheme();
270
+ let t1;
271
+ if ($[0] !== t0) {
272
+ t1 = { enabled: t0 };
273
+ $[0] = t0;
274
+ $[1] = t1;
275
+ } else t1 = $[1];
276
+ useManagedAdminTheme(void 0, void 0, t1);
277
+ const adminStore = useAdminStoreRaw();
278
+ let t2;
279
+ if ($[2] !== adminStore) {
280
+ t2 = adminStore?.getState().admin.getComponent("adminAuthLayout");
281
+ $[2] = adminStore;
282
+ $[3] = t2;
283
+ } else t2 = $[3];
284
+ const overrideLoader = t2;
285
+ let t3;
286
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
287
+ t3 = { allowDynamicImportLoaders: false };
288
+ $[4] = t3;
289
+ } else t3 = $[4];
290
+ const { Component: Override } = useLazyComponent(overrideLoader, t3);
291
+ if (Override) {
292
+ let t4$1;
293
+ if ($[5] !== props) {
294
+ t4$1 = /* @__PURE__ */ jsx(AuthLayoutBuiltIn, { ...props });
295
+ $[5] = props;
296
+ $[6] = t4$1;
297
+ } else t4$1 = $[6];
298
+ let t5;
299
+ if ($[7] !== Override || $[8] !== props) {
300
+ t5 = /* @__PURE__ */ jsx(Override, { ...props });
301
+ $[7] = Override;
302
+ $[8] = props;
303
+ $[9] = t5;
304
+ } else t5 = $[9];
305
+ let t6;
306
+ if ($[10] !== t4$1 || $[11] !== t5) {
307
+ t6 = /* @__PURE__ */ jsx(React.Suspense, {
308
+ fallback: t4$1,
309
+ children: t5
310
+ });
311
+ $[10] = t4$1;
312
+ $[11] = t5;
313
+ $[12] = t6;
314
+ } else t6 = $[12];
315
+ return t6;
316
+ }
317
+ let t4;
318
+ if ($[13] !== props) {
319
+ t4 = /* @__PURE__ */ jsx(AuthLayoutBuiltIn, { ...props });
320
+ $[13] = props;
321
+ $[14] = t4;
322
+ } else t4 = $[14];
323
+ return t4;
113
324
  }
114
325
 
115
326
  //#endregion
116
- export { AuthLayout };
327
+ export { AuthDefaultLogo, AuthLayout };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/forgot-password-form.d.ts
4
4
  /**
@@ -53,6 +53,6 @@ declare function ForgotPasswordForm({
53
53
  defaultValues,
54
54
  className,
55
55
  error
56
- }: ForgotPasswordFormProps): react_jsx_runtime2.JSX.Element;
56
+ }: ForgotPasswordFormProps): react_jsx_runtime4.JSX.Element;
57
57
  //#endregion
58
58
  export { ForgotPasswordForm };
@@ -87,10 +87,10 @@ function ForgotPasswordForm(t0) {
87
87
  let t6$1;
88
88
  if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
89
89
  t6$1 = /* @__PURE__ */ jsx("div", {
90
- className: "bg-primary/10 mx-auto flex size-12 items-center justify-center",
90
+ className: "bg-surface-high mx-auto flex size-12 items-center justify-center rounded-lg",
91
91
  children: /* @__PURE__ */ jsx(Icon, {
92
92
  icon: "ph:check-circle-duotone",
93
- className: "text-primary size-6"
93
+ className: "text-foreground size-6"
94
94
  })
95
95
  });
96
96
  $[9] = t6$1;
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/login-form.d.ts
4
4
  /**
@@ -70,6 +70,6 @@ declare function LoginForm({
70
70
  className,
71
71
  error,
72
72
  minPasswordLength
73
- }: LoginFormProps): react_jsx_runtime6.JSX.Element;
73
+ }: LoginFormProps): react_jsx_runtime3.JSX.Element;
74
74
  //#endregion
75
75
  export { LoginForm };
@@ -275,7 +275,7 @@ function LoginForm(t0) {
275
275
  className: "text-muted-foreground flex items-center gap-2 text-xs",
276
276
  children: [/* @__PURE__ */ jsx("input", {
277
277
  type: "checkbox",
278
- className: "border-border accent-primary",
278
+ className: "border-border accent-foreground",
279
279
  ...register("rememberMe")
280
280
  }), t("auth.rememberMe")]
281
281
  }), showForgotPassword && /* @__PURE__ */ jsx(Button, {
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/reset-password-form.d.ts
4
4
  /**
@@ -60,6 +60,6 @@ declare function ResetPasswordForm({
60
60
  minPasswordLength,
61
61
  className,
62
62
  error
63
- }: ResetPasswordFormProps): react_jsx_runtime3.JSX.Element;
63
+ }: ResetPasswordFormProps): react_jsx_runtime6.JSX.Element;
64
64
  //#endregion
65
65
  export { ResetPasswordForm };
@@ -102,10 +102,10 @@ function ResetPasswordForm(t0) {
102
102
  let t8$1;
103
103
  if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
104
104
  t8$1 = /* @__PURE__ */ jsx("div", {
105
- className: "bg-primary/10 mx-auto flex size-12 items-center justify-center",
105
+ className: "bg-surface-high mx-auto flex size-12 items-center justify-center rounded-lg",
106
106
  children: /* @__PURE__ */ jsx(Icon, {
107
107
  icon: "ph:check-circle-duotone",
108
- className: "text-primary size-6"
108
+ className: "text-foreground size-6"
109
109
  })
110
110
  });
111
111
  $[11] = t8$1;
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/setup-form.d.ts
4
4
  /**
@@ -55,6 +55,6 @@ declare function SetupForm({
55
55
  className,
56
56
  error,
57
57
  minPasswordLength
58
- }: SetupFormProps): react_jsx_runtime1.JSX.Element;
58
+ }: SetupFormProps): react_jsx_runtime5.JSX.Element;
59
59
  //#endregion
60
60
  export { SetupForm, SetupFormValues };
@@ -335,7 +335,7 @@ function SectionLayoutRenderer(t0) {
335
335
  className: "qa-form-fields__section-title text-lg font-semibold",
336
336
  children: resolveText(section.label, "", formValues)
337
337
  }), section.description && /* @__PURE__ */ jsx("p", {
338
- className: "text-muted-foreground mt-1 text-sm",
338
+ className: "text-muted-foreground mt-1 text-sm text-pretty",
339
339
  children: resolveText(section.description, "", formValues)
340
340
  })]
341
341
  }) : null;
@@ -379,7 +379,7 @@ function SectionLayoutRenderer(t0) {
379
379
  let t7;
380
380
  if ($[30] !== formValues || $[31] !== resolveText || $[32] !== section.description) {
381
381
  t7 = section.description && /* @__PURE__ */ jsx("p", {
382
- className: "text-muted-foreground mb-4 text-sm",
382
+ className: "text-muted-foreground mb-4 text-sm text-pretty",
383
383
  children: resolveText(section.description, "", formValues)
384
384
  });
385
385
  $[30] = formValues;
@@ -401,7 +401,7 @@ function SectionLayoutRenderer(t0) {
401
401
  if ($[37] !== t6 || $[38] !== t8 || $[39] !== value) {
402
402
  t9 = /* @__PURE__ */ jsxs(AccordionItem, {
403
403
  value,
404
- className: "border px-4",
404
+ className: "border-transparent px-4",
405
405
  children: [t6, t8]
406
406
  });
407
407
  $[37] = t6;
@@ -471,7 +471,8 @@ function TabsLayoutRenderer(t0) {
471
471
  if ($[15] !== formValues || $[16] !== resolveText) {
472
472
  t6 = (tab_0) => /* @__PURE__ */ jsxs(TabsTrigger, {
473
473
  value: tab_0.id,
474
- children: [resolveIconElement(tab_0.icon, { className: "mr-2 size-4" }), resolveText(tab_0.label, tab_0.id, formValues)]
474
+ className: "flex-1",
475
+ children: [resolveIconElement(tab_0.icon, { className: "size-3.5" }), resolveText(tab_0.label, tab_0.id, formValues)]
475
476
  }, tab_0.id);
476
477
  $[15] = formValues;
477
478
  $[16] = resolveText;
@@ -511,7 +512,7 @@ function TabsLayoutRenderer(t0) {
511
512
  t3 = /* @__PURE__ */ jsxs(Tabs, {
512
513
  defaultValue: defaultTab,
513
514
  children: [/* @__PURE__ */ jsx(TabsList, {
514
- variant: "line",
515
+ className: "w-full",
515
516
  children: visibleTabs.map(t6)
516
517
  }), visibleTabs.map(t7)]
517
518
  });
@@ -610,8 +611,9 @@ function AutoFormFields(t0) {
610
611
  const $ = c(55);
611
612
  const { collection, mode: t1, config, registry, fieldResolver, fieldPrefix, allCollectionsConfig } = t0;
612
613
  const mode = t1 === void 0 ? "collection" : t1;
614
+ const isActionForm = collection === "__action__";
613
615
  const t2 = mode === "collection" ? config?.fields : void 0;
614
- const t3 = mode === "collection";
616
+ const t3 = mode === "collection" && !isActionForm;
615
617
  let t4;
616
618
  if ($[0] !== t3) {
617
619
  t4 = { enabled: t3 };
@@ -637,7 +639,7 @@ function AutoFormFields(t0) {
637
639
  $[6] = t7;
638
640
  } else t7 = $[6];
639
641
  const globalResult = useGlobalFields(mode === "global" ? collection : "", t7);
640
- const t8 = mode === "collection";
642
+ const t8 = mode === "collection" && !isActionForm;
641
643
  let t9;
642
644
  if ($[7] !== t8) {
643
645
  t9 = { enabled: t8 };
@@ -806,7 +808,7 @@ function AutoFormFields(t0) {
806
808
  } else t22 = $[36];
807
809
  let t23;
808
810
  if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
809
- t23 = cn("qa-form-fields__sidebar", "border-border w-full @max-2xl:border-b @max-2xl:pb-4 @2xl:border-l @2xl:pl-4", "w-full @2xl:max-w-xs");
811
+ t23 = cn("qa-form-fields__sidebar", "w-full @max-2xl:pb-2 @2xl:max-w-[18rem] @2xl:pl-1");
810
812
  $[37] = t23;
811
813
  } else t23 = $[37];
812
814
  let t24;
@@ -814,7 +816,7 @@ function AutoFormFields(t0) {
814
816
  t24 = /* @__PURE__ */ jsx("aside", {
815
817
  className: t23,
816
818
  children: /* @__PURE__ */ jsx("div", {
817
- className: "space-y-4 @2xl:sticky @2xl:top-4 @2xl:h-auto",
819
+ className: "bg-surface-low/45 space-y-4 rounded-md px-3 py-3 @2xl:sticky @2xl:top-4 @2xl:h-auto",
818
820
  children: /* @__PURE__ */ jsx(SidebarRenderer, {
819
821
  sidebar: formConfig.sidebar,
820
822
  fields,