@questpie/admin 3.2.4 → 3.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +103 -230
- 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 +94 -296
- 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 -180
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +2 -2
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
- package/dist/client/components/fields/rich-text-editor/index.mjs +195 -513
- 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 +61 -72
- 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 +285 -605
- 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 +176 -476
- package/dist/client/components/preview/live-preview-mode.mjs +233 -458
- 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 +229 -572
- package/dist/client/components/primitives/select-single.mjs +179 -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.mjs +63 -146
- 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.mjs +14 -36
- package/dist/client/preview/preview-banner.d.mts +2 -2
- 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 +167 -348
- package/dist/client/preview/use-collection-preview.mjs +121 -215
- 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.mjs +86 -321
- package/dist/client/scope/provider.mjs +8 -17
- package/dist/client/utils/build-field-definitions-from-schema.mjs +4 -2
- 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.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +128 -453
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- 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 -379
- package/dist/client/views/collection/cells/complex-cells.mjs +183 -611
- package/dist/client/views/collection/cells/primitive-cells.mjs +116 -356
- 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 +58 -182
- package/dist/client/views/collection/form-view.mjs +284 -518
- package/dist/client/views/collection/table-view.mjs +231 -463
- package/dist/client/views/collection/view-skeletons.mjs +112 -237
- package/dist/client/views/common/global-search.mjs +241 -560
- 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 +477 -1301
- 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 +458 -1274
- 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.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +95 -290
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/dashboard-page.mjs +11 -57
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.mjs +31 -83
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +35 -90
- package/dist/client/views/pages/login-page.d.mts +2 -2
- 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.mjs +9 -33
- package/dist/server/adapters/index.d.mts +2 -0
- package/dist/server/adapters/nextjs.d.mts +1 -0
- package/dist/server/auth-helpers.d.mts +1 -0
- package/dist/server/modules/admin/.generated/module.d.mts +1 -0
- package/dist/server/modules/admin/collections/account.d.mts +46 -46
- package/dist/server/modules/admin/collections/admin-locks.d.mts +50 -50
- 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 +39 -39
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +62 -62
- package/dist/server/modules/admin/collections/verification.d.mts +23 -23
- package/dist/server/modules/admin/index.d.mts +20 -19
- 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 +45 -45
- package/dist/server/modules/audit/.generated/module.d.mts +6 -6
- package/dist/server/modules/audit/collections/audit-log.d.mts +78 -78
- package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
- package/dist/server.d.mts +2 -0
- package/package.json +3 -5
|
@@ -6,7 +6,6 @@ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "
|
|
|
6
6
|
import { Separator } from "./separator.mjs";
|
|
7
7
|
import { useIsMobile } from "../../hooks/use-media-query.mjs";
|
|
8
8
|
import { shouldHandleAdminShortcut } from "../../utils/keyboard-shortcuts.mjs";
|
|
9
|
-
import { c } from "react/compiler-runtime";
|
|
10
9
|
import { Icon } from "@iconify/react";
|
|
11
10
|
import * as React from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -27,731 +26,213 @@ function useSidebar() {
|
|
|
27
26
|
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
28
27
|
return context;
|
|
29
28
|
}
|
|
30
|
-
function SidebarProvider(
|
|
31
|
-
const $ = c(36);
|
|
32
|
-
let children;
|
|
33
|
-
let className;
|
|
34
|
-
let openProp;
|
|
35
|
-
let props;
|
|
36
|
-
let setOpenProp;
|
|
37
|
-
let style;
|
|
38
|
-
let t1;
|
|
39
|
-
if ($[0] !== t0) {
|
|
40
|
-
({defaultOpen: t1, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props} = t0);
|
|
41
|
-
$[0] = t0;
|
|
42
|
-
$[1] = children;
|
|
43
|
-
$[2] = className;
|
|
44
|
-
$[3] = openProp;
|
|
45
|
-
$[4] = props;
|
|
46
|
-
$[5] = setOpenProp;
|
|
47
|
-
$[6] = style;
|
|
48
|
-
$[7] = t1;
|
|
49
|
-
} else {
|
|
50
|
-
children = $[1];
|
|
51
|
-
className = $[2];
|
|
52
|
-
openProp = $[3];
|
|
53
|
-
props = $[4];
|
|
54
|
-
setOpenProp = $[5];
|
|
55
|
-
style = $[6];
|
|
56
|
-
t1 = $[7];
|
|
57
|
-
}
|
|
58
|
-
const defaultOpen = t1 === void 0 ? true : t1;
|
|
29
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
59
30
|
const isMobile = useIsMobile();
|
|
60
31
|
const [openMobile, setOpenMobile] = React.useState(false);
|
|
61
32
|
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
62
33
|
const open = openProp ?? _open;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
t3 = () => isMobile ? setOpenMobile(_temp) : setOpen(_temp2);
|
|
79
|
-
$[11] = isMobile;
|
|
80
|
-
$[12] = setOpen;
|
|
81
|
-
$[13] = t3;
|
|
82
|
-
} else t3 = $[13];
|
|
83
|
-
const toggleSidebar = t3;
|
|
84
|
-
let t4;
|
|
85
|
-
let t5;
|
|
86
|
-
if ($[14] !== toggleSidebar) {
|
|
87
|
-
t4 = () => {
|
|
88
|
-
const handleKeyDown = (event) => {
|
|
89
|
-
if (shouldHandleAdminShortcut(event, { key: SIDEBAR_KEYBOARD_SHORTCUT })) {
|
|
90
|
-
event.preventDefault();
|
|
91
|
-
toggleSidebar();
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
95
|
-
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
34
|
+
const setOpen = React.useCallback((value) => {
|
|
35
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
36
|
+
if (setOpenProp) setOpenProp(openState);
|
|
37
|
+
else _setOpen(openState);
|
|
38
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
39
|
+
}, [setOpenProp, open]);
|
|
40
|
+
const toggleSidebar = React.useCallback(() => {
|
|
41
|
+
return isMobile ? setOpenMobile((open$1) => !open$1) : setOpen((open$1) => !open$1);
|
|
42
|
+
}, [isMobile, setOpen]);
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
const handleKeyDown = (event) => {
|
|
45
|
+
if (shouldHandleAdminShortcut(event, { key: SIDEBAR_KEYBOARD_SHORTCUT })) {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
toggleSidebar();
|
|
48
|
+
}
|
|
96
49
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
$[16] = t5;
|
|
101
|
-
} else {
|
|
102
|
-
t4 = $[15];
|
|
103
|
-
t5 = $[16];
|
|
104
|
-
}
|
|
105
|
-
React.useEffect(t4, t5);
|
|
50
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
51
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
52
|
+
}, [toggleSidebar]);
|
|
106
53
|
const state = open ? "expanded" : "collapsed";
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const contextValue = t6;
|
|
127
|
-
let t7;
|
|
128
|
-
if ($[24] !== style) {
|
|
129
|
-
t7 = {
|
|
130
|
-
"--sidebar-width": SIDEBAR_WIDTH,
|
|
131
|
-
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
132
|
-
...style
|
|
133
|
-
};
|
|
134
|
-
$[24] = style;
|
|
135
|
-
$[25] = t7;
|
|
136
|
-
} else t7 = $[25];
|
|
137
|
-
const t8 = t7;
|
|
138
|
-
let t9;
|
|
139
|
-
if ($[26] !== 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);
|
|
141
|
-
$[26] = className;
|
|
142
|
-
$[27] = t9;
|
|
143
|
-
} else t9 = $[27];
|
|
144
|
-
let t10;
|
|
145
|
-
if ($[28] !== children || $[29] !== props || $[30] !== t8 || $[31] !== t9) {
|
|
146
|
-
t10 = /* @__PURE__ */ jsx("div", {
|
|
54
|
+
const contextValue = React.useMemo(() => ({
|
|
55
|
+
state,
|
|
56
|
+
open,
|
|
57
|
+
setOpen,
|
|
58
|
+
isMobile,
|
|
59
|
+
openMobile,
|
|
60
|
+
setOpenMobile,
|
|
61
|
+
toggleSidebar
|
|
62
|
+
}), [
|
|
63
|
+
state,
|
|
64
|
+
open,
|
|
65
|
+
setOpen,
|
|
66
|
+
isMobile,
|
|
67
|
+
openMobile,
|
|
68
|
+
toggleSidebar
|
|
69
|
+
]);
|
|
70
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
71
|
+
value: contextValue,
|
|
72
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
147
73
|
"data-slot": "sidebar-wrapper",
|
|
148
|
-
style:
|
|
149
|
-
|
|
74
|
+
style: {
|
|
75
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
76
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
77
|
+
...style
|
|
78
|
+
},
|
|
79
|
+
className: cn("qa-sidebar-provider group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar bg-background flex min-h-svh w-full", className),
|
|
150
80
|
...props,
|
|
151
81
|
children
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
$[29] = props;
|
|
155
|
-
$[30] = t8;
|
|
156
|
-
$[31] = t9;
|
|
157
|
-
$[32] = t10;
|
|
158
|
-
} else t10 = $[32];
|
|
159
|
-
let t11;
|
|
160
|
-
if ($[33] !== contextValue || $[34] !== t10) {
|
|
161
|
-
t11 = /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
162
|
-
value: contextValue,
|
|
163
|
-
children: t10
|
|
164
|
-
});
|
|
165
|
-
$[33] = contextValue;
|
|
166
|
-
$[34] = t10;
|
|
167
|
-
$[35] = t11;
|
|
168
|
-
} else t11 = $[35];
|
|
169
|
-
return t11;
|
|
82
|
+
})
|
|
83
|
+
});
|
|
170
84
|
}
|
|
171
|
-
function
|
|
172
|
-
return !open_1;
|
|
173
|
-
}
|
|
174
|
-
function _temp(open_0) {
|
|
175
|
-
return !open_0;
|
|
176
|
-
}
|
|
177
|
-
function Sidebar(t0) {
|
|
178
|
-
const $ = c(46);
|
|
179
|
-
let children;
|
|
180
|
-
let className;
|
|
181
|
-
let props;
|
|
182
|
-
let t1;
|
|
183
|
-
let t2;
|
|
184
|
-
let t3;
|
|
185
|
-
if ($[0] !== t0) {
|
|
186
|
-
({side: t1, variant: t2, collapsible: t3, className, children, ...props} = t0);
|
|
187
|
-
$[0] = t0;
|
|
188
|
-
$[1] = children;
|
|
189
|
-
$[2] = className;
|
|
190
|
-
$[3] = props;
|
|
191
|
-
$[4] = t1;
|
|
192
|
-
$[5] = t2;
|
|
193
|
-
$[6] = t3;
|
|
194
|
-
} else {
|
|
195
|
-
children = $[1];
|
|
196
|
-
className = $[2];
|
|
197
|
-
props = $[3];
|
|
198
|
-
t1 = $[4];
|
|
199
|
-
t2 = $[5];
|
|
200
|
-
t3 = $[6];
|
|
201
|
-
}
|
|
202
|
-
const side = t1 === void 0 ? "left" : t1;
|
|
203
|
-
const variant = t2 === void 0 ? "sidebar" : t2;
|
|
204
|
-
const collapsible = t3 === void 0 ? "offExamples" : t3;
|
|
85
|
+
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offExamples", className, children, ...props }) {
|
|
205
86
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
206
|
-
if (collapsible === "none") {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
$[12] = t5$1;
|
|
225
|
-
} else t5$1 = $[12];
|
|
226
|
-
return t5$1;
|
|
227
|
-
}
|
|
228
|
-
if (isMobile) {
|
|
229
|
-
let t4$1;
|
|
230
|
-
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
231
|
-
t4$1 = { "--sidebar-width": SIDEBAR_WIDTH_MOBILE };
|
|
232
|
-
$[13] = t4$1;
|
|
233
|
-
} else t4$1 = $[13];
|
|
234
|
-
let t5$1;
|
|
235
|
-
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
236
|
-
t5$1 = /* @__PURE__ */ jsxs(SheetHeader, {
|
|
87
|
+
if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
|
|
88
|
+
"data-slot": "sidebar",
|
|
89
|
+
className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
|
|
90
|
+
...props,
|
|
91
|
+
children
|
|
92
|
+
});
|
|
93
|
+
if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
|
|
94
|
+
open: openMobile,
|
|
95
|
+
onOpenChange: setOpenMobile,
|
|
96
|
+
...props,
|
|
97
|
+
children: /* @__PURE__ */ jsxs(SheetContent, {
|
|
98
|
+
"data-sidebar": "sidebar",
|
|
99
|
+
"data-slot": "sidebar",
|
|
100
|
+
"data-mobile": "true",
|
|
101
|
+
className: "text-sidebar-foreground w-(--sidebar-width) bg-transparent p-2 [&>button]:hidden",
|
|
102
|
+
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
103
|
+
side,
|
|
104
|
+
children: [/* @__PURE__ */ jsxs(SheetHeader, {
|
|
237
105
|
className: "sr-only",
|
|
238
106
|
children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
|
|
239
|
-
})
|
|
240
|
-
$[14] = t5$1;
|
|
241
|
-
} else t5$1 = $[14];
|
|
242
|
-
let t6$1;
|
|
243
|
-
if ($[15] !== children) {
|
|
244
|
-
t6$1 = /* @__PURE__ */ jsx("div", {
|
|
107
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
245
108
|
className: "bg-sidebar border-sidebar-border flex h-full w-full flex-col overflow-hidden rounded-xl border shadow-lg",
|
|
246
109
|
children
|
|
247
|
-
})
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
style: t4$1,
|
|
259
|
-
side,
|
|
260
|
-
children: [t5$1, t6$1]
|
|
261
|
-
});
|
|
262
|
-
$[17] = side;
|
|
263
|
-
$[18] = t6$1;
|
|
264
|
-
$[19] = t7$1;
|
|
265
|
-
} else t7$1 = $[19];
|
|
266
|
-
let t8$1;
|
|
267
|
-
if ($[20] !== openMobile || $[21] !== props || $[22] !== setOpenMobile || $[23] !== t7$1) {
|
|
268
|
-
t8$1 = /* @__PURE__ */ jsx(Sheet, {
|
|
269
|
-
open: openMobile,
|
|
270
|
-
onOpenChange: setOpenMobile,
|
|
271
|
-
...props,
|
|
272
|
-
children: t7$1
|
|
273
|
-
});
|
|
274
|
-
$[20] = openMobile;
|
|
275
|
-
$[21] = props;
|
|
276
|
-
$[22] = setOpenMobile;
|
|
277
|
-
$[23] = t7$1;
|
|
278
|
-
$[24] = t8$1;
|
|
279
|
-
} else t8$1 = $[24];
|
|
280
|
-
return t8$1;
|
|
281
|
-
}
|
|
282
|
-
const t4 = state === "collapsed" ? collapsible : "";
|
|
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)";
|
|
284
|
-
let t6;
|
|
285
|
-
if ($[25] !== t5) {
|
|
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);
|
|
287
|
-
$[25] = t5;
|
|
288
|
-
$[26] = t6;
|
|
289
|
-
} else t6 = $[26];
|
|
290
|
-
let t7;
|
|
291
|
-
if ($[27] !== t6) {
|
|
292
|
-
t7 = /* @__PURE__ */ jsx("div", {
|
|
110
|
+
})]
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
114
|
+
className: "group peer text-sidebar-foreground relative hidden md:block",
|
|
115
|
+
"data-state": state,
|
|
116
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
117
|
+
"data-variant": variant,
|
|
118
|
+
"data-side": side,
|
|
119
|
+
"data-slot": "sidebar",
|
|
120
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
293
121
|
"data-slot": "sidebar-gap",
|
|
294
|
-
className:
|
|
295
|
-
})
|
|
296
|
-
$[27] = t6;
|
|
297
|
-
$[28] = t7;
|
|
298
|
-
} else t7 = $[28];
|
|
299
|
-
const t8 = side === "left" ? "left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]";
|
|
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";
|
|
301
|
-
let t10;
|
|
302
|
-
if ($[29] !== className || $[30] !== t8 || $[31] !== t9) {
|
|
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);
|
|
304
|
-
$[29] = className;
|
|
305
|
-
$[30] = t8;
|
|
306
|
-
$[31] = t9;
|
|
307
|
-
$[32] = t10;
|
|
308
|
-
} else t10 = $[32];
|
|
309
|
-
let t11;
|
|
310
|
-
if ($[33] !== children) {
|
|
311
|
-
t11 = /* @__PURE__ */ jsx("div", {
|
|
312
|
-
"data-sidebar": "sidebar",
|
|
313
|
-
"data-slot": "sidebar-inner",
|
|
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",
|
|
315
|
-
children
|
|
316
|
-
});
|
|
317
|
-
$[33] = children;
|
|
318
|
-
$[34] = t11;
|
|
319
|
-
} else t11 = $[34];
|
|
320
|
-
let t12;
|
|
321
|
-
if ($[35] !== props || $[36] !== t10 || $[37] !== t11) {
|
|
322
|
-
t12 = /* @__PURE__ */ jsx("div", {
|
|
122
|
+
className: 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", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
123
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
323
124
|
"data-slot": "sidebar-container",
|
|
324
|
-
className:
|
|
125
|
+
className: 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", side === "left" ? "left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]", 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", className),
|
|
325
126
|
...props,
|
|
326
|
-
children:
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
if ($[39] !== side || $[40] !== state || $[41] !== t12 || $[42] !== t4 || $[43] !== t7 || $[44] !== variant) {
|
|
335
|
-
t13 = /* @__PURE__ */ jsxs("div", {
|
|
336
|
-
className: "group peer text-sidebar-foreground relative hidden md:block",
|
|
337
|
-
"data-state": state,
|
|
338
|
-
"data-collapsible": t4,
|
|
339
|
-
"data-variant": variant,
|
|
340
|
-
"data-side": side,
|
|
341
|
-
"data-slot": "sidebar",
|
|
342
|
-
children: [t7, t12]
|
|
343
|
-
});
|
|
344
|
-
$[39] = side;
|
|
345
|
-
$[40] = state;
|
|
346
|
-
$[41] = t12;
|
|
347
|
-
$[42] = t4;
|
|
348
|
-
$[43] = t7;
|
|
349
|
-
$[44] = variant;
|
|
350
|
-
$[45] = t13;
|
|
351
|
-
} else t13 = $[45];
|
|
352
|
-
return t13;
|
|
127
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
128
|
+
"data-sidebar": "sidebar",
|
|
129
|
+
"data-slot": "sidebar-inner",
|
|
130
|
+
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",
|
|
131
|
+
children
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
134
|
+
});
|
|
353
135
|
}
|
|
354
|
-
function SidebarTrigger(
|
|
355
|
-
const $ = c(13);
|
|
356
|
-
let className;
|
|
357
|
-
let onClick;
|
|
358
|
-
let props;
|
|
359
|
-
if ($[0] !== t0) {
|
|
360
|
-
({className, onClick, ...props} = t0);
|
|
361
|
-
$[0] = t0;
|
|
362
|
-
$[1] = className;
|
|
363
|
-
$[2] = onClick;
|
|
364
|
-
$[3] = props;
|
|
365
|
-
} else {
|
|
366
|
-
className = $[1];
|
|
367
|
-
onClick = $[2];
|
|
368
|
-
props = $[3];
|
|
369
|
-
}
|
|
136
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
370
137
|
const { toggleSidebar } = useSidebar();
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
138
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
139
|
+
"data-sidebar": "trigger",
|
|
140
|
+
"data-slot": "sidebar-trigger",
|
|
141
|
+
variant: "ghost",
|
|
142
|
+
size: "icon-sm",
|
|
143
|
+
className,
|
|
144
|
+
onClick: (event) => {
|
|
374
145
|
onClick?.(event);
|
|
375
146
|
toggleSidebar();
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
$[6] = t1;
|
|
380
|
-
} else t1 = $[6];
|
|
381
|
-
let t2;
|
|
382
|
-
let t3;
|
|
383
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
384
|
-
t2 = /* @__PURE__ */ jsx(Icon, { icon: "ph:sidebar" });
|
|
385
|
-
t3 = /* @__PURE__ */ jsx("span", {
|
|
147
|
+
},
|
|
148
|
+
...props,
|
|
149
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:sidebar" }), /* @__PURE__ */ jsx("span", {
|
|
386
150
|
className: "sr-only",
|
|
387
151
|
children: "Toggle Sidebar"
|
|
388
|
-
})
|
|
389
|
-
|
|
390
|
-
$[8] = t3;
|
|
391
|
-
} else {
|
|
392
|
-
t2 = $[7];
|
|
393
|
-
t3 = $[8];
|
|
394
|
-
}
|
|
395
|
-
let t4;
|
|
396
|
-
if ($[9] !== className || $[10] !== props || $[11] !== t1) {
|
|
397
|
-
t4 = /* @__PURE__ */ jsxs(Button, {
|
|
398
|
-
"data-sidebar": "trigger",
|
|
399
|
-
"data-slot": "sidebar-trigger",
|
|
400
|
-
variant: "ghost",
|
|
401
|
-
size: "icon-sm",
|
|
402
|
-
className,
|
|
403
|
-
onClick: t1,
|
|
404
|
-
...props,
|
|
405
|
-
children: [t2, t3]
|
|
406
|
-
});
|
|
407
|
-
$[9] = className;
|
|
408
|
-
$[10] = props;
|
|
409
|
-
$[11] = t1;
|
|
410
|
-
$[12] = t4;
|
|
411
|
-
} else t4 = $[12];
|
|
412
|
-
return t4;
|
|
152
|
+
})]
|
|
153
|
+
});
|
|
413
154
|
}
|
|
414
|
-
function SidebarInset(
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
$[0] = t0;
|
|
421
|
-
$[1] = className;
|
|
422
|
-
$[2] = props;
|
|
423
|
-
} else {
|
|
424
|
-
className = $[1];
|
|
425
|
-
props = $[2];
|
|
426
|
-
}
|
|
427
|
-
let t1;
|
|
428
|
-
if ($[3] !== className) {
|
|
429
|
-
t1 = cn("qa-sidebar-inset border-border relative flex min-w-0 flex-1 flex-col md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className);
|
|
430
|
-
$[3] = className;
|
|
431
|
-
$[4] = t1;
|
|
432
|
-
} else t1 = $[4];
|
|
433
|
-
let t2;
|
|
434
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
435
|
-
t2 = /* @__PURE__ */ jsx("main", {
|
|
436
|
-
"data-slot": "sidebar-inset",
|
|
437
|
-
className: t1,
|
|
438
|
-
...props
|
|
439
|
-
});
|
|
440
|
-
$[5] = props;
|
|
441
|
-
$[6] = t1;
|
|
442
|
-
$[7] = t2;
|
|
443
|
-
} else t2 = $[7];
|
|
444
|
-
return t2;
|
|
155
|
+
function SidebarInset({ className, ...props }) {
|
|
156
|
+
return /* @__PURE__ */ jsx("main", {
|
|
157
|
+
"data-slot": "sidebar-inset",
|
|
158
|
+
className: cn("qa-sidebar-inset border-border relative flex min-w-0 flex-1 flex-col md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
159
|
+
...props
|
|
160
|
+
});
|
|
445
161
|
}
|
|
446
|
-
function SidebarHeader(
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
$[1] = className;
|
|
454
|
-
$[2] = props;
|
|
455
|
-
} else {
|
|
456
|
-
className = $[1];
|
|
457
|
-
props = $[2];
|
|
458
|
-
}
|
|
459
|
-
let t1;
|
|
460
|
-
if ($[3] !== className) {
|
|
461
|
-
t1 = cn("qa-sidebar-header flex h-14 flex-col gap-2 p-2", className);
|
|
462
|
-
$[3] = className;
|
|
463
|
-
$[4] = t1;
|
|
464
|
-
} else t1 = $[4];
|
|
465
|
-
let t2;
|
|
466
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
467
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
468
|
-
"data-slot": "sidebar-header",
|
|
469
|
-
"data-sidebar": "header",
|
|
470
|
-
className: t1,
|
|
471
|
-
...props
|
|
472
|
-
});
|
|
473
|
-
$[5] = props;
|
|
474
|
-
$[6] = t1;
|
|
475
|
-
$[7] = t2;
|
|
476
|
-
} else t2 = $[7];
|
|
477
|
-
return t2;
|
|
162
|
+
function SidebarHeader({ className, ...props }) {
|
|
163
|
+
return /* @__PURE__ */ jsx("div", {
|
|
164
|
+
"data-slot": "sidebar-header",
|
|
165
|
+
"data-sidebar": "header",
|
|
166
|
+
className: cn("qa-sidebar-header flex h-14 flex-col gap-2 p-2", className),
|
|
167
|
+
...props
|
|
168
|
+
});
|
|
478
169
|
}
|
|
479
|
-
function SidebarFooter(
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
$[1] = className;
|
|
487
|
-
$[2] = props;
|
|
488
|
-
} else {
|
|
489
|
-
className = $[1];
|
|
490
|
-
props = $[2];
|
|
491
|
-
}
|
|
492
|
-
let t1;
|
|
493
|
-
if ($[3] !== className) {
|
|
494
|
-
t1 = cn("qa-sidebar-footer flex flex-col gap-2 p-2", className);
|
|
495
|
-
$[3] = className;
|
|
496
|
-
$[4] = t1;
|
|
497
|
-
} else t1 = $[4];
|
|
498
|
-
let t2;
|
|
499
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
500
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
501
|
-
"data-slot": "sidebar-footer",
|
|
502
|
-
"data-sidebar": "footer",
|
|
503
|
-
className: t1,
|
|
504
|
-
...props
|
|
505
|
-
});
|
|
506
|
-
$[5] = props;
|
|
507
|
-
$[6] = t1;
|
|
508
|
-
$[7] = t2;
|
|
509
|
-
} else t2 = $[7];
|
|
510
|
-
return t2;
|
|
170
|
+
function SidebarFooter({ className, ...props }) {
|
|
171
|
+
return /* @__PURE__ */ jsx("div", {
|
|
172
|
+
"data-slot": "sidebar-footer",
|
|
173
|
+
"data-sidebar": "footer",
|
|
174
|
+
className: cn("qa-sidebar-footer flex flex-col gap-2 p-2", className),
|
|
175
|
+
...props
|
|
176
|
+
});
|
|
511
177
|
}
|
|
512
|
-
function SidebarSeparator(
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
$[1] = className;
|
|
520
|
-
$[2] = props;
|
|
521
|
-
} else {
|
|
522
|
-
className = $[1];
|
|
523
|
-
props = $[2];
|
|
524
|
-
}
|
|
525
|
-
let t1;
|
|
526
|
-
if ($[3] !== className) {
|
|
527
|
-
t1 = cn("qa-sidebar-separator bg-sidebar-border mx-2 w-full", className);
|
|
528
|
-
$[3] = className;
|
|
529
|
-
$[4] = t1;
|
|
530
|
-
} else t1 = $[4];
|
|
531
|
-
let t2;
|
|
532
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
533
|
-
t2 = /* @__PURE__ */ jsx(Separator, {
|
|
534
|
-
"data-slot": "sidebar-separator",
|
|
535
|
-
"data-sidebar": "separator",
|
|
536
|
-
className: t1,
|
|
537
|
-
...props
|
|
538
|
-
});
|
|
539
|
-
$[5] = props;
|
|
540
|
-
$[6] = t1;
|
|
541
|
-
$[7] = t2;
|
|
542
|
-
} else t2 = $[7];
|
|
543
|
-
return t2;
|
|
178
|
+
function SidebarSeparator({ className, ...props }) {
|
|
179
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
180
|
+
"data-slot": "sidebar-separator",
|
|
181
|
+
"data-sidebar": "separator",
|
|
182
|
+
className: cn("qa-sidebar-separator bg-sidebar-border mx-2 w-full", className),
|
|
183
|
+
...props
|
|
184
|
+
});
|
|
544
185
|
}
|
|
545
|
-
function SidebarContent(
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
$[1] = className;
|
|
553
|
-
$[2] = props;
|
|
554
|
-
} else {
|
|
555
|
-
className = $[1];
|
|
556
|
-
props = $[2];
|
|
557
|
-
}
|
|
558
|
-
let t1;
|
|
559
|
-
if ($[3] !== className) {
|
|
560
|
-
t1 = cn("qa-sidebar-content no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className);
|
|
561
|
-
$[3] = className;
|
|
562
|
-
$[4] = t1;
|
|
563
|
-
} else t1 = $[4];
|
|
564
|
-
let t2;
|
|
565
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
566
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
567
|
-
"data-slot": "sidebar-content",
|
|
568
|
-
"data-sidebar": "content",
|
|
569
|
-
className: t1,
|
|
570
|
-
...props
|
|
571
|
-
});
|
|
572
|
-
$[5] = props;
|
|
573
|
-
$[6] = t1;
|
|
574
|
-
$[7] = t2;
|
|
575
|
-
} else t2 = $[7];
|
|
576
|
-
return t2;
|
|
186
|
+
function SidebarContent({ className, ...props }) {
|
|
187
|
+
return /* @__PURE__ */ jsx("div", {
|
|
188
|
+
"data-slot": "sidebar-content",
|
|
189
|
+
"data-sidebar": "content",
|
|
190
|
+
className: cn("qa-sidebar-content no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
191
|
+
...props
|
|
192
|
+
});
|
|
577
193
|
}
|
|
578
|
-
function SidebarGroup(
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
$[1] = className;
|
|
586
|
-
$[2] = props;
|
|
587
|
-
} else {
|
|
588
|
-
className = $[1];
|
|
589
|
-
props = $[2];
|
|
590
|
-
}
|
|
591
|
-
let t1;
|
|
592
|
-
if ($[3] !== className) {
|
|
593
|
-
t1 = cn("qa-sidebar-group relative flex w-full min-w-0 flex-col px-2 py-1", className);
|
|
594
|
-
$[3] = className;
|
|
595
|
-
$[4] = t1;
|
|
596
|
-
} else t1 = $[4];
|
|
597
|
-
let t2;
|
|
598
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
599
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
600
|
-
"data-slot": "sidebar-group",
|
|
601
|
-
"data-sidebar": "group",
|
|
602
|
-
className: t1,
|
|
603
|
-
...props
|
|
604
|
-
});
|
|
605
|
-
$[5] = props;
|
|
606
|
-
$[6] = t1;
|
|
607
|
-
$[7] = t2;
|
|
608
|
-
} else t2 = $[7];
|
|
609
|
-
return t2;
|
|
194
|
+
function SidebarGroup({ className, ...props }) {
|
|
195
|
+
return /* @__PURE__ */ jsx("div", {
|
|
196
|
+
"data-slot": "sidebar-group",
|
|
197
|
+
"data-sidebar": "group",
|
|
198
|
+
className: cn("qa-sidebar-group relative flex w-full min-w-0 flex-col px-2 py-1", className),
|
|
199
|
+
...props
|
|
200
|
+
});
|
|
610
201
|
}
|
|
611
|
-
function SidebarGroupLabel(
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
if ($[0] !== t0) {
|
|
618
|
-
const { className, render: t4$1, ...props } = t0;
|
|
619
|
-
render = t4$1;
|
|
620
|
-
t3 = useRender;
|
|
621
|
-
t1 = "div";
|
|
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);
|
|
623
|
-
$[0] = t0;
|
|
624
|
-
$[1] = render;
|
|
625
|
-
$[2] = t1;
|
|
626
|
-
$[3] = t2;
|
|
627
|
-
$[4] = t3;
|
|
628
|
-
} else {
|
|
629
|
-
render = $[1];
|
|
630
|
-
t1 = $[2];
|
|
631
|
-
t2 = $[3];
|
|
632
|
-
t3 = $[4];
|
|
633
|
-
}
|
|
634
|
-
let t4;
|
|
635
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
636
|
-
t4 = {
|
|
202
|
+
function SidebarGroupLabel({ className, render, ...props }) {
|
|
203
|
+
return useRender({
|
|
204
|
+
defaultTagName: "div",
|
|
205
|
+
props: 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),
|
|
206
|
+
render,
|
|
207
|
+
state: {
|
|
637
208
|
slot: "sidebar-group-label",
|
|
638
209
|
sidebar: "group-label"
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
} else t4 = $[5];
|
|
642
|
-
let t5;
|
|
643
|
-
if ($[6] !== render || $[7] !== t1 || $[8] !== t2) {
|
|
644
|
-
t5 = {
|
|
645
|
-
defaultTagName: t1,
|
|
646
|
-
props: t2,
|
|
647
|
-
render,
|
|
648
|
-
state: t4
|
|
649
|
-
};
|
|
650
|
-
$[6] = render;
|
|
651
|
-
$[7] = t1;
|
|
652
|
-
$[8] = t2;
|
|
653
|
-
$[9] = t5;
|
|
654
|
-
} else t5 = $[9];
|
|
655
|
-
return t3(t5);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
656
212
|
}
|
|
657
|
-
function SidebarGroupContent(
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
$[1] = className;
|
|
665
|
-
$[2] = props;
|
|
666
|
-
} else {
|
|
667
|
-
className = $[1];
|
|
668
|
-
props = $[2];
|
|
669
|
-
}
|
|
670
|
-
let t1;
|
|
671
|
-
if ($[3] !== className) {
|
|
672
|
-
t1 = cn("qa-sidebar-group-content w-full text-xs", className);
|
|
673
|
-
$[3] = className;
|
|
674
|
-
$[4] = t1;
|
|
675
|
-
} else t1 = $[4];
|
|
676
|
-
let t2;
|
|
677
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
678
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
679
|
-
"data-slot": "sidebar-group-content",
|
|
680
|
-
"data-sidebar": "group-content",
|
|
681
|
-
className: t1,
|
|
682
|
-
...props
|
|
683
|
-
});
|
|
684
|
-
$[5] = props;
|
|
685
|
-
$[6] = t1;
|
|
686
|
-
$[7] = t2;
|
|
687
|
-
} else t2 = $[7];
|
|
688
|
-
return t2;
|
|
213
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
214
|
+
return /* @__PURE__ */ jsx("div", {
|
|
215
|
+
"data-slot": "sidebar-group-content",
|
|
216
|
+
"data-sidebar": "group-content",
|
|
217
|
+
className: cn("qa-sidebar-group-content w-full text-xs", className),
|
|
218
|
+
...props
|
|
219
|
+
});
|
|
689
220
|
}
|
|
690
|
-
function SidebarMenu(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
$[1] = className;
|
|
698
|
-
$[2] = props;
|
|
699
|
-
} else {
|
|
700
|
-
className = $[1];
|
|
701
|
-
props = $[2];
|
|
702
|
-
}
|
|
703
|
-
let t1;
|
|
704
|
-
if ($[3] !== className) {
|
|
705
|
-
t1 = cn("qa-sidebar-menu flex w-full min-w-0 flex-col gap-px", className);
|
|
706
|
-
$[3] = className;
|
|
707
|
-
$[4] = t1;
|
|
708
|
-
} else t1 = $[4];
|
|
709
|
-
let t2;
|
|
710
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
711
|
-
t2 = /* @__PURE__ */ jsx("ul", {
|
|
712
|
-
"data-slot": "sidebar-menu",
|
|
713
|
-
"data-sidebar": "menu",
|
|
714
|
-
className: t1,
|
|
715
|
-
...props
|
|
716
|
-
});
|
|
717
|
-
$[5] = props;
|
|
718
|
-
$[6] = t1;
|
|
719
|
-
$[7] = t2;
|
|
720
|
-
} else t2 = $[7];
|
|
721
|
-
return t2;
|
|
221
|
+
function SidebarMenu({ className, ...props }) {
|
|
222
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
223
|
+
"data-slot": "sidebar-menu",
|
|
224
|
+
"data-sidebar": "menu",
|
|
225
|
+
className: cn("qa-sidebar-menu flex w-full min-w-0 flex-col gap-px", className),
|
|
226
|
+
...props
|
|
227
|
+
});
|
|
722
228
|
}
|
|
723
|
-
function SidebarMenuItem(
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
$[1] = className;
|
|
731
|
-
$[2] = props;
|
|
732
|
-
} else {
|
|
733
|
-
className = $[1];
|
|
734
|
-
props = $[2];
|
|
735
|
-
}
|
|
736
|
-
let t1;
|
|
737
|
-
if ($[3] !== className) {
|
|
738
|
-
t1 = cn("qa-sidebar-menu-item group/menu-item relative", className);
|
|
739
|
-
$[3] = className;
|
|
740
|
-
$[4] = t1;
|
|
741
|
-
} else t1 = $[4];
|
|
742
|
-
let t2;
|
|
743
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
744
|
-
t2 = /* @__PURE__ */ jsx("li", {
|
|
745
|
-
"data-slot": "sidebar-menu-item",
|
|
746
|
-
"data-sidebar": "menu-item",
|
|
747
|
-
className: t1,
|
|
748
|
-
...props
|
|
749
|
-
});
|
|
750
|
-
$[5] = props;
|
|
751
|
-
$[6] = t1;
|
|
752
|
-
$[7] = t2;
|
|
753
|
-
} else t2 = $[7];
|
|
754
|
-
return t2;
|
|
229
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
230
|
+
return /* @__PURE__ */ jsx("li", {
|
|
231
|
+
"data-slot": "sidebar-menu-item",
|
|
232
|
+
"data-sidebar": "menu-item",
|
|
233
|
+
className: cn("qa-sidebar-menu-item group/menu-item relative", className),
|
|
234
|
+
...props
|
|
235
|
+
});
|
|
755
236
|
}
|
|
756
237
|
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", {
|
|
757
238
|
variants: {
|