@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
@@ -1,7 +1,6 @@
1
1
  import { cn } from "../../lib/utils.mjs";
2
2
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.mjs";
3
3
  import { Kbd } from "./kbd.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
 
@@ -30,109 +29,43 @@ import { jsx, jsxs } from "react/jsx-runtime";
30
29
  * <SearchInput isLoading={isSearching} ... />
31
30
  * ```
32
31
  */
33
- function SearchInput(t0) {
34
- const $ = c(26);
35
- let className;
36
- let containerClassName;
37
- let onClear;
38
- let props;
39
- let shortcut;
40
- let t1;
41
- let value;
42
- if ($[0] !== t0) {
43
- ({shortcut, onClear, isLoading: t1, containerClassName, className, value, ...props} = t0);
44
- $[0] = t0;
45
- $[1] = className;
46
- $[2] = containerClassName;
47
- $[3] = onClear;
48
- $[4] = props;
49
- $[5] = shortcut;
50
- $[6] = t1;
51
- $[7] = value;
52
- } else {
53
- className = $[1];
54
- containerClassName = $[2];
55
- onClear = $[3];
56
- props = $[4];
57
- shortcut = $[5];
58
- t1 = $[6];
59
- value = $[7];
60
- }
61
- const isLoading = t1 === void 0 ? false : t1;
32
+ function SearchInput({ shortcut, onClear, isLoading = false, containerClassName, className, value, ...props }) {
62
33
  const hasValue = value !== void 0 && value !== "";
63
34
  const showClearButton = hasValue && onClear;
64
35
  const showShortcut = shortcut && !hasValue;
65
- let t2;
66
- if ($[8] !== containerClassName) {
67
- t2 = cn("qa-search-input border-border-subtle bg-card hover:bg-surface-low focus-within:border-border-strong focus-within:bg-card", containerClassName);
68
- $[8] = containerClassName;
69
- $[9] = t2;
70
- } else t2 = $[9];
71
- let t3;
72
- if ($[10] !== isLoading) {
73
- t3 = /* @__PURE__ */ jsx(InputGroupAddon, {
74
- align: "inline-start",
75
- children: isLoading ? /* @__PURE__ */ jsx(Icon, {
76
- icon: "ph:spinner-gap",
77
- className: "text-muted-foreground size-4 animate-spin"
78
- }) : /* @__PURE__ */ jsx(Icon, {
79
- icon: "ph:magnifying-glass",
80
- className: "text-muted-foreground size-4"
81
- })
82
- });
83
- $[10] = isLoading;
84
- $[11] = t3;
85
- } else t3 = $[11];
86
- let t4;
87
- if ($[12] !== className || $[13] !== props || $[14] !== value) {
88
- t4 = /* @__PURE__ */ jsx(InputGroupInput, {
89
- placeholder: "Search...",
90
- value,
91
- className,
92
- ...props
93
- });
94
- $[12] = className;
95
- $[13] = props;
96
- $[14] = value;
97
- $[15] = t4;
98
- } else t4 = $[15];
99
- let t5;
100
- if ($[16] !== onClear || $[17] !== shortcut || $[18] !== showClearButton || $[19] !== showShortcut) {
101
- t5 = (showClearButton || showShortcut) && /* @__PURE__ */ jsxs(InputGroupAddon, {
102
- align: "inline-end",
103
- children: [showClearButton && /* @__PURE__ */ jsx(InputGroupButton, {
104
- onClick: onClear,
105
- size: "icon-xs",
106
- className: "text-muted-foreground hover:text-foreground",
107
- children: /* @__PURE__ */ jsx(Icon, {
108
- icon: "ph:x",
109
- className: "size-3"
36
+ return /* @__PURE__ */ jsxs(InputGroup, {
37
+ className: cn("qa-search-input border-border-subtle bg-card hover:bg-surface-low focus-within:border-border-strong focus-within:bg-card", containerClassName),
38
+ children: [
39
+ /* @__PURE__ */ jsx(InputGroupAddon, {
40
+ align: "inline-start",
41
+ children: isLoading ? /* @__PURE__ */ jsx(Icon, {
42
+ icon: "ph:spinner-gap",
43
+ className: "text-muted-foreground size-4 animate-spin"
44
+ }) : /* @__PURE__ */ jsx(Icon, {
45
+ icon: "ph:magnifying-glass",
46
+ className: "text-muted-foreground size-4"
110
47
  })
111
- }), showShortcut && /* @__PURE__ */ jsx(Kbd, { children: shortcut })]
112
- });
113
- $[16] = onClear;
114
- $[17] = shortcut;
115
- $[18] = showClearButton;
116
- $[19] = showShortcut;
117
- $[20] = t5;
118
- } else t5 = $[20];
119
- let t6;
120
- if ($[21] !== t2 || $[22] !== t3 || $[23] !== t4 || $[24] !== t5) {
121
- t6 = /* @__PURE__ */ jsxs(InputGroup, {
122
- className: t2,
123
- children: [
124
- t3,
125
- t4,
126
- t5
127
- ]
128
- });
129
- $[21] = t2;
130
- $[22] = t3;
131
- $[23] = t4;
132
- $[24] = t5;
133
- $[25] = t6;
134
- } else t6 = $[25];
135
- return t6;
48
+ }),
49
+ /* @__PURE__ */ jsx(InputGroupInput, {
50
+ placeholder: "Search...",
51
+ value,
52
+ className,
53
+ ...props
54
+ }),
55
+ (showClearButton || showShortcut) && /* @__PURE__ */ jsxs(InputGroupAddon, {
56
+ align: "inline-end",
57
+ children: [showClearButton && /* @__PURE__ */ jsx(InputGroupButton, {
58
+ onClick: onClear,
59
+ size: "icon-xs",
60
+ className: "text-muted-foreground hover:text-foreground",
61
+ children: /* @__PURE__ */ jsx(Icon, {
62
+ icon: "ph:x",
63
+ className: "size-3"
64
+ })
65
+ }), showShortcut && /* @__PURE__ */ jsx(Kbd, { children: shortcut })]
66
+ })
67
+ ]
68
+ });
136
69
  }
137
70
 
138
71
  //#endregion
@@ -1,426 +1,105 @@
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 { Select } from "@base-ui/react/select";
8
7
 
9
8
  //#region src/client/components/ui/select.tsx
10
9
  const Select$1 = Select.Root;
11
- function SelectGroup(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-select__group scroll-my-1 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(Select.Group, {
33
- "data-slot": "select-group",
34
- className: t1,
35
- ...props
36
- });
37
- $[5] = props;
38
- $[6] = t1;
39
- $[7] = t2;
40
- } else t2 = $[7];
41
- return t2;
10
+ function SelectGroup({ className, ...props }) {
11
+ return /* @__PURE__ */ jsx(Select.Group, {
12
+ "data-slot": "select-group",
13
+ className: cn("qa-select__group scroll-my-1 p-1", className),
14
+ ...props
15
+ });
42
16
  }
43
- function SelectValue(t0) {
44
- const $ = c(8);
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-select__value flex flex-1 text-left", className);
59
- $[3] = className;
60
- $[4] = t1;
61
- } else t1 = $[4];
62
- let t2;
63
- if ($[5] !== props || $[6] !== t1) {
64
- t2 = /* @__PURE__ */ jsx(Select.Value, {
65
- "data-slot": "select-value",
66
- className: t1,
67
- ...props
68
- });
69
- $[5] = props;
70
- $[6] = t1;
71
- $[7] = t2;
72
- } else t2 = $[7];
73
- return t2;
17
+ function SelectValue({ className, ...props }) {
18
+ return /* @__PURE__ */ jsx(Select.Value, {
19
+ "data-slot": "select-value",
20
+ className: cn("qa-select__value flex flex-1 text-left", className),
21
+ ...props
22
+ });
74
23
  }
75
- function SelectTrigger(t0) {
76
- const $ = c(15);
77
- let children;
78
- let className;
79
- let props;
80
- let t1;
81
- let t2;
82
- if ($[0] !== t0) {
83
- ({className, size: t1, children, type: t2, ...props} = t0);
84
- $[0] = t0;
85
- $[1] = children;
86
- $[2] = className;
87
- $[3] = props;
88
- $[4] = t1;
89
- $[5] = t2;
90
- } else {
91
- children = $[1];
92
- className = $[2];
93
- props = $[3];
94
- t1 = $[4];
95
- t2 = $[5];
96
- }
97
- const size = t1 === void 0 ? "default" : t1;
98
- const type = t2 === void 0 ? "button" : t2;
99
- let t3;
100
- if ($[6] !== className) {
101
- t3 = cn("qa-select__trigger control-surface font-chrome data-[placeholder]:text-muted-foreground focus-visible:border-border-strong focus-visible:ring-ring/20 aria-expanded:border-border-strong aria-expanded:ring-ring/20 aria-invalid:border-border-strong aria-invalid:ring-ring/20 flex w-fit items-center justify-between gap-2 px-3 py-2 text-sm whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-expanded:ring-[3px] aria-invalid:ring-[3px] data-[size=sm]:h-8 data-[size=sm]:px-2.5 data-[size=sm]:text-xs *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
102
- $[6] = className;
103
- $[7] = t3;
104
- } else t3 = $[7];
105
- let t4;
106
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
107
- t4 = /* @__PURE__ */ jsx(Select.Icon, { render: /* @__PURE__ */ jsx(Icon, {
24
+ function SelectTrigger({ className, size = "default", children, type = "button", ...props }) {
25
+ return /* @__PURE__ */ jsxs(Select.Trigger, {
26
+ "data-slot": "select-trigger",
27
+ "data-size": size,
28
+ type,
29
+ className: cn("qa-select__trigger control-surface font-chrome data-[placeholder]:text-muted-foreground focus-visible:border-border-strong focus-visible:ring-ring/20 aria-expanded:border-border-strong aria-expanded:ring-ring/20 aria-invalid:border-border-strong aria-invalid:ring-ring/20 flex w-fit items-center justify-between gap-2 px-3 py-2 text-sm whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-expanded:ring-[3px] aria-invalid:ring-[3px] data-[size=sm]:h-8 data-[size=sm]:px-2.5 data-[size=sm]:text-xs *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
30
+ ...props,
31
+ children: [children, /* @__PURE__ */ jsx(Select.Icon, { render: /* @__PURE__ */ jsx(Icon, {
108
32
  icon: "ph:caret-down",
109
33
  className: "text-muted-foreground pointer-events-none size-4"
110
- }) });
111
- $[8] = t4;
112
- } else t4 = $[8];
113
- let t5;
114
- if ($[9] !== children || $[10] !== props || $[11] !== size || $[12] !== t3 || $[13] !== type) {
115
- t5 = /* @__PURE__ */ jsxs(Select.Trigger, {
116
- "data-slot": "select-trigger",
117
- "data-size": size,
118
- type,
119
- className: t3,
120
- ...props,
121
- children: [children, t4]
122
- });
123
- $[9] = children;
124
- $[10] = props;
125
- $[11] = size;
126
- $[12] = t3;
127
- $[13] = type;
128
- $[14] = t5;
129
- } else t5 = $[14];
130
- return t5;
34
+ }) })]
35
+ });
131
36
  }
132
- function SelectContent(t0) {
133
- const $ = c(26);
134
- let children;
135
- let className;
136
- let props;
137
- let t1;
138
- let t2;
139
- let t3;
140
- let t4;
141
- let t5;
142
- if ($[0] !== t0) {
143
- ({className, children, side: t1, sideOffset: t2, align: t3, alignOffset: t4, alignItemWithTrigger: t5, ...props} = t0);
144
- $[0] = t0;
145
- $[1] = children;
146
- $[2] = className;
147
- $[3] = props;
148
- $[4] = t1;
149
- $[5] = t2;
150
- $[6] = t3;
151
- $[7] = t4;
152
- $[8] = t5;
153
- } else {
154
- children = $[1];
155
- className = $[2];
156
- props = $[3];
157
- t1 = $[4];
158
- t2 = $[5];
159
- t3 = $[6];
160
- t4 = $[7];
161
- t5 = $[8];
162
- }
163
- const side = t1 === void 0 ? "bottom" : t1;
164
- const sideOffset = t2 === void 0 ? 4 : t2;
165
- const align = t3 === void 0 ? "center" : t3;
166
- const alignOffset = t4 === void 0 ? 0 : t4;
167
- const alignItemWithTrigger = t5 === void 0 ? true : t5;
168
- let t6;
169
- if ($[9] !== className) {
170
- t6 = cn("qa-select__content floating-surface motion-floating text-popover-foreground relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto 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);
171
- $[9] = className;
172
- $[10] = t6;
173
- } else t6 = $[10];
174
- let t7;
175
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
176
- t7 = /* @__PURE__ */ jsx(SelectScrollUpButton, {});
177
- $[11] = t7;
178
- } else t7 = $[11];
179
- let t8;
180
- if ($[12] !== children) {
181
- t8 = /* @__PURE__ */ jsx(Select.List, { children });
182
- $[12] = children;
183
- $[13] = t8;
184
- } else t8 = $[13];
185
- let t9;
186
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
187
- t9 = /* @__PURE__ */ jsx(SelectScrollDownButton, {});
188
- $[14] = t9;
189
- } else t9 = $[14];
190
- let t10;
191
- if ($[15] !== props || $[16] !== t6 || $[17] !== t8) {
192
- t10 = /* @__PURE__ */ jsxs(Select.Popup, {
37
+ function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = true, ...props }) {
38
+ return /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
39
+ side,
40
+ sideOffset,
41
+ align,
42
+ alignOffset,
43
+ alignItemWithTrigger,
44
+ className: "isolate z-50",
45
+ children: /* @__PURE__ */ jsxs(Select.Popup, {
193
46
  "data-slot": "select-content",
194
- className: t6,
47
+ className: cn("qa-select__content floating-surface motion-floating text-popover-foreground relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto 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),
195
48
  ...props,
196
49
  children: [
197
- t7,
198
- t8,
199
- t9
50
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
51
+ /* @__PURE__ */ jsx(Select.List, { children }),
52
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
200
53
  ]
201
- });
202
- $[15] = props;
203
- $[16] = t6;
204
- $[17] = t8;
205
- $[18] = t10;
206
- } else t10 = $[18];
207
- let t11;
208
- if ($[19] !== align || $[20] !== alignItemWithTrigger || $[21] !== alignOffset || $[22] !== side || $[23] !== sideOffset || $[24] !== t10) {
209
- t11 = /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
210
- side,
211
- sideOffset,
212
- align,
213
- alignOffset,
214
- alignItemWithTrigger,
215
- className: "isolate z-50",
216
- children: t10
217
- }) });
218
- $[19] = align;
219
- $[20] = alignItemWithTrigger;
220
- $[21] = alignOffset;
221
- $[22] = side;
222
- $[23] = sideOffset;
223
- $[24] = t10;
224
- $[25] = t11;
225
- } else t11 = $[25];
226
- return t11;
54
+ })
55
+ }) });
227
56
  }
228
- function SelectLabel(t0) {
229
- const $ = c(8);
230
- let className;
231
- let props;
232
- if ($[0] !== t0) {
233
- ({className, ...props} = t0);
234
- $[0] = t0;
235
- $[1] = className;
236
- $[2] = props;
237
- } else {
238
- className = $[1];
239
- props = $[2];
240
- }
241
- let t1;
242
- if ($[3] !== className) {
243
- t1 = cn("qa-select__label text-muted-foreground px-2 py-1.5 text-xs", className);
244
- $[3] = className;
245
- $[4] = t1;
246
- } else t1 = $[4];
247
- let t2;
248
- if ($[5] !== props || $[6] !== t1) {
249
- t2 = /* @__PURE__ */ jsx(Select.GroupLabel, {
250
- "data-slot": "select-label",
251
- className: t1,
252
- ...props
253
- });
254
- $[5] = props;
255
- $[6] = t1;
256
- $[7] = t2;
257
- } else t2 = $[7];
258
- return t2;
57
+ function SelectLabel({ className, ...props }) {
58
+ return /* @__PURE__ */ jsx(Select.GroupLabel, {
59
+ "data-slot": "select-label",
60
+ className: cn("qa-select__label text-muted-foreground px-2 py-1.5 text-xs", className),
61
+ ...props
62
+ });
259
63
  }
260
- function SelectItem(t0) {
261
- const $ = c(13);
262
- let children;
263
- let className;
264
- let props;
265
- if ($[0] !== t0) {
266
- ({className, children, ...props} = t0);
267
- $[0] = t0;
268
- $[1] = children;
269
- $[2] = className;
270
- $[3] = props;
271
- } else {
272
- children = $[1];
273
- className = $[2];
274
- props = $[3];
275
- }
276
- let t1;
277
- if ($[4] !== className) {
278
- t1 = cn("qa-select__item item-surface focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex min-h-9 w-full cursor-default items-center gap-2 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-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className);
279
- $[4] = className;
280
- $[5] = t1;
281
- } else t1 = $[5];
282
- let t2;
283
- if ($[6] !== children) {
284
- t2 = /* @__PURE__ */ jsx(Select.ItemText, {
64
+ function SelectItem({ className, children, ...props }) {
65
+ return /* @__PURE__ */ jsxs(Select.Item, {
66
+ "data-slot": "select-item",
67
+ className: cn("qa-select__item item-surface focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex min-h-9 w-full cursor-default items-center gap-2 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-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
68
+ ...props,
69
+ children: [/* @__PURE__ */ jsx(Select.ItemText, {
285
70
  className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
286
71
  children
287
- });
288
- $[6] = children;
289
- $[7] = t2;
290
- } else t2 = $[7];
291
- let t3;
292
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
293
- t3 = /* @__PURE__ */ jsx(Select.ItemIndicator, {
72
+ }), /* @__PURE__ */ jsx(Select.ItemIndicator, {
294
73
  render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-3 flex items-center justify-center" }),
295
74
  children: /* @__PURE__ */ jsx(Icon, {
296
75
  icon: "ph:check",
297
76
  className: "pointer-events-none"
298
77
  })
299
- });
300
- $[8] = t3;
301
- } else t3 = $[8];
302
- let t4;
303
- if ($[9] !== props || $[10] !== t1 || $[11] !== t2) {
304
- t4 = /* @__PURE__ */ jsxs(Select.Item, {
305
- "data-slot": "select-item",
306
- className: t1,
307
- ...props,
308
- children: [t2, t3]
309
- });
310
- $[9] = props;
311
- $[10] = t1;
312
- $[11] = t2;
313
- $[12] = t4;
314
- } else t4 = $[12];
315
- return t4;
78
+ })]
79
+ });
316
80
  }
317
- function SelectSeparator(t0) {
318
- const $ = c(8);
319
- let className;
320
- let props;
321
- if ($[0] !== t0) {
322
- ({className, ...props} = t0);
323
- $[0] = t0;
324
- $[1] = className;
325
- $[2] = props;
326
- } else {
327
- className = $[1];
328
- props = $[2];
329
- }
330
- let t1;
331
- if ($[3] !== className) {
332
- t1 = cn("bg-border pointer-events-none -mx-1 my-1 h-px", className);
333
- $[3] = className;
334
- $[4] = t1;
335
- } else t1 = $[4];
336
- let t2;
337
- if ($[5] !== props || $[6] !== t1) {
338
- t2 = /* @__PURE__ */ jsx(Select.Separator, {
339
- "data-slot": "select-separator",
340
- className: t1,
341
- ...props
342
- });
343
- $[5] = props;
344
- $[6] = t1;
345
- $[7] = t2;
346
- } else t2 = $[7];
347
- return t2;
81
+ function SelectSeparator({ className, ...props }) {
82
+ return /* @__PURE__ */ jsx(Select.Separator, {
83
+ "data-slot": "select-separator",
84
+ className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
85
+ ...props
86
+ });
348
87
  }
349
- function SelectScrollUpButton(t0) {
350
- const $ = c(9);
351
- let className;
352
- let props;
353
- if ($[0] !== t0) {
354
- ({className, ...props} = t0);
355
- $[0] = t0;
356
- $[1] = className;
357
- $[2] = props;
358
- } else {
359
- className = $[1];
360
- props = $[2];
361
- }
362
- let t1;
363
- if ($[3] !== className) {
364
- t1 = cn("qa-select__separator bg-border pointer-events-none -mx-1 my-1 h-px", className);
365
- $[3] = className;
366
- $[4] = t1;
367
- } else t1 = $[4];
368
- let t2;
369
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
370
- t2 = /* @__PURE__ */ jsx(Icon, { icon: "ph:caret-up" });
371
- $[5] = t2;
372
- } else t2 = $[5];
373
- let t3;
374
- if ($[6] !== props || $[7] !== t1) {
375
- t3 = /* @__PURE__ */ jsx(Select.ScrollUpArrow, {
376
- "data-slot": "select-scroll-up-button",
377
- className: t1,
378
- ...props,
379
- children: t2
380
- });
381
- $[6] = props;
382
- $[7] = t1;
383
- $[8] = t3;
384
- } else t3 = $[8];
385
- return t3;
88
+ function SelectScrollUpButton({ className, ...props }) {
89
+ return /* @__PURE__ */ jsx(Select.ScrollUpArrow, {
90
+ "data-slot": "select-scroll-up-button",
91
+ className: cn("qa-select__separator bg-border pointer-events-none -mx-1 my-1 h-px", className),
92
+ ...props,
93
+ children: /* @__PURE__ */ jsx(Icon, { icon: "ph:caret-up" })
94
+ });
386
95
  }
387
- function SelectScrollDownButton(t0) {
388
- const $ = c(9);
389
- let className;
390
- let props;
391
- if ($[0] !== t0) {
392
- ({className, ...props} = t0);
393
- $[0] = t0;
394
- $[1] = className;
395
- $[2] = props;
396
- } else {
397
- className = $[1];
398
- props = $[2];
399
- }
400
- let t1;
401
- if ($[3] !== className) {
402
- t1 = cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5", className);
403
- $[3] = className;
404
- $[4] = t1;
405
- } else t1 = $[4];
406
- let t2;
407
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
408
- t2 = /* @__PURE__ */ jsx(Icon, { icon: "ph:caret-down" });
409
- $[5] = t2;
410
- } else t2 = $[5];
411
- let t3;
412
- if ($[6] !== props || $[7] !== t1) {
413
- t3 = /* @__PURE__ */ jsx(Select.ScrollDownArrow, {
414
- "data-slot": "select-scroll-down-button",
415
- className: t1,
416
- ...props,
417
- children: t2
418
- });
419
- $[6] = props;
420
- $[7] = t1;
421
- $[8] = t3;
422
- } else t3 = $[8];
423
- return t3;
96
+ function SelectScrollDownButton({ className, ...props }) {
97
+ return /* @__PURE__ */ jsx(Select.ScrollDownArrow, {
98
+ "data-slot": "select-scroll-down-button",
99
+ className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5", className),
100
+ ...props,
101
+ children: /* @__PURE__ */ jsx(Icon, { icon: "ph:caret-down" })
102
+ });
424
103
  }
425
104
 
426
105
  //#endregion