@questpie/admin 3.2.4 → 3.2.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 (248) hide show
  1. package/dist/client/blocks/block-renderer.d.mts +2 -2
  2. package/dist/client/blocks/block-renderer.mjs +164 -339
  3. package/dist/client/components/actions/action-button.mjs +9 -9
  4. package/dist/client/components/actions/action-dialog.mjs +195 -493
  5. package/dist/client/components/actions/confirmation-dialog.mjs +44 -159
  6. package/dist/client/components/actions/header-actions.mjs +73 -165
  7. package/dist/client/components/admin-link.mjs +40 -126
  8. package/dist/client/components/auth/auth-loading.mjs +9 -44
  9. package/dist/client/components/blocks/block-canvas.mjs +31 -95
  10. package/dist/client/components/blocks/block-editor-context.mjs +13 -57
  11. package/dist/client/components/blocks/block-editor-layout.mjs +72 -166
  12. package/dist/client/components/blocks/block-editor-provider.mjs +184 -245
  13. package/dist/client/components/blocks/block-fields-renderer.mjs +54 -229
  14. package/dist/client/components/blocks/block-insert-button.mjs +49 -165
  15. package/dist/client/components/blocks/block-item-menu.mjs +102 -301
  16. package/dist/client/components/blocks/block-item.mjs +136 -370
  17. package/dist/client/components/blocks/block-library-sidebar.mjs +103 -230
  18. package/dist/client/components/blocks/block-tree.mjs +12 -68
  19. package/dist/client/components/blocks/block-type-icon.mjs +14 -56
  20. package/dist/client/components/brand-logo.mjs +35 -149
  21. package/dist/client/components/component-renderer.mjs +42 -118
  22. package/dist/client/components/error-boundary.mjs +14 -58
  23. package/dist/client/components/fields/array-field.mjs +209 -521
  24. package/dist/client/components/fields/asset-preview-field.mjs +41 -141
  25. package/dist/client/components/fields/blocks-field/blocks-field.mjs +60 -156
  26. package/dist/client/components/fields/boolean-field.mjs +29 -59
  27. package/dist/client/components/fields/date-field.mjs +7 -37
  28. package/dist/client/components/fields/datetime-field.mjs +7 -38
  29. package/dist/client/components/fields/email-field.mjs +25 -54
  30. package/dist/client/components/fields/field-wrapper.mjs +30 -105
  31. package/dist/client/components/fields/json-field.mjs +94 -296
  32. package/dist/client/components/fields/locale-badge.mjs +6 -15
  33. package/dist/client/components/fields/number-field.mjs +27 -60
  34. package/dist/client/components/fields/object-array-field.mjs +283 -659
  35. package/dist/client/components/fields/object-field.mjs +165 -633
  36. package/dist/client/components/fields/relation/displays/cards-display.mjs +106 -220
  37. package/dist/client/components/fields/relation/displays/chips-display.mjs +78 -150
  38. package/dist/client/components/fields/relation/displays/grid-display.mjs +92 -186
  39. package/dist/client/components/fields/relation/displays/list-display.mjs +122 -239
  40. package/dist/client/components/fields/relation/displays/table-display.mjs +70 -244
  41. package/dist/client/components/fields/relation/relation-items-display.mjs +30 -126
  42. package/dist/client/components/fields/relation-field.mjs +10 -66
  43. package/dist/client/components/fields/relation-picker.mjs +18 -18
  44. package/dist/client/components/fields/relation-select.mjs +12 -12
  45. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +80 -180
  46. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +2 -2
  47. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
  48. package/dist/client/components/fields/rich-text-editor/index.mjs +195 -513
  49. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +61 -111
  50. package/dist/client/components/fields/rich-text-editor/table-controls.mjs +105 -415
  51. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +256 -511
  52. package/dist/client/components/fields/rich-text-field.mjs +14 -53
  53. package/dist/client/components/fields/select-field.mjs +39 -74
  54. package/dist/client/components/fields/text-field.mjs +26 -59
  55. package/dist/client/components/fields/textarea-field.mjs +26 -58
  56. package/dist/client/components/fields/time-field.mjs +7 -35
  57. package/dist/client/components/fields/upload-field.mjs +47 -165
  58. package/dist/client/components/filter-builder/columns-tab.mjs +80 -280
  59. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +197 -540
  60. package/dist/client/components/filter-builder/filters-tab.mjs +96 -386
  61. package/dist/client/components/filter-builder/saved-views-tab.mjs +133 -351
  62. package/dist/client/components/history-sidebar.mjs +285 -605
  63. package/dist/client/components/layout/field-layout-renderer.mjs +106 -254
  64. package/dist/client/components/locale-switcher.mjs +106 -228
  65. package/dist/client/components/media/media-grid.mjs +84 -273
  66. package/dist/client/components/media/media-picker-dialog.mjs +176 -476
  67. package/dist/client/components/preview/live-preview-mode.mjs +233 -458
  68. package/dist/client/components/preview/preview-pane.mjs +22 -22
  69. package/dist/client/components/primitives/asset-preview.mjs +290 -666
  70. package/dist/client/components/primitives/checkbox-input.mjs +9 -35
  71. package/dist/client/components/primitives/date-input.mjs +109 -327
  72. package/dist/client/components/primitives/dropzone.mjs +209 -336
  73. package/dist/client/components/primitives/field-select-control.mjs +12 -80
  74. package/dist/client/components/primitives/number-input.mjs +4 -4
  75. package/dist/client/components/primitives/select-multi.mjs +200 -559
  76. package/dist/client/components/primitives/select-single.mjs +165 -499
  77. package/dist/client/components/primitives/time-input.mjs +43 -117
  78. package/dist/client/components/primitives/toggle-input.mjs +9 -29
  79. package/dist/client/components/sheets/resource-sheet.mjs +61 -70
  80. package/dist/client/components/ui/accordion.mjs +35 -155
  81. package/dist/client/components/ui/alert.mjs +13 -68
  82. package/dist/client/components/ui/badge.mjs +9 -51
  83. package/dist/client/components/ui/button.mjs +8 -54
  84. package/dist/client/components/ui/card.mjs +37 -193
  85. package/dist/client/components/ui/checkbox.mjs +12 -68
  86. package/dist/client/components/ui/command.mjs +48 -219
  87. package/dist/client/components/ui/dialog.mjs +50 -262
  88. package/dist/client/components/ui/drawer.mjs +55 -259
  89. package/dist/client/components/ui/dropdown-menu.mjs +86 -427
  90. package/dist/client/components/ui/empty-state.mjs +28 -98
  91. package/dist/client/components/ui/field.mjs +73 -309
  92. package/dist/client/components/ui/input-group.mjs +42 -167
  93. package/dist/client/components/ui/input.mjs +7 -37
  94. package/dist/client/components/ui/kbd.mjs +6 -36
  95. package/dist/client/components/ui/label.mjs +7 -37
  96. package/dist/client/components/ui/popover.mjs +34 -169
  97. package/dist/client/components/ui/responsive-dialog.mjs +67 -273
  98. package/dist/client/components/ui/scroll-fade.mjs +63 -158
  99. package/dist/client/components/ui/search-input.mjs +33 -100
  100. package/dist/client/components/ui/select.mjs +72 -393
  101. package/dist/client/components/ui/separator.mjs +7 -38
  102. package/dist/client/components/ui/sheet.mjs +49 -269
  103. package/dist/client/components/ui/sidebar.mjs +171 -690
  104. package/dist/client/components/ui/skeleton.mjs +7 -38
  105. package/dist/client/components/ui/sonner.mjs +11 -42
  106. package/dist/client/components/ui/switch.mjs +9 -45
  107. package/dist/client/components/ui/table.mjs +48 -266
  108. package/dist/client/components/ui/tabs.mjs +26 -139
  109. package/dist/client/components/ui/textarea.mjs +6 -32
  110. package/dist/client/components/ui/tooltip.mjs +27 -129
  111. package/dist/client/components/widgets/chart-widget.mjs +174 -522
  112. package/dist/client/components/widgets/progress-widget.mjs +66 -172
  113. package/dist/client/components/widgets/quick-actions-widget.mjs +102 -261
  114. package/dist/client/components/widgets/recent-items-widget.mjs +69 -195
  115. package/dist/client/components/widgets/stats-widget.mjs +41 -175
  116. package/dist/client/components/widgets/table-widget.mjs +9 -9
  117. package/dist/client/components/widgets/timeline-widget.mjs +86 -226
  118. package/dist/client/components/widgets/value-widget.mjs +74 -381
  119. package/dist/client/components/widgets/widget-empty-state.mjs +26 -76
  120. package/dist/client/components/widgets/widget-skeletons.mjs +138 -421
  121. package/dist/client/contexts/focus-context.mjs +63 -146
  122. package/dist/client/hooks/typed-hooks.mjs +241 -701
  123. package/dist/client/hooks/use-action.mjs +62 -198
  124. package/dist/client/hooks/use-admin-config.mjs +5 -35
  125. package/dist/client/hooks/use-admin-preferences.mjs +16 -88
  126. package/dist/client/hooks/use-admin-routes.mjs +22 -56
  127. package/dist/client/hooks/use-audit-history.mjs +21 -69
  128. package/dist/client/hooks/use-brand.mjs +1 -9
  129. package/dist/client/hooks/use-collection-fields.mjs +17 -57
  130. package/dist/client/hooks/use-collection-meta.mjs +12 -44
  131. package/dist/client/hooks/use-collection-schema.mjs +10 -33
  132. package/dist/client/hooks/use-collection-validation.mjs +23 -53
  133. package/dist/client/hooks/use-collection.mjs +194 -614
  134. package/dist/client/hooks/use-current-user.mjs +0 -1
  135. package/dist/client/hooks/use-field-hooks.mjs +10 -10
  136. package/dist/client/hooks/use-field-options.mjs +61 -202
  137. package/dist/client/hooks/use-global-fields.mjs +14 -46
  138. package/dist/client/hooks/use-global-meta.mjs +9 -30
  139. package/dist/client/hooks/use-global-schema.mjs +9 -30
  140. package/dist/client/hooks/use-global.mjs +63 -219
  141. package/dist/client/hooks/use-locks.mjs +117 -325
  142. package/dist/client/hooks/use-media-query.mjs +16 -36
  143. package/dist/client/hooks/use-prefill-params.mjs +0 -1
  144. package/dist/client/hooks/use-questpie-query-options.mjs +12 -29
  145. package/dist/client/hooks/use-reactive-fields.mjs +1 -1
  146. package/dist/client/hooks/use-reactive-prop.mjs +65 -223
  147. package/dist/client/hooks/use-realtime-highlight.mjs +51 -114
  148. package/dist/client/hooks/use-saved-views.mjs +22 -103
  149. package/dist/client/hooks/use-search-param-toggle.mjs +28 -79
  150. package/dist/client/hooks/use-search.mjs +31 -143
  151. package/dist/client/hooks/use-server-actions.mjs +18 -50
  152. package/dist/client/hooks/use-server-validation.mjs +72 -166
  153. package/dist/client/hooks/use-server-widget-data.mjs +7 -33
  154. package/dist/client/hooks/use-setup-status.mjs +12 -25
  155. package/dist/client/hooks/use-sidebar-search-param.mjs +33 -78
  156. package/dist/client/hooks/use-transition-stage.mjs +8 -38
  157. package/dist/client/hooks/use-upload.mjs +54 -152
  158. package/dist/client/hooks/use-validation-error-map.mjs +6 -26
  159. package/dist/client/hooks/use-view-state.mjs +187 -437
  160. package/dist/client/i18n/hooks.mjs +65 -197
  161. package/dist/client/lib/render-profiler.mjs +14 -41
  162. package/dist/client/preview/block-scope-context.d.mts +2 -2
  163. package/dist/client/preview/block-scope-context.mjs +14 -36
  164. package/dist/client/preview/preview-banner.d.mts +2 -2
  165. package/dist/client/preview/preview-banner.mjs +42 -108
  166. package/dist/client/preview/preview-field.d.mts +4 -4
  167. package/dist/client/preview/preview-field.mjs +167 -348
  168. package/dist/client/preview/use-collection-preview.mjs +121 -215
  169. package/dist/client/runtime/content-locales-provider.mjs +31 -83
  170. package/dist/client/runtime/locale-scope.mjs +22 -63
  171. package/dist/client/runtime/provider.mjs +100 -255
  172. package/dist/client/runtime/translations-provider.mjs +41 -107
  173. package/dist/client/scope/picker.d.mts +2 -2
  174. package/dist/client/scope/picker.mjs +86 -321
  175. package/dist/client/scope/provider.d.mts +2 -2
  176. package/dist/client/scope/provider.mjs +8 -17
  177. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  178. package/dist/client/views/auth/accept-invite-form.mjs +121 -412
  179. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  180. package/dist/client/views/auth/auth-layout.mjs +104 -284
  181. package/dist/client/views/auth/forgot-password-form.mjs +94 -325
  182. package/dist/client/views/auth/invite-form.mjs +107 -442
  183. package/dist/client/views/auth/login-form.d.mts +2 -2
  184. package/dist/client/views/auth/login-form.mjs +116 -337
  185. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  186. package/dist/client/views/auth/reset-password-form.mjs +128 -453
  187. package/dist/client/views/auth/setup-form.d.mts +2 -2
  188. package/dist/client/views/auth/setup-form.mjs +140 -478
  189. package/dist/client/views/collection/auto-form-fields.mjs +243 -615
  190. package/dist/client/views/collection/bulk-action-toolbar.mjs +212 -379
  191. package/dist/client/views/collection/cells/complex-cells.mjs +183 -611
  192. package/dist/client/views/collection/cells/primitive-cells.mjs +109 -363
  193. package/dist/client/views/collection/cells/relation-cells.mjs +86 -233
  194. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +142 -371
  195. package/dist/client/views/collection/cells/shared/relation-chip.mjs +35 -131
  196. package/dist/client/views/collection/cells/upload-cells.mjs +60 -177
  197. package/dist/client/views/collection/columns/build-columns.mjs +8 -48
  198. package/dist/client/views/collection/field-renderer.mjs +58 -182
  199. package/dist/client/views/collection/form-view.mjs +284 -518
  200. package/dist/client/views/collection/table-view.mjs +231 -463
  201. package/dist/client/views/collection/view-skeletons.mjs +112 -237
  202. package/dist/client/views/common/global-search.mjs +241 -560
  203. package/dist/client/views/dashboard/dashboard-grid.mjs +256 -775
  204. package/dist/client/views/dashboard/dashboard-widget.mjs +38 -126
  205. package/dist/client/views/dashboard/widget-card.mjs +61 -269
  206. package/dist/client/views/globals/global-form-view.mjs +477 -1301
  207. package/dist/client/views/layout/admin-layout-provider.mjs +28 -88
  208. package/dist/client/views/layout/admin-layout.mjs +83 -246
  209. package/dist/client/views/layout/admin-router.mjs +458 -1274
  210. package/dist/client/views/layout/admin-sidebar.mjs +510 -1292
  211. package/dist/client/views/layout/admin-theme.mjs +30 -64
  212. package/dist/client/views/layout/admin-view-layout.mjs +40 -144
  213. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  214. package/dist/client/views/pages/accept-invite-page.mjs +95 -290
  215. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  216. package/dist/client/views/pages/dashboard-page.mjs +11 -57
  217. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  218. package/dist/client/views/pages/forgot-password-page.mjs +31 -83
  219. package/dist/client/views/pages/invite-page.d.mts +2 -2
  220. package/dist/client/views/pages/invite-page.mjs +35 -90
  221. package/dist/client/views/pages/login-page.mjs +41 -121
  222. package/dist/client/views/pages/reset-password-page.mjs +46 -173
  223. package/dist/client/views/pages/setup-page.mjs +33 -95
  224. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  225. package/dist/components/rich-text/rich-text-renderer.mjs +9 -33
  226. package/dist/server/modules/admin/collections/account.d.mts +46 -46
  227. package/dist/server/modules/admin/collections/admin-locks.d.mts +50 -50
  228. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  229. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  230. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  231. package/dist/server/modules/admin/collections/assets.d.mts +39 -39
  232. package/dist/server/modules/admin/collections/session.d.mts +41 -41
  233. package/dist/server/modules/admin/collections/user.d.mts +63 -63
  234. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  235. package/dist/server/modules/admin/index.d.mts +20 -19
  236. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  237. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  238. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  239. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  240. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  241. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  242. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  243. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  244. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +45 -45
  245. package/dist/server/modules/audit/.generated/module.d.mts +6 -6
  246. package/dist/server/modules/audit/collections/audit-log.d.mts +78 -78
  247. package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
  248. package/package.json +3 -5
@@ -2,237 +2,66 @@
2
2
 
3
3
  import { cn } from "../../lib/utils.mjs";
4
4
  import { InputGroup, InputGroupAddon } from "./input-group.mjs";
5
- import { c } from "react/compiler-runtime";
6
5
  import { Icon } from "@iconify/react";
7
6
  import { jsx, jsxs } from "react/jsx-runtime";
8
7
  import { Command } from "cmdk";
9
8
 
10
9
  //#region src/client/components/ui/command.tsx
11
- function Command$1(t0) {
12
- const $ = c(8);
13
- let className;
14
- let props;
15
- if ($[0] !== t0) {
16
- ({className, ...props} = t0);
17
- $[0] = t0;
18
- $[1] = className;
19
- $[2] = props;
20
- } else {
21
- className = $[1];
22
- props = $[2];
23
- }
24
- let t1;
25
- if ($[3] !== className) {
26
- t1 = cn("qa-command bg-popover text-popover-foreground flex size-full flex-col overflow-hidden p-1", className);
27
- $[3] = className;
28
- $[4] = t1;
29
- } else t1 = $[4];
30
- let t2;
31
- if ($[5] !== props || $[6] !== t1) {
32
- t2 = /* @__PURE__ */ jsx(Command, {
33
- "data-slot": "command",
34
- className: t1,
35
- ...props
36
- });
37
- $[5] = props;
38
- $[6] = t1;
39
- $[7] = t2;
40
- } else t2 = $[7];
41
- return t2;
10
+ function Command$1({ className, ...props }) {
11
+ return /* @__PURE__ */ jsx(Command, {
12
+ "data-slot": "command",
13
+ className: cn("qa-command bg-popover text-popover-foreground flex size-full flex-col overflow-hidden p-1", className),
14
+ ...props
15
+ });
42
16
  }
43
- function CommandInput(t0) {
44
- const $ = c(11);
45
- let className;
46
- let props;
47
- if ($[0] !== t0) {
48
- ({className, ...props} = t0);
49
- $[0] = t0;
50
- $[1] = className;
51
- $[2] = props;
52
- } else {
53
- className = $[1];
54
- props = $[2];
55
- }
56
- let t1;
57
- if ($[3] !== className) {
58
- t1 = cn("qa-command__input w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className);
59
- $[3] = className;
60
- $[4] = t1;
61
- } else t1 = $[4];
62
- let t2;
63
- if ($[5] !== props || $[6] !== t1) {
64
- t2 = /* @__PURE__ */ jsx(Command.Input, {
65
- "data-slot": "command-input",
66
- className: t1,
67
- ...props
68
- });
69
- $[5] = props;
70
- $[6] = t1;
71
- $[7] = t2;
72
- } else t2 = $[7];
73
- let t3;
74
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
75
- t3 = /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Icon, {
76
- icon: "ph:magnifying-glass",
77
- className: "size-3.5 shrink-0 opacity-50"
78
- }) });
79
- $[8] = t3;
80
- } else t3 = $[8];
81
- let t4;
82
- if ($[9] !== t2) {
83
- t4 = /* @__PURE__ */ jsx("div", {
84
- "data-slot": "command-input-wrapper",
85
- className: "p-1 pb-0",
86
- children: /* @__PURE__ */ jsxs(InputGroup, {
87
- className: "h-9!",
88
- children: [t2, t3]
89
- })
90
- });
91
- $[9] = t2;
92
- $[10] = t4;
93
- } else t4 = $[10];
94
- return t4;
17
+ function CommandInput({ className, ...props }) {
18
+ return /* @__PURE__ */ jsx("div", {
19
+ "data-slot": "command-input-wrapper",
20
+ className: "p-1 pb-0",
21
+ children: /* @__PURE__ */ jsxs(InputGroup, {
22
+ className: "h-9!",
23
+ children: [/* @__PURE__ */ jsx(Command.Input, {
24
+ "data-slot": "command-input",
25
+ className: cn("qa-command__input w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
26
+ ...props
27
+ }), /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Icon, {
28
+ icon: "ph:magnifying-glass",
29
+ className: "size-3.5 shrink-0 opacity-50"
30
+ }) })]
31
+ })
32
+ });
95
33
  }
96
- function CommandList(t0) {
97
- const $ = c(8);
98
- let className;
99
- let props;
100
- if ($[0] !== t0) {
101
- ({className, ...props} = t0);
102
- $[0] = t0;
103
- $[1] = className;
104
- $[2] = props;
105
- } else {
106
- className = $[1];
107
- props = $[2];
108
- }
109
- let t1;
110
- if ($[3] !== className) {
111
- t1 = cn("qa-command__list no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className);
112
- $[3] = className;
113
- $[4] = t1;
114
- } else t1 = $[4];
115
- let t2;
116
- if ($[5] !== props || $[6] !== t1) {
117
- t2 = /* @__PURE__ */ jsx(Command.List, {
118
- "data-slot": "command-list",
119
- className: t1,
120
- ...props
121
- });
122
- $[5] = props;
123
- $[6] = t1;
124
- $[7] = t2;
125
- } else t2 = $[7];
126
- return t2;
34
+ function CommandList({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx(Command.List, {
36
+ "data-slot": "command-list",
37
+ className: cn("qa-command__list no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className),
38
+ ...props
39
+ });
127
40
  }
128
- function CommandEmpty(t0) {
129
- const $ = c(8);
130
- let className;
131
- let props;
132
- if ($[0] !== t0) {
133
- ({className, ...props} = t0);
134
- $[0] = t0;
135
- $[1] = className;
136
- $[2] = props;
137
- } else {
138
- className = $[1];
139
- props = $[2];
140
- }
141
- let t1;
142
- if ($[3] !== className) {
143
- t1 = cn("qa-command__empty text-muted-foreground py-6 text-center text-sm", className);
144
- $[3] = className;
145
- $[4] = t1;
146
- } else t1 = $[4];
147
- let t2;
148
- if ($[5] !== props || $[6] !== t1) {
149
- t2 = /* @__PURE__ */ jsx(Command.Empty, {
150
- "data-slot": "command-empty",
151
- className: t1,
152
- ...props
153
- });
154
- $[5] = props;
155
- $[6] = t1;
156
- $[7] = t2;
157
- } else t2 = $[7];
158
- return t2;
41
+ function CommandEmpty({ className, ...props }) {
42
+ return /* @__PURE__ */ jsx(Command.Empty, {
43
+ "data-slot": "command-empty",
44
+ className: cn("qa-command__empty text-muted-foreground py-6 text-center text-sm", className),
45
+ ...props
46
+ });
159
47
  }
160
- function CommandGroup(t0) {
161
- const $ = c(8);
162
- let className;
163
- let props;
164
- if ($[0] !== t0) {
165
- ({className, ...props} = t0);
166
- $[0] = t0;
167
- $[1] = className;
168
- $[2] = props;
169
- } else {
170
- className = $[1];
171
- props = $[2];
172
- }
173
- let t1;
174
- if ($[3] !== className) {
175
- t1 = cn("qa-command__group text-foreground [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:font-chrome [&_[cmdk-group-heading]]:chrome-meta overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className);
176
- $[3] = className;
177
- $[4] = t1;
178
- } else t1 = $[4];
179
- let t2;
180
- if ($[5] !== props || $[6] !== t1) {
181
- t2 = /* @__PURE__ */ jsx(Command.Group, {
182
- "data-slot": "command-group",
183
- className: t1,
184
- ...props
185
- });
186
- $[5] = props;
187
- $[6] = t1;
188
- $[7] = t2;
189
- } else t2 = $[7];
190
- return t2;
48
+ function CommandGroup({ className, ...props }) {
49
+ return /* @__PURE__ */ jsx(Command.Group, {
50
+ "data-slot": "command-group",
51
+ className: cn("qa-command__group text-foreground [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:font-chrome [&_[cmdk-group-heading]]:chrome-meta overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
52
+ ...props
53
+ });
191
54
  }
192
- function CommandItem(t0) {
193
- const $ = c(11);
194
- let children;
195
- let className;
196
- let props;
197
- if ($[0] !== t0) {
198
- ({className, children, ...props} = t0);
199
- $[0] = t0;
200
- $[1] = children;
201
- $[2] = className;
202
- $[3] = props;
203
- } else {
204
- children = $[1];
205
- className = $[2];
206
- props = $[3];
207
- }
208
- let t1;
209
- if ($[4] !== className) {
210
- t1 = cn("qa-command__item item-surface data-selected:border-border data-selected:bg-accent data-selected:text-accent-foreground data-selected:*:[svg]:text-accent-foreground group/command-item relative flex min-h-9 cursor-pointer items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", className);
211
- $[4] = className;
212
- $[5] = t1;
213
- } else t1 = $[5];
214
- let t2;
215
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
216
- t2 = /* @__PURE__ */ jsx(Icon, {
55
+ function CommandItem({ className, children, ...props }) {
56
+ return /* @__PURE__ */ jsxs(Command.Item, {
57
+ "data-slot": "command-item",
58
+ className: cn("qa-command__item item-surface data-selected:border-border data-selected:bg-accent data-selected:text-accent-foreground data-selected:*:[svg]:text-accent-foreground group/command-item relative flex min-h-9 cursor-pointer items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", className),
59
+ ...props,
60
+ children: [children, /* @__PURE__ */ jsx(Icon, {
217
61
  icon: "ph:check",
218
62
  className: "ml-auto opacity-0 group-has-[[data-slot=command-shortcut]]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"
219
- });
220
- $[6] = t2;
221
- } else t2 = $[6];
222
- let t3;
223
- if ($[7] !== children || $[8] !== props || $[9] !== t1) {
224
- t3 = /* @__PURE__ */ jsxs(Command.Item, {
225
- "data-slot": "command-item",
226
- className: t1,
227
- ...props,
228
- children: [children, t2]
229
- });
230
- $[7] = children;
231
- $[8] = props;
232
- $[9] = t1;
233
- $[10] = t3;
234
- } else t3 = $[10];
235
- return t3;
63
+ })]
64
+ });
236
65
  }
237
66
 
238
67
  //#endregion
@@ -2,116 +2,36 @@
2
2
 
3
3
  import { cn } from "../../lib/utils.mjs";
4
4
  import { Button } from "./button.mjs";
5
- import { c } from "react/compiler-runtime";
6
5
  import { Icon } from "@iconify/react";
7
6
  import { jsx, jsxs } from "react/jsx-runtime";
8
7
  import { Dialog } from "@base-ui/react/dialog";
9
8
 
10
9
  //#region src/client/components/ui/dialog.tsx
11
- function Dialog$1(t0) {
12
- const $ = c(4);
13
- let props;
14
- if ($[0] !== t0) {
15
- ({...props} = t0);
16
- $[0] = t0;
17
- $[1] = props;
18
- } else props = $[1];
19
- let t1;
20
- if ($[2] !== props) {
21
- t1 = /* @__PURE__ */ jsx(Dialog.Root, {
22
- "data-slot": "dialog",
23
- ...props
24
- });
25
- $[2] = props;
26
- $[3] = t1;
27
- } else t1 = $[3];
28
- return t1;
10
+ function Dialog$1({ ...props }) {
11
+ return /* @__PURE__ */ jsx(Dialog.Root, {
12
+ "data-slot": "dialog",
13
+ ...props
14
+ });
29
15
  }
30
- function DialogPortal(t0) {
31
- const $ = c(4);
32
- let props;
33
- if ($[0] !== t0) {
34
- ({...props} = t0);
35
- $[0] = t0;
36
- $[1] = props;
37
- } else props = $[1];
38
- let t1;
39
- if ($[2] !== props) {
40
- t1 = /* @__PURE__ */ jsx(Dialog.Portal, {
41
- "data-slot": "dialog-portal",
42
- ...props
43
- });
44
- $[2] = props;
45
- $[3] = t1;
46
- } else t1 = $[3];
47
- return t1;
16
+ function DialogPortal({ ...props }) {
17
+ return /* @__PURE__ */ jsx(Dialog.Portal, {
18
+ "data-slot": "dialog-portal",
19
+ ...props
20
+ });
48
21
  }
49
- function DialogOverlay(t0) {
50
- const $ = c(8);
51
- let className;
52
- let props;
53
- if ($[0] !== t0) {
54
- ({className, ...props} = t0);
55
- $[0] = t0;
56
- $[1] = className;
57
- $[2] = props;
58
- } else {
59
- className = $[1];
60
- props = $[2];
61
- }
62
- let t1;
63
- if ($[3] !== className) {
64
- t1 = cn("qa-dialog__overlay motion-overlay fixed inset-0 isolate z-50 bg-black/70 backdrop-blur-[2px] data-ending-style:opacity-0 data-starting-style:opacity-0", className);
65
- $[3] = className;
66
- $[4] = t1;
67
- } else t1 = $[4];
68
- let t2;
69
- if ($[5] !== props || $[6] !== t1) {
70
- t2 = /* @__PURE__ */ jsx(Dialog.Backdrop, {
71
- "data-slot": "dialog-overlay",
72
- className: t1,
73
- ...props
74
- });
75
- $[5] = props;
76
- $[6] = t1;
77
- $[7] = t2;
78
- } else t2 = $[7];
79
- return t2;
22
+ function DialogOverlay({ className, ...props }) {
23
+ return /* @__PURE__ */ jsx(Dialog.Backdrop, {
24
+ "data-slot": "dialog-overlay",
25
+ className: cn("qa-dialog__overlay motion-overlay fixed inset-0 isolate z-50 bg-black/70 backdrop-blur-[2px] data-ending-style:opacity-0 data-starting-style:opacity-0", className),
26
+ ...props
27
+ });
80
28
  }
81
- function DialogContent(t0) {
82
- const $ = c(15);
83
- let children;
84
- let className;
85
- let props;
86
- let t1;
87
- if ($[0] !== t0) {
88
- ({className, children, showCloseButton: t1, ...props} = t0);
89
- $[0] = t0;
90
- $[1] = children;
91
- $[2] = className;
92
- $[3] = props;
93
- $[4] = t1;
94
- } else {
95
- children = $[1];
96
- className = $[2];
97
- props = $[3];
98
- t1 = $[4];
99
- }
100
- const showCloseButton = t1 === void 0 ? true : t1;
101
- let t2;
102
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
103
- t2 = /* @__PURE__ */ jsx(DialogOverlay, {});
104
- $[5] = t2;
105
- } else t2 = $[5];
106
- let t3;
107
- if ($[6] !== className) {
108
- t3 = cn("qa-dialog__content floating-surface motion-floating text-popover-foreground fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] origin-center -translate-x-1/2 -translate-y-1/2 gap-4 p-5 text-sm outline-none data-ending-style:scale-[var(--motion-scale-enter)] data-ending-style:opacity-0 data-starting-style:scale-[var(--motion-scale-enter)] data-starting-style:opacity-0 sm:max-w-md", className);
109
- $[6] = className;
110
- $[7] = t3;
111
- } else t3 = $[7];
112
- let t4;
113
- if ($[8] !== showCloseButton) {
114
- t4 = showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
29
+ function DialogContent({ className, children, showCloseButton = true, ...props }) {
30
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
31
+ "data-slot": "dialog-content",
32
+ className: cn("qa-dialog__content floating-surface motion-floating text-popover-foreground fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] origin-center -translate-x-1/2 -translate-y-1/2 gap-4 p-5 text-sm outline-none data-ending-style:scale-[var(--motion-scale-enter)] data-ending-style:opacity-0 data-starting-style:scale-[var(--motion-scale-enter)] data-starting-style:opacity-0 sm:max-w-md", className),
33
+ ...props,
34
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
115
35
  "data-slot": "dialog-close",
116
36
  nativeButton: false,
117
37
  render: /* @__PURE__ */ jsx(Button, {
@@ -123,173 +43,41 @@ function DialogContent(t0) {
123
43
  className: "sr-only",
124
44
  children: "Close"
125
45
  })]
126
- });
127
- $[8] = showCloseButton;
128
- $[9] = t4;
129
- } else t4 = $[9];
130
- let t5;
131
- if ($[10] !== children || $[11] !== props || $[12] !== t3 || $[13] !== t4) {
132
- t5 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t2, /* @__PURE__ */ jsxs(Dialog.Popup, {
133
- "data-slot": "dialog-content",
134
- className: t3,
135
- ...props,
136
- children: [children, t4]
137
- })] });
138
- $[10] = children;
139
- $[11] = props;
140
- $[12] = t3;
141
- $[13] = t4;
142
- $[14] = t5;
143
- } else t5 = $[14];
144
- return t5;
46
+ })]
47
+ })] });
145
48
  }
146
- function DialogHeader(t0) {
147
- const $ = c(8);
148
- let className;
149
- let props;
150
- if ($[0] !== t0) {
151
- ({className, ...props} = t0);
152
- $[0] = t0;
153
- $[1] = className;
154
- $[2] = props;
155
- } else {
156
- className = $[1];
157
- props = $[2];
158
- }
159
- let t1;
160
- if ($[3] !== className) {
161
- t1 = cn("qa-dialog__header flex flex-col gap-1", className);
162
- $[3] = className;
163
- $[4] = t1;
164
- } else t1 = $[4];
165
- let t2;
166
- if ($[5] !== props || $[6] !== t1) {
167
- t2 = /* @__PURE__ */ jsx("div", {
168
- "data-slot": "dialog-header",
169
- className: t1,
170
- ...props
171
- });
172
- $[5] = props;
173
- $[6] = t1;
174
- $[7] = t2;
175
- } else t2 = $[7];
176
- return t2;
49
+ function DialogHeader({ className, ...props }) {
50
+ return /* @__PURE__ */ jsx("div", {
51
+ "data-slot": "dialog-header",
52
+ className: cn("qa-dialog__header flex flex-col gap-1", className),
53
+ ...props
54
+ });
177
55
  }
178
- function DialogFooter(t0) {
179
- const $ = c(14);
180
- let children;
181
- let className;
182
- let props;
183
- let t1;
184
- if ($[0] !== t0) {
185
- ({className, showCloseButton: t1, children, ...props} = t0);
186
- $[0] = t0;
187
- $[1] = children;
188
- $[2] = className;
189
- $[3] = props;
190
- $[4] = t1;
191
- } else {
192
- children = $[1];
193
- className = $[2];
194
- props = $[3];
195
- t1 = $[4];
196
- }
197
- const showCloseButton = t1 === void 0 ? false : t1;
198
- let t2;
199
- if ($[5] !== className) {
200
- t2 = cn("qa-dialog__footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className);
201
- $[5] = className;
202
- $[6] = t2;
203
- } else t2 = $[6];
204
- let t3;
205
- if ($[7] !== showCloseButton) {
206
- t3 = showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
56
+ function DialogFooter({ className, showCloseButton = false, children, ...props }) {
57
+ return /* @__PURE__ */ jsxs("div", {
58
+ "data-slot": "dialog-footer",
59
+ className: cn("qa-dialog__footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
60
+ ...props,
61
+ children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog.Close, {
207
62
  nativeButton: false,
208
63
  render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
209
64
  children: "Close"
210
- });
211
- $[7] = showCloseButton;
212
- $[8] = t3;
213
- } else t3 = $[8];
214
- let t4;
215
- if ($[9] !== children || $[10] !== props || $[11] !== t2 || $[12] !== t3) {
216
- t4 = /* @__PURE__ */ jsxs("div", {
217
- "data-slot": "dialog-footer",
218
- className: t2,
219
- ...props,
220
- children: [children, t3]
221
- });
222
- $[9] = children;
223
- $[10] = props;
224
- $[11] = t2;
225
- $[12] = t3;
226
- $[13] = t4;
227
- } else t4 = $[13];
228
- return t4;
65
+ })]
66
+ });
229
67
  }
230
- function DialogTitle(t0) {
231
- const $ = c(8);
232
- let className;
233
- let props;
234
- if ($[0] !== t0) {
235
- ({className, ...props} = t0);
236
- $[0] = t0;
237
- $[1] = className;
238
- $[2] = props;
239
- } else {
240
- className = $[1];
241
- props = $[2];
242
- }
243
- let t1;
244
- if ($[3] !== className) {
245
- t1 = cn("qa-dialog__title font-chrome text-sm font-medium", className);
246
- $[3] = className;
247
- $[4] = t1;
248
- } else t1 = $[4];
249
- let t2;
250
- if ($[5] !== props || $[6] !== t1) {
251
- t2 = /* @__PURE__ */ jsx(Dialog.Title, {
252
- "data-slot": "dialog-title",
253
- className: t1,
254
- ...props
255
- });
256
- $[5] = props;
257
- $[6] = t1;
258
- $[7] = t2;
259
- } else t2 = $[7];
260
- return t2;
68
+ function DialogTitle({ className, ...props }) {
69
+ return /* @__PURE__ */ jsx(Dialog.Title, {
70
+ "data-slot": "dialog-title",
71
+ className: cn("qa-dialog__title font-chrome text-sm font-medium", className),
72
+ ...props
73
+ });
261
74
  }
262
- function DialogDescription(t0) {
263
- const $ = c(8);
264
- let className;
265
- let props;
266
- if ($[0] !== t0) {
267
- ({className, ...props} = t0);
268
- $[0] = t0;
269
- $[1] = className;
270
- $[2] = props;
271
- } else {
272
- className = $[1];
273
- props = $[2];
274
- }
275
- let t1;
276
- if ($[3] !== className) {
277
- t1 = cn("qa-dialog__description text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3", className);
278
- $[3] = className;
279
- $[4] = t1;
280
- } else t1 = $[4];
281
- let t2;
282
- if ($[5] !== props || $[6] !== t1) {
283
- t2 = /* @__PURE__ */ jsx(Dialog.Description, {
284
- "data-slot": "dialog-description",
285
- className: t1,
286
- ...props
287
- });
288
- $[5] = props;
289
- $[6] = t1;
290
- $[7] = t2;
291
- } else t2 = $[7];
292
- return t2;
75
+ function DialogDescription({ className, ...props }) {
76
+ return /* @__PURE__ */ jsx(Dialog.Description, {
77
+ "data-slot": "dialog-description",
78
+ className: cn("qa-dialog__description text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3", className),
79
+ ...props
80
+ });
293
81
  }
294
82
 
295
83
  //#endregion