@questpie/admin 3.2.3 → 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.
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +164 -339
- package/dist/client/components/actions/action-button.mjs +9 -9
- package/dist/client/components/actions/action-dialog.mjs +195 -493
- package/dist/client/components/actions/confirmation-dialog.mjs +44 -159
- package/dist/client/components/actions/header-actions.mjs +73 -165
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/admin-link.mjs +40 -126
- package/dist/client/components/auth/auth-loading.mjs +9 -44
- package/dist/client/components/blocks/block-canvas.mjs +31 -95
- package/dist/client/components/blocks/block-editor-context.mjs +13 -57
- package/dist/client/components/blocks/block-editor-layout.mjs +72 -166
- package/dist/client/components/blocks/block-editor-provider.mjs +184 -245
- package/dist/client/components/blocks/block-fields-renderer.mjs +54 -229
- package/dist/client/components/blocks/block-insert-button.mjs +49 -165
- package/dist/client/components/blocks/block-item-menu.mjs +102 -301
- package/dist/client/components/blocks/block-item.mjs +136 -370
- package/dist/client/components/blocks/block-library-sidebar.mjs +106 -220
- package/dist/client/components/blocks/block-tree.mjs +12 -68
- package/dist/client/components/blocks/block-type-icon.mjs +14 -56
- package/dist/client/components/brand-logo.mjs +35 -149
- package/dist/client/components/component-renderer.mjs +42 -118
- package/dist/client/components/error-boundary.mjs +14 -58
- package/dist/client/components/fields/array-field.mjs +209 -521
- package/dist/client/components/fields/asset-preview-field.mjs +41 -141
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +60 -156
- package/dist/client/components/fields/boolean-field.mjs +29 -59
- package/dist/client/components/fields/date-field.mjs +7 -37
- package/dist/client/components/fields/datetime-field.mjs +7 -38
- package/dist/client/components/fields/email-field.mjs +25 -54
- package/dist/client/components/fields/field-wrapper.mjs +30 -105
- package/dist/client/components/fields/json-field.mjs +107 -313
- package/dist/client/components/fields/locale-badge.mjs +6 -15
- package/dist/client/components/fields/number-field.mjs +27 -60
- package/dist/client/components/fields/object-array-field.mjs +283 -659
- package/dist/client/components/fields/object-field.mjs +165 -633
- package/dist/client/components/fields/relation/displays/cards-display.mjs +106 -220
- package/dist/client/components/fields/relation/displays/chips-display.mjs +78 -150
- package/dist/client/components/fields/relation/displays/grid-display.mjs +92 -186
- package/dist/client/components/fields/relation/displays/list-display.mjs +122 -239
- package/dist/client/components/fields/relation/displays/table-display.mjs +70 -244
- package/dist/client/components/fields/relation/relation-items-display.mjs +30 -126
- package/dist/client/components/fields/relation-field.mjs +10 -66
- package/dist/client/components/fields/relation-picker.mjs +18 -18
- package/dist/client/components/fields/relation-select.mjs +12 -12
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +80 -182
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +8 -19
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
- package/dist/client/components/fields/rich-text-editor/index.mjs +196 -530
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +61 -111
- package/dist/client/components/fields/rich-text-editor/table-controls.mjs +105 -415
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +256 -511
- package/dist/client/components/fields/rich-text-field.mjs +14 -53
- package/dist/client/components/fields/select-field.mjs +39 -74
- package/dist/client/components/fields/text-field.mjs +26 -59
- package/dist/client/components/fields/textarea-field.mjs +26 -58
- package/dist/client/components/fields/time-field.mjs +7 -35
- package/dist/client/components/fields/upload-field.mjs +47 -165
- package/dist/client/components/filter-builder/columns-tab.mjs +80 -280
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +197 -540
- package/dist/client/components/filter-builder/filters-tab.mjs +96 -386
- package/dist/client/components/filter-builder/saved-views-tab.mjs +133 -351
- package/dist/client/components/history-sidebar.mjs +306 -611
- package/dist/client/components/layout/field-layout-renderer.mjs +106 -254
- package/dist/client/components/locale-switcher.mjs +106 -228
- package/dist/client/components/media/media-grid.mjs +84 -273
- package/dist/client/components/media/media-picker-dialog.mjs +177 -494
- package/dist/client/components/preview/live-preview-mode.mjs +240 -438
- package/dist/client/components/preview/preview-pane.mjs +22 -22
- package/dist/client/components/primitives/asset-preview.mjs +290 -666
- package/dist/client/components/primitives/checkbox-input.mjs +9 -35
- package/dist/client/components/primitives/date-input.mjs +109 -327
- package/dist/client/components/primitives/dropzone.mjs +209 -336
- package/dist/client/components/primitives/field-select-control.mjs +12 -80
- package/dist/client/components/primitives/number-input.mjs +4 -4
- package/dist/client/components/primitives/select-multi.mjs +200 -559
- package/dist/client/components/primitives/select-single.mjs +165 -499
- package/dist/client/components/primitives/time-input.mjs +43 -117
- package/dist/client/components/primitives/toggle-input.mjs +9 -29
- package/dist/client/components/sheets/resource-sheet.mjs +61 -70
- package/dist/client/components/ui/accordion.mjs +35 -155
- package/dist/client/components/ui/alert.mjs +13 -68
- package/dist/client/components/ui/badge.mjs +9 -51
- package/dist/client/components/ui/button.mjs +8 -54
- package/dist/client/components/ui/card.mjs +37 -193
- package/dist/client/components/ui/checkbox.mjs +12 -68
- package/dist/client/components/ui/command.mjs +48 -219
- package/dist/client/components/ui/dialog.mjs +50 -262
- package/dist/client/components/ui/drawer.mjs +55 -259
- package/dist/client/components/ui/dropdown-menu.mjs +86 -427
- package/dist/client/components/ui/empty-state.mjs +28 -98
- package/dist/client/components/ui/field.mjs +73 -309
- package/dist/client/components/ui/input-group.mjs +42 -167
- package/dist/client/components/ui/input.mjs +7 -37
- package/dist/client/components/ui/kbd.mjs +6 -36
- package/dist/client/components/ui/label.mjs +7 -37
- package/dist/client/components/ui/popover.mjs +34 -169
- package/dist/client/components/ui/responsive-dialog.mjs +67 -273
- package/dist/client/components/ui/scroll-fade.mjs +63 -158
- package/dist/client/components/ui/search-input.mjs +33 -100
- package/dist/client/components/ui/select.mjs +72 -393
- package/dist/client/components/ui/separator.mjs +7 -38
- package/dist/client/components/ui/sheet.mjs +49 -269
- package/dist/client/components/ui/sidebar.mjs +171 -690
- package/dist/client/components/ui/skeleton.mjs +7 -38
- package/dist/client/components/ui/sonner.mjs +11 -42
- package/dist/client/components/ui/switch.mjs +9 -45
- package/dist/client/components/ui/table.mjs +48 -266
- package/dist/client/components/ui/tabs.mjs +26 -139
- package/dist/client/components/ui/textarea.mjs +6 -32
- package/dist/client/components/ui/tooltip.mjs +27 -129
- package/dist/client/components/widgets/chart-widget.mjs +174 -522
- package/dist/client/components/widgets/progress-widget.mjs +66 -172
- package/dist/client/components/widgets/quick-actions-widget.mjs +102 -261
- package/dist/client/components/widgets/recent-items-widget.mjs +69 -195
- package/dist/client/components/widgets/stats-widget.mjs +41 -175
- package/dist/client/components/widgets/table-widget.mjs +9 -9
- package/dist/client/components/widgets/timeline-widget.mjs +86 -226
- package/dist/client/components/widgets/value-widget.mjs +74 -381
- package/dist/client/components/widgets/widget-empty-state.mjs +26 -76
- package/dist/client/components/widgets/widget-skeletons.mjs +138 -421
- package/dist/client/contexts/focus-context.d.mts +4 -0
- package/dist/client/contexts/focus-context.mjs +87 -150
- package/dist/client/hooks/typed-hooks.mjs +241 -701
- package/dist/client/hooks/use-action.mjs +62 -198
- package/dist/client/hooks/use-admin-config.mjs +5 -35
- package/dist/client/hooks/use-admin-preferences.mjs +16 -88
- package/dist/client/hooks/use-admin-routes.mjs +22 -56
- package/dist/client/hooks/use-audit-history.mjs +21 -69
- package/dist/client/hooks/use-brand.mjs +1 -9
- package/dist/client/hooks/use-collection-fields.mjs +17 -57
- package/dist/client/hooks/use-collection-meta.mjs +12 -44
- package/dist/client/hooks/use-collection-schema.mjs +10 -33
- package/dist/client/hooks/use-collection-validation.mjs +23 -53
- package/dist/client/hooks/use-collection.mjs +194 -614
- package/dist/client/hooks/use-current-user.mjs +0 -1
- package/dist/client/hooks/use-field-hooks.mjs +10 -10
- package/dist/client/hooks/use-field-options.mjs +61 -202
- package/dist/client/hooks/use-global-fields.mjs +14 -46
- package/dist/client/hooks/use-global-meta.mjs +9 -30
- package/dist/client/hooks/use-global-schema.mjs +9 -30
- package/dist/client/hooks/use-global.mjs +63 -219
- package/dist/client/hooks/use-locks.mjs +117 -325
- package/dist/client/hooks/use-media-query.mjs +16 -36
- package/dist/client/hooks/use-prefill-params.mjs +0 -1
- package/dist/client/hooks/use-questpie-query-options.mjs +12 -29
- package/dist/client/hooks/use-reactive-fields.mjs +1 -1
- package/dist/client/hooks/use-reactive-prop.mjs +65 -223
- package/dist/client/hooks/use-realtime-highlight.mjs +51 -114
- package/dist/client/hooks/use-saved-views.mjs +22 -103
- package/dist/client/hooks/use-search-param-toggle.mjs +28 -79
- package/dist/client/hooks/use-search.mjs +31 -143
- package/dist/client/hooks/use-server-actions.mjs +18 -50
- package/dist/client/hooks/use-server-validation.mjs +72 -166
- package/dist/client/hooks/use-server-widget-data.mjs +7 -33
- package/dist/client/hooks/use-setup-status.mjs +12 -25
- package/dist/client/hooks/use-sidebar-search-param.mjs +33 -78
- package/dist/client/hooks/use-transition-stage.mjs +8 -38
- package/dist/client/hooks/use-upload.mjs +54 -152
- package/dist/client/hooks/use-validation-error-map.mjs +6 -26
- package/dist/client/hooks/use-view-state.mjs +187 -437
- package/dist/client/i18n/hooks.mjs +65 -197
- package/dist/client/lib/render-profiler.mjs +14 -41
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/block-scope-context.mjs +14 -36
- package/dist/client/preview/diff.mjs +110 -0
- package/dist/client/preview/preview-banner.mjs +42 -108
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/preview/preview-field.mjs +166 -409
- package/dist/client/preview/use-collection-preview.mjs +135 -201
- package/dist/client/runtime/content-locales-provider.mjs +31 -83
- package/dist/client/runtime/locale-scope.mjs +22 -63
- package/dist/client/runtime/provider.mjs +100 -255
- package/dist/client/runtime/translations-provider.mjs +41 -107
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/picker.mjs +86 -321
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/scope/provider.mjs +8 -17
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/accept-invite-form.mjs +121 -412
- package/dist/client/views/auth/auth-layout.d.mts +3 -3
- package/dist/client/views/auth/auth-layout.mjs +104 -284
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +94 -325
- package/dist/client/views/auth/invite-form.mjs +107 -442
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +116 -337
- package/dist/client/views/auth/reset-password-form.mjs +128 -453
- package/dist/client/views/auth/setup-form.mjs +140 -478
- package/dist/client/views/collection/auto-form-fields.mjs +243 -615
- package/dist/client/views/collection/bulk-action-toolbar.mjs +212 -400
- package/dist/client/views/collection/cells/complex-cells.mjs +183 -611
- package/dist/client/views/collection/cells/primitive-cells.mjs +109 -363
- package/dist/client/views/collection/cells/relation-cells.mjs +86 -233
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +142 -371
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +35 -131
- package/dist/client/views/collection/cells/upload-cells.mjs +60 -177
- package/dist/client/views/collection/columns/build-columns.mjs +8 -48
- package/dist/client/views/collection/field-renderer.mjs +11 -24
- package/dist/client/views/collection/form-view.mjs +288 -560
- package/dist/client/views/collection/table-view.mjs +239 -469
- package/dist/client/views/collection/view-skeletons.mjs +112 -237
- package/dist/client/views/common/global-search.mjs +241 -543
- package/dist/client/views/dashboard/dashboard-grid.mjs +256 -775
- package/dist/client/views/dashboard/dashboard-widget.mjs +38 -126
- package/dist/client/views/dashboard/widget-card.mjs +61 -269
- package/dist/client/views/globals/global-form-view.mjs +478 -1298
- package/dist/client/views/layout/admin-layout-provider.mjs +28 -88
- package/dist/client/views/layout/admin-layout.mjs +83 -246
- package/dist/client/views/layout/admin-router.mjs +457 -1289
- package/dist/client/views/layout/admin-sidebar.mjs +510 -1292
- package/dist/client/views/layout/admin-theme.mjs +30 -64
- package/dist/client/views/layout/admin-view-layout.mjs +40 -144
- package/dist/client/views/pages/accept-invite-page.mjs +95 -290
- package/dist/client/views/pages/dashboard-page.mjs +11 -57
- package/dist/client/views/pages/forgot-password-page.mjs +31 -83
- package/dist/client/views/pages/invite-page.mjs +35 -90
- package/dist/client/views/pages/login-page.mjs +41 -121
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +46 -173
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +33 -95
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/components/rich-text/rich-text-renderer.mjs +9 -33
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- 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 +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +34 -34
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +53 -53
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/index.d.mts +21 -20
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
- package/package.json +3 -5
|
@@ -4,7 +4,6 @@ import { cn } from "../../lib/utils.mjs";
|
|
|
4
4
|
import { DialogContent, DialogFooter, DialogHeader } from "./dialog.mjs";
|
|
5
5
|
import { useIsMobile } from "../../hooks/use-media-query.mjs";
|
|
6
6
|
import { Drawer, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } from "./drawer.mjs";
|
|
7
|
-
import { c } from "react/compiler-runtime";
|
|
8
7
|
import * as React from "react";
|
|
9
8
|
import { jsx } from "react/jsx-runtime";
|
|
10
9
|
import { Dialog } from "@base-ui/react/dialog";
|
|
@@ -16,292 +15,87 @@ function useResponsiveDialog() {
|
|
|
16
15
|
if (!context) throw new Error("ResponsiveDialog components must be used within ResponsiveDialog");
|
|
17
16
|
return context;
|
|
18
17
|
}
|
|
19
|
-
function ResponsiveDialog(
|
|
20
|
-
const $ = c(16);
|
|
21
|
-
const { children, open, onOpenChange } = t0;
|
|
18
|
+
function ResponsiveDialog({ children, open, onOpenChange }) {
|
|
22
19
|
const isMobile = useIsMobile();
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
$[1] = t1;
|
|
28
|
-
} else t1 = $[1];
|
|
29
|
-
const contextValue = t1;
|
|
30
|
-
if (isMobile) {
|
|
31
|
-
let t2$1;
|
|
32
|
-
if ($[2] !== children || $[3] !== onOpenChange || $[4] !== open) {
|
|
33
|
-
t2$1 = /* @__PURE__ */ jsx(Drawer, {
|
|
34
|
-
open,
|
|
35
|
-
onOpenChange,
|
|
36
|
-
children
|
|
37
|
-
});
|
|
38
|
-
$[2] = children;
|
|
39
|
-
$[3] = onOpenChange;
|
|
40
|
-
$[4] = open;
|
|
41
|
-
$[5] = t2$1;
|
|
42
|
-
} else t2$1 = $[5];
|
|
43
|
-
let t3$1;
|
|
44
|
-
if ($[6] !== contextValue || $[7] !== t2$1) {
|
|
45
|
-
t3$1 = /* @__PURE__ */ jsx(ResponsiveDialogContext.Provider, {
|
|
46
|
-
value: contextValue,
|
|
47
|
-
children: t2$1
|
|
48
|
-
});
|
|
49
|
-
$[6] = contextValue;
|
|
50
|
-
$[7] = t2$1;
|
|
51
|
-
$[8] = t3$1;
|
|
52
|
-
} else t3$1 = $[8];
|
|
53
|
-
return t3$1;
|
|
54
|
-
}
|
|
55
|
-
let t2;
|
|
56
|
-
if ($[9] !== children || $[10] !== onOpenChange || $[11] !== open) {
|
|
57
|
-
t2 = /* @__PURE__ */ jsx(Dialog.Root, {
|
|
20
|
+
const contextValue = React.useMemo(() => ({ isMobile }), [isMobile]);
|
|
21
|
+
if (isMobile) return /* @__PURE__ */ jsx(ResponsiveDialogContext.Provider, {
|
|
22
|
+
value: contextValue,
|
|
23
|
+
children: /* @__PURE__ */ jsx(Drawer, {
|
|
58
24
|
open,
|
|
59
25
|
onOpenChange,
|
|
60
26
|
children
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
children: t2
|
|
72
|
-
});
|
|
73
|
-
$[13] = contextValue;
|
|
74
|
-
$[14] = t2;
|
|
75
|
-
$[15] = t3;
|
|
76
|
-
} else t3 = $[15];
|
|
77
|
-
return t3;
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ jsx(ResponsiveDialogContext.Provider, {
|
|
30
|
+
value: contextValue,
|
|
31
|
+
children: /* @__PURE__ */ jsx(Dialog.Root, {
|
|
32
|
+
open,
|
|
33
|
+
onOpenChange,
|
|
34
|
+
children
|
|
35
|
+
})
|
|
36
|
+
});
|
|
78
37
|
}
|
|
79
|
-
function ResponsiveDialogContent(
|
|
80
|
-
const $ = c(11);
|
|
81
|
-
const { children, className, showCloseButton } = t0;
|
|
38
|
+
function ResponsiveDialogContent({ children, className, showCloseButton }) {
|
|
82
39
|
const { isMobile } = useResponsiveDialog();
|
|
83
|
-
if (isMobile) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
t2$1 = /* @__PURE__ */ jsx(DrawerContent, {
|
|
93
|
-
className: t1$1,
|
|
94
|
-
children
|
|
95
|
-
});
|
|
96
|
-
$[2] = children;
|
|
97
|
-
$[3] = t1$1;
|
|
98
|
-
$[4] = t2$1;
|
|
99
|
-
} else t2$1 = $[4];
|
|
100
|
-
return t2$1;
|
|
101
|
-
}
|
|
102
|
-
let t1;
|
|
103
|
-
if ($[5] !== className) {
|
|
104
|
-
t1 = cn("qa-responsive-dialog__content", className);
|
|
105
|
-
$[5] = className;
|
|
106
|
-
$[6] = t1;
|
|
107
|
-
} else t1 = $[6];
|
|
108
|
-
let t2;
|
|
109
|
-
if ($[7] !== children || $[8] !== showCloseButton || $[9] !== t1) {
|
|
110
|
-
t2 = /* @__PURE__ */ jsx(DialogContent, {
|
|
111
|
-
showCloseButton,
|
|
112
|
-
className: t1,
|
|
113
|
-
children
|
|
114
|
-
});
|
|
115
|
-
$[7] = children;
|
|
116
|
-
$[8] = showCloseButton;
|
|
117
|
-
$[9] = t1;
|
|
118
|
-
$[10] = t2;
|
|
119
|
-
} else t2 = $[10];
|
|
120
|
-
return t2;
|
|
40
|
+
if (isMobile) return /* @__PURE__ */ jsx(DrawerContent, {
|
|
41
|
+
className: cn("max-h-[96vh]", className),
|
|
42
|
+
children
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */ jsx(DialogContent, {
|
|
45
|
+
showCloseButton,
|
|
46
|
+
className: cn("qa-responsive-dialog__content", className),
|
|
47
|
+
children
|
|
48
|
+
});
|
|
121
49
|
}
|
|
122
|
-
function ResponsiveDialogHeader(
|
|
123
|
-
const $ = c(9);
|
|
124
|
-
let className;
|
|
125
|
-
let props;
|
|
126
|
-
if ($[0] !== t0) {
|
|
127
|
-
({className, ...props} = t0);
|
|
128
|
-
$[0] = t0;
|
|
129
|
-
$[1] = className;
|
|
130
|
-
$[2] = props;
|
|
131
|
-
} else {
|
|
132
|
-
className = $[1];
|
|
133
|
-
props = $[2];
|
|
134
|
-
}
|
|
50
|
+
function ResponsiveDialogHeader({ className, ...props }) {
|
|
135
51
|
const { isMobile } = useResponsiveDialog();
|
|
136
|
-
if (isMobile) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
$[4] = props;
|
|
145
|
-
$[5] = t1$1;
|
|
146
|
-
} else t1$1 = $[5];
|
|
147
|
-
return t1$1;
|
|
148
|
-
}
|
|
149
|
-
let t1;
|
|
150
|
-
if ($[6] !== className || $[7] !== props) {
|
|
151
|
-
t1 = /* @__PURE__ */ jsx(DialogHeader, {
|
|
152
|
-
className,
|
|
153
|
-
...props
|
|
154
|
-
});
|
|
155
|
-
$[6] = className;
|
|
156
|
-
$[7] = props;
|
|
157
|
-
$[8] = t1;
|
|
158
|
-
} else t1 = $[8];
|
|
159
|
-
return t1;
|
|
52
|
+
if (isMobile) return /* @__PURE__ */ jsx(DrawerHeader, {
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
return /* @__PURE__ */ jsx(DialogHeader, {
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
160
60
|
}
|
|
161
|
-
function ResponsiveDialogTitle(
|
|
162
|
-
const $ = c(14);
|
|
163
|
-
let children;
|
|
164
|
-
let className;
|
|
165
|
-
let props;
|
|
166
|
-
if ($[0] !== t0) {
|
|
167
|
-
({className, children, ...props} = t0);
|
|
168
|
-
$[0] = t0;
|
|
169
|
-
$[1] = children;
|
|
170
|
-
$[2] = className;
|
|
171
|
-
$[3] = props;
|
|
172
|
-
} else {
|
|
173
|
-
children = $[1];
|
|
174
|
-
className = $[2];
|
|
175
|
-
props = $[3];
|
|
176
|
-
}
|
|
61
|
+
function ResponsiveDialogTitle({ className, children, ...props }) {
|
|
177
62
|
const { isMobile } = useResponsiveDialog();
|
|
178
|
-
if (isMobile) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
$[7] = t1$1;
|
|
190
|
-
} else t1$1 = $[7];
|
|
191
|
-
return t1$1;
|
|
192
|
-
}
|
|
193
|
-
let t1;
|
|
194
|
-
if ($[8] !== className) {
|
|
195
|
-
t1 = cn("qa-responsive-dialog__title text-sm font-medium", className);
|
|
196
|
-
$[8] = className;
|
|
197
|
-
$[9] = t1;
|
|
198
|
-
} else t1 = $[9];
|
|
199
|
-
let t2;
|
|
200
|
-
if ($[10] !== children || $[11] !== props || $[12] !== t1) {
|
|
201
|
-
t2 = /* @__PURE__ */ jsx(Dialog.Title, {
|
|
202
|
-
"data-slot": "responsive-dialog-title",
|
|
203
|
-
className: t1,
|
|
204
|
-
...props,
|
|
205
|
-
children
|
|
206
|
-
});
|
|
207
|
-
$[10] = children;
|
|
208
|
-
$[11] = props;
|
|
209
|
-
$[12] = t1;
|
|
210
|
-
$[13] = t2;
|
|
211
|
-
} else t2 = $[13];
|
|
212
|
-
return t2;
|
|
63
|
+
if (isMobile) return /* @__PURE__ */ jsx(DrawerTitle, {
|
|
64
|
+
className,
|
|
65
|
+
...props,
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
69
|
+
"data-slot": "responsive-dialog-title",
|
|
70
|
+
className: cn("qa-responsive-dialog__title text-sm font-medium", className),
|
|
71
|
+
...props,
|
|
72
|
+
children
|
|
73
|
+
});
|
|
213
74
|
}
|
|
214
|
-
function ResponsiveDialogDescription(
|
|
215
|
-
const $ = c(14);
|
|
216
|
-
let children;
|
|
217
|
-
let className;
|
|
218
|
-
let props;
|
|
219
|
-
if ($[0] !== t0) {
|
|
220
|
-
({className, children, ...props} = t0);
|
|
221
|
-
$[0] = t0;
|
|
222
|
-
$[1] = children;
|
|
223
|
-
$[2] = className;
|
|
224
|
-
$[3] = props;
|
|
225
|
-
} else {
|
|
226
|
-
children = $[1];
|
|
227
|
-
className = $[2];
|
|
228
|
-
props = $[3];
|
|
229
|
-
}
|
|
75
|
+
function ResponsiveDialogDescription({ className, children, ...props }) {
|
|
230
76
|
const { isMobile } = useResponsiveDialog();
|
|
231
|
-
if (isMobile) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
$[7] = t1$1;
|
|
243
|
-
} else t1$1 = $[7];
|
|
244
|
-
return t1$1;
|
|
245
|
-
}
|
|
246
|
-
let t1;
|
|
247
|
-
if ($[8] !== className) {
|
|
248
|
-
t1 = cn("text-muted-foreground text-xs/relaxed", className);
|
|
249
|
-
$[8] = className;
|
|
250
|
-
$[9] = t1;
|
|
251
|
-
} else t1 = $[9];
|
|
252
|
-
let t2;
|
|
253
|
-
if ($[10] !== children || $[11] !== props || $[12] !== t1) {
|
|
254
|
-
t2 = /* @__PURE__ */ jsx(Dialog.Description, {
|
|
255
|
-
"data-slot": "responsive-dialog-description",
|
|
256
|
-
className: t1,
|
|
257
|
-
...props,
|
|
258
|
-
children
|
|
259
|
-
});
|
|
260
|
-
$[10] = children;
|
|
261
|
-
$[11] = props;
|
|
262
|
-
$[12] = t1;
|
|
263
|
-
$[13] = t2;
|
|
264
|
-
} else t2 = $[13];
|
|
265
|
-
return t2;
|
|
77
|
+
if (isMobile) return /* @__PURE__ */ jsx(DrawerDescription, {
|
|
78
|
+
className,
|
|
79
|
+
...props,
|
|
80
|
+
children
|
|
81
|
+
});
|
|
82
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
83
|
+
"data-slot": "responsive-dialog-description",
|
|
84
|
+
className: cn("text-muted-foreground text-xs/relaxed", className),
|
|
85
|
+
...props,
|
|
86
|
+
children
|
|
87
|
+
});
|
|
266
88
|
}
|
|
267
|
-
function ResponsiveDialogFooter(
|
|
268
|
-
const $ = c(9);
|
|
269
|
-
let className;
|
|
270
|
-
let props;
|
|
271
|
-
if ($[0] !== t0) {
|
|
272
|
-
({className, ...props} = t0);
|
|
273
|
-
$[0] = t0;
|
|
274
|
-
$[1] = className;
|
|
275
|
-
$[2] = props;
|
|
276
|
-
} else {
|
|
277
|
-
className = $[1];
|
|
278
|
-
props = $[2];
|
|
279
|
-
}
|
|
89
|
+
function ResponsiveDialogFooter({ className, ...props }) {
|
|
280
90
|
const { isMobile } = useResponsiveDialog();
|
|
281
|
-
if (isMobile) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
$[4] = props;
|
|
290
|
-
$[5] = t1$1;
|
|
291
|
-
} else t1$1 = $[5];
|
|
292
|
-
return t1$1;
|
|
293
|
-
}
|
|
294
|
-
let t1;
|
|
295
|
-
if ($[6] !== className || $[7] !== props) {
|
|
296
|
-
t1 = /* @__PURE__ */ jsx(DialogFooter, {
|
|
297
|
-
className,
|
|
298
|
-
...props
|
|
299
|
-
});
|
|
300
|
-
$[6] = className;
|
|
301
|
-
$[7] = props;
|
|
302
|
-
$[8] = t1;
|
|
303
|
-
} else t1 = $[8];
|
|
304
|
-
return t1;
|
|
91
|
+
if (isMobile) return /* @__PURE__ */ jsx(DrawerFooter, {
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
return /* @__PURE__ */ jsx(DialogFooter, {
|
|
96
|
+
className,
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
305
99
|
}
|
|
306
100
|
|
|
307
101
|
//#endregion
|
|
@@ -1,169 +1,74 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
|
|
6
5
|
//#region src/client/components/ui/scroll-fade.tsx
|
|
7
|
-
function ScrollFade(
|
|
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;
|
|
6
|
+
function ScrollFade({ orientation = "horizontal", fadeSize = 20, leftInset = 0, children, className, ...props }) {
|
|
35
7
|
const wrapperRef = React.useRef(null);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
8
|
+
const [overflow, setOverflow] = React.useState({
|
|
9
|
+
left: false,
|
|
10
|
+
right: false,
|
|
11
|
+
top: false,
|
|
12
|
+
bottom: false
|
|
13
|
+
});
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
const wrapper = wrapperRef.current;
|
|
16
|
+
if (!wrapper) return;
|
|
17
|
+
const scrollable = wrapper.querySelector("[data-scroll-fade-target]") ?? wrapper.querySelector(".overflow-x-auto, .overflow-y-auto, .overflow-auto") ?? wrapper;
|
|
18
|
+
const update = () => {
|
|
19
|
+
const el = scrollable;
|
|
20
|
+
const h$1 = orientation !== "vertical";
|
|
21
|
+
const v$1 = orientation !== "horizontal";
|
|
22
|
+
setOverflow({
|
|
23
|
+
left: h$1 && el.scrollLeft > 1,
|
|
24
|
+
right: h$1 && el.scrollLeft + el.clientWidth < el.scrollWidth - 1,
|
|
25
|
+
top: v$1 && el.scrollTop > 1,
|
|
26
|
+
bottom: v$1 && el.scrollTop + el.clientHeight < el.scrollHeight - 1
|
|
27
|
+
});
|
|
43
28
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
};
|
|
29
|
+
update();
|
|
30
|
+
scrollable.addEventListener("scroll", update, { passive: true });
|
|
31
|
+
const observer = new ResizeObserver(update);
|
|
32
|
+
observer.observe(scrollable);
|
|
33
|
+
return () => {
|
|
34
|
+
scrollable.removeEventListener("scroll", update);
|
|
35
|
+
observer.disconnect();
|
|
73
36
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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;
|
|
37
|
+
}, [orientation]);
|
|
38
|
+
const h = orientation !== "vertical";
|
|
39
|
+
const v = orientation !== "horizontal";
|
|
40
|
+
const fade = "pointer-events-none absolute z-30 transition-opacity duration-200";
|
|
41
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
42
|
+
ref: wrapperRef,
|
|
43
|
+
className: cn("relative", className),
|
|
44
|
+
...props,
|
|
45
|
+
children: [
|
|
46
|
+
children,
|
|
47
|
+
h && /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: cn(fade, "inset-y-0 bg-gradient-to-r from-background to-transparent", overflow.left ? "opacity-100" : "opacity-0"),
|
|
49
|
+
style: {
|
|
50
|
+
left: leftInset,
|
|
51
|
+
width: fadeSize
|
|
52
|
+
},
|
|
53
|
+
"aria-hidden": true
|
|
54
|
+
}),
|
|
55
|
+
h && /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: cn(fade, "inset-y-0 right-0 bg-gradient-to-l from-background to-transparent", overflow.right ? "opacity-100" : "opacity-0"),
|
|
57
|
+
style: { width: fadeSize },
|
|
58
|
+
"aria-hidden": true
|
|
59
|
+
}),
|
|
60
|
+
v && /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: cn(fade, "inset-x-0 top-0 bg-gradient-to-b from-background to-transparent", overflow.top ? "opacity-100" : "opacity-0"),
|
|
62
|
+
style: { height: fadeSize },
|
|
63
|
+
"aria-hidden": true
|
|
64
|
+
}),
|
|
65
|
+
v && /* @__PURE__ */ jsx("div", {
|
|
66
|
+
className: cn(fade, "inset-x-0 bottom-0 bg-gradient-to-t from-background to-transparent", overflow.bottom ? "opacity-100" : "opacity-0"),
|
|
67
|
+
style: { height: fadeSize },
|
|
68
|
+
"aria-hidden": true
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
});
|
|
167
72
|
}
|
|
168
73
|
|
|
169
74
|
//#endregion
|