@questpie/admin 3.2.4 → 3.2.6

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 (255) 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.d.mts +2 -2
  8. package/dist/client/components/admin-link.mjs +40 -126
  9. package/dist/client/components/auth/auth-loading.mjs +9 -44
  10. package/dist/client/components/blocks/block-canvas.mjs +31 -95
  11. package/dist/client/components/blocks/block-editor-context.mjs +13 -57
  12. package/dist/client/components/blocks/block-editor-layout.mjs +72 -166
  13. package/dist/client/components/blocks/block-editor-provider.mjs +184 -245
  14. package/dist/client/components/blocks/block-fields-renderer.mjs +54 -229
  15. package/dist/client/components/blocks/block-insert-button.mjs +49 -165
  16. package/dist/client/components/blocks/block-item-menu.mjs +102 -301
  17. package/dist/client/components/blocks/block-item.mjs +136 -370
  18. package/dist/client/components/blocks/block-library-sidebar.mjs +103 -230
  19. package/dist/client/components/blocks/block-tree.mjs +12 -68
  20. package/dist/client/components/blocks/block-type-icon.mjs +14 -56
  21. package/dist/client/components/brand-logo.mjs +35 -149
  22. package/dist/client/components/component-renderer.mjs +42 -118
  23. package/dist/client/components/error-boundary.mjs +14 -58
  24. package/dist/client/components/fields/array-field.mjs +209 -521
  25. package/dist/client/components/fields/asset-preview-field.mjs +41 -141
  26. package/dist/client/components/fields/blocks-field/blocks-field.mjs +60 -156
  27. package/dist/client/components/fields/boolean-field.mjs +29 -59
  28. package/dist/client/components/fields/date-field.mjs +7 -37
  29. package/dist/client/components/fields/datetime-field.mjs +7 -38
  30. package/dist/client/components/fields/email-field.mjs +25 -54
  31. package/dist/client/components/fields/field-wrapper.mjs +30 -105
  32. package/dist/client/components/fields/json-field.mjs +94 -296
  33. package/dist/client/components/fields/locale-badge.mjs +6 -15
  34. package/dist/client/components/fields/number-field.mjs +27 -60
  35. package/dist/client/components/fields/object-array-field.mjs +283 -659
  36. package/dist/client/components/fields/object-field.mjs +165 -633
  37. package/dist/client/components/fields/relation/displays/cards-display.mjs +106 -220
  38. package/dist/client/components/fields/relation/displays/chips-display.mjs +78 -150
  39. package/dist/client/components/fields/relation/displays/grid-display.mjs +92 -186
  40. package/dist/client/components/fields/relation/displays/list-display.mjs +122 -239
  41. package/dist/client/components/fields/relation/displays/table-display.mjs +70 -244
  42. package/dist/client/components/fields/relation/relation-items-display.mjs +30 -126
  43. package/dist/client/components/fields/relation-field.mjs +10 -66
  44. package/dist/client/components/fields/relation-picker.mjs +18 -18
  45. package/dist/client/components/fields/relation-select.mjs +12 -12
  46. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +80 -180
  47. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +2 -2
  48. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
  49. package/dist/client/components/fields/rich-text-editor/index.mjs +195 -513
  50. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +61 -111
  51. package/dist/client/components/fields/rich-text-editor/table-controls.mjs +105 -415
  52. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +256 -511
  53. package/dist/client/components/fields/rich-text-field.mjs +14 -53
  54. package/dist/client/components/fields/select-field.mjs +61 -72
  55. package/dist/client/components/fields/text-field.mjs +26 -59
  56. package/dist/client/components/fields/textarea-field.mjs +26 -58
  57. package/dist/client/components/fields/time-field.mjs +7 -35
  58. package/dist/client/components/fields/upload-field.mjs +47 -165
  59. package/dist/client/components/filter-builder/columns-tab.mjs +80 -280
  60. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +197 -540
  61. package/dist/client/components/filter-builder/filters-tab.mjs +96 -386
  62. package/dist/client/components/filter-builder/saved-views-tab.mjs +133 -351
  63. package/dist/client/components/history-sidebar.mjs +285 -605
  64. package/dist/client/components/layout/field-layout-renderer.mjs +106 -254
  65. package/dist/client/components/locale-switcher.mjs +106 -228
  66. package/dist/client/components/media/media-grid.mjs +84 -273
  67. package/dist/client/components/media/media-picker-dialog.mjs +176 -476
  68. package/dist/client/components/preview/live-preview-mode.mjs +233 -458
  69. package/dist/client/components/preview/preview-pane.mjs +22 -22
  70. package/dist/client/components/primitives/asset-preview.mjs +290 -666
  71. package/dist/client/components/primitives/checkbox-input.mjs +9 -35
  72. package/dist/client/components/primitives/date-input.mjs +109 -327
  73. package/dist/client/components/primitives/dropzone.mjs +209 -336
  74. package/dist/client/components/primitives/field-select-control.mjs +12 -80
  75. package/dist/client/components/primitives/number-input.mjs +4 -4
  76. package/dist/client/components/primitives/select-multi.mjs +229 -572
  77. package/dist/client/components/primitives/select-single.mjs +179 -499
  78. package/dist/client/components/primitives/time-input.mjs +43 -117
  79. package/dist/client/components/primitives/toggle-input.mjs +9 -29
  80. package/dist/client/components/sheets/resource-sheet.mjs +61 -70
  81. package/dist/client/components/ui/accordion.mjs +35 -155
  82. package/dist/client/components/ui/alert.mjs +13 -68
  83. package/dist/client/components/ui/badge.mjs +9 -51
  84. package/dist/client/components/ui/button.mjs +8 -54
  85. package/dist/client/components/ui/card.mjs +37 -193
  86. package/dist/client/components/ui/checkbox.mjs +12 -68
  87. package/dist/client/components/ui/command.mjs +48 -219
  88. package/dist/client/components/ui/dialog.mjs +50 -262
  89. package/dist/client/components/ui/drawer.mjs +55 -259
  90. package/dist/client/components/ui/dropdown-menu.mjs +86 -427
  91. package/dist/client/components/ui/empty-state.mjs +28 -98
  92. package/dist/client/components/ui/field.mjs +73 -309
  93. package/dist/client/components/ui/input-group.mjs +42 -167
  94. package/dist/client/components/ui/input.mjs +7 -37
  95. package/dist/client/components/ui/kbd.mjs +6 -36
  96. package/dist/client/components/ui/label.mjs +7 -37
  97. package/dist/client/components/ui/popover.mjs +34 -169
  98. package/dist/client/components/ui/responsive-dialog.mjs +67 -273
  99. package/dist/client/components/ui/scroll-fade.mjs +63 -158
  100. package/dist/client/components/ui/search-input.mjs +33 -100
  101. package/dist/client/components/ui/select.mjs +72 -393
  102. package/dist/client/components/ui/separator.mjs +7 -38
  103. package/dist/client/components/ui/sheet.mjs +49 -269
  104. package/dist/client/components/ui/sidebar.mjs +171 -690
  105. package/dist/client/components/ui/skeleton.mjs +7 -38
  106. package/dist/client/components/ui/sonner.mjs +11 -42
  107. package/dist/client/components/ui/switch.mjs +9 -45
  108. package/dist/client/components/ui/table.mjs +48 -266
  109. package/dist/client/components/ui/tabs.mjs +26 -139
  110. package/dist/client/components/ui/textarea.mjs +6 -32
  111. package/dist/client/components/ui/tooltip.mjs +27 -129
  112. package/dist/client/components/widgets/chart-widget.mjs +174 -522
  113. package/dist/client/components/widgets/progress-widget.mjs +66 -172
  114. package/dist/client/components/widgets/quick-actions-widget.mjs +102 -261
  115. package/dist/client/components/widgets/recent-items-widget.mjs +69 -195
  116. package/dist/client/components/widgets/stats-widget.mjs +41 -175
  117. package/dist/client/components/widgets/table-widget.mjs +9 -9
  118. package/dist/client/components/widgets/timeline-widget.mjs +86 -226
  119. package/dist/client/components/widgets/value-widget.mjs +74 -381
  120. package/dist/client/components/widgets/widget-empty-state.mjs +26 -76
  121. package/dist/client/components/widgets/widget-skeletons.mjs +138 -421
  122. package/dist/client/contexts/focus-context.mjs +63 -146
  123. package/dist/client/hooks/typed-hooks.mjs +241 -701
  124. package/dist/client/hooks/use-action.mjs +62 -198
  125. package/dist/client/hooks/use-admin-config.mjs +5 -35
  126. package/dist/client/hooks/use-admin-preferences.mjs +16 -88
  127. package/dist/client/hooks/use-admin-routes.mjs +22 -56
  128. package/dist/client/hooks/use-audit-history.mjs +21 -69
  129. package/dist/client/hooks/use-brand.mjs +1 -9
  130. package/dist/client/hooks/use-collection-fields.mjs +17 -57
  131. package/dist/client/hooks/use-collection-meta.mjs +12 -44
  132. package/dist/client/hooks/use-collection-schema.mjs +10 -33
  133. package/dist/client/hooks/use-collection-validation.mjs +23 -53
  134. package/dist/client/hooks/use-collection.mjs +194 -614
  135. package/dist/client/hooks/use-current-user.mjs +0 -1
  136. package/dist/client/hooks/use-field-hooks.mjs +10 -10
  137. package/dist/client/hooks/use-field-options.mjs +61 -202
  138. package/dist/client/hooks/use-global-fields.mjs +14 -46
  139. package/dist/client/hooks/use-global-meta.mjs +9 -30
  140. package/dist/client/hooks/use-global-schema.mjs +9 -30
  141. package/dist/client/hooks/use-global.mjs +63 -219
  142. package/dist/client/hooks/use-locks.mjs +117 -325
  143. package/dist/client/hooks/use-media-query.mjs +16 -36
  144. package/dist/client/hooks/use-prefill-params.mjs +0 -1
  145. package/dist/client/hooks/use-questpie-query-options.mjs +12 -29
  146. package/dist/client/hooks/use-reactive-fields.mjs +1 -1
  147. package/dist/client/hooks/use-reactive-prop.mjs +65 -223
  148. package/dist/client/hooks/use-realtime-highlight.mjs +51 -114
  149. package/dist/client/hooks/use-saved-views.mjs +22 -103
  150. package/dist/client/hooks/use-search-param-toggle.mjs +28 -79
  151. package/dist/client/hooks/use-search.mjs +31 -143
  152. package/dist/client/hooks/use-server-actions.mjs +18 -50
  153. package/dist/client/hooks/use-server-validation.mjs +72 -166
  154. package/dist/client/hooks/use-server-widget-data.mjs +7 -33
  155. package/dist/client/hooks/use-setup-status.mjs +12 -25
  156. package/dist/client/hooks/use-sidebar-search-param.mjs +33 -78
  157. package/dist/client/hooks/use-transition-stage.mjs +8 -38
  158. package/dist/client/hooks/use-upload.mjs +54 -152
  159. package/dist/client/hooks/use-validation-error-map.mjs +6 -26
  160. package/dist/client/hooks/use-view-state.mjs +187 -437
  161. package/dist/client/i18n/hooks.mjs +65 -197
  162. package/dist/client/lib/render-profiler.mjs +14 -41
  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.mjs +86 -321
  174. package/dist/client/scope/provider.mjs +8 -17
  175. package/dist/client/utils/build-field-definitions-from-schema.mjs +4 -2
  176. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  177. package/dist/client/views/auth/accept-invite-form.mjs +121 -412
  178. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  179. package/dist/client/views/auth/auth-layout.mjs +104 -284
  180. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  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 +116 -356
  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.d.mts +2 -2
  222. package/dist/client/views/pages/login-page.mjs +41 -121
  223. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  224. package/dist/client/views/pages/reset-password-page.mjs +46 -173
  225. package/dist/client/views/pages/setup-page.d.mts +2 -2
  226. package/dist/client/views/pages/setup-page.mjs +33 -95
  227. package/dist/components/rich-text/rich-text-renderer.mjs +9 -33
  228. package/dist/server/adapters/index.d.mts +2 -0
  229. package/dist/server/adapters/nextjs.d.mts +1 -0
  230. package/dist/server/auth-helpers.d.mts +1 -0
  231. package/dist/server/modules/admin/.generated/module.d.mts +1 -0
  232. package/dist/server/modules/admin/collections/account.d.mts +46 -46
  233. package/dist/server/modules/admin/collections/admin-locks.d.mts +50 -50
  234. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  235. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  236. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  237. package/dist/server/modules/admin/collections/assets.d.mts +39 -39
  238. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  239. package/dist/server/modules/admin/collections/user.d.mts +62 -62
  240. package/dist/server/modules/admin/collections/verification.d.mts +23 -23
  241. package/dist/server/modules/admin/index.d.mts +20 -19
  242. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  243. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  244. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  245. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  246. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  247. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  248. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  249. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  250. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +45 -45
  251. package/dist/server/modules/audit/.generated/module.d.mts +6 -6
  252. package/dist/server/modules/audit/collections/audit-log.d.mts +78 -78
  253. package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
  254. package/dist/server.d.mts +2 -0
  255. package/package.json +3 -5
@@ -1,456 +1,115 @@
1
1
  "use client";
2
2
 
3
3
  import { cn } from "../../lib/utils.mjs";
4
- import { c } from "react/compiler-runtime";
5
4
  import { Icon } from "@iconify/react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { Menu } from "@base-ui/react/menu";
8
7
 
9
8
  //#region src/client/components/ui/dropdown-menu.tsx
10
- function DropdownMenu(t0) {
11
- const $ = c(4);
12
- let props;
13
- if ($[0] !== t0) {
14
- ({...props} = t0);
15
- $[0] = t0;
16
- $[1] = props;
17
- } else props = $[1];
18
- let t1;
19
- if ($[2] !== props) {
20
- t1 = /* @__PURE__ */ jsx(Menu.Root, {
21
- "data-slot": "dropdown-menu",
22
- ...props
23
- });
24
- $[2] = props;
25
- $[3] = t1;
26
- } else t1 = $[3];
27
- return t1;
9
+ function DropdownMenu({ ...props }) {
10
+ return /* @__PURE__ */ jsx(Menu.Root, {
11
+ "data-slot": "dropdown-menu",
12
+ ...props
13
+ });
28
14
  }
29
- function DropdownMenuTrigger(t0) {
30
- const $ = c(6);
31
- let props;
32
- let t1;
33
- if ($[0] !== t0) {
34
- ({type: t1, ...props} = t0);
35
- $[0] = t0;
36
- $[1] = props;
37
- $[2] = t1;
38
- } else {
39
- props = $[1];
40
- t1 = $[2];
41
- }
42
- const type = t1 === void 0 ? "button" : t1;
43
- let t2;
44
- if ($[3] !== props || $[4] !== type) {
45
- t2 = /* @__PURE__ */ jsx(Menu.Trigger, {
46
- "data-slot": "dropdown-menu-trigger",
47
- type,
48
- ...props
49
- });
50
- $[3] = props;
51
- $[4] = type;
52
- $[5] = t2;
53
- } else t2 = $[5];
54
- return t2;
15
+ function DropdownMenuTrigger({ type = "button", ...props }) {
16
+ return /* @__PURE__ */ jsx(Menu.Trigger, {
17
+ "data-slot": "dropdown-menu-trigger",
18
+ type,
19
+ ...props
20
+ });
55
21
  }
56
- function DropdownMenuContent(t0) {
57
- const $ = c(18);
58
- let className;
59
- let props;
60
- let t1;
61
- let t2;
62
- let t3;
63
- let t4;
64
- if ($[0] !== t0) {
65
- ({align: t1, alignOffset: t2, side: t3, sideOffset: t4, className, ...props} = t0);
66
- $[0] = t0;
67
- $[1] = className;
68
- $[2] = props;
69
- $[3] = t1;
70
- $[4] = t2;
71
- $[5] = t3;
72
- $[6] = t4;
73
- } else {
74
- className = $[1];
75
- props = $[2];
76
- t1 = $[3];
77
- t2 = $[4];
78
- t3 = $[5];
79
- t4 = $[6];
80
- }
81
- const align = t1 === void 0 ? "start" : t1;
82
- const alignOffset = t2 === void 0 ? 0 : t2;
83
- const side = t3 === void 0 ? "bottom" : t3;
84
- const sideOffset = t4 === void 0 ? 4 : t4;
85
- let t5;
86
- if ($[7] !== className) {
87
- t5 = cn("qa-dropdown-menu__content floating-surface motion-floating text-popover-foreground z-50 max-h-(--available-height) w-(--anchor-width) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto p-1.5 outline-none data-closed:overflow-hidden 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", className);
88
- $[7] = className;
89
- $[8] = t5;
90
- } else t5 = $[8];
91
- let t6;
92
- if ($[9] !== props || $[10] !== t5) {
93
- t6 = /* @__PURE__ */ jsx(Menu.Popup, {
22
+ function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, ...props }) {
23
+ return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
24
+ className: "isolate z-50 outline-none",
25
+ align,
26
+ alignOffset,
27
+ side,
28
+ sideOffset,
29
+ children: /* @__PURE__ */ jsx(Menu.Popup, {
94
30
  "data-slot": "dropdown-menu-content",
95
- className: t5,
31
+ className: cn("qa-dropdown-menu__content floating-surface motion-floating text-popover-foreground z-50 max-h-(--available-height) w-(--anchor-width) min-w-48 origin-(--transform-origin) overflow-x-hidden overflow-y-auto p-1.5 outline-none data-closed:overflow-hidden 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", className),
96
32
  ...props
97
- });
98
- $[9] = props;
99
- $[10] = t5;
100
- $[11] = t6;
101
- } else t6 = $[11];
102
- let t7;
103
- if ($[12] !== align || $[13] !== alignOffset || $[14] !== side || $[15] !== sideOffset || $[16] !== t6) {
104
- t7 = /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
105
- className: "isolate z-50 outline-none",
106
- align,
107
- alignOffset,
108
- side,
109
- sideOffset,
110
- children: t6
111
- }) });
112
- $[12] = align;
113
- $[13] = alignOffset;
114
- $[14] = side;
115
- $[15] = sideOffset;
116
- $[16] = t6;
117
- $[17] = t7;
118
- } else t7 = $[17];
119
- return t7;
33
+ })
34
+ }) });
120
35
  }
121
- function DropdownMenuLabel(t0) {
122
- const $ = c(10);
123
- let className;
124
- let inset;
125
- let props;
126
- if ($[0] !== t0) {
127
- ({className, inset, ...props} = t0);
128
- $[0] = t0;
129
- $[1] = className;
130
- $[2] = inset;
131
- $[3] = props;
132
- } else {
133
- className = $[1];
134
- inset = $[2];
135
- props = $[3];
136
- }
137
- let t1;
138
- if ($[4] !== className) {
139
- t1 = cn("qa-dropdown-menu__label text-muted-foreground font-chrome chrome-meta px-2.5 py-1.5 text-xs font-medium data-[inset]:pl-8", className);
140
- $[4] = className;
141
- $[5] = t1;
142
- } else t1 = $[5];
143
- let t2;
144
- if ($[6] !== inset || $[7] !== props || $[8] !== t1) {
145
- t2 = /* @__PURE__ */ jsx("div", {
146
- "data-slot": "dropdown-menu-label",
147
- "data-inset": inset,
148
- className: t1,
149
- ...props
150
- });
151
- $[6] = inset;
152
- $[7] = props;
153
- $[8] = t1;
154
- $[9] = t2;
155
- } else t2 = $[9];
156
- return t2;
36
+ function DropdownMenuLabel({ className, inset, ...props }) {
37
+ return /* @__PURE__ */ jsx("div", {
38
+ "data-slot": "dropdown-menu-label",
39
+ "data-inset": inset,
40
+ className: cn("qa-dropdown-menu__label text-muted-foreground font-chrome chrome-meta px-2.5 py-1.5 text-xs font-medium data-[inset]:pl-8", className),
41
+ ...props
42
+ });
157
43
  }
158
- function DropdownMenuItem(t0) {
159
- const $ = c(12);
160
- let className;
161
- let inset;
162
- let props;
163
- let t1;
164
- if ($[0] !== t0) {
165
- ({className, inset, variant: t1, ...props} = t0);
166
- $[0] = t0;
167
- $[1] = className;
168
- $[2] = inset;
169
- $[3] = props;
170
- $[4] = t1;
171
- } else {
172
- className = $[1];
173
- inset = $[2];
174
- props = $[3];
175
- t1 = $[4];
176
- }
177
- const variant = t1 === void 0 ? "default" : t1;
178
- let t2;
179
- if ($[5] !== className) {
180
- t2 = cn("qa-dropdown-menu__item item-surface focus:border-border focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:border-destructive/30 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground group/dropdown-menu-item relative flex min-h-9 cursor-default items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-9 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
181
- $[5] = className;
182
- $[6] = t2;
183
- } else t2 = $[6];
184
- let t3;
185
- if ($[7] !== inset || $[8] !== props || $[9] !== t2 || $[10] !== variant) {
186
- t3 = /* @__PURE__ */ jsx(Menu.Item, {
187
- "data-slot": "dropdown-menu-item",
188
- "data-inset": inset,
189
- "data-variant": variant,
190
- className: t2,
191
- ...props
192
- });
193
- $[7] = inset;
194
- $[8] = props;
195
- $[9] = t2;
196
- $[10] = variant;
197
- $[11] = t3;
198
- } else t3 = $[11];
199
- return t3;
44
+ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
45
+ return /* @__PURE__ */ jsx(Menu.Item, {
46
+ "data-slot": "dropdown-menu-item",
47
+ "data-inset": inset,
48
+ "data-variant": variant,
49
+ className: cn("qa-dropdown-menu__item item-surface focus:border-border focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:border-destructive/30 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground group/dropdown-menu-item relative flex min-h-9 cursor-default items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-9 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
50
+ ...props
51
+ });
200
52
  }
201
- function DropdownMenuSub(t0) {
202
- const $ = c(4);
203
- let props;
204
- if ($[0] !== t0) {
205
- ({...props} = t0);
206
- $[0] = t0;
207
- $[1] = props;
208
- } else props = $[1];
209
- let t1;
210
- if ($[2] !== props) {
211
- t1 = /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
212
- "data-slot": "dropdown-menu-sub",
213
- ...props
214
- });
215
- $[2] = props;
216
- $[3] = t1;
217
- } else t1 = $[3];
218
- return t1;
53
+ function DropdownMenuSub({ ...props }) {
54
+ return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
55
+ "data-slot": "dropdown-menu-sub",
56
+ ...props
57
+ });
219
58
  }
220
- function DropdownMenuSubTrigger(t0) {
221
- const $ = c(13);
222
- let children;
223
- let className;
224
- let inset;
225
- let props;
226
- if ($[0] !== t0) {
227
- ({className, inset, children, ...props} = t0);
228
- $[0] = t0;
229
- $[1] = children;
230
- $[2] = className;
231
- $[3] = inset;
232
- $[4] = props;
233
- } else {
234
- children = $[1];
235
- className = $[2];
236
- inset = $[3];
237
- props = $[4];
238
- }
239
- let t1;
240
- if ($[5] !== className) {
241
- t1 = cn("qa-dropdown-menu__sub-trigger item-surface focus:border-border focus:bg-accent focus:text-accent-foreground data-open:border-border data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground flex min-h-9 cursor-default items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-[inset]:pl-9 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
242
- $[5] = className;
243
- $[6] = t1;
244
- } else t1 = $[6];
245
- let t2;
246
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
247
- t2 = /* @__PURE__ */ jsx(Icon, {
59
+ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
60
+ return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
61
+ "data-slot": "dropdown-menu-sub-trigger",
62
+ "data-inset": inset,
63
+ className: cn("qa-dropdown-menu__sub-trigger item-surface focus:border-border focus:bg-accent focus:text-accent-foreground data-open:border-border data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground flex min-h-9 cursor-default items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-[inset]:pl-9 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
64
+ ...props,
65
+ children: [children, /* @__PURE__ */ jsx(Icon, {
248
66
  icon: "ph:caret-right",
249
67
  className: "ml-auto size-4"
250
- });
251
- $[7] = t2;
252
- } else t2 = $[7];
253
- let t3;
254
- if ($[8] !== children || $[9] !== inset || $[10] !== props || $[11] !== t1) {
255
- t3 = /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
256
- "data-slot": "dropdown-menu-sub-trigger",
257
- "data-inset": inset,
258
- className: t1,
259
- ...props,
260
- children: [children, t2]
261
- });
262
- $[8] = children;
263
- $[9] = inset;
264
- $[10] = props;
265
- $[11] = t1;
266
- $[12] = t3;
267
- } else t3 = $[12];
268
- return t3;
68
+ })]
69
+ });
269
70
  }
270
- function DropdownMenuSubContent(t0) {
271
- const $ = c(16);
272
- let className;
273
- let props;
274
- let t1;
275
- let t2;
276
- let t3;
277
- let t4;
278
- if ($[0] !== t0) {
279
- ({align: t1, alignOffset: t2, side: t3, sideOffset: t4, className, ...props} = t0);
280
- $[0] = t0;
281
- $[1] = className;
282
- $[2] = props;
283
- $[3] = t1;
284
- $[4] = t2;
285
- $[5] = t3;
286
- $[6] = t4;
287
- } else {
288
- className = $[1];
289
- props = $[2];
290
- t1 = $[3];
291
- t2 = $[4];
292
- t3 = $[5];
293
- t4 = $[6];
294
- }
295
- const align = t1 === void 0 ? "start" : t1;
296
- const alignOffset = t2 === void 0 ? -3 : t2;
297
- const side = t3 === void 0 ? "right" : t3;
298
- const sideOffset = t4 === void 0 ? 0 : t4;
299
- let t5;
300
- if ($[7] !== className) {
301
- t5 = cn("qa-dropdown-menu__sub-content w-auto min-w-32 p-1", className);
302
- $[7] = className;
303
- $[8] = t5;
304
- } else t5 = $[8];
305
- let t6;
306
- if ($[9] !== align || $[10] !== alignOffset || $[11] !== props || $[12] !== side || $[13] !== sideOffset || $[14] !== t5) {
307
- t6 = /* @__PURE__ */ jsx(DropdownMenuContent, {
308
- "data-slot": "dropdown-menu-sub-content",
309
- className: t5,
310
- align,
311
- alignOffset,
312
- side,
313
- sideOffset,
314
- ...props
315
- });
316
- $[9] = align;
317
- $[10] = alignOffset;
318
- $[11] = props;
319
- $[12] = side;
320
- $[13] = sideOffset;
321
- $[14] = t5;
322
- $[15] = t6;
323
- } else t6 = $[15];
324
- return t6;
71
+ function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) {
72
+ return /* @__PURE__ */ jsx(DropdownMenuContent, {
73
+ "data-slot": "dropdown-menu-sub-content",
74
+ className: cn("qa-dropdown-menu__sub-content w-auto min-w-32 p-1", className),
75
+ align,
76
+ alignOffset,
77
+ side,
78
+ sideOffset,
79
+ ...props
80
+ });
325
81
  }
326
- function DropdownMenuRadioGroup(t0) {
327
- const $ = c(4);
328
- let props;
329
- if ($[0] !== t0) {
330
- ({...props} = t0);
331
- $[0] = t0;
332
- $[1] = props;
333
- } else props = $[1];
334
- let t1;
335
- if ($[2] !== props) {
336
- t1 = /* @__PURE__ */ jsx(Menu.RadioGroup, {
337
- "data-slot": "dropdown-menu-radio-group",
338
- ...props
339
- });
340
- $[2] = props;
341
- $[3] = t1;
342
- } else t1 = $[3];
343
- return t1;
82
+ function DropdownMenuRadioGroup({ ...props }) {
83
+ return /* @__PURE__ */ jsx(Menu.RadioGroup, {
84
+ "data-slot": "dropdown-menu-radio-group",
85
+ ...props
86
+ });
344
87
  }
345
- function DropdownMenuRadioItem(t0) {
346
- const $ = c(11);
347
- let children;
348
- let className;
349
- let props;
350
- if ($[0] !== t0) {
351
- ({className, children, ...props} = t0);
352
- $[0] = t0;
353
- $[1] = children;
354
- $[2] = className;
355
- $[3] = props;
356
- } else {
357
- children = $[1];
358
- className = $[2];
359
- props = $[3];
360
- }
361
- let t1;
362
- if ($[4] !== className) {
363
- t1 = cn("qa-dropdown-menu__radio-item item-surface focus:border-border focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex min-h-9 cursor-default items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", className);
364
- $[4] = className;
365
- $[5] = t1;
366
- } else t1 = $[5];
367
- let t2;
368
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
369
- t2 = /* @__PURE__ */ jsx("span", {
88
+ function DropdownMenuRadioItem({ className, children, ...props }) {
89
+ return /* @__PURE__ */ jsxs(Menu.RadioItem, {
90
+ "data-slot": "dropdown-menu-radio-item",
91
+ className: cn("qa-dropdown-menu__radio-item item-surface focus:border-border focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex min-h-9 cursor-default items-center gap-2.5 px-3 py-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", className),
92
+ ...props,
93
+ children: [/* @__PURE__ */ jsx("span", {
370
94
  className: "pointer-events-none absolute right-3 flex items-center justify-center",
371
95
  "data-slot": "dropdown-menu-radio-item-indicator",
372
96
  children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(Icon, { icon: "ph:check" }) })
373
- });
374
- $[6] = t2;
375
- } else t2 = $[6];
376
- let t3;
377
- if ($[7] !== children || $[8] !== props || $[9] !== t1) {
378
- t3 = /* @__PURE__ */ jsxs(Menu.RadioItem, {
379
- "data-slot": "dropdown-menu-radio-item",
380
- className: t1,
381
- ...props,
382
- children: [t2, children]
383
- });
384
- $[7] = children;
385
- $[8] = props;
386
- $[9] = t1;
387
- $[10] = t3;
388
- } else t3 = $[10];
389
- return t3;
97
+ }), children]
98
+ });
390
99
  }
391
- function DropdownMenuSeparator(t0) {
392
- const $ = c(8);
393
- let className;
394
- let props;
395
- if ($[0] !== t0) {
396
- ({className, ...props} = t0);
397
- $[0] = t0;
398
- $[1] = className;
399
- $[2] = props;
400
- } else {
401
- className = $[1];
402
- props = $[2];
403
- }
404
- let t1;
405
- if ($[3] !== className) {
406
- t1 = cn("qa-dropdown-menu__separator bg-border -mx-1 my-1 h-px", className);
407
- $[3] = className;
408
- $[4] = t1;
409
- } else t1 = $[4];
410
- let t2;
411
- if ($[5] !== props || $[6] !== t1) {
412
- t2 = /* @__PURE__ */ jsx(Menu.Separator, {
413
- "data-slot": "dropdown-menu-separator",
414
- className: t1,
415
- ...props
416
- });
417
- $[5] = props;
418
- $[6] = t1;
419
- $[7] = t2;
420
- } else t2 = $[7];
421
- return t2;
100
+ function DropdownMenuSeparator({ className, ...props }) {
101
+ return /* @__PURE__ */ jsx(Menu.Separator, {
102
+ "data-slot": "dropdown-menu-separator",
103
+ className: cn("qa-dropdown-menu__separator bg-border -mx-1 my-1 h-px", className),
104
+ ...props
105
+ });
422
106
  }
423
- function DropdownMenuShortcut(t0) {
424
- const $ = c(8);
425
- let className;
426
- let props;
427
- if ($[0] !== t0) {
428
- ({className, ...props} = t0);
429
- $[0] = t0;
430
- $[1] = className;
431
- $[2] = props;
432
- } else {
433
- className = $[1];
434
- props = $[2];
435
- }
436
- let t1;
437
- if ($[3] !== className) {
438
- t1 = cn("qa-dropdown-menu__shortcut text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground font-chrome chrome-meta ml-auto text-[0.625rem]", className);
439
- $[3] = className;
440
- $[4] = t1;
441
- } else t1 = $[4];
442
- let t2;
443
- if ($[5] !== props || $[6] !== t1) {
444
- t2 = /* @__PURE__ */ jsx("span", {
445
- "data-slot": "dropdown-menu-shortcut",
446
- className: t1,
447
- ...props
448
- });
449
- $[5] = props;
450
- $[6] = t1;
451
- $[7] = t2;
452
- } else t2 = $[7];
453
- return t2;
107
+ function DropdownMenuShortcut({ className, ...props }) {
108
+ return /* @__PURE__ */ jsx("span", {
109
+ "data-slot": "dropdown-menu-shortcut",
110
+ className: cn("qa-dropdown-menu__shortcut text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground font-chrome chrome-meta ml-auto text-[0.625rem]", className),
111
+ ...props
112
+ });
454
113
  }
455
114
 
456
115
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { cn } from "../../lib/utils.mjs";
2
- import { c } from "react/compiler-runtime";
3
2
  import { Icon } from "@iconify/react";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
5
4
 
@@ -21,107 +20,38 @@ import { jsx, jsxs } from "react/jsx-runtime";
21
20
  * />
22
21
  * ```
23
22
  */
24
- function EmptyState(t0) {
25
- const $ = c(27);
26
- const { title, description, icon: Icon$1, iconName, variant: t1, action, height: t2, className } = t0;
27
- const variant = t1 === void 0 ? "empty" : t1;
28
- const height = t2 === void 0 ? "h-48" : t2;
23
+ function EmptyState({ title, description, icon: Icon$1, iconName, variant = "empty", action, height = "h-48", className }) {
29
24
  const resolvedIconName = iconName ?? (variant === "error" ? "ph:warning-circle" : variant === "search" ? "ph:magnifying-glass" : "ph:tray");
30
- const t3 = variant === "error" ? "alert" : void 0;
31
- let t4;
32
- if ($[0] !== className || $[1] !== height) {
33
- t4 = cn("qa-empty-state relative flex flex-col items-center justify-center px-6 py-8 text-center", height, className);
34
- $[0] = className;
35
- $[1] = height;
36
- $[2] = t4;
37
- } else t4 = $[2];
38
- const t5 = variant === "error" ? "text-destructive" : "text-muted-foreground";
39
- let t6;
40
- if ($[3] !== t5) {
41
- t6 = cn("mb-3 flex size-8 items-center justify-center", t5);
42
- $[3] = t5;
43
- $[4] = t6;
44
- } else t6 = $[4];
45
- let t7;
46
- if ($[5] !== Icon$1 || $[6] !== resolvedIconName) {
47
- t7 = Icon$1 ? /* @__PURE__ */ jsx(Icon$1, { className: "size-5" }) : /* @__PURE__ */ jsx(Icon, {
48
- icon: resolvedIconName,
49
- className: "size-5"
50
- });
51
- $[5] = Icon$1;
52
- $[6] = resolvedIconName;
53
- $[7] = t7;
54
- } else t7 = $[7];
55
- let t8;
56
- if ($[8] !== t6 || $[9] !== t7) {
57
- t8 = /* @__PURE__ */ jsx("div", {
58
- className: t6,
59
- children: t7
60
- });
61
- $[8] = t6;
62
- $[9] = t7;
63
- $[10] = t8;
64
- } else t8 = $[10];
65
- let t9;
66
- if ($[11] !== title) {
67
- t9 = /* @__PURE__ */ jsx("p", {
68
- className: "qa-empty-state__title text-foreground max-w-sm text-sm font-medium text-balance",
69
- children: title
70
- });
71
- $[11] = title;
72
- $[12] = t9;
73
- } else t9 = $[12];
74
- let t10;
75
- if ($[13] !== description) {
76
- t10 = description && /* @__PURE__ */ jsx("p", {
77
- className: "qa-empty-state__description text-muted-foreground mt-1 max-w-md text-sm/relaxed text-pretty",
78
- children: description
79
- });
80
- $[13] = description;
81
- $[14] = t10;
82
- } else t10 = $[14];
83
- let t11;
84
- if ($[15] !== action) {
85
- t11 = action && /* @__PURE__ */ jsx("div", {
86
- className: "qa-empty-state__action mt-4 flex flex-wrap items-center justify-center gap-2",
87
- children: action
88
- });
89
- $[15] = action;
90
- $[16] = t11;
91
- } else t11 = $[16];
92
- let t12;
93
- if ($[17] !== t10 || $[18] !== t11 || $[19] !== t8 || $[20] !== t9) {
94
- t12 = /* @__PURE__ */ jsxs("div", {
25
+ return /* @__PURE__ */ jsx("div", {
26
+ "data-slot": "empty-state",
27
+ "data-variant": variant,
28
+ role: variant === "error" ? "alert" : void 0,
29
+ className: cn("qa-empty-state relative flex flex-col items-center justify-center px-6 py-8 text-center", height, className),
30
+ children: /* @__PURE__ */ jsxs("div", {
95
31
  className: "flex max-w-lg flex-col items-center",
96
32
  children: [
97
- t8,
98
- t9,
99
- t10,
100
- t11
33
+ /* @__PURE__ */ jsx("div", {
34
+ className: cn("mb-3 flex size-8 items-center justify-center", variant === "error" ? "text-destructive" : "text-muted-foreground"),
35
+ children: Icon$1 ? /* @__PURE__ */ jsx(Icon$1, { className: "size-5" }) : /* @__PURE__ */ jsx(Icon, {
36
+ icon: resolvedIconName,
37
+ className: "size-5"
38
+ })
39
+ }),
40
+ /* @__PURE__ */ jsx("p", {
41
+ className: "qa-empty-state__title text-foreground max-w-sm text-sm font-medium text-balance",
42
+ children: title
43
+ }),
44
+ description && /* @__PURE__ */ jsx("p", {
45
+ className: "qa-empty-state__description text-muted-foreground mt-1 max-w-md text-sm/relaxed text-pretty",
46
+ children: description
47
+ }),
48
+ action && /* @__PURE__ */ jsx("div", {
49
+ className: "qa-empty-state__action mt-4 flex flex-wrap items-center justify-center gap-2",
50
+ children: action
51
+ })
101
52
  ]
102
- });
103
- $[17] = t10;
104
- $[18] = t11;
105
- $[19] = t8;
106
- $[20] = t9;
107
- $[21] = t12;
108
- } else t12 = $[21];
109
- let t13;
110
- if ($[22] !== t12 || $[23] !== t3 || $[24] !== t4 || $[25] !== variant) {
111
- t13 = /* @__PURE__ */ jsx("div", {
112
- "data-slot": "empty-state",
113
- "data-variant": variant,
114
- role: t3,
115
- className: t4,
116
- children: t12
117
- });
118
- $[22] = t12;
119
- $[23] = t3;
120
- $[24] = t4;
121
- $[25] = variant;
122
- $[26] = t13;
123
- } else t13 = $[26];
124
- return t13;
53
+ })
54
+ });
125
55
  }
126
56
 
127
57
  //#endregion