@questpie/admin 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +91 -63
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +106 -86
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +406 -365
- package/dist/client/components/primitives/select-single.mjs +391 -323
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +154 -100
- package/dist/client/components/widgets/progress-widget.mjs +63 -36
- package/dist/client/components/widgets/quick-actions-widget.mjs +207 -115
- package/dist/client/components/widgets/recent-items-widget.mjs +147 -103
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +161 -247
- package/dist/client/components/widgets/timeline-widget.mjs +119 -78
- package/dist/client/components/widgets/value-widget.mjs +286 -157
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +70 -46
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-banner.mjs +75 -46
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +17 -10
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1167 -234
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +152 -155
- package/dist/client/views/layout/admin-router.mjs +936 -616
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +762 -592
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +3 -3
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +70 -71
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +29 -7
- package/dist/server/i18n/messages/cs.mjs +414 -1
- package/dist/server/i18n/messages/de.mjs +412 -1
- package/dist/server/i18n/messages/en.mjs +166 -1
- package/dist/server/i18n/messages/es.mjs +412 -1
- package/dist/server/i18n/messages/fr.mjs +412 -1
- package/dist/server/i18n/messages/pl.mjs +416 -1
- package/dist/server/i18n/messages/pt.mjs +409 -1
- package/dist/server/i18n/messages/sk.mjs +216 -2
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- package/dist/server/modules/admin/collections/account.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-locks.d.mts +2 -2
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +42 -42
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +40 -28
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +67 -28
- package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.mjs +25 -17
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +16 -13
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +2 -2
- package/dist/server/modules/audit/.generated/module.d.mts +1 -1
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +2 -2
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- package/dist/client/views/layout/admin-topbar.mjs +0 -236
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { Icon } from "@iconify/react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
//#region src/client/components/ui/empty-state.tsx
|
|
6
7
|
/**
|
|
7
|
-
* EmptyState -
|
|
8
|
+
* EmptyState - Empty state component with theme-adaptive styling
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
11
|
* ```tsx
|
|
@@ -21,78 +22,106 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
24
|
function EmptyState(t0) {
|
|
24
|
-
const $ = c(
|
|
25
|
-
const { title, description, icon: Icon, action, height:
|
|
26
|
-
const
|
|
27
|
-
|
|
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;
|
|
29
|
+
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;
|
|
28
32
|
if ($[0] !== className || $[1] !== height) {
|
|
29
|
-
|
|
33
|
+
t4 = cn("qa-empty-state relative flex flex-col items-center justify-center px-6 py-8 text-center", height, className);
|
|
30
34
|
$[0] = className;
|
|
31
35
|
$[1] = height;
|
|
32
|
-
$[2] =
|
|
33
|
-
} else
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
$[
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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",
|
|
44
69
|
children: title
|
|
45
70
|
});
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
} else
|
|
49
|
-
let
|
|
50
|
-
if ($[
|
|
51
|
-
|
|
52
|
-
className: "text-muted-foreground
|
|
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",
|
|
53
78
|
children: description
|
|
54
79
|
});
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
} else
|
|
58
|
-
let
|
|
59
|
-
if ($[
|
|
60
|
-
|
|
61
|
-
className: "mt-4",
|
|
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",
|
|
62
87
|
children: action
|
|
63
88
|
});
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
} else
|
|
67
|
-
let
|
|
68
|
-
if ($[
|
|
69
|
-
|
|
70
|
-
className: "
|
|
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", {
|
|
95
|
+
className: "flex max-w-lg flex-col items-center",
|
|
71
96
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
97
|
+
t8,
|
|
98
|
+
t9,
|
|
99
|
+
t10,
|
|
100
|
+
t11
|
|
76
101
|
]
|
|
77
102
|
});
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
} else
|
|
84
|
-
let
|
|
85
|
-
if ($[
|
|
86
|
-
|
|
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", {
|
|
87
112
|
"data-slot": "empty-state",
|
|
88
|
-
|
|
89
|
-
|
|
113
|
+
"data-variant": variant,
|
|
114
|
+
role: t3,
|
|
115
|
+
className: t4,
|
|
116
|
+
children: t12
|
|
90
117
|
});
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
|
|
95
|
-
|
|
118
|
+
$[22] = t12;
|
|
119
|
+
$[23] = t3;
|
|
120
|
+
$[24] = t4;
|
|
121
|
+
$[25] = variant;
|
|
122
|
+
$[26] = t13;
|
|
123
|
+
} else t13 = $[26];
|
|
124
|
+
return t13;
|
|
96
125
|
}
|
|
97
126
|
|
|
98
127
|
//#endregion
|
|
@@ -178,7 +178,7 @@ function FieldLabel(t0) {
|
|
|
178
178
|
}
|
|
179
179
|
let t1;
|
|
180
180
|
if ($[3] !== className) {
|
|
181
|
-
t1 = cn("qa-field__label has-data-checked:bg-
|
|
181
|
+
t1 = cn("qa-field__label has-data-checked:bg-accent has-data-checked:text-accent-foreground group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className);
|
|
182
182
|
$[3] = className;
|
|
183
183
|
$[4] = t1;
|
|
184
184
|
} else t1 = $[4];
|
|
@@ -228,7 +228,7 @@ function FieldDescription(t0) {
|
|
|
228
228
|
const t3 = fieldIds?.descriptionId;
|
|
229
229
|
let t4;
|
|
230
230
|
if ($[6] !== className) {
|
|
231
|
-
t4 = cn("qa-field__description text-muted-foreground text-left text-xs/relaxed leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a:hover]:text-
|
|
231
|
+
t4 = cn("qa-field__description text-muted-foreground text-left text-xs/relaxed leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a:hover]:text-foreground [&>a]:underline [&>a]:underline-offset-4", className);
|
|
232
232
|
$[6] = className;
|
|
233
233
|
$[7] = t4;
|
|
234
234
|
} else t4 = $[7];
|
|
@@ -23,7 +23,7 @@ function InputGroup(t0) {
|
|
|
23
23
|
}
|
|
24
24
|
let t1;
|
|
25
25
|
if ($[3] !== className) {
|
|
26
|
-
t1 = cn("qa-input-group
|
|
26
|
+
t1 = cn("qa-input-group control-surface font-chrome has-[[data-slot=input-group-control]:focus-visible]:border-border-strong has-[[data-slot=input-group-control]:focus-visible]:ring-ring/20 has-[[data-slot=input-group-control][aria-expanded=true]]:border-border-strong has-[[data-slot=input-group-control][aria-expanded=true]]:ring-ring/20 has-[[data-slot][aria-invalid=true]]:ring-ring/20 has-[[data-slot][aria-invalid=true]]:border-border-strong group/input-group hover:border-border-strong/70 relative flex w-full min-w-0 items-center overflow-hidden outline-none has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control][aria-expanded=true]]:ring-[3px] has-[[data-slot][aria-invalid=true]]:ring-[3px] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0", className);
|
|
27
27
|
$[3] = className;
|
|
28
28
|
$[4] = t1;
|
|
29
29
|
} else t1 = $[4];
|
|
@@ -41,7 +41,7 @@ function InputGroup(t0) {
|
|
|
41
41
|
} else t2 = $[7];
|
|
42
42
|
return t2;
|
|
43
43
|
}
|
|
44
|
-
const inputGroupAddonVariants = cva("qa-input-group__addon text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 flex h-
|
|
44
|
+
const inputGroupAddonVariants = cva("qa-input-group__addon font-chrome text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 flex h-full cursor-text items-center justify-center gap-1 py-1 text-xs/relaxed font-medium select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5", {
|
|
45
45
|
variants: { align: {
|
|
46
46
|
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]",
|
|
47
47
|
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]",
|
|
@@ -105,7 +105,7 @@ function _temp(e) {
|
|
|
105
105
|
if (e.target.closest("button")) return;
|
|
106
106
|
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
107
107
|
}
|
|
108
|
-
const inputGroupButtonVariants = cva("qa-input-group__button flex items-center gap-2 text-xs/relaxed shadow-none", {
|
|
108
|
+
const inputGroupButtonVariants = cva("qa-input-group__button flex items-center gap-2 rounded-[var(--control-radius-inner)] text-xs/relaxed shadow-none", {
|
|
109
109
|
variants: { size: {
|
|
110
110
|
xs: "h-5 gap-1 px-1 [&>svg:not([class*='size-'])]:size-3",
|
|
111
111
|
sm: "",
|
|
@@ -22,7 +22,7 @@ function Input$1(t0) {
|
|
|
22
22
|
}
|
|
23
23
|
let t1;
|
|
24
24
|
if ($[4] !== className) {
|
|
25
|
-
t1 = cn("qa-input
|
|
25
|
+
t1 = cn("qa-input control-surface font-chrome focus-visible:border-border-strong focus-visible:ring-ring/20 focus:border-border-strong focus:ring-ring/20 aria-invalid:border-border-strong aria-invalid:ring-ring/20 file:text-foreground placeholder:text-muted-foreground w-full min-w-0 px-3 py-2 text-sm outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus:ring-[3px] focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-[3px]", className);
|
|
26
26
|
$[4] = className;
|
|
27
27
|
$[5] = t1;
|
|
28
28
|
} else t1 = $[5];
|
|
@@ -30,7 +30,7 @@ function Kbd(t0) {
|
|
|
30
30
|
}
|
|
31
31
|
let t1;
|
|
32
32
|
if ($[4] !== className) {
|
|
33
|
-
t1 = cn("qa-kbd bg-muted text-muted-foreground pointer-events-none inline-flex h-5 items-center gap-1 border px-1.5 font-mono text-[10px] font-medium select-none", className);
|
|
33
|
+
t1 = cn("qa-kbd rounded-xs bg-muted text-muted-foreground pointer-events-none inline-flex h-5 items-center gap-1 border px-1.5 font-mono text-[10px] font-medium select-none", className);
|
|
34
34
|
$[4] = className;
|
|
35
35
|
$[5] = t1;
|
|
36
36
|
} else t1 = $[5];
|
|
@@ -21,7 +21,7 @@ function Label(t0) {
|
|
|
21
21
|
}
|
|
22
22
|
let t1;
|
|
23
23
|
if ($[4] !== className) {
|
|
24
|
-
t1 = cn("qa-label flex items-center gap-2
|
|
24
|
+
t1 = cn("qa-label font-chrome flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className);
|
|
25
25
|
$[4] = className;
|
|
26
26
|
$[5] = t1;
|
|
27
27
|
} else t1 = $[5];
|
|
@@ -24,23 +24,31 @@ function Popover$1(t0) {
|
|
|
24
24
|
return t1;
|
|
25
25
|
}
|
|
26
26
|
function PopoverTrigger(t0) {
|
|
27
|
-
const $ = c(
|
|
27
|
+
const $ = c(6);
|
|
28
28
|
let props;
|
|
29
|
+
let t1;
|
|
29
30
|
if ($[0] !== t0) {
|
|
30
|
-
({...props} = t0);
|
|
31
|
+
({type: t1, ...props} = t0);
|
|
31
32
|
$[0] = t0;
|
|
32
33
|
$[1] = props;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
t1 =
|
|
34
|
+
$[2] = t1;
|
|
35
|
+
} else {
|
|
36
|
+
props = $[1];
|
|
37
|
+
t1 = $[2];
|
|
38
|
+
}
|
|
39
|
+
const type = t1 === void 0 ? "button" : t1;
|
|
40
|
+
let t2;
|
|
41
|
+
if ($[3] !== props || $[4] !== type) {
|
|
42
|
+
t2 = /* @__PURE__ */ jsx(Popover.Trigger, {
|
|
37
43
|
"data-slot": "popover-trigger",
|
|
44
|
+
type,
|
|
38
45
|
...props
|
|
39
46
|
});
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
$[3] = props;
|
|
48
|
+
$[4] = type;
|
|
49
|
+
$[5] = t2;
|
|
50
|
+
} else t2 = $[5];
|
|
51
|
+
return t2;
|
|
44
52
|
}
|
|
45
53
|
function PopoverContent(t0) {
|
|
46
54
|
const $ = c(18);
|
|
@@ -73,7 +81,7 @@ function PopoverContent(t0) {
|
|
|
73
81
|
const sideOffset = t4 === void 0 ? 4 : t4;
|
|
74
82
|
let t5;
|
|
75
83
|
if ($[7] !== className) {
|
|
76
|
-
t5 = cn("qa-popover__content
|
|
84
|
+
t5 = cn("qa-popover__content floating-surface motion-floating text-popover-foreground z-50 flex min-w-48 origin-(--transform-origin) flex-col gap-4 p-2.5 text-xs outline-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);
|
|
77
85
|
$[7] = className;
|
|
78
86
|
$[8] = t5;
|
|
79
87
|
} else t5 = $[8];
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.mjs";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/client/components/ui/scroll-fade.tsx
|
|
7
|
+
function ScrollFade(t0) {
|
|
8
|
+
const $ = c(38);
|
|
9
|
+
let children;
|
|
10
|
+
let className;
|
|
11
|
+
let props;
|
|
12
|
+
let t1;
|
|
13
|
+
let t2;
|
|
14
|
+
let t3;
|
|
15
|
+
if ($[0] !== t0) {
|
|
16
|
+
({orientation: t1, fadeSize: t2, leftInset: t3, children, className, ...props} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = children;
|
|
19
|
+
$[2] = className;
|
|
20
|
+
$[3] = props;
|
|
21
|
+
$[4] = t1;
|
|
22
|
+
$[5] = t2;
|
|
23
|
+
$[6] = t3;
|
|
24
|
+
} else {
|
|
25
|
+
children = $[1];
|
|
26
|
+
className = $[2];
|
|
27
|
+
props = $[3];
|
|
28
|
+
t1 = $[4];
|
|
29
|
+
t2 = $[5];
|
|
30
|
+
t3 = $[6];
|
|
31
|
+
}
|
|
32
|
+
const orientation = t1 === void 0 ? "horizontal" : t1;
|
|
33
|
+
const fadeSize = t2 === void 0 ? 20 : t2;
|
|
34
|
+
const leftInset = t3 === void 0 ? 0 : t3;
|
|
35
|
+
const wrapperRef = React.useRef(null);
|
|
36
|
+
let t4;
|
|
37
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
38
|
+
t4 = {
|
|
39
|
+
left: false,
|
|
40
|
+
right: false,
|
|
41
|
+
top: false,
|
|
42
|
+
bottom: false
|
|
43
|
+
};
|
|
44
|
+
$[7] = t4;
|
|
45
|
+
} else t4 = $[7];
|
|
46
|
+
const [overflow, setOverflow] = React.useState(t4);
|
|
47
|
+
let t5;
|
|
48
|
+
let t6;
|
|
49
|
+
if ($[8] !== orientation) {
|
|
50
|
+
t5 = () => {
|
|
51
|
+
const wrapper = wrapperRef.current;
|
|
52
|
+
if (!wrapper) return;
|
|
53
|
+
const scrollable = wrapper.querySelector("[data-scroll-fade-target]") ?? wrapper.querySelector(".overflow-x-auto, .overflow-y-auto, .overflow-auto") ?? wrapper;
|
|
54
|
+
const update = () => {
|
|
55
|
+
const el = scrollable;
|
|
56
|
+
const h = orientation !== "vertical";
|
|
57
|
+
const v = orientation !== "horizontal";
|
|
58
|
+
setOverflow({
|
|
59
|
+
left: h && el.scrollLeft > 1,
|
|
60
|
+
right: h && el.scrollLeft + el.clientWidth < el.scrollWidth - 1,
|
|
61
|
+
top: v && el.scrollTop > 1,
|
|
62
|
+
bottom: v && el.scrollTop + el.clientHeight < el.scrollHeight - 1
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
update();
|
|
66
|
+
scrollable.addEventListener("scroll", update, { passive: true });
|
|
67
|
+
const observer = new ResizeObserver(update);
|
|
68
|
+
observer.observe(scrollable);
|
|
69
|
+
return () => {
|
|
70
|
+
scrollable.removeEventListener("scroll", update);
|
|
71
|
+
observer.disconnect();
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
t6 = [orientation];
|
|
75
|
+
$[8] = orientation;
|
|
76
|
+
$[9] = t5;
|
|
77
|
+
$[10] = t6;
|
|
78
|
+
} else {
|
|
79
|
+
t5 = $[9];
|
|
80
|
+
t6 = $[10];
|
|
81
|
+
}
|
|
82
|
+
React.useEffect(t5, t6);
|
|
83
|
+
const h_0 = orientation !== "vertical";
|
|
84
|
+
const v_0 = orientation !== "horizontal";
|
|
85
|
+
let t7;
|
|
86
|
+
if ($[11] !== className) {
|
|
87
|
+
t7 = cn("relative", className);
|
|
88
|
+
$[11] = className;
|
|
89
|
+
$[12] = t7;
|
|
90
|
+
} else t7 = $[12];
|
|
91
|
+
let t8;
|
|
92
|
+
if ($[13] !== fadeSize || $[14] !== h_0 || $[15] !== leftInset || $[16] !== overflow) {
|
|
93
|
+
t8 = h_0 && /* @__PURE__ */ jsx("div", {
|
|
94
|
+
className: cn("pointer-events-none absolute z-30 transition-opacity duration-200", "inset-y-0 bg-gradient-to-r from-background to-transparent", overflow.left ? "opacity-100" : "opacity-0"),
|
|
95
|
+
style: {
|
|
96
|
+
left: leftInset,
|
|
97
|
+
width: fadeSize
|
|
98
|
+
},
|
|
99
|
+
"aria-hidden": true
|
|
100
|
+
});
|
|
101
|
+
$[13] = fadeSize;
|
|
102
|
+
$[14] = h_0;
|
|
103
|
+
$[15] = leftInset;
|
|
104
|
+
$[16] = overflow;
|
|
105
|
+
$[17] = t8;
|
|
106
|
+
} else t8 = $[17];
|
|
107
|
+
let t9;
|
|
108
|
+
if ($[18] !== fadeSize || $[19] !== h_0 || $[20] !== overflow) {
|
|
109
|
+
t9 = h_0 && /* @__PURE__ */ jsx("div", {
|
|
110
|
+
className: cn("pointer-events-none absolute z-30 transition-opacity duration-200", "inset-y-0 right-0 bg-gradient-to-l from-background to-transparent", overflow.right ? "opacity-100" : "opacity-0"),
|
|
111
|
+
style: { width: fadeSize },
|
|
112
|
+
"aria-hidden": true
|
|
113
|
+
});
|
|
114
|
+
$[18] = fadeSize;
|
|
115
|
+
$[19] = h_0;
|
|
116
|
+
$[20] = overflow;
|
|
117
|
+
$[21] = t9;
|
|
118
|
+
} else t9 = $[21];
|
|
119
|
+
let t10;
|
|
120
|
+
if ($[22] !== fadeSize || $[23] !== overflow || $[24] !== v_0) {
|
|
121
|
+
t10 = v_0 && /* @__PURE__ */ jsx("div", {
|
|
122
|
+
className: cn("pointer-events-none absolute z-30 transition-opacity duration-200", "inset-x-0 top-0 bg-gradient-to-b from-background to-transparent", overflow.top ? "opacity-100" : "opacity-0"),
|
|
123
|
+
style: { height: fadeSize },
|
|
124
|
+
"aria-hidden": true
|
|
125
|
+
});
|
|
126
|
+
$[22] = fadeSize;
|
|
127
|
+
$[23] = overflow;
|
|
128
|
+
$[24] = v_0;
|
|
129
|
+
$[25] = t10;
|
|
130
|
+
} else t10 = $[25];
|
|
131
|
+
let t11;
|
|
132
|
+
if ($[26] !== fadeSize || $[27] !== overflow || $[28] !== v_0) {
|
|
133
|
+
t11 = v_0 && /* @__PURE__ */ jsx("div", {
|
|
134
|
+
className: cn("pointer-events-none absolute z-30 transition-opacity duration-200", "inset-x-0 bottom-0 bg-gradient-to-t from-background to-transparent", overflow.bottom ? "opacity-100" : "opacity-0"),
|
|
135
|
+
style: { height: fadeSize },
|
|
136
|
+
"aria-hidden": true
|
|
137
|
+
});
|
|
138
|
+
$[26] = fadeSize;
|
|
139
|
+
$[27] = overflow;
|
|
140
|
+
$[28] = v_0;
|
|
141
|
+
$[29] = t11;
|
|
142
|
+
} else t11 = $[29];
|
|
143
|
+
let t12;
|
|
144
|
+
if ($[30] !== children || $[31] !== props || $[32] !== t10 || $[33] !== t11 || $[34] !== t7 || $[35] !== t8 || $[36] !== t9) {
|
|
145
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
146
|
+
ref: wrapperRef,
|
|
147
|
+
className: t7,
|
|
148
|
+
...props,
|
|
149
|
+
children: [
|
|
150
|
+
children,
|
|
151
|
+
t8,
|
|
152
|
+
t9,
|
|
153
|
+
t10,
|
|
154
|
+
t11
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
$[30] = children;
|
|
158
|
+
$[31] = props;
|
|
159
|
+
$[32] = t10;
|
|
160
|
+
$[33] = t11;
|
|
161
|
+
$[34] = t7;
|
|
162
|
+
$[35] = t8;
|
|
163
|
+
$[36] = t9;
|
|
164
|
+
$[37] = t12;
|
|
165
|
+
} else t12 = $[37];
|
|
166
|
+
return t12;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
//#endregion
|
|
170
|
+
export { ScrollFade };
|
|
@@ -64,7 +64,7 @@ function SearchInput(t0) {
|
|
|
64
64
|
const showShortcut = shortcut && !hasValue;
|
|
65
65
|
let t2;
|
|
66
66
|
if ($[8] !== containerClassName) {
|
|
67
|
-
t2 = cn("qa-search-input bg-
|
|
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
68
|
$[8] = containerClassName;
|
|
69
69
|
$[9] = t2;
|
|
70
70
|
} else t2 = $[9];
|