@questpie/admin 3.0.2 → 3.0.4

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 (249) 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-fields-renderer.mjs +64 -28
  16. package/dist/client/components/blocks/block-insert-button.mjs +4 -4
  17. package/dist/client/components/blocks/block-item.mjs +2 -2
  18. package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
  19. package/dist/client/components/component-renderer.mjs +1 -1
  20. package/dist/client/components/fields/array-field.mjs +14 -14
  21. package/dist/client/components/fields/asset-preview-field.mjs +1 -1
  22. package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
  23. package/dist/client/components/fields/json-field.mjs +2 -2
  24. package/dist/client/components/fields/object-array-field.mjs +22 -22
  25. package/dist/client/components/fields/object-field.mjs +5 -5
  26. package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
  27. package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
  28. package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
  29. package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
  30. package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
  31. package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
  32. package/dist/client/components/fields/relation-picker.mjs +7 -6
  33. package/dist/client/components/fields/relation-select.mjs +71 -47
  34. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
  35. package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
  36. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
  37. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
  38. package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
  39. package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
  40. package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
  41. package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
  42. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
  43. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
  44. package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
  45. package/dist/client/components/fields/upload-field.mjs +45 -49
  46. package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
  47. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
  48. package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
  49. package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
  50. package/dist/client/components/history-sidebar.mjs +850 -340
  51. package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
  52. package/dist/client/components/locale-switcher.mjs +8 -8
  53. package/dist/client/components/media/media-grid.mjs +12 -9
  54. package/dist/client/components/media/media-picker-dialog.mjs +242 -230
  55. package/dist/client/components/preview/live-preview-mode.mjs +1 -1
  56. package/dist/client/components/primitives/asset-preview.mjs +37 -22
  57. package/dist/client/components/primitives/date-input.mjs +212 -249
  58. package/dist/client/components/primitives/dropzone.mjs +192 -159
  59. package/dist/client/components/primitives/field-select-control.mjs +93 -0
  60. package/dist/client/components/primitives/select-multi.mjs +251 -230
  61. package/dist/client/components/primitives/select-single.mjs +345 -290
  62. package/dist/client/components/primitives/time-input.mjs +2 -2
  63. package/dist/client/components/sheets/resource-sheet.mjs +2 -0
  64. package/dist/client/components/ui/accordion.mjs +4 -4
  65. package/dist/client/components/ui/alert.mjs +3 -3
  66. package/dist/client/components/ui/badge.mjs +4 -4
  67. package/dist/client/components/ui/button.mjs +47 -37
  68. package/dist/client/components/ui/card.mjs +2 -2
  69. package/dist/client/components/ui/checkbox.mjs +1 -1
  70. package/dist/client/components/ui/command.mjs +5 -5
  71. package/dist/client/components/ui/dialog.mjs +3 -3
  72. package/dist/client/components/ui/drawer.mjs +1 -1
  73. package/dist/client/components/ui/dropdown-menu.mjs +157 -15
  74. package/dist/client/components/ui/empty-state.mjs +88 -59
  75. package/dist/client/components/ui/field.mjs +2 -2
  76. package/dist/client/components/ui/input-group.mjs +3 -3
  77. package/dist/client/components/ui/input.mjs +1 -1
  78. package/dist/client/components/ui/kbd.mjs +1 -1
  79. package/dist/client/components/ui/label.mjs +1 -1
  80. package/dist/client/components/ui/popover.mjs +19 -11
  81. package/dist/client/components/ui/scroll-fade.mjs +170 -0
  82. package/dist/client/components/ui/search-input.mjs +1 -1
  83. package/dist/client/components/ui/select.mjs +129 -27
  84. package/dist/client/components/ui/sheet.mjs +54 -34
  85. package/dist/client/components/ui/sidebar.mjs +15 -14
  86. package/dist/client/components/ui/skeleton.mjs +28 -12
  87. package/dist/client/components/ui/switch.mjs +2 -2
  88. package/dist/client/components/ui/table.mjs +82 -74
  89. package/dist/client/components/ui/tabs.mjs +26 -31
  90. package/dist/client/components/ui/textarea.mjs +1 -1
  91. package/dist/client/components/ui/tooltip.mjs +1 -1
  92. package/dist/client/components/widgets/chart-widget.mjs +134 -96
  93. package/dist/client/components/widgets/progress-widget.mjs +59 -34
  94. package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
  95. package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
  96. package/dist/client/components/widgets/stats-widget.mjs +91 -72
  97. package/dist/client/components/widgets/table-widget.mjs +159 -246
  98. package/dist/client/components/widgets/timeline-widget.mjs +66 -43
  99. package/dist/client/components/widgets/value-widget.mjs +261 -152
  100. package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
  101. package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
  102. package/dist/client/contexts/focus-context.d.mts +2 -2
  103. package/dist/client/hooks/use-action.mjs +63 -55
  104. package/dist/client/hooks/use-audit-history.mjs +1 -65
  105. package/dist/client/hooks/use-collection-validation.mjs +36 -23
  106. package/dist/client/hooks/use-collection.mjs +96 -1
  107. package/dist/client/hooks/use-saved-views.mjs +70 -49
  108. package/dist/client/hooks/use-server-actions.mjs +59 -40
  109. package/dist/client/hooks/use-server-validation.mjs +156 -41
  110. package/dist/client/hooks/use-server-widget-data.mjs +1 -1
  111. package/dist/client/hooks/use-setup-status.d.mts +3 -3
  112. package/dist/client/hooks/use-setup-status.mjs +2 -2
  113. package/dist/client/hooks/use-transition-stage.mjs +2 -10
  114. package/dist/client/hooks/use-validation-error-map.mjs +31 -13
  115. package/dist/client/hooks/use-view-state.mjs +238 -174
  116. package/dist/client/i18n/date-locale.mjs +33 -0
  117. package/dist/client/i18n/hooks.mjs +17 -1
  118. package/dist/client/lib/utils.mjs +3 -2
  119. package/dist/client/preview/block-scope-context.d.mts +2 -2
  120. package/dist/client/preview/preview-banner.d.mts +2 -2
  121. package/dist/client/preview/preview-field.d.mts +4 -4
  122. package/dist/client/preview/preview-field.mjs +2 -2
  123. package/dist/client/runtime/provider.mjs +8 -1
  124. package/dist/client/runtime/translations-provider.mjs +1 -1
  125. package/dist/client/scope/picker.d.mts +2 -2
  126. package/dist/client/scope/provider.d.mts +2 -2
  127. package/dist/client/styles/base.css +1022 -0
  128. package/dist/client/styles/index.css +3 -589
  129. package/dist/client/utils/auto-expand-fields.mjs +4 -2
  130. package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
  131. package/dist/client/utils/use-lazy-component.mjs +80 -0
  132. package/dist/client/views/auth/auth-layout.d.mts +18 -11
  133. package/dist/client/views/auth/auth-layout.mjs +291 -80
  134. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  135. package/dist/client/views/auth/forgot-password-form.mjs +2 -2
  136. package/dist/client/views/auth/login-form.d.mts +2 -2
  137. package/dist/client/views/auth/login-form.mjs +1 -1
  138. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  139. package/dist/client/views/auth/reset-password-form.mjs +2 -2
  140. package/dist/client/views/auth/setup-form.d.mts +2 -2
  141. package/dist/client/views/collection/auto-form-fields.mjs +11 -9
  142. package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
  143. package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
  144. package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
  145. package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
  146. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
  147. package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
  148. package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
  149. package/dist/client/views/collection/columns/build-columns.mjs +29 -9
  150. package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
  151. package/dist/client/views/collection/field-renderer.mjs +50 -89
  152. package/dist/client/views/collection/form-view.mjs +237 -227
  153. package/dist/client/views/collection/table-view.mjs +1162 -229
  154. package/dist/client/views/collection/view-skeletons.mjs +222 -79
  155. package/dist/client/views/common/global-search.mjs +29 -18
  156. package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
  157. package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
  158. package/dist/client/views/dashboard/widget-card.mjs +23 -14
  159. package/dist/client/views/globals/global-form-view.mjs +634 -589
  160. package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
  161. package/dist/client/views/layout/admin-layout.d.mts +3 -6
  162. package/dist/client/views/layout/admin-layout.mjs +149 -172
  163. package/dist/client/views/layout/admin-router.mjs +747 -544
  164. package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
  165. package/dist/client/views/layout/admin-sidebar.mjs +751 -591
  166. package/dist/client/views/layout/admin-theme.d.mts +10 -0
  167. package/dist/client/views/layout/admin-theme.mjs +84 -0
  168. package/dist/client/views/layout/admin-view-layout.mjs +161 -0
  169. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  170. package/dist/client/views/pages/accept-invite-page.mjs +49 -26
  171. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  172. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  173. package/dist/client/views/pages/forgot-password-page.mjs +2 -19
  174. package/dist/client/views/pages/invite-page.d.mts +2 -2
  175. package/dist/client/views/pages/invite-page.mjs +2 -19
  176. package/dist/client/views/pages/login-page.d.mts +3 -3
  177. package/dist/client/views/pages/login-page.mjs +4 -21
  178. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  179. package/dist/client/views/pages/reset-password-page.mjs +3 -20
  180. package/dist/client/views/pages/setup-page.d.mts +2 -2
  181. package/dist/client/views/pages/setup-page.mjs +3 -20
  182. package/dist/client.d.mts +6 -2
  183. package/dist/client.mjs +2 -1
  184. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  185. package/dist/index.d.mts +6 -2
  186. package/dist/index.mjs +2 -1
  187. package/dist/server/augmentation/dashboard.d.mts +67 -3
  188. package/dist/server/augmentation/form-layout.d.mts +21 -0
  189. package/dist/server/augmentation/index.d.mts +1 -1
  190. package/dist/server/codegen/admin-client-template.mjs +4 -0
  191. package/dist/server/fields/blocks.d.mts +1 -1
  192. package/dist/server/fields/blocks.mjs +12 -0
  193. package/dist/server/fields/rich-text.d.mts +1 -1
  194. package/dist/server/fields/rich-text.mjs +8 -0
  195. package/dist/server/i18n/index.mjs +17 -1
  196. package/dist/server/i18n/messages/cs.mjs +23 -0
  197. package/dist/server/i18n/messages/de.mjs +23 -0
  198. package/dist/server/i18n/messages/en.mjs +64 -1
  199. package/dist/server/i18n/messages/es.mjs +23 -0
  200. package/dist/server/i18n/messages/fr.mjs +23 -0
  201. package/dist/server/i18n/messages/pl.mjs +23 -0
  202. package/dist/server/i18n/messages/pt.mjs +23 -0
  203. package/dist/server/i18n/messages/sk.mjs +83 -1
  204. package/dist/server/modules/admin/block/introspection.mjs +4 -1
  205. package/dist/server/modules/admin/block/prefetch.mjs +12 -2
  206. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  207. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  208. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  209. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  210. package/dist/server/modules/admin/collections/apikey.d.mts +64 -64
  211. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  212. package/dist/server/modules/admin/collections/assets.mjs +0 -1
  213. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  214. package/dist/server/modules/admin/collections/user.d.mts +40 -28
  215. package/dist/server/modules/admin/collections/user.mjs +40 -9
  216. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  217. package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
  218. package/dist/server/modules/admin/factories.mjs +7 -18
  219. package/dist/server/modules/admin/index.d.mts +1 -1
  220. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  221. package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
  222. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  223. package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
  224. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  225. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  226. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  227. package/dist/server/modules/admin/routes/setup.d.mts +10 -10
  228. package/dist/server/modules/admin/routes/setup.mjs +7 -7
  229. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  230. package/dist/server/modules/admin/routes/translations.mjs +5 -1
  231. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  232. package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
  233. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +25 -25
  234. package/dist/server/modules/audit/.generated/module.d.mts +7 -7
  235. package/dist/server/modules/audit/.generated/module.mjs +1 -1
  236. package/dist/server/modules/audit/collections/audit-log.d.mts +39 -39
  237. package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
  238. package/dist/server/modules/audit/config/app.mjs +99 -42
  239. package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
  240. package/dist/server/plugin.mjs +4 -2
  241. package/dist/server/proxy-factories.d.mts +4 -3
  242. package/dist/server/proxy-factories.mjs +34 -8
  243. package/dist/shared/types/saved-views.types.d.mts +2 -0
  244. package/package.json +6 -4
  245. package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
  246. package/dist/client/components/ui/spinner.mjs +0 -52
  247. package/dist/client/components/ui/toolbar.mjs +0 -136
  248. package/dist/client/contexts/breadcrumb-context.mjs +0 -60
  249. package/dist/client/views/layout/admin-topbar.mjs +0 -236
@@ -1,4 +1,5 @@
1
1
  import { useTranslation } from "../../../../i18n/hooks.mjs";
2
+ import { cn } from "../../../../lib/utils.mjs";
2
3
  import { resolveIconElement } from "../../../component-renderer.mjs";
3
4
  import { Button } from "../../../ui/button.mjs";
4
5
  import { Skeleton } from "../../../ui/skeleton.mjs";
@@ -52,8 +53,11 @@ function GridSkeleton(t0) {
52
53
  }
53
54
  function _temp2(key) {
54
55
  return /* @__PURE__ */ jsxs("div", {
55
- className: "border-border bg-card flex items-center gap-2 border p-2",
56
- children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-8 shrink-0 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 max-w-[120px] flex-1 rounded" })]
56
+ className: "panel-surface flex items-center gap-2 p-2.5",
57
+ children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-8 shrink-0" }), /* @__PURE__ */ jsx(Skeleton, {
58
+ variant: "text",
59
+ className: "h-4 max-w-[120px] flex-1"
60
+ })]
57
61
  }, key);
58
62
  }
59
63
  function _temp() {
@@ -103,17 +107,17 @@ function GridDisplay(t0) {
103
107
  t10$1 = (item_1) => {
104
108
  const image = getImage(item_1);
105
109
  const gridContent = /* @__PURE__ */ jsxs("div", {
106
- className: "border-border bg-card hover:bg-card flex h-full items-center gap-2 border p-2 transition-colors",
110
+ className: cn("item-surface border-border bg-card flex h-full items-center gap-2 px-3 py-2.5 transition-colors", (editable || !!actions?.onEdit || linkToDetail) && "hover:border-border hover:bg-accent hover:text-accent-foreground"),
107
111
  children: [
108
112
  image ? /* @__PURE__ */ jsx("div", {
109
- className: "bg-muted size-8 shrink-0 overflow-hidden rounded",
113
+ className: "bg-muted size-8 shrink-0 overflow-hidden rounded-sm",
110
114
  children: /* @__PURE__ */ jsx("img", {
111
115
  src: image,
112
116
  alt: getTitle(item_1),
113
- className: "h-full w-full object-cover"
117
+ className: "image-outline h-full w-full object-cover"
114
118
  })
115
119
  }) : collectionIcon ? /* @__PURE__ */ jsx("div", {
116
- className: "bg-muted flex size-8 shrink-0 items-center justify-center rounded",
120
+ className: "bg-muted flex size-8 shrink-0 items-center justify-center rounded-sm",
117
121
  children: resolveIconElement(collectionIcon, { className: "size-4 text-muted-foreground" })
118
122
  }) : null,
119
123
  /* @__PURE__ */ jsx("span", {
@@ -121,12 +125,12 @@ function GridDisplay(t0) {
121
125
  children: getTitle(item_1)
122
126
  }),
123
127
  editable && (actions?.onEdit || actions?.onRemove) && /* @__PURE__ */ jsxs("div", {
124
- className: "flex shrink-0 items-center gap-0.5",
128
+ className: "flex shrink-0 items-center gap-1",
125
129
  children: [actions?.onEdit && /* @__PURE__ */ jsx(Button, {
126
130
  type: "button",
127
131
  variant: "ghost",
128
- size: "icon",
129
- className: "h-6 w-6",
132
+ size: "icon-xs",
133
+ className: "relative after:absolute after:-inset-1",
130
134
  onClick: (e) => {
131
135
  e.preventDefault();
132
136
  e.stopPropagation();
@@ -140,8 +144,8 @@ function GridDisplay(t0) {
140
144
  }), actions?.onRemove && /* @__PURE__ */ jsx(Button, {
141
145
  type: "button",
142
146
  variant: "ghost",
143
- size: "icon",
144
- className: "h-6 w-6",
147
+ size: "icon-xs",
148
+ className: "relative after:absolute after:-inset-1",
145
149
  onClick: (e_0) => {
146
150
  e_0.preventDefault();
147
151
  e_0.stopPropagation();
@@ -1,4 +1,5 @@
1
1
  import { useTranslation } from "../../../../i18n/hooks.mjs";
2
+ import { cn } from "../../../../lib/utils.mjs";
2
3
  import { resolveIconElement } from "../../../component-renderer.mjs";
3
4
  import { Button } from "../../../ui/button.mjs";
4
5
  import { Skeleton } from "../../../ui/skeleton.mjs";
@@ -29,7 +30,7 @@ function ListSkeleton(t0) {
29
30
  let t4$1;
30
31
  if ($[2] !== skeletonKeys) {
31
32
  t4$1 = /* @__PURE__ */ jsx("div", {
32
- className: "border-border bg-card space-y-2 border p-3",
33
+ className: "panel-surface space-y-2 p-3",
33
34
  children: skeletonKeys.map(_temp2)
34
35
  });
35
36
  $[2] = skeletonKeys;
@@ -40,7 +41,7 @@ function ListSkeleton(t0) {
40
41
  let t4;
41
42
  if ($[4] !== skeletonKeys) {
42
43
  t4 = /* @__PURE__ */ jsx("ul", {
43
- className: "space-y-1",
44
+ className: "space-y-2",
44
45
  children: skeletonKeys.map(_temp3)
45
46
  });
46
47
  $[4] = skeletonKeys;
@@ -50,14 +51,26 @@ function ListSkeleton(t0) {
50
51
  }
51
52
  function _temp3(key_0) {
52
53
  return /* @__PURE__ */ jsxs("li", {
53
- className: "flex items-center gap-1",
54
- children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-3 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-32 rounded" })]
54
+ className: "item-surface border-border bg-card flex items-center gap-2 px-3 py-2",
55
+ children: [/* @__PURE__ */ jsx(Skeleton, {
56
+ variant: "text",
57
+ className: "size-3.5"
58
+ }), /* @__PURE__ */ jsx(Skeleton, {
59
+ variant: "text",
60
+ className: "h-4 w-32"
61
+ })]
55
62
  }, key_0);
56
63
  }
57
64
  function _temp2(key) {
58
65
  return /* @__PURE__ */ jsxs("div", {
59
- className: "border-border bg-card flex items-center gap-2 border p-2",
60
- children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-3.5 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 max-w-[200px] flex-1 rounded" })]
66
+ className: "item-surface border-border bg-card flex items-center gap-2 px-3 py-2.5",
67
+ children: [/* @__PURE__ */ jsx(Skeleton, {
68
+ variant: "text",
69
+ className: "size-3.5"
70
+ }), /* @__PURE__ */ jsx(Skeleton, {
71
+ variant: "text",
72
+ className: "h-4 max-w-[200px] flex-1"
73
+ })]
61
74
  }, key);
62
75
  }
63
76
  function _temp() {
@@ -81,7 +94,7 @@ function ListDisplay(t0) {
81
94
  const iconElement = t6;
82
95
  let t7;
83
96
  if ($[2] !== collectionIcon) {
84
- t7 = resolveIconElement(collectionIcon, { className: "size-3 text-muted-foreground" });
97
+ t7 = resolveIconElement(collectionIcon, { className: "size-3.5 text-muted-foreground shrink-0" });
85
98
  $[2] = collectionIcon;
86
99
  $[3] = t7;
87
100
  } else t7 = $[3];
@@ -105,11 +118,11 @@ function ListDisplay(t0) {
105
118
  let t9$2;
106
119
  if ($[14] !== actions || $[15] !== iconElement || $[16] !== orderable || $[17] !== renderItem || $[18] !== t) {
107
120
  t9$2 = (item, index) => /* @__PURE__ */ jsxs("div", {
108
- className: "border-border bg-card flex items-center gap-2 border p-2",
121
+ className: "item-surface border-border bg-card flex items-center gap-2 px-3 py-2.5",
109
122
  children: [
110
123
  orderable && /* @__PURE__ */ jsx("button", {
111
124
  type: "button",
112
- className: "text-muted-foreground hover:text-foreground cursor-grab",
125
+ className: "text-muted-foreground hover:text-foreground flex shrink-0 cursor-grab items-center",
113
126
  "aria-label": t("field.dragToReorder"),
114
127
  children: /* @__PURE__ */ jsx(Icon, {
115
128
  icon: "ph:dots-six-vertical",
@@ -126,8 +139,8 @@ function ListDisplay(t0) {
126
139
  actions?.onEdit && /* @__PURE__ */ jsx(Button, {
127
140
  type: "button",
128
141
  variant: "ghost",
129
- size: "icon",
130
- className: "h-7 w-7 shrink-0",
142
+ size: "icon-xs",
143
+ className: "shrink-0",
131
144
  onClick: () => actions.onEdit?.(item),
132
145
  title: t("common.edit"),
133
146
  "aria-label": t("field.editItem"),
@@ -139,8 +152,8 @@ function ListDisplay(t0) {
139
152
  actions?.onRemove && /* @__PURE__ */ jsx(Button, {
140
153
  type: "button",
141
154
  variant: "ghost",
142
- size: "icon",
143
- className: "h-7 w-7 shrink-0",
155
+ size: "icon-xs",
156
+ className: "shrink-0",
144
157
  onClick: () => actions.onRemove?.(item),
145
158
  title: t("common.remove"),
146
159
  "aria-label": t("field.removeItem"),
@@ -170,7 +183,7 @@ function ListDisplay(t0) {
170
183
  let t9$1;
171
184
  if ($[20] !== t8$1) {
172
185
  t9$1 = /* @__PURE__ */ jsx("div", {
173
- className: "border-border bg-card space-y-2 border p-3",
186
+ className: "panel-surface space-y-2 p-3",
174
187
  children: t8$1
175
188
  });
176
189
  $[20] = t8$1;
@@ -187,31 +200,31 @@ function ListDisplay(t0) {
187
200
  if (actions?.onEdit) return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("button", {
188
201
  type: "button",
189
202
  onClick: () => actions.onEdit?.(item_0),
190
- className: "text-primary inline-flex items-center gap-1 text-sm hover:underline",
203
+ className: cn("item-surface border-border bg-card flex w-full items-center gap-2 px-3 py-2 text-sm", "hover:border-border hover:bg-accent hover:text-accent-foreground"),
191
204
  children: [
192
205
  smallIconElement,
193
206
  displayText,
194
207
  /* @__PURE__ */ jsx(Icon, {
195
208
  icon: "ph:pencil",
196
- className: "size-3"
209
+ className: "ml-auto size-3.5 shrink-0"
197
210
  })
198
211
  ]
199
212
  }) }, item_0.id);
200
213
  if (linkToDetail) return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(CollectionEditLink, {
201
214
  collection,
202
215
  id: item_0.id,
203
- className: "text-primary inline-flex items-center gap-1 text-sm hover:underline",
216
+ className: cn("item-surface border-border bg-card flex w-full items-center gap-2 px-3 py-2 text-sm", "hover:border-border hover:bg-accent hover:text-accent-foreground"),
204
217
  children: [
205
218
  smallIconElement,
206
219
  displayText,
207
220
  /* @__PURE__ */ jsx(Icon, {
208
221
  icon: "ph:arrow-right",
209
- className: "size-3"
222
+ className: "ml-auto size-3.5 shrink-0"
210
223
  })
211
224
  ]
212
225
  }) }, item_0.id);
213
226
  return /* @__PURE__ */ jsxs("li", {
214
- className: "flex items-center gap-1 text-sm",
227
+ className: "item-surface border-border bg-card flex w-full items-center gap-2 px-3 py-2 text-sm",
215
228
  children: [smallIconElement, displayText]
216
229
  }, item_0.id);
217
230
  };
@@ -234,7 +247,7 @@ function ListDisplay(t0) {
234
247
  let t9;
235
248
  if ($[35] !== t8) {
236
249
  t9 = /* @__PURE__ */ jsx("ul", {
237
- className: "space-y-1",
250
+ className: "space-y-2",
238
251
  children: t8
239
252
  });
240
253
  $[35] = t8;
@@ -1,6 +1,7 @@
1
1
  import { useTranslation } from "../../../../i18n/hooks.mjs";
2
2
  import { Button } from "../../../ui/button.mjs";
3
3
  import { Skeleton } from "../../../ui/skeleton.mjs";
4
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../../../ui/table.mjs";
4
5
  import { formatColumnHeader, resolveCellForColumn } from "./types.mjs";
5
6
  import { CollectionEditLink } from "../../../admin-link.mjs";
6
7
  import { c } from "react/compiler-runtime";
@@ -41,32 +42,26 @@ function TableSkeleton(t0) {
41
42
  } else t6 = $[5];
42
43
  let t7;
43
44
  if ($[6] !== hasActions) {
44
- t7 = hasActions && /* @__PURE__ */ jsx("th", { className: "w-20 px-3 py-2" });
45
+ t7 = hasActions && /* @__PURE__ */ jsx(TableHead, { className: "w-20" });
45
46
  $[6] = hasActions;
46
47
  $[7] = t7;
47
48
  } else t7 = $[7];
48
49
  let t8;
49
50
  if ($[8] !== t6 || $[9] !== t7) {
50
- t8 = /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", {
51
- className: "border-border bg-card border-b",
52
- children: [t6, t7]
53
- }) });
51
+ t8 = /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [t6, t7] }) });
54
52
  $[8] = t6;
55
53
  $[9] = t7;
56
54
  $[10] = t8;
57
55
  } else t8 = $[10];
58
56
  let t9;
59
57
  if ($[11] !== columns || $[12] !== hasActions || $[13] !== skeletonKeys) {
60
- t9 = /* @__PURE__ */ jsx("tbody", { children: skeletonKeys.map((key) => /* @__PURE__ */ jsxs("tr", {
61
- className: "border-b last:border-0",
62
- children: [columns.map(_temp3), hasActions && /* @__PURE__ */ jsx("td", {
63
- className: "px-3 py-2",
64
- children: /* @__PURE__ */ jsx("div", {
65
- className: "flex items-center justify-end gap-1",
66
- children: /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-7 rounded" })
67
- })
68
- })]
69
- }, key)) });
58
+ t9 = /* @__PURE__ */ jsx(TableBody, { children: skeletonKeys.map((key) => /* @__PURE__ */ jsxs(TableRow, { children: [columns.map(_temp3), hasActions && /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx("div", {
59
+ className: "flex items-center justify-end gap-1",
60
+ children: /* @__PURE__ */ jsx(Skeleton, {
61
+ variant: "text",
62
+ className: "h-6 w-6"
63
+ })
64
+ }) })] }, key)) });
70
65
  $[11] = columns;
71
66
  $[12] = hasActions;
72
67
  $[13] = skeletonKeys;
@@ -75,11 +70,8 @@ function TableSkeleton(t0) {
75
70
  let t10;
76
71
  if ($[15] !== t8 || $[16] !== t9) {
77
72
  t10 = /* @__PURE__ */ jsx("div", {
78
- className: "min-w-0 overflow-x-auto border",
79
- children: /* @__PURE__ */ jsxs("table", {
80
- className: "w-full text-sm",
81
- children: [t8, t9]
82
- })
73
+ className: "panel-surface min-w-0 overflow-x-auto",
74
+ children: /* @__PURE__ */ jsxs(Table, { children: [t8, t9] })
83
75
  });
84
76
  $[15] = t8;
85
77
  $[16] = t9;
@@ -91,16 +83,13 @@ function TableSkeleton(t0) {
91
83
  * Cell renderer that uses resolved cell components from field registry
92
84
  */
93
85
  function _temp3(col_0) {
94
- return /* @__PURE__ */ jsx("td", {
95
- className: "px-3 py-2",
96
- children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24 rounded" })
97
- }, col_0);
86
+ return /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, {
87
+ variant: "text",
88
+ className: "h-4 w-24"
89
+ }) }, col_0);
98
90
  }
99
91
  function _temp2(col) {
100
- return /* @__PURE__ */ jsx("th", {
101
- className: "px-3 py-2 text-left font-medium",
102
- children: formatColumnHeader(col)
103
- }, col);
92
+ return /* @__PURE__ */ jsx(TableHead, { children: formatColumnHeader(col) }, col);
104
93
  }
105
94
  function _temp() {
106
95
  return crypto.randomUUID();
@@ -186,16 +175,13 @@ function TableDisplay(t0) {
186
175
  } else t7 = $[7];
187
176
  let t8;
188
177
  if ($[8] !== hasActions) {
189
- t8 = hasActions && /* @__PURE__ */ jsx("th", { className: "w-20 px-3 py-2" });
178
+ t8 = hasActions && /* @__PURE__ */ jsx(TableHead, { className: "w-20" });
190
179
  $[8] = hasActions;
191
180
  $[9] = t8;
192
181
  } else t8 = $[9];
193
182
  let t9;
194
183
  if ($[10] !== t7 || $[11] !== t8) {
195
- t9 = /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", {
196
- className: "border-border bg-card border-b",
197
- children: [t7, t8]
198
- }) });
184
+ t9 = /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [t7, t8] }) });
199
185
  $[10] = t7;
200
186
  $[11] = t8;
201
187
  $[12] = t9;
@@ -204,57 +190,46 @@ function TableDisplay(t0) {
204
190
  if ($[13] !== actions || $[14] !== collection || $[15] !== collectionConfig || $[16] !== columns || $[17] !== editable || $[18] !== hasActions || $[19] !== items || $[20] !== linkToDetail || $[21] !== t) {
205
191
  let t11$1;
206
192
  if ($[23] !== actions || $[24] !== collection || $[25] !== collectionConfig || $[26] !== columns || $[27] !== editable || $[28] !== hasActions || $[29] !== linkToDetail || $[30] !== t) {
207
- t11$1 = (item) => /* @__PURE__ */ jsxs("tr", {
208
- className: "border-b last:border-0",
209
- children: [columns.map((col_0) => /* @__PURE__ */ jsx("td", {
210
- className: "px-3 py-2",
211
- children: /* @__PURE__ */ jsx(CellRenderer, {
212
- item,
213
- column: col_0,
214
- collectionConfig
193
+ t11$1 = (item) => /* @__PURE__ */ jsxs(TableRow, { children: [columns.map((col_0) => /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(CellRenderer, {
194
+ item,
195
+ column: col_0,
196
+ collectionConfig
197
+ }) }, col_0)), hasActions && /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", {
198
+ className: "flex items-center justify-end gap-1",
199
+ children: [
200
+ actions?.onEdit && /* @__PURE__ */ jsx(Button, {
201
+ type: "button",
202
+ variant: "ghost",
203
+ size: "icon-xs",
204
+ onClick: () => actions.onEdit?.(item),
205
+ "aria-label": t("field.editItem"),
206
+ children: /* @__PURE__ */ jsx(Icon, {
207
+ icon: "ph:pencil",
208
+ className: "size-4"
209
+ })
210
+ }),
211
+ editable && actions?.onRemove && /* @__PURE__ */ jsx(Button, {
212
+ type: "button",
213
+ variant: "ghost",
214
+ size: "icon-xs",
215
+ onClick: () => actions.onRemove?.(item),
216
+ "aria-label": t("field.removeItem"),
217
+ children: /* @__PURE__ */ jsx(Icon, {
218
+ icon: "ph:x",
219
+ className: "size-4"
220
+ })
221
+ }),
222
+ !editable && linkToDetail && !actions?.onEdit && /* @__PURE__ */ jsx(CollectionEditLink, {
223
+ collection,
224
+ id: item.id,
225
+ className: "item-surface text-muted-foreground hover:border-border hover:bg-accent hover:text-accent-foreground inline-flex min-h-10 min-w-10 items-center justify-center active:scale-[0.96]",
226
+ children: /* @__PURE__ */ jsx(Icon, {
227
+ icon: "ph:arrow-right",
228
+ className: "size-4"
229
+ })
215
230
  })
216
- }, col_0)), hasActions && /* @__PURE__ */ jsx("td", {
217
- className: "px-3 py-2",
218
- children: /* @__PURE__ */ jsxs("div", {
219
- className: "flex items-center justify-end gap-1",
220
- children: [
221
- actions?.onEdit && /* @__PURE__ */ jsx(Button, {
222
- type: "button",
223
- variant: "ghost",
224
- size: "icon",
225
- className: "h-7 w-7",
226
- onClick: () => actions.onEdit?.(item),
227
- "aria-label": t("field.editItem"),
228
- children: /* @__PURE__ */ jsx(Icon, {
229
- icon: "ph:pencil",
230
- className: "size-4"
231
- })
232
- }),
233
- editable && actions?.onRemove && /* @__PURE__ */ jsx(Button, {
234
- type: "button",
235
- variant: "ghost",
236
- size: "icon",
237
- className: "h-7 w-7",
238
- onClick: () => actions.onRemove?.(item),
239
- "aria-label": t("field.removeItem"),
240
- children: /* @__PURE__ */ jsx(Icon, {
241
- icon: "ph:x",
242
- className: "size-4"
243
- })
244
- }),
245
- !editable && linkToDetail && !actions?.onEdit && /* @__PURE__ */ jsx(CollectionEditLink, {
246
- collection,
247
- id: item.id,
248
- className: "text-primary hover:underline",
249
- children: /* @__PURE__ */ jsx(Icon, {
250
- icon: "ph:arrow-right",
251
- className: "size-4"
252
- })
253
- })
254
- ]
255
- })
256
- })]
257
- }, item.id);
231
+ ]
232
+ }) })] }, item.id);
258
233
  $[23] = actions;
259
234
  $[24] = collection;
260
235
  $[25] = collectionConfig;
@@ -279,18 +254,15 @@ function TableDisplay(t0) {
279
254
  } else t10 = $[22];
280
255
  let t11;
281
256
  if ($[32] !== t10) {
282
- t11 = /* @__PURE__ */ jsx("tbody", { children: t10 });
257
+ t11 = /* @__PURE__ */ jsx(TableBody, { children: t10 });
283
258
  $[32] = t10;
284
259
  $[33] = t11;
285
260
  } else t11 = $[33];
286
261
  let t12;
287
262
  if ($[34] !== t11 || $[35] !== t9) {
288
263
  t12 = /* @__PURE__ */ jsx("div", {
289
- className: "min-w-0 overflow-x-auto border",
290
- children: /* @__PURE__ */ jsxs("table", {
291
- className: "w-full text-sm",
292
- children: [t9, t11]
293
- })
264
+ className: "panel-surface min-w-0 overflow-x-auto",
265
+ children: /* @__PURE__ */ jsxs(Table, { children: [t9, t11] })
294
266
  });
295
267
  $[34] = t11;
296
268
  $[35] = t9;
@@ -299,10 +271,7 @@ function TableDisplay(t0) {
299
271
  return t12;
300
272
  }
301
273
  function _temp4(col) {
302
- return /* @__PURE__ */ jsx("th", {
303
- className: "px-3 py-2 text-left font-medium",
304
- children: formatColumnHeader(col)
305
- }, col);
274
+ return /* @__PURE__ */ jsx(TableHead, { children: formatColumnHeader(col) }, col);
306
275
  }
307
276
 
308
277
  //#endregion
@@ -78,7 +78,7 @@ function RelationItemsDisplay(t0) {
78
78
  let t10;
79
79
  if ($[23] !== resolvedEmptyMessage) {
80
80
  t10 = /* @__PURE__ */ jsx("div", {
81
- className: "border border-dashed p-4 text-center",
81
+ className: "py-2",
82
82
  children: /* @__PURE__ */ jsx("p", {
83
83
  className: "text-muted-foreground text-sm",
84
84
  children: resolvedEmptyMessage
@@ -192,7 +192,7 @@ function RelationPicker({ name, value, onChange, targetCollection, label, filter
192
192
  className: "flex items-center gap-2",
193
193
  children: [/* @__PURE__ */ jsxs("label", {
194
194
  htmlFor: name,
195
- className: "flex items-center gap-1.5 text-sm font-medium",
195
+ className: "font-chrome flex items-center gap-1.5 text-sm font-medium",
196
196
  children: [
197
197
  resolveIconElement(collectionIconRef, { className: "size-3.5 text-muted-foreground" }),
198
198
  resolvedLabel,
@@ -201,7 +201,7 @@ function RelationPicker({ name, value, onChange, targetCollection, label, filter
201
201
  children: "*"
202
202
  }),
203
203
  maxItems && /* @__PURE__ */ jsxs("span", {
204
- className: "text-muted-foreground ml-2 text-xs",
204
+ className: "text-muted-foreground font-chrome chrome-meta ml-2 text-xs tabular-nums",
205
205
  children: [
206
206
  "(",
207
207
  selectedIds.length,
@@ -230,7 +230,7 @@ function RelationPicker({ name, value, onChange, targetCollection, label, filter
230
230
  loadingCount: selectedIds.length || 3
231
231
  }),
232
232
  !readOnly && canAddMore && /* @__PURE__ */ jsxs("div", {
233
- className: "flex gap-2",
233
+ className: "qa-relation-picker__add-more flex items-center gap-2",
234
234
  children: [/* @__PURE__ */ jsx("div", {
235
235
  className: "flex-1",
236
236
  children: /* @__PURE__ */ jsx(SelectSingle, {
@@ -259,6 +259,7 @@ function RelationPicker({ name, value, onChange, targetCollection, label, filter
259
259
  type: "button",
260
260
  variant: "outline",
261
261
  size: "icon",
262
+ className: "text-muted-foreground hover:text-foreground size-10",
262
263
  onClick: handleOpenCreate,
263
264
  disabled,
264
265
  title: createLabel,
@@ -270,14 +271,14 @@ function RelationPicker({ name, value, onChange, targetCollection, label, filter
270
271
  })]
271
272
  }),
272
273
  selectedIds.length === 0 && !isLoadingItems && /* @__PURE__ */ jsx("div", {
273
- className: "border border-dashed p-4 text-center",
274
+ className: "qa-relation-picker__empty-state py-2",
274
275
  children: /* @__PURE__ */ jsx("p", {
275
- className: "text-muted-foreground text-sm",
276
+ className: "text-muted-foreground text-sm text-pretty",
276
277
  children: resolvedPlaceholder || emptyLabel
277
278
  })
278
279
  }),
279
280
  error && /* @__PURE__ */ jsx("p", {
280
- className: "text-destructive text-sm",
281
+ className: "text-destructive text-sm text-pretty",
281
282
  children: error
282
283
  }),
283
284
  /* @__PURE__ */ jsx(ResourceSheet, {