@questpie/admin 3.0.3 → 3.0.4
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-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 +2 -2
- 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 +12 -9
- 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 +251 -230
- package/dist/client/components/primitives/select-single.mjs +345 -290
- 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 +134 -96
- package/dist/client/components/widgets/progress-widget.mjs +59 -34
- package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
- package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +159 -246
- package/dist/client/components/widgets/timeline-widget.mjs +66 -43
- package/dist/client/components/widgets/value-widget.mjs +261 -152
- 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 +59 -40
- 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-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/auth-layout.d.mts +18 -11
- 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 +1162 -229
- 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 +149 -172
- package/dist/client/views/layout/admin-router.mjs +747 -544
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +751 -591
- 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 +1 -1
- 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 +3 -20
- 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 +17 -1
- package/dist/server/i18n/messages/cs.mjs +23 -0
- package/dist/server/i18n/messages/de.mjs +23 -0
- package/dist/server/i18n/messages/en.mjs +64 -1
- package/dist/server/i18n/messages/es.mjs +23 -0
- package/dist/server/i18n/messages/fr.mjs +23 -0
- package/dist/server/i18n/messages/pl.mjs +23 -0
- package/dist/server/i18n/messages/pt.mjs +23 -0
- package/dist/server/i18n/messages/sk.mjs +83 -1
- 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 +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 +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 +12 -0
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +2 -2
- 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 +33 -0
- 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 +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +7 -7
- 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/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
- 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
|
@@ -8,6 +8,38 @@ import { Select } from "@base-ui/react/select";
|
|
|
8
8
|
|
|
9
9
|
//#region src/client/components/ui/select.tsx
|
|
10
10
|
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;
|
|
42
|
+
}
|
|
11
43
|
function SelectValue(t0) {
|
|
12
44
|
const $ = c(8);
|
|
13
45
|
let className;
|
|
@@ -41,55 +73,61 @@ function SelectValue(t0) {
|
|
|
41
73
|
return t2;
|
|
42
74
|
}
|
|
43
75
|
function SelectTrigger(t0) {
|
|
44
|
-
const $ = c(
|
|
76
|
+
const $ = c(15);
|
|
45
77
|
let children;
|
|
46
78
|
let className;
|
|
47
79
|
let props;
|
|
48
80
|
let t1;
|
|
81
|
+
let t2;
|
|
49
82
|
if ($[0] !== t0) {
|
|
50
|
-
({className, size: t1, children, ...props} = t0);
|
|
83
|
+
({className, size: t1, children, type: t2, ...props} = t0);
|
|
51
84
|
$[0] = t0;
|
|
52
85
|
$[1] = children;
|
|
53
86
|
$[2] = className;
|
|
54
87
|
$[3] = props;
|
|
55
88
|
$[4] = t1;
|
|
89
|
+
$[5] = t2;
|
|
56
90
|
} else {
|
|
57
91
|
children = $[1];
|
|
58
92
|
className = $[2];
|
|
59
93
|
props = $[3];
|
|
60
94
|
t1 = $[4];
|
|
95
|
+
t2 = $[5];
|
|
61
96
|
}
|
|
62
97
|
const size = t1 === void 0 ? "default" : t1;
|
|
63
|
-
|
|
64
|
-
if ($[5] !== className) {
|
|
65
|
-
t2 = cn("qa-select__trigger border-input data-[placeholder]:text-muted-foreground bg-transparent font-mono focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 flex w-fit items-center justify-between gap-2 border px-3 py-2 text-sm whitespace-nowrap transition-all outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-[2px] data-[size=default]:h-9 data-[size=sm]:h-7 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);
|
|
66
|
-
$[5] = className;
|
|
67
|
-
$[6] = t2;
|
|
68
|
-
} else t2 = $[6];
|
|
98
|
+
const type = t2 === void 0 ? "button" : t2;
|
|
69
99
|
let t3;
|
|
70
|
-
if ($[
|
|
71
|
-
t3 =
|
|
72
|
-
|
|
73
|
-
className: "text-muted-foreground pointer-events-none size-4"
|
|
74
|
-
}) });
|
|
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;
|
|
75
103
|
$[7] = t3;
|
|
76
104
|
} else t3 = $[7];
|
|
77
105
|
let t4;
|
|
78
|
-
if ($[8]
|
|
79
|
-
t4 = /* @__PURE__ */
|
|
106
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
107
|
+
t4 = /* @__PURE__ */ jsx(Select.Icon, { render: /* @__PURE__ */ jsx(Icon, {
|
|
108
|
+
icon: "ph:caret-down",
|
|
109
|
+
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, {
|
|
80
116
|
"data-slot": "select-trigger",
|
|
81
117
|
"data-size": size,
|
|
82
|
-
|
|
118
|
+
type,
|
|
119
|
+
className: t3,
|
|
83
120
|
...props,
|
|
84
|
-
children: [children,
|
|
121
|
+
children: [children, t4]
|
|
85
122
|
});
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
|
|
92
|
-
|
|
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;
|
|
93
131
|
}
|
|
94
132
|
function SelectContent(t0) {
|
|
95
133
|
const $ = c(26);
|
|
@@ -129,7 +167,7 @@ function SelectContent(t0) {
|
|
|
129
167
|
const alignItemWithTrigger = t5 === void 0 ? true : t5;
|
|
130
168
|
let t6;
|
|
131
169
|
if ($[9] !== className) {
|
|
132
|
-
t6 = cn("qa-select__content
|
|
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);
|
|
133
171
|
$[9] = className;
|
|
134
172
|
$[10] = t6;
|
|
135
173
|
} else t6 = $[10];
|
|
@@ -187,6 +225,38 @@ function SelectContent(t0) {
|
|
|
187
225
|
} else t11 = $[25];
|
|
188
226
|
return t11;
|
|
189
227
|
}
|
|
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;
|
|
259
|
+
}
|
|
190
260
|
function SelectItem(t0) {
|
|
191
261
|
const $ = c(13);
|
|
192
262
|
let children;
|
|
@@ -205,7 +275,7 @@ function SelectItem(t0) {
|
|
|
205
275
|
}
|
|
206
276
|
let t1;
|
|
207
277
|
if ($[4] !== className) {
|
|
208
|
-
t1 = cn("qa-select__item 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);
|
|
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);
|
|
209
279
|
$[4] = className;
|
|
210
280
|
$[5] = t1;
|
|
211
281
|
} else t1 = $[5];
|
|
@@ -244,6 +314,38 @@ function SelectItem(t0) {
|
|
|
244
314
|
} else t4 = $[12];
|
|
245
315
|
return t4;
|
|
246
316
|
}
|
|
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;
|
|
348
|
+
}
|
|
247
349
|
function SelectScrollUpButton(t0) {
|
|
248
350
|
const $ = c(9);
|
|
249
351
|
let className;
|
|
@@ -322,4 +424,4 @@ function SelectScrollDownButton(t0) {
|
|
|
322
424
|
}
|
|
323
425
|
|
|
324
426
|
//#endregion
|
|
325
|
-
export { Select$1 as Select, SelectContent, SelectItem, SelectTrigger, SelectValue };
|
|
427
|
+
export { Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -59,7 +59,7 @@ function SheetOverlay(t0) {
|
|
|
59
59
|
}
|
|
60
60
|
let t1;
|
|
61
61
|
if ($[3] !== className) {
|
|
62
|
-
t1 = cn("qa-sheet__overlay
|
|
62
|
+
t1 = cn("qa-sheet__overlay fixed inset-0 z-50 bg-black/80", className);
|
|
63
63
|
$[3] = className;
|
|
64
64
|
$[4] = t1;
|
|
65
65
|
} else t1 = $[4];
|
|
@@ -77,43 +77,56 @@ function SheetOverlay(t0) {
|
|
|
77
77
|
return t2;
|
|
78
78
|
}
|
|
79
79
|
function SheetContent(t0) {
|
|
80
|
-
const $ = c(
|
|
80
|
+
const $ = c(25);
|
|
81
81
|
let children;
|
|
82
82
|
let className;
|
|
83
83
|
let props;
|
|
84
84
|
let t1;
|
|
85
85
|
let t2;
|
|
86
|
+
let t3;
|
|
87
|
+
let t4;
|
|
86
88
|
if ($[0] !== t0) {
|
|
87
|
-
({className, children, side: t1, showCloseButton: t2, ...props} = t0);
|
|
89
|
+
({className, children, side: t1, showCloseButton: t2, animated: t3, showOverlay: t4, ...props} = t0);
|
|
88
90
|
$[0] = t0;
|
|
89
91
|
$[1] = children;
|
|
90
92
|
$[2] = className;
|
|
91
93
|
$[3] = props;
|
|
92
94
|
$[4] = t1;
|
|
93
95
|
$[5] = t2;
|
|
96
|
+
$[6] = t3;
|
|
97
|
+
$[7] = t4;
|
|
94
98
|
} else {
|
|
95
99
|
children = $[1];
|
|
96
100
|
className = $[2];
|
|
97
101
|
props = $[3];
|
|
98
102
|
t1 = $[4];
|
|
99
103
|
t2 = $[5];
|
|
104
|
+
t3 = $[6];
|
|
105
|
+
t4 = $[7];
|
|
100
106
|
}
|
|
101
107
|
const side = t1 === void 0 ? "right" : t1;
|
|
102
108
|
const showCloseButton = t2 === void 0 ? true : t2;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} else t3 = $[6];
|
|
108
|
-
let t4;
|
|
109
|
-
if ($[7] !== className) {
|
|
110
|
-
t4 = cn("qa-sheet__content bg-background border-border data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-clip-padding text-sm transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-full data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-full data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-lg data-[side=right]:sm:max-w-lg", className);
|
|
111
|
-
$[7] = className;
|
|
112
|
-
$[8] = t4;
|
|
113
|
-
} else t4 = $[8];
|
|
109
|
+
const animated = t3 === void 0 ? true : t3;
|
|
110
|
+
const showOverlay = t4 === void 0 ? false : t4;
|
|
111
|
+
const overlayClassName = animated ? "qa-sheet__overlay motion-overlay fixed inset-0 z-50 bg-black/80 data-ending-style:opacity-0 data-starting-style:opacity-0" : "qa-sheet__overlay fixed inset-0 z-50 bg-black/80";
|
|
112
|
+
const contentClassName = animated ? "qa-sheet__content bg-background border-border motion-sheet data-starting-style:opacity-0 data-ending-style:opacity-0 data-[side=right]:data-starting-style:translate-x-10 data-[side=right]:data-ending-style:translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=left]:data-ending-style:-translate-x-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=top]:data-ending-style:-translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=bottom]:data-ending-style:translate-y-10 fixed z-50 flex flex-col bg-clip-padding text-sm data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-full data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-full data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-lg data-[side=right]:sm:max-w-lg" : "qa-sheet__content bg-background border-border fixed z-50 flex flex-col bg-clip-padding text-sm data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-full data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-full data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-lg data-[side=right]:sm:max-w-lg";
|
|
114
113
|
let t5;
|
|
115
|
-
if ($[9] !==
|
|
116
|
-
t5 =
|
|
114
|
+
if ($[8] !== overlayClassName || $[9] !== showOverlay) {
|
|
115
|
+
t5 = showOverlay && /* @__PURE__ */ jsx(SheetOverlay, { className: overlayClassName });
|
|
116
|
+
$[8] = overlayClassName;
|
|
117
|
+
$[9] = showOverlay;
|
|
118
|
+
$[10] = t5;
|
|
119
|
+
} else t5 = $[10];
|
|
120
|
+
let t6;
|
|
121
|
+
if ($[11] !== className || $[12] !== contentClassName) {
|
|
122
|
+
t6 = cn(contentClassName, className);
|
|
123
|
+
$[11] = className;
|
|
124
|
+
$[12] = contentClassName;
|
|
125
|
+
$[13] = t6;
|
|
126
|
+
} else t6 = $[13];
|
|
127
|
+
let t7;
|
|
128
|
+
if ($[14] !== showCloseButton) {
|
|
129
|
+
t7 = showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
117
130
|
"data-slot": "sheet-close",
|
|
118
131
|
nativeButton: false,
|
|
119
132
|
render: /* @__PURE__ */ jsx(Button, {
|
|
@@ -126,26 +139,33 @@ function SheetContent(t0) {
|
|
|
126
139
|
children: "Close"
|
|
127
140
|
})]
|
|
128
141
|
});
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
} else
|
|
132
|
-
let
|
|
133
|
-
if ($[
|
|
134
|
-
|
|
142
|
+
$[14] = showCloseButton;
|
|
143
|
+
$[15] = t7;
|
|
144
|
+
} else t7 = $[15];
|
|
145
|
+
let t8;
|
|
146
|
+
if ($[16] !== children || $[17] !== props || $[18] !== side || $[19] !== t6 || $[20] !== t7) {
|
|
147
|
+
t8 = /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
135
148
|
"data-slot": "sheet-content",
|
|
136
149
|
"data-side": side,
|
|
137
|
-
className:
|
|
150
|
+
className: t6,
|
|
138
151
|
...props,
|
|
139
|
-
children: [children,
|
|
140
|
-
})
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
} else
|
|
148
|
-
|
|
152
|
+
children: [children, t7]
|
|
153
|
+
});
|
|
154
|
+
$[16] = children;
|
|
155
|
+
$[17] = props;
|
|
156
|
+
$[18] = side;
|
|
157
|
+
$[19] = t6;
|
|
158
|
+
$[20] = t7;
|
|
159
|
+
$[21] = t8;
|
|
160
|
+
} else t8 = $[21];
|
|
161
|
+
let t9;
|
|
162
|
+
if ($[22] !== t5 || $[23] !== t8) {
|
|
163
|
+
t9 = /* @__PURE__ */ jsxs(SheetPortal, { children: [t5, t8] });
|
|
164
|
+
$[22] = t5;
|
|
165
|
+
$[23] = t8;
|
|
166
|
+
$[24] = t9;
|
|
167
|
+
} else t9 = $[24];
|
|
168
|
+
return t9;
|
|
149
169
|
}
|
|
150
170
|
function SheetHeader(t0) {
|
|
151
171
|
const $ = c(8);
|
|
@@ -226,7 +246,7 @@ function SheetTitle(t0) {
|
|
|
226
246
|
}
|
|
227
247
|
let t1;
|
|
228
248
|
if ($[3] !== className) {
|
|
229
|
-
t1 = cn("qa-sheet__title text-foreground
|
|
249
|
+
t1 = cn("qa-sheet__title font-chrome text-foreground text-sm font-medium", className);
|
|
230
250
|
$[3] = className;
|
|
231
251
|
$[4] = t1;
|
|
232
252
|
} else t1 = $[4];
|
|
@@ -5,6 +5,7 @@ import { Button } from "./button.mjs";
|
|
|
5
5
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.mjs";
|
|
6
6
|
import { Separator } from "./separator.mjs";
|
|
7
7
|
import { useIsMobile } from "../../hooks/use-media-query.mjs";
|
|
8
|
+
import { shouldHandleAdminShortcut } from "../../utils/keyboard-shortcuts.mjs";
|
|
8
9
|
import { c } from "react/compiler-runtime";
|
|
9
10
|
import { Icon } from "@iconify/react";
|
|
10
11
|
import * as React from "react";
|
|
@@ -19,7 +20,7 @@ const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
|
|
|
19
20
|
const SIDEBAR_WIDTH = "16rem";
|
|
20
21
|
const SIDEBAR_WIDTH_MOBILE = "min(18rem, 85vw)";
|
|
21
22
|
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
22
|
-
const SIDEBAR_KEYBOARD_SHORTCUT = "
|
|
23
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = "\\";
|
|
23
24
|
const SidebarContext = React.createContext(null);
|
|
24
25
|
function useSidebar() {
|
|
25
26
|
const context = React.useContext(SidebarContext);
|
|
@@ -85,7 +86,7 @@ function SidebarProvider(t0) {
|
|
|
85
86
|
if ($[14] !== toggleSidebar) {
|
|
86
87
|
t4 = () => {
|
|
87
88
|
const handleKeyDown = (event) => {
|
|
88
|
-
if (event
|
|
89
|
+
if (shouldHandleAdminShortcut(event, { key: SIDEBAR_KEYBOARD_SHORTCUT })) {
|
|
89
90
|
event.preventDefault();
|
|
90
91
|
toggleSidebar();
|
|
91
92
|
}
|
|
@@ -136,7 +137,7 @@ function SidebarProvider(t0) {
|
|
|
136
137
|
const t8 = t7;
|
|
137
138
|
let t9;
|
|
138
139
|
if ($[26] !== className) {
|
|
139
|
-
t9 = cn("qa-sidebar-provider group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className);
|
|
140
|
+
t9 = cn("qa-sidebar-provider group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar bg-background flex min-h-svh w-full", className);
|
|
140
141
|
$[26] = className;
|
|
141
142
|
$[27] = t9;
|
|
142
143
|
} else t9 = $[27];
|
|
@@ -241,7 +242,7 @@ function Sidebar(t0) {
|
|
|
241
242
|
let t6$1;
|
|
242
243
|
if ($[15] !== children) {
|
|
243
244
|
t6$1 = /* @__PURE__ */ jsx("div", {
|
|
244
|
-
className: "flex h-full w-full flex-col",
|
|
245
|
+
className: "bg-sidebar border-sidebar-border flex h-full w-full flex-col overflow-hidden rounded-xl border shadow-lg",
|
|
245
246
|
children
|
|
246
247
|
});
|
|
247
248
|
$[15] = children;
|
|
@@ -253,7 +254,7 @@ function Sidebar(t0) {
|
|
|
253
254
|
"data-sidebar": "sidebar",
|
|
254
255
|
"data-slot": "sidebar",
|
|
255
256
|
"data-mobile": "true",
|
|
256
|
-
className: "
|
|
257
|
+
className: "text-sidebar-foreground w-(--sidebar-width) bg-transparent p-2 [&>button]:hidden",
|
|
257
258
|
style: t4$1,
|
|
258
259
|
side,
|
|
259
260
|
children: [t5$1, t6$1]
|
|
@@ -282,7 +283,7 @@ function Sidebar(t0) {
|
|
|
282
283
|
const t5 = variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)";
|
|
283
284
|
let t6;
|
|
284
285
|
if ($[25] !== t5) {
|
|
285
|
-
t6 = cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-
|
|
286
|
+
t6 = cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-[var(--motion-duration-slow)] ease-[var(--motion-ease-move)] motion-reduce:transition-none", "group-data-[collapsible=offExamples]:w-0", "group-data-[side=right]:rotate-180", t5);
|
|
286
287
|
$[25] = t5;
|
|
287
288
|
$[26] = t6;
|
|
288
289
|
} else t6 = $[26];
|
|
@@ -299,7 +300,7 @@ function Sidebar(t0) {
|
|
|
299
300
|
const t9 = variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";
|
|
300
301
|
let t10;
|
|
301
302
|
if ($[29] !== className || $[30] !== t8 || $[31] !== t9) {
|
|
302
|
-
t10 = cn("absolute inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-
|
|
303
|
+
t10 = cn("qa-sidebar__container absolute inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-[var(--motion-duration-slow)] ease-[var(--motion-ease-move)] motion-reduce:transition-none md:flex", t8, t9, className);
|
|
303
304
|
$[29] = className;
|
|
304
305
|
$[30] = t8;
|
|
305
306
|
$[31] = t9;
|
|
@@ -310,7 +311,7 @@ function Sidebar(t0) {
|
|
|
310
311
|
t11 = /* @__PURE__ */ jsx("div", {
|
|
311
312
|
"data-sidebar": "sidebar",
|
|
312
313
|
"data-slot": "sidebar-inner",
|
|
313
|
-
className: "qa-sidebar bg-sidebar border-sidebar-border flex size-full flex-col group-data-[variant=floating]:border group-data-[variant=floating]:shadow-
|
|
314
|
+
className: "qa-sidebar bg-sidebar border-sidebar-border group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:overflow-hidden group-data-[variant=floating]:rounded-xl group-data-[variant=floating]:border group-data-[variant=floating]:shadow-md group-data-[variant=floating]:ring-1",
|
|
314
315
|
children
|
|
315
316
|
});
|
|
316
317
|
$[33] = children;
|
|
@@ -618,7 +619,7 @@ function SidebarGroupLabel(t0) {
|
|
|
618
619
|
render = t4$1;
|
|
619
620
|
t3 = useRender;
|
|
620
621
|
t1 = "div";
|
|
621
|
-
t2 = mergeProps({ className: cn("qa-sidebar-group-label text-sidebar-foreground/
|
|
622
|
+
t2 = mergeProps({ className: cn("qa-sidebar-group-label text-sidebar-foreground/55 ring-sidebar-ring flex h-8 shrink-0 items-center px-2 font-mono text-[11px] font-semibold tracking-[0.08em] uppercase tabular-nums outline-hidden transition-[height,margin,opacity,padding] duration-200 ease-linear group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:mt-0 group-data-[collapsible=icon]:h-0 group-data-[collapsible=icon]:overflow-hidden group-data-[collapsible=icon]:px-0 group-data-[collapsible=icon]:py-0 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className) }, props);
|
|
622
623
|
$[0] = t0;
|
|
623
624
|
$[1] = render;
|
|
624
625
|
$[2] = t1;
|
|
@@ -752,16 +753,16 @@ function SidebarMenuItem(t0) {
|
|
|
752
753
|
} else t2 = $[7];
|
|
753
754
|
return t2;
|
|
754
755
|
}
|
|
755
|
-
cva("qa-sidebar-menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-
|
|
756
|
+
cva("qa-sidebar-menu-button item-surface font-chrome ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden p-2 text-left text-[13px] outline-hidden transition-[background-color,color,border-color,box-shadow,transform,width,height,padding] duration-150 ease-out group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 active:scale-[0.96] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:border-transparent data-active:bg-[var(--sidebar-active-background)] data-active:font-medium data-active:text-[var(--sidebar-active-foreground)] [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
756
757
|
variants: {
|
|
757
758
|
variant: {
|
|
758
759
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
759
|
-
outline: "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground
|
|
760
|
+
outline: "bg-background border-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:border-sidebar-border"
|
|
760
761
|
},
|
|
761
762
|
size: {
|
|
762
|
-
default: "h-8 text-
|
|
763
|
-
sm: "h-7 text-
|
|
764
|
-
lg: "h-12 text-
|
|
763
|
+
default: "h-8 text-[13px]",
|
|
764
|
+
sm: "h-7 text-[13px]",
|
|
765
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
765
766
|
}
|
|
766
767
|
},
|
|
767
768
|
defaultVariants: {
|
|
@@ -1,38 +1,54 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.mjs";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
4
5
|
|
|
5
6
|
//#region src/client/components/ui/skeleton.tsx
|
|
7
|
+
const skeletonVariants = cva("qa-skeleton bg-muted animate-pulse", {
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "rounded-sm",
|
|
10
|
+
text: "rounded-xs",
|
|
11
|
+
chip: "rounded-sm",
|
|
12
|
+
avatar: "rounded-md"
|
|
13
|
+
} },
|
|
14
|
+
defaultVariants: { variant: "default" }
|
|
15
|
+
});
|
|
6
16
|
function Skeleton(t0) {
|
|
7
|
-
const $ = c(
|
|
17
|
+
const $ = c(11);
|
|
8
18
|
let className;
|
|
9
19
|
let props;
|
|
20
|
+
let variant;
|
|
10
21
|
if ($[0] !== t0) {
|
|
11
|
-
({className, ...props} = t0);
|
|
22
|
+
({className, variant, ...props} = t0);
|
|
12
23
|
$[0] = t0;
|
|
13
24
|
$[1] = className;
|
|
14
25
|
$[2] = props;
|
|
26
|
+
$[3] = variant;
|
|
15
27
|
} else {
|
|
16
28
|
className = $[1];
|
|
17
29
|
props = $[2];
|
|
30
|
+
variant = $[3];
|
|
18
31
|
}
|
|
19
32
|
let t1;
|
|
20
|
-
if ($[
|
|
21
|
-
t1 = cn(
|
|
22
|
-
$[
|
|
23
|
-
$[
|
|
24
|
-
|
|
33
|
+
if ($[4] !== className || $[5] !== variant) {
|
|
34
|
+
t1 = cn(skeletonVariants({ variant }), className);
|
|
35
|
+
$[4] = className;
|
|
36
|
+
$[5] = variant;
|
|
37
|
+
$[6] = t1;
|
|
38
|
+
} else t1 = $[6];
|
|
25
39
|
let t2;
|
|
26
|
-
if ($[
|
|
40
|
+
if ($[7] !== props || $[8] !== t1 || $[9] !== variant) {
|
|
27
41
|
t2 = /* @__PURE__ */ jsx("div", {
|
|
28
42
|
"data-slot": "skeleton",
|
|
43
|
+
"data-variant": variant,
|
|
29
44
|
className: t1,
|
|
30
45
|
...props
|
|
31
46
|
});
|
|
32
|
-
$[
|
|
33
|
-
$[
|
|
34
|
-
$[
|
|
35
|
-
|
|
47
|
+
$[7] = props;
|
|
48
|
+
$[8] = t1;
|
|
49
|
+
$[9] = variant;
|
|
50
|
+
$[10] = t2;
|
|
51
|
+
} else t2 = $[10];
|
|
36
52
|
return t2;
|
|
37
53
|
}
|
|
38
54
|
|
|
@@ -25,7 +25,7 @@ function Switch$1(t0) {
|
|
|
25
25
|
const size = t1 === void 0 ? "default" : t1;
|
|
26
26
|
let t2;
|
|
27
27
|
if ($[4] !== className) {
|
|
28
|
-
t2 = cn("qa-switch data-checked:
|
|
28
|
+
t2 = cn("qa-switch data-checked:border-border-strong data-checked:bg-surface-high data-unchecked:border-input data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:border-border-strong aria-invalid:ring-ring/20 peer group/switch relative inline-flex shrink-0 items-center rounded-full border transition-[background-color,border-color,box-shadow] duration-150 ease-out outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-[3px] aria-invalid:ring-[3px] data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[16.6px] data-[size=default]:w-[28px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]", className);
|
|
29
29
|
$[4] = className;
|
|
30
30
|
$[5] = t2;
|
|
31
31
|
} else t2 = $[5];
|
|
@@ -33,7 +33,7 @@ function Switch$1(t0) {
|
|
|
33
33
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
34
|
t3 = /* @__PURE__ */ jsx(Switch.Thumb, {
|
|
35
35
|
"data-slot": "switch-thumb",
|
|
36
|
-
className: "qa-switch__thumb bg-
|
|
36
|
+
className: "qa-switch__thumb bg-card data-checked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform duration-150 ease-out group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0"
|
|
37
37
|
});
|
|
38
38
|
$[6] = t3;
|
|
39
39
|
} else t3 = $[6];
|