@vinicunca/taman-ui 0.1.0
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 +95 -0
- package/dist/_virtual/_/plugin-vue/export-helper.mjs +8 -0
- package/dist/components/auth/index.d.ts +2 -0
- package/dist/components/auth/index.mjs +2 -0
- package/dist/components/auth/taman-auth-form.mjs +67 -0
- package/dist/components/auth/taman-auth-form.vue.d.ts +31 -0
- package/dist/components/back-to-top/index.mjs +2 -0
- package/dist/components/back-to-top/taman-back-to-top.mjs +70 -0
- package/dist/components/back-to-top/taman-back-to-top.vue.d.ts +18 -0
- package/dist/components/button/check-group-selection.mjs +17 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.mjs +3 -0
- package/dist/components/button/taman-button-check-group.mjs +132 -0
- package/dist/components/button/taman-button-check-group.types.d.ts +22 -0
- package/dist/components/button/taman-button-check-group.vue.d.ts +41 -0
- package/dist/components/button/taman-button-icon.mjs +105 -0
- package/dist/components/button/taman-button-icon.vue.d.ts +17 -0
- package/dist/components/descriptions/index.d.ts +4 -0
- package/dist/components/descriptions/index.mjs +3 -0
- package/dist/components/descriptions/taman-description-cell.mjs +116 -0
- package/dist/components/descriptions/taman-description-item.mjs +10 -0
- package/dist/components/descriptions/taman-description-item.vue.d.ts +5 -0
- package/dist/components/descriptions/taman-description-row.mjs +131 -0
- package/dist/components/descriptions/taman-description.mjs +78 -0
- package/dist/components/descriptions/taman-description.types.d.ts +51 -0
- package/dist/components/descriptions/taman-description.vue.d.ts +23 -0
- package/dist/components/descriptions/use-taman-description.mjs +161 -0
- package/dist/components/file-upload/index.d.ts +3 -0
- package/dist/components/file-upload/index.mjs +2 -0
- package/dist/components/file-upload/taman-file-upload.mjs +88 -0
- package/dist/components/file-upload/taman-file-upload.types.d.ts +10 -0
- package/dist/components/file-upload/taman-file-upload.vue.d.ts +21 -0
- package/dist/components/full-screen/full-screen.mjs +27 -0
- package/dist/components/full-screen/full-screen.vue.d.ts +8 -0
- package/dist/components/full-screen/index.mjs +2 -0
- package/dist/components/icon/icon.mjs +27 -0
- package/dist/components/icon/icon.vue.d.ts +9 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.mjs +2 -0
- package/dist/components/index.d.ts +34 -0
- package/dist/components/index.mjs +31 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.mjs +4 -0
- package/dist/components/input/password-strength.d.ts +7 -0
- package/dist/components/input/password-strength.mjs +21 -0
- package/dist/components/input/taman-input-currency.mjs +76 -0
- package/dist/components/input/taman-input-currency.types.d.ts +8 -0
- package/dist/components/input/taman-input-currency.vue.d.ts +15 -0
- package/dist/components/input/taman-input-password.mjs +99 -0
- package/dist/components/input/taman-input-password.vue.d.ts +17 -0
- package/dist/components/input-date/format-calendar-input-value.mjs +26 -0
- package/dist/components/input-date/index.d.ts +3 -0
- package/dist/components/input-date/index.mjs +2 -0
- package/dist/components/input-date/taman-input-date.mjs +116 -0
- package/dist/components/input-date/taman-input-date.types.d.ts +14 -0
- package/dist/components/input-date/taman-input-date.vue.d.ts +21 -0
- package/dist/components/loading/index.d.ts +3 -0
- package/dist/components/loading/index.mjs +2 -0
- package/dist/components/loading/taman-loading.mjs +64 -0
- package/dist/components/loading/taman-loading.vue.d.ts +25 -0
- package/dist/components/loading/types.d.ts +13 -0
- package/dist/components/logo/index.mjs +2 -0
- package/dist/components/logo/taman-logo.mjs +60 -0
- package/dist/components/logo/taman-logo.vue.d.ts +32 -0
- package/dist/components/render-content/index.d.ts +2 -0
- package/dist/components/render-content/index.mjs +2 -0
- package/dist/components/render-content/render-content.mjs +42 -0
- package/dist/components/render-content/render-content.vue.d.ts +31 -0
- package/dist/components/scrollbar/index.d.ts +2 -0
- package/dist/components/scrollbar/index.mjs +2 -0
- package/dist/components/scrollbar/scrollbar.mjs +136 -0
- package/dist/components/scrollbar/scrollbar.vue.d.ts +50 -0
- package/dist/form/components/form-actions.mjs +151 -0
- package/dist/form/components/form-field-array.mjs +154 -0
- package/dist/form/components/form-field-array.types.d.ts +18 -0
- package/dist/form/form-render/form-render-field-collapsible.mjs +32 -0
- package/dist/form/form-render/form-render-field-control.mjs +44 -0
- package/dist/form/form-render/form-render-form-field.mjs +408 -0
- package/dist/form/form-render/form-render-form-label.mjs +46 -0
- package/dist/form/form-render/form-render-form.mjs +163 -0
- package/dist/form/form-render/form-render-group.mjs +89 -0
- package/dist/form/form-render/form-render.context.mjs +10 -0
- package/dist/form/form-render/form-render.dependencies.mjs +101 -0
- package/dist/form/form-render/form-render.helper.mjs +31 -0
- package/dist/form/form-render/form-render.schema.mjs +209 -0
- package/dist/form/form-render/index.mjs +4 -0
- package/dist/form/form.api.d.ts +54 -0
- package/dist/form/form.api.mjs +324 -0
- package/dist/form/form.built-ins.d.ts +36 -0
- package/dist/form/form.built-ins.mjs +48 -0
- package/dist/form/form.codec.d.ts +17 -0
- package/dist/form/form.codec.mjs +45 -0
- package/dist/form/form.config.d.ts +6 -0
- package/dist/form/form.config.mjs +43 -0
- package/dist/form/form.empty-value.d.ts +4 -0
- package/dist/form/form.empty-value.mjs +20 -0
- package/dist/form/form.field-name.mjs +25 -0
- package/dist/form/form.rule-registry.mjs +10 -0
- package/dist/form/form.runtime-field.mjs +56 -0
- package/dist/form/form.runtime.mjs +235 -0
- package/dist/form/form.schema-defaults.mjs +36 -0
- package/dist/form/form.types.d.ts +315 -0
- package/dist/form/form.use-delayed-flag.mjs +35 -0
- package/dist/form/form.use-form-context.mjs +44 -0
- package/dist/form/form.use-taman-form.d.ts +7 -0
- package/dist/form/form.use-taman-form.mjs +36 -0
- package/dist/form/index.d.ts +8 -0
- package/dist/form/index.mjs +6 -0
- package/dist/form/taman-use-form.mjs +146 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.mjs +56 -0
- package/dist/layout/components/index.mjs +6 -0
- package/dist/layout/components/taman-core-button-collapse.mjs +38 -0
- package/dist/layout/components/taman-core-button-fixed.mjs +29 -0
- package/dist/layout/components/taman-core-layout-content.mjs +50 -0
- package/dist/layout/components/taman-core-layout-footer.mjs +38 -0
- package/dist/layout/components/taman-core-layout-header.mjs +48 -0
- package/dist/layout/components/taman-core-layout-sidebar.mjs +319 -0
- package/dist/layout/components/taman-core-layout-tabbar.mjs +21 -0
- package/dist/layout/composables/use-layout.mjs +31 -0
- package/dist/layout/composables/use-sidebar-drag.mjs +103 -0
- package/dist/layout/header-scroll-state.mjs +9 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.mjs +2 -0
- package/dist/layout/taman-core-layout.d.ts +41 -0
- package/dist/layout/taman-core-layout.mjs +603 -0
- package/dist/layout/taman-core-layout.vue.d.ts +99 -0
- package/dist/menu/components/collapse-transition.mjs +82 -0
- package/dist/menu/components/index.mjs +5 -0
- package/dist/menu/components/normal-menu/index.d.ts +3 -0
- package/dist/menu/components/normal-menu/index.mjs +2 -0
- package/dist/menu/components/normal-menu/normal-menu.d.ts +11 -0
- package/dist/menu/components/normal-menu/normal-menu.mjs +50 -0
- package/dist/menu/components/normal-menu/normal-menu.vue.d.ts +19 -0
- package/dist/menu/components/taman-menu-badge-dot.mjs +23 -0
- package/dist/menu/components/taman-menu-badge.mjs +49 -0
- package/dist/menu/components/taman-menu-badge.vue.d.ts +9 -0
- package/dist/menu/components/taman-menu-item.mjs +124 -0
- package/dist/menu/components/taman-menu-root.mjs +250 -0
- package/dist/menu/components/taman-menu-sub-menu-content.mjs +83 -0
- package/dist/menu/components/taman-menu-sub-menu.mjs +216 -0
- package/dist/menu/composables/index.mjs +3 -0
- package/dist/menu/composables/use-menu-context.mjs +36 -0
- package/dist/menu/composables/use-menu-scroll.mjs +23 -0
- package/dist/menu/composables/use-menu.mjs +33 -0
- package/dist/menu/index.d.ts +7 -0
- package/dist/menu/index.mjs +5 -0
- package/dist/menu/menu.constants.mjs +5 -0
- package/dist/menu/menu.types.d.ts +63 -0
- package/dist/menu/menu.utils.mjs +27 -0
- package/dist/menu/taman-menu.mjs +41 -0
- package/dist/menu/taman-menu.vue.d.ts +12 -0
- package/dist/menu/taman-sub-menu.mjs +75 -0
- package/dist/popup/alert/alert-builder.d.ts +8 -0
- package/dist/popup/alert/alert-builder.mjs +98 -0
- package/dist/popup/alert/alert-overlay.mjs +55 -0
- package/dist/popup/alert/alert.d.ts +43 -0
- package/dist/popup/alert/alert.mjs +10 -0
- package/dist/popup/alert/alert.vue.d.ts +26 -0
- package/dist/popup/alert/alert2.mjs +238 -0
- package/dist/popup/alert/index.d.ts +4 -0
- package/dist/popup/alert/index.mjs +4 -0
- package/dist/popup/dialog/dialog.api.d.ts +23 -0
- package/dist/popup/dialog/dialog.api.mjs +133 -0
- package/dist/popup/dialog/dialog.mjs +336 -0
- package/dist/popup/dialog/dialog.types.d.ts +60 -0
- package/dist/popup/dialog/dialog.vue.d.ts +46 -0
- package/dist/popup/dialog/index.d.ts +4 -0
- package/dist/popup/dialog/index.mjs +3 -0
- package/dist/popup/dialog/use-dialog-draggable.mjs +93 -0
- package/dist/popup/dialog/use-taman-dialog.d.ts +13 -0
- package/dist/popup/dialog/use-taman-dialog.mjs +106 -0
- package/dist/popup/drawer/drawer.api.d.ts +23 -0
- package/dist/popup/drawer/drawer.api.mjs +124 -0
- package/dist/popup/drawer/drawer.mjs +277 -0
- package/dist/popup/drawer/drawer.types.d.ts +56 -0
- package/dist/popup/drawer/drawer.vue.d.ts +47 -0
- package/dist/popup/drawer/index.d.ts +4 -0
- package/dist/popup/drawer/index.mjs +3 -0
- package/dist/popup/drawer/use-taman-drawer.d.ts +13 -0
- package/dist/popup/drawer/use-taman-drawer.mjs +109 -0
- package/dist/popup/index.d.ts +13 -0
- package/dist/popup/index.mjs +11 -0
- package/dist/tabs/components/index.mjs +2 -0
- package/dist/tabs/components/taman-tabs.mjs +158 -0
- package/dist/tabs/components/widgets/index.d.ts +4 -0
- package/dist/tabs/components/widgets/index.mjs +4 -0
- package/dist/tabs/components/widgets/tool-more.mjs +45 -0
- package/dist/tabs/components/widgets/tool-more.vue.d.ts +7 -0
- package/dist/tabs/components/widgets/tool-refresh.mjs +25 -0
- package/dist/tabs/components/widgets/tool-refresh.vue.d.ts +9 -0
- package/dist/tabs/components/widgets/tool-screen.mjs +29 -0
- package/dist/tabs/components/widgets/tool-screen.vue.d.ts +12 -0
- package/dist/tabs/index.d.ts +8 -0
- package/dist/tabs/index.mjs +6 -0
- package/dist/tabs/strict-context-menu.d.ts +10 -0
- package/dist/tabs/tabs.types.d.ts +30 -0
- package/dist/tabs/taman-tabs-view.mjs +101 -0
- package/dist/tabs/taman-tabs-view.vue.d.ts +18 -0
- package/dist/tabs/use-tabs-drag.mjs +69 -0
- package/dist/tabs/use-tabs-view-scroll.mjs +114 -0
- package/dist/ui/alert-dialog/alert-dialog-action.mjs +21 -0
- package/dist/ui/alert-dialog/alert-dialog-action.vue.d.ts +16 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.mjs +21 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.vue.d.ts +16 -0
- package/dist/ui/alert-dialog/alert-dialog-content.mjs +111 -0
- package/dist/ui/alert-dialog/alert-dialog-content.vue.d.ts +49 -0
- package/dist/ui/alert-dialog/alert-dialog-description.mjs +30 -0
- package/dist/ui/alert-dialog/alert-dialog-description.vue.d.ts +20 -0
- package/dist/ui/alert-dialog/alert-dialog-footer.mjs +14 -0
- package/dist/ui/alert-dialog/alert-dialog-footer.vue.d.ts +15 -0
- package/dist/ui/alert-dialog/alert-dialog-header.mjs +14 -0
- package/dist/ui/alert-dialog/alert-dialog-header.vue.d.ts +15 -0
- package/dist/ui/alert-dialog/alert-dialog-overlay.mjs +29 -0
- package/dist/ui/alert-dialog/alert-dialog-root.mjs +23 -0
- package/dist/ui/alert-dialog/alert-dialog-root.vue.d.ts +23 -0
- package/dist/ui/alert-dialog/alert-dialog-title.mjs +30 -0
- package/dist/ui/alert-dialog/alert-dialog-title.vue.d.ts +20 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.mjs +21 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.vue.d.ts +16 -0
- package/dist/ui/alert-dialog/index.d.ts +10 -0
- package/dist/ui/alert-dialog/index.mjs +10 -0
- package/dist/ui/dialog/dialog-close.mjs +21 -0
- package/dist/ui/dialog/dialog-close.vue.d.ts +16 -0
- package/dist/ui/dialog/dialog-content.mjs +111 -0
- package/dist/ui/dialog/dialog-content.vue.d.ts +51 -0
- package/dist/ui/dialog/dialog-description.mjs +31 -0
- package/dist/ui/dialog/dialog-description.vue.d.ts +20 -0
- package/dist/ui/dialog/dialog-footer.mjs +14 -0
- package/dist/ui/dialog/dialog-footer.vue.d.ts +15 -0
- package/dist/ui/dialog/dialog-header.mjs +14 -0
- package/dist/ui/dialog/dialog-header.vue.d.ts +15 -0
- package/dist/ui/dialog/dialog-overlay.mjs +34 -0
- package/dist/ui/dialog/dialog-overlay.vue.d.ts +14 -0
- package/dist/ui/dialog/dialog-root.mjs +24 -0
- package/dist/ui/dialog/dialog-root.vue.d.ts +23 -0
- package/dist/ui/dialog/dialog-title.mjs +31 -0
- package/dist/ui/dialog/dialog-title.vue.d.ts +20 -0
- package/dist/ui/dialog/dialog-trigger.mjs +21 -0
- package/dist/ui/dialog/dialog-trigger.vue.d.ts +16 -0
- package/dist/ui/dialog/index.d.ts +10 -0
- package/dist/ui/dialog/index.mjs +10 -0
- package/dist/ui/dialog/use-dialog-state-events.mjs +60 -0
- package/dist/ui/form/form-control.mjs +27 -0
- package/dist/ui/form/form-control.vue.d.ts +15 -0
- package/dist/ui/form/form-description.mjs +27 -0
- package/dist/ui/form/form-description.vue.d.ts +19 -0
- package/dist/ui/form/form-field.mjs +37 -0
- package/dist/ui/form/form-field.vue.d.ts +27 -0
- package/dist/ui/form/form-item.mjs +27 -0
- package/dist/ui/form/form-item.vue.d.ts +19 -0
- package/dist/ui/form/form-label.mjs +41 -0
- package/dist/ui/form/form-label.vue.d.ts +20 -0
- package/dist/ui/form/form-message.mjs +28 -0
- package/dist/ui/form/form-message.vue.d.ts +9 -0
- package/dist/ui/form/index.d.ts +8 -0
- package/dist/ui/form/index.mjs +8 -0
- package/dist/ui/form/injection-keys.d.ts +13 -0
- package/dist/ui/form/injection-keys.mjs +5 -0
- package/dist/ui/form/use-form-field.mjs +27 -0
- package/dist/ui/index.d.ts +42 -0
- package/dist/ui/index.mjs +42 -0
- package/dist/ui/label/index.d.ts +2 -0
- package/dist/ui/label/index.mjs +2 -0
- package/dist/ui/label/label.mjs +31 -0
- package/dist/ui/label/label.vue.d.ts +20 -0
- package/dist/ui/scroll-area/index.d.ts +3 -0
- package/dist/ui/scroll-area/index.mjs +3 -0
- package/dist/ui/scroll-area/scroll-area.mjs +47 -0
- package/dist/ui/scroll-area/scroll-area.vue.d.ts +21 -0
- package/dist/ui/scroll-area/scroll-bar.mjs +38 -0
- package/dist/ui/scroll-area/scroll-bar.vue.d.ts +12 -0
- package/dist/ui/sheet/index.d.ts +8 -0
- package/dist/ui/sheet/index.mjs +8 -0
- package/dist/ui/sheet/sheet-close.mjs +21 -0
- package/dist/ui/sheet/sheet-close.vue.d.ts +16 -0
- package/dist/ui/sheet/sheet-content.mjs +105 -0
- package/dist/ui/sheet/sheet-content.vue.d.ts +48 -0
- package/dist/ui/sheet/sheet-description.mjs +30 -0
- package/dist/ui/sheet/sheet-description.vue.d.ts +20 -0
- package/dist/ui/sheet/sheet-footer.mjs +14 -0
- package/dist/ui/sheet/sheet-footer.vue.d.ts +15 -0
- package/dist/ui/sheet/sheet-header.mjs +14 -0
- package/dist/ui/sheet/sheet-header.vue.d.ts +15 -0
- package/dist/ui/sheet/sheet-overlay.mjs +32 -0
- package/dist/ui/sheet/sheet-root.mjs +24 -0
- package/dist/ui/sheet/sheet-root.vue.d.ts +23 -0
- package/dist/ui/sheet/sheet-title.mjs +31 -0
- package/dist/ui/sheet/sheet-title.vue.d.ts +20 -0
- package/dist/ui/sheet/sheet.variants.d.ts +27 -0
- package/dist/ui/sheet/sheet.variants.mjs +12 -0
- package/dist/unocss/content.d.ts +4 -0
- package/dist/unocss/content.mjs +9 -0
- package/dist/unocss/index.d.ts +2 -0
- package/dist/unocss/index.mjs +2 -0
- package/package.json +78 -0
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
import _sfc_main$1 from "../components/button/taman-button-icon.mjs";
|
|
2
|
+
import "../index.mjs";
|
|
3
|
+
import _sfc_main$2 from "./components/taman-core-layout-content.mjs";
|
|
4
|
+
import _sfc_main$3 from "./components/taman-core-layout-footer.mjs";
|
|
5
|
+
import _sfc_main$4 from "./components/taman-core-layout-header.mjs";
|
|
6
|
+
import _sfc_main$5 from "./components/taman-core-layout-sidebar.mjs";
|
|
7
|
+
import _sfc_main$6 from "./components/taman-core-layout-tabbar.mjs";
|
|
8
|
+
import "./components/index.mjs";
|
|
9
|
+
import { useLayout } from "./composables/use-layout.mjs";
|
|
10
|
+
import { resolveHeaderHiddenOnScroll } from "./header-scroll-state.mjs";
|
|
11
|
+
import { Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
12
|
+
import { useEventListener, useScroll } from "@vueuse/core";
|
|
13
|
+
import { SCROLL_FIXED_CLASS, useLayoutFooterStyle, useLayoutHeaderStyle, useLayoutViewportHeight } from "@vinicunca/taman-core/composables";
|
|
14
|
+
import { ELEMENT_ID_LAYOUT_SCROLL, ELEMENT_ID_MAIN_CONTENT } from "@vinicunca/taman-core/constants";
|
|
15
|
+
//#region src/layout/taman-core-layout.vue
|
|
16
|
+
const _hoisted_1 = [
|
|
17
|
+
"data-layout",
|
|
18
|
+
"data-mobile",
|
|
19
|
+
"data-sidebar-collapsed"
|
|
20
|
+
];
|
|
21
|
+
const _hoisted_2 = ["id"];
|
|
22
|
+
const HEADER_TRIGGER_DISTANCE = 12;
|
|
23
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
24
|
+
name: "TamanCoreLayout",
|
|
25
|
+
__name: "taman-core-layout",
|
|
26
|
+
props: /*@__PURE__*/ mergeModels({
|
|
27
|
+
contentCompact: { default: "wide" },
|
|
28
|
+
contentCompactWidth: { default: 1200 },
|
|
29
|
+
contentPadding: { default: 0 },
|
|
30
|
+
contentPaddingBottom: { default: 0 },
|
|
31
|
+
contentPaddingLeft: { default: 0 },
|
|
32
|
+
contentPaddingRight: { default: 0 },
|
|
33
|
+
contentPaddingTop: { default: 0 },
|
|
34
|
+
footerEnable: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
38
|
+
footerFixed: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true
|
|
41
|
+
},
|
|
42
|
+
footerHeight: { default: 32 },
|
|
43
|
+
headerHeight: { default: 50 },
|
|
44
|
+
headerHidden: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
headerMode: { default: "fixed" },
|
|
49
|
+
headerTheme: {},
|
|
50
|
+
headerToggleSidebarButton: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
headerVisible: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
isMobile: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
layout: { default: "sidebar-nav" },
|
|
63
|
+
sidebarCollapse: { type: Boolean },
|
|
64
|
+
sidebarCollapsedButton: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
68
|
+
sidebarCollapseShowTitle: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false
|
|
71
|
+
},
|
|
72
|
+
sidebarEnable: { type: Boolean },
|
|
73
|
+
sidebarExtraCollapsedWidth: { default: 60 },
|
|
74
|
+
sidebarExtraTitleHeight: {},
|
|
75
|
+
sidebarFixedButton: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: true
|
|
78
|
+
},
|
|
79
|
+
sidebarHidden: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
83
|
+
sidebarLogoVisible: { type: Boolean },
|
|
84
|
+
sidebarMixedWidth: { default: 80 },
|
|
85
|
+
sidebarTheme: { default: "dark" },
|
|
86
|
+
sidebarThemeSub: { default: "dark" },
|
|
87
|
+
sidebarWidth: { default: 180 },
|
|
88
|
+
sideCollapseWidth: { default: 60 },
|
|
89
|
+
tabbarEnable: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: true
|
|
92
|
+
},
|
|
93
|
+
tabbarHeight: { default: 40 },
|
|
94
|
+
zIndex: { default: 200 }
|
|
95
|
+
}, {
|
|
96
|
+
"sidebarDraggable": {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: true
|
|
99
|
+
},
|
|
100
|
+
"sidebarDraggableModifiers": {},
|
|
101
|
+
"sidebarCollapse": {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: false
|
|
104
|
+
},
|
|
105
|
+
"sidebarCollapseModifiers": {},
|
|
106
|
+
"sidebarExtraVisible": { type: Boolean },
|
|
107
|
+
"sidebarExtraVisibleModifiers": {},
|
|
108
|
+
"sidebarExtraCollapse": {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
"sidebarExtraCollapseModifiers": {},
|
|
113
|
+
"sidebarExpandOnHover": {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: false
|
|
116
|
+
},
|
|
117
|
+
"sidebarExpandOnHoverModifiers": {},
|
|
118
|
+
"sidebarEnable": {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: true
|
|
121
|
+
},
|
|
122
|
+
"sidebarEnableModifiers": {}
|
|
123
|
+
}),
|
|
124
|
+
emits: /*@__PURE__*/ mergeModels([
|
|
125
|
+
"sideMouseLeave",
|
|
126
|
+
"toggleSidebar",
|
|
127
|
+
"update:sidebarWidth"
|
|
128
|
+
], [
|
|
129
|
+
"update:sidebarDraggable",
|
|
130
|
+
"update:sidebarCollapse",
|
|
131
|
+
"update:sidebarExtraVisible",
|
|
132
|
+
"update:sidebarExtraCollapse",
|
|
133
|
+
"update:sidebarExpandOnHover",
|
|
134
|
+
"update:sidebarEnable"
|
|
135
|
+
]),
|
|
136
|
+
setup(__props, { emit: __emit }) {
|
|
137
|
+
const props = __props;
|
|
138
|
+
const emits = __emit;
|
|
139
|
+
const sidebarDraggable = useModel(__props, "sidebarDraggable");
|
|
140
|
+
const sidebarCollapse = useModel(__props, "sidebarCollapse");
|
|
141
|
+
const sidebarExtraVisible = useModel(__props, "sidebarExtraVisible");
|
|
142
|
+
const sidebarExtraCollapse = useModel(__props, "sidebarExtraCollapse");
|
|
143
|
+
const sidebarExpandOnHover = useModel(__props, "sidebarExpandOnHover");
|
|
144
|
+
const sidebarEnable = useModel(__props, "sidebarEnable");
|
|
145
|
+
const sidebarExpandOnHovering = ref(false);
|
|
146
|
+
const mobileSidebarOpen = ref(false);
|
|
147
|
+
const headerIsHidden = ref(false);
|
|
148
|
+
const mainRef = useTemplateRef("mainRef");
|
|
149
|
+
const contentRef = useTemplateRef("contentRef");
|
|
150
|
+
let lastMouseY = null;
|
|
151
|
+
const { arrivedState, directions, y: scrollY } = useScroll(contentRef, { onScroll: handleLayoutScroll });
|
|
152
|
+
useLayoutViewportHeight();
|
|
153
|
+
const { setLayoutHeaderHeight } = useLayoutHeaderStyle();
|
|
154
|
+
const { setLayoutFooterHeight } = useLayoutFooterStyle();
|
|
155
|
+
const { currentLayout, isFullContent, isHeaderMixedNav, isHeaderNav, isMixedNav, isSidebarMixedNav } = useLayout(props);
|
|
156
|
+
/**
|
|
157
|
+
* Whether the header auto-hides
|
|
158
|
+
*/
|
|
159
|
+
const isHeaderAutoActive = computed(() => props.headerMode === "auto" && !isMixedNav.value && !isFullContent.value);
|
|
160
|
+
const isHeaderOverlayModeActive = computed(() => (props.headerMode === "auto" || props.headerMode === "auto-scroll") && !isMixedNav.value && !isFullContent.value);
|
|
161
|
+
const headerHasShadow = computed(() => scrollY.value > 20);
|
|
162
|
+
const headerWrapperHeight = computed(() => {
|
|
163
|
+
let height = 0;
|
|
164
|
+
if (props.headerVisible && !props.headerHidden) height += props.headerHeight;
|
|
165
|
+
if (props.tabbarEnable) height += props.tabbarHeight;
|
|
166
|
+
return height;
|
|
167
|
+
});
|
|
168
|
+
const getSideCollapseWidth = computed(() => {
|
|
169
|
+
const { sidebarCollapseShowTitle, sidebarExtraCollapsedWidth, sideCollapseWidth } = props;
|
|
170
|
+
return sidebarCollapseShowTitle || isSidebarMixedNav.value || isHeaderMixedNav.value ? sidebarExtraCollapsedWidth : sideCollapseWidth;
|
|
171
|
+
});
|
|
172
|
+
const activeSidebarCollapse = computed({
|
|
173
|
+
get: () => props.isMobile ? !mobileSidebarOpen.value : sidebarCollapse.value,
|
|
174
|
+
set: (value) => {
|
|
175
|
+
if (props.isMobile) {
|
|
176
|
+
mobileSidebarOpen.value = !value;
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
sidebarCollapse.value = value;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
/**
|
|
183
|
+
* Whether the sidebar region is visible
|
|
184
|
+
*/
|
|
185
|
+
const sidebarEnableState = computed(() => {
|
|
186
|
+
return !isHeaderNav.value && sidebarEnable.value;
|
|
187
|
+
});
|
|
188
|
+
/**
|
|
189
|
+
* Sidebar top offset
|
|
190
|
+
*/
|
|
191
|
+
const sidebarMarginTop = computed(() => {
|
|
192
|
+
const { headerHeight, isMobile } = props;
|
|
193
|
+
return isMixedNav.value && !isMobile ? headerHeight : 0;
|
|
194
|
+
});
|
|
195
|
+
/**
|
|
196
|
+
* Computed sidebar width
|
|
197
|
+
*/
|
|
198
|
+
const getSidebarWidth = computed(() => {
|
|
199
|
+
const { isMobile, sidebarHidden, sidebarMixedWidth, sidebarWidth } = props;
|
|
200
|
+
let width = 0;
|
|
201
|
+
if (sidebarHidden) return width;
|
|
202
|
+
if (!sidebarEnableState.value || sidebarHidden && !isSidebarMixedNav.value && !isMixedNav.value && !isHeaderMixedNav.value) return width;
|
|
203
|
+
if ((isHeaderMixedNav.value || isSidebarMixedNav.value) && !isMobile) width = sidebarMixedWidth;
|
|
204
|
+
else if (activeSidebarCollapse.value) width = isMobile ? 0 : getSideCollapseWidth.value;
|
|
205
|
+
else width = sidebarWidth;
|
|
206
|
+
return width;
|
|
207
|
+
});
|
|
208
|
+
/**
|
|
209
|
+
* Extra sidebar panel width
|
|
210
|
+
*/
|
|
211
|
+
const sidebarExtraWidth = computed(() => {
|
|
212
|
+
const { sidebarExtraCollapsedWidth, sidebarWidth } = props;
|
|
213
|
+
return sidebarExtraCollapse.value ? sidebarExtraCollapsedWidth : sidebarWidth;
|
|
214
|
+
});
|
|
215
|
+
/**
|
|
216
|
+
* Whether a sidebar layout is active (including mixed sidebar)
|
|
217
|
+
*/
|
|
218
|
+
const isSideMode = computed(() => currentLayout.value === "mixed-nav" || currentLayout.value === "sidebar-mixed-nav" || currentLayout.value === "sidebar-nav" || currentLayout.value === "header-mixed-nav" || currentLayout.value === "header-sidebar-nav");
|
|
219
|
+
/**
|
|
220
|
+
* Whether the header is fixed
|
|
221
|
+
*/
|
|
222
|
+
const headerFixed = computed(() => {
|
|
223
|
+
const { headerMode } = props;
|
|
224
|
+
return isMixedNav.value || headerMode === "fixed" || headerMode === "auto-scroll" || headerMode === "auto";
|
|
225
|
+
});
|
|
226
|
+
const showSidebar = computed(() => {
|
|
227
|
+
return isSideMode.value && sidebarEnable.value && !props.sidebarHidden;
|
|
228
|
+
});
|
|
229
|
+
/**
|
|
230
|
+
* Overlay mask visibility
|
|
231
|
+
*/
|
|
232
|
+
const maskVisible = computed(() => !activeSidebarCollapse.value && props.isMobile);
|
|
233
|
+
const mainStyle = computed(() => {
|
|
234
|
+
let width = "100%";
|
|
235
|
+
let sidebarAndExtraWidth = "unset";
|
|
236
|
+
if (headerFixed.value && currentLayout.value !== "header-nav" && currentLayout.value !== "mixed-nav" && currentLayout.value !== "header-sidebar-nav" && showSidebar.value && !props.isMobile) {
|
|
237
|
+
if ((isSidebarMixedNav.value || isHeaderMixedNav.value) && sidebarExpandOnHover.value && sidebarExtraVisible.value) {
|
|
238
|
+
sidebarAndExtraWidth = `${props.sidebarMixedWidth + (sidebarExtraCollapse.value ? props.sidebarExtraCollapsedWidth : props.sidebarWidth)}px`;
|
|
239
|
+
width = `calc(100% - ${sidebarAndExtraWidth})`;
|
|
240
|
+
} else {
|
|
241
|
+
let sidebarWidth = getSidebarWidth.value;
|
|
242
|
+
if (sidebarExpandOnHovering.value && !sidebarExpandOnHover.value) sidebarWidth = isSidebarMixedNav.value || isHeaderMixedNav.value ? props.sidebarMixedWidth : getSideCollapseWidth.value;
|
|
243
|
+
sidebarAndExtraWidth = `${sidebarWidth}px`;
|
|
244
|
+
width = `calc(100% - ${sidebarAndExtraWidth})`;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
sidebarAndExtraWidth,
|
|
249
|
+
width
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
const tabbarStyle = computed(() => {
|
|
253
|
+
let width;
|
|
254
|
+
let marginLeft = 0;
|
|
255
|
+
if (!isMixedNav.value || props.sidebarHidden) width = "100%";
|
|
256
|
+
else if (sidebarEnable.value) {
|
|
257
|
+
const onHoveringWidth = sidebarExpandOnHover.value ? props.sidebarWidth : getSideCollapseWidth.value;
|
|
258
|
+
marginLeft = activeSidebarCollapse.value ? getSideCollapseWidth.value : onHoveringWidth;
|
|
259
|
+
width = `calc(100% - ${activeSidebarCollapse.value ? getSidebarWidth.value : onHoveringWidth}px)`;
|
|
260
|
+
} else width = "100%";
|
|
261
|
+
return {
|
|
262
|
+
marginLeft: `${marginLeft}px`,
|
|
263
|
+
width
|
|
264
|
+
};
|
|
265
|
+
});
|
|
266
|
+
const layoutScrollStyle = computed(() => {
|
|
267
|
+
const fixed = headerFixed.value;
|
|
268
|
+
if (!fixed) return {
|
|
269
|
+
marginTop: 0,
|
|
270
|
+
paddingTop: 0
|
|
271
|
+
};
|
|
272
|
+
if (isHeaderOverlayModeActive.value) return {
|
|
273
|
+
marginTop: 0,
|
|
274
|
+
paddingTop: isFullContent.value ? 0 : `${headerWrapperHeight.value}px`
|
|
275
|
+
};
|
|
276
|
+
return {
|
|
277
|
+
marginTop: fixed && !isFullContent.value && !headerIsHidden.value && (!isHeaderAutoActive.value || scrollY.value < headerWrapperHeight.value) ? `${headerWrapperHeight.value}px` : 0,
|
|
278
|
+
paddingTop: 0
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
const contentStyle = computed(() => {
|
|
282
|
+
const { footerEnable, footerFixed, footerHeight } = props;
|
|
283
|
+
return {
|
|
284
|
+
minHeight: footerEnable && !footerFixed ? void 0 : 0,
|
|
285
|
+
paddingBottom: `${footerEnable && footerFixed ? footerHeight : 0}px`
|
|
286
|
+
};
|
|
287
|
+
});
|
|
288
|
+
const headerZIndex = computed(() => {
|
|
289
|
+
const { zIndex } = props;
|
|
290
|
+
return zIndex + (isMixedNav.value ? 1 : 0);
|
|
291
|
+
});
|
|
292
|
+
const headerWrapperStyle = computed(() => {
|
|
293
|
+
const fixed = headerFixed.value;
|
|
294
|
+
const hidden = headerIsHidden.value || isFullContent.value;
|
|
295
|
+
return {
|
|
296
|
+
"height": isFullContent.value ? "0" : `${headerWrapperHeight.value}px`,
|
|
297
|
+
"left": isMixedNav.value ? 0 : mainStyle.value.sidebarAndExtraWidth,
|
|
298
|
+
"position": fixed ? "fixed" : "static",
|
|
299
|
+
"top": 0,
|
|
300
|
+
"transform": fixed ? `translate3d(0, ${hidden ? "-100%" : "0"}, 0)` : void 0,
|
|
301
|
+
"transitionDuration": fixed ? void 0 : "0ms",
|
|
302
|
+
"width": mainStyle.value.width,
|
|
303
|
+
"willChange": fixed ? "transform" : void 0,
|
|
304
|
+
"z-index": headerZIndex.value
|
|
305
|
+
};
|
|
306
|
+
});
|
|
307
|
+
/**
|
|
308
|
+
* Sidebar z-index
|
|
309
|
+
*/
|
|
310
|
+
const sidebarZIndex = computed(() => {
|
|
311
|
+
const { isMobile, zIndex } = props;
|
|
312
|
+
let offset = isMobile || isSideMode.value ? 1 : -1;
|
|
313
|
+
if (isMixedNav.value) offset += 1;
|
|
314
|
+
return zIndex + offset;
|
|
315
|
+
});
|
|
316
|
+
const footerWidth = computed(() => {
|
|
317
|
+
if (!props.footerFixed) return "100%";
|
|
318
|
+
return mainStyle.value.width;
|
|
319
|
+
});
|
|
320
|
+
const maskStyle = computed(() => {
|
|
321
|
+
return { zIndex: props.zIndex };
|
|
322
|
+
});
|
|
323
|
+
/**
|
|
324
|
+
* Whether the sidebar logo region is displayed
|
|
325
|
+
*/
|
|
326
|
+
const sidebarHeaderHeight = computed(() => {
|
|
327
|
+
if (isMixedNav.value || !props.sidebarLogoVisible) return 0;
|
|
328
|
+
return props.headerHeight;
|
|
329
|
+
});
|
|
330
|
+
const showHeaderToggleButton = computed(() => {
|
|
331
|
+
return props.isMobile || props.headerToggleSidebarButton && isSideMode.value && !isSidebarMixedNav.value && !isMixedNav.value && !props.isMobile;
|
|
332
|
+
});
|
|
333
|
+
const showHeaderLogo = computed(() => {
|
|
334
|
+
return !isSideMode.value || isMixedNav.value || props.isMobile;
|
|
335
|
+
});
|
|
336
|
+
watch(() => props.isMobile, (isMobile) => {
|
|
337
|
+
if (isMobile) mobileSidebarOpen.value = false;
|
|
338
|
+
}, { immediate: true });
|
|
339
|
+
watch([() => headerWrapperHeight.value, () => isFullContent.value], ([height]) => {
|
|
340
|
+
setLayoutHeaderHeight(isFullContent.value ? 0 : height);
|
|
341
|
+
}, { immediate: true });
|
|
342
|
+
watch(() => props.footerHeight, (height) => {
|
|
343
|
+
setLayoutFooterHeight(height);
|
|
344
|
+
}, { immediate: true });
|
|
345
|
+
watch([
|
|
346
|
+
() => props.headerMode,
|
|
347
|
+
() => isMixedNav.value,
|
|
348
|
+
() => isFullContent.value
|
|
349
|
+
], () => {
|
|
350
|
+
headerIsHidden.value = false;
|
|
351
|
+
});
|
|
352
|
+
useEventListener(mainRef, "mousemove", handleHeaderMouseMove, { passive: true });
|
|
353
|
+
useEventListener(mainRef, "wheel", handleLayoutWheel, { passive: true });
|
|
354
|
+
function handleLayoutWheel(event) {
|
|
355
|
+
lastMouseY = event.clientY;
|
|
356
|
+
}
|
|
357
|
+
function handleHeaderMouseMove(event) {
|
|
358
|
+
lastMouseY = event.clientY;
|
|
359
|
+
if (!isHeaderAutoActive.value) return;
|
|
360
|
+
updateHeaderVisibilityFromMouse(lastMouseY);
|
|
361
|
+
}
|
|
362
|
+
function updateHeaderVisibilityFromMouse(mouseY) {
|
|
363
|
+
if (arrivedState.top || scrollY.value < headerWrapperHeight.value) {
|
|
364
|
+
headerIsHidden.value = false;
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
if (mouseY === null) return;
|
|
368
|
+
const isInTriggerZone = mouseY <= HEADER_TRIGGER_DISTANCE;
|
|
369
|
+
const isInHeaderZone = !headerIsHidden.value && mouseY <= headerWrapperHeight.value;
|
|
370
|
+
headerIsHidden.value = !(isInTriggerZone || isInHeaderZone);
|
|
371
|
+
}
|
|
372
|
+
function handleLayoutScroll() {
|
|
373
|
+
if (isHeaderAutoActive.value) {
|
|
374
|
+
updateHeaderVisibilityFromMouse(lastMouseY);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
if (props.headerMode !== "auto-scroll" || isMixedNav.value || isFullContent.value) return;
|
|
378
|
+
resolveHeaderVisibilityOnScroll();
|
|
379
|
+
}
|
|
380
|
+
function resolveHeaderVisibilityOnScroll() {
|
|
381
|
+
headerIsHidden.value = resolveHeaderHiddenOnScroll({
|
|
382
|
+
arrivedTop: arrivedState.top,
|
|
383
|
+
currentHidden: headerIsHidden.value,
|
|
384
|
+
directionDown: directions.bottom,
|
|
385
|
+
directionUp: directions.top,
|
|
386
|
+
headerHeight: headerWrapperHeight.value,
|
|
387
|
+
scrollTop: scrollY.value
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
function handleClickMask() {
|
|
391
|
+
activeSidebarCollapse.value = true;
|
|
392
|
+
}
|
|
393
|
+
function handleHeaderToggle() {
|
|
394
|
+
if (props.isMobile) activeSidebarCollapse.value = false;
|
|
395
|
+
else emits("toggleSidebar");
|
|
396
|
+
}
|
|
397
|
+
const idMainContent = ELEMENT_ID_MAIN_CONTENT;
|
|
398
|
+
const idLayoutScroll = ELEMENT_ID_LAYOUT_SCROLL;
|
|
399
|
+
const idLayoutStaticHeader = `${ELEMENT_ID_LAYOUT_SCROLL}__static_header`;
|
|
400
|
+
const layoutStaticHeaderTarget = `#${idLayoutStaticHeader}`;
|
|
401
|
+
return (_ctx, _cache) => {
|
|
402
|
+
return openBlock(), createElementBlock("div", {
|
|
403
|
+
"data-layout-region": "layout",
|
|
404
|
+
"data-layout": unref(currentLayout),
|
|
405
|
+
"data-mobile": __props.isMobile,
|
|
406
|
+
"data-sidebar-collapsed": activeSidebarCollapse.value,
|
|
407
|
+
class: "flex h-full min-h-0 w-full relative overflow-hidden"
|
|
408
|
+
}, [
|
|
409
|
+
sidebarEnableState.value ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
410
|
+
key: 0,
|
|
411
|
+
draggable: sidebarDraggable.value,
|
|
412
|
+
"onUpdate:draggable": _cache[0] || (_cache[0] = ($event) => sidebarDraggable.value = $event),
|
|
413
|
+
collapse: activeSidebarCollapse.value,
|
|
414
|
+
"onUpdate:collapse": _cache[1] || (_cache[1] = ($event) => activeSidebarCollapse.value = $event),
|
|
415
|
+
"expand-on-hover": sidebarExpandOnHover.value,
|
|
416
|
+
"onUpdate:expandOnHover": _cache[2] || (_cache[2] = ($event) => sidebarExpandOnHover.value = $event),
|
|
417
|
+
"expand-on-hovering": sidebarExpandOnHovering.value,
|
|
418
|
+
"onUpdate:expandOnHovering": _cache[3] || (_cache[3] = ($event) => sidebarExpandOnHovering.value = $event),
|
|
419
|
+
"extra-collapse": sidebarExtraCollapse.value,
|
|
420
|
+
"onUpdate:extraCollapse": _cache[4] || (_cache[4] = ($event) => sidebarExtraCollapse.value = $event),
|
|
421
|
+
"extra-visible": sidebarExtraVisible.value,
|
|
422
|
+
"onUpdate:extraVisible": _cache[5] || (_cache[5] = ($event) => sidebarExtraVisible.value = $event),
|
|
423
|
+
"show-collapse-button": __props.sidebarCollapsedButton,
|
|
424
|
+
"show-fixed-button": __props.sidebarFixedButton,
|
|
425
|
+
"collapse-width": getSideCollapseWidth.value,
|
|
426
|
+
"dom-visible": !__props.isMobile,
|
|
427
|
+
"expanded-width": __props.sidebarWidth,
|
|
428
|
+
"extra-width": sidebarExtraWidth.value,
|
|
429
|
+
"fixed-extra": sidebarExpandOnHover.value,
|
|
430
|
+
"header-height": sidebarHeaderHeight.value,
|
|
431
|
+
"extra-title-height": unref(isSidebarMixedNav) || unref(isHeaderMixedNav) ? __props.sidebarExtraTitleHeight : 0,
|
|
432
|
+
"is-sidebar-mixed": unref(isSidebarMixedNav) || unref(isHeaderMixedNav),
|
|
433
|
+
"is-mobile": __props.isMobile,
|
|
434
|
+
"margin-top": sidebarMarginTop.value,
|
|
435
|
+
"mixed-width": __props.sidebarMixedWidth,
|
|
436
|
+
show: showSidebar.value,
|
|
437
|
+
theme: __props.sidebarTheme,
|
|
438
|
+
"theme-sub": __props.sidebarThemeSub,
|
|
439
|
+
width: getSidebarWidth.value,
|
|
440
|
+
"z-index": sidebarZIndex.value,
|
|
441
|
+
onLeave: _cache[6] || (_cache[6] = () => emits("sideMouseLeave")),
|
|
442
|
+
"onUpdate:width": _cache[7] || (_cache[7] = (val) => emits("update:sidebarWidth", val))
|
|
443
|
+
}, createSlots({
|
|
444
|
+
extra: withCtx(() => [renderSlot(_ctx.$slots, "side-extra")]),
|
|
445
|
+
"extra-title": withCtx(() => [renderSlot(_ctx.$slots, "side-extra-title")]),
|
|
446
|
+
default: withCtx(() => [unref(isSidebarMixedNav) || unref(isHeaderMixedNav) ? renderSlot(_ctx.$slots, "mixed-menu", {}, void 0, void 0, 0) : renderSlot(_ctx.$slots, "menu", {}, void 0, void 0, 1)]),
|
|
447
|
+
_: 2
|
|
448
|
+
}, [isSideMode.value && !unref(isMixedNav) && __props.sidebarLogoVisible ? {
|
|
449
|
+
name: "logo",
|
|
450
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "logo")]),
|
|
451
|
+
key: "0"
|
|
452
|
+
} : void 0]), 1032, [
|
|
453
|
+
"draggable",
|
|
454
|
+
"collapse",
|
|
455
|
+
"expand-on-hover",
|
|
456
|
+
"expand-on-hovering",
|
|
457
|
+
"extra-collapse",
|
|
458
|
+
"extra-visible",
|
|
459
|
+
"show-collapse-button",
|
|
460
|
+
"show-fixed-button",
|
|
461
|
+
"collapse-width",
|
|
462
|
+
"dom-visible",
|
|
463
|
+
"expanded-width",
|
|
464
|
+
"extra-width",
|
|
465
|
+
"fixed-extra",
|
|
466
|
+
"header-height",
|
|
467
|
+
"extra-title-height",
|
|
468
|
+
"is-sidebar-mixed",
|
|
469
|
+
"is-mobile",
|
|
470
|
+
"margin-top",
|
|
471
|
+
"mixed-width",
|
|
472
|
+
"show",
|
|
473
|
+
"theme",
|
|
474
|
+
"theme-sub",
|
|
475
|
+
"width",
|
|
476
|
+
"z-index"
|
|
477
|
+
])) : createCommentVNode("v-if", true),
|
|
478
|
+
createElementVNode("div", {
|
|
479
|
+
ref_key: "mainRef",
|
|
480
|
+
ref: mainRef,
|
|
481
|
+
"data-layout-region": "main",
|
|
482
|
+
class: "flex flex-1 flex-col min-h-0 relative overflow-hidden"
|
|
483
|
+
}, [(openBlock(), createBlock(Teleport, {
|
|
484
|
+
defer: "",
|
|
485
|
+
disabled: headerFixed.value,
|
|
486
|
+
to: layoutStaticHeaderTarget
|
|
487
|
+
}, [createElementVNode("div", {
|
|
488
|
+
"data-layout-region": "header",
|
|
489
|
+
class: normalizeClass([[{ "shadow-[0_16px_24px_hsl(var(--background))]": headerHasShadow.value }, unref(SCROLL_FIXED_CLASS)], "shrink-0 transition-transform-280 overflow-hidden"]),
|
|
490
|
+
style: normalizeStyle(headerWrapperStyle.value)
|
|
491
|
+
}, [__props.headerVisible ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
492
|
+
key: 0,
|
|
493
|
+
"full-width": !isSideMode.value,
|
|
494
|
+
height: __props.headerHeight,
|
|
495
|
+
"is-mobile": __props.isMobile,
|
|
496
|
+
show: !unref(isFullContent) && !__props.headerHidden,
|
|
497
|
+
"sidebar-width": __props.sidebarWidth,
|
|
498
|
+
theme: __props.headerTheme,
|
|
499
|
+
width: mainStyle.value.width,
|
|
500
|
+
"z-index": headerZIndex.value,
|
|
501
|
+
"logo-visible": __props.sidebarLogoVisible
|
|
502
|
+
}, createSlots({
|
|
503
|
+
"toggle-button": withCtx(() => [showHeaderToggleButton.value ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
504
|
+
key: 0,
|
|
505
|
+
"data-layout-action": "toggle-sidebar",
|
|
506
|
+
icon: __props.isMobile ? !activeSidebarCollapse.value : showSidebar.value ? "lucide:panel-left-close" : "lucide:panel-left-open",
|
|
507
|
+
onClick: handleHeaderToggle
|
|
508
|
+
}, null, 8, ["icon"])) : createCommentVNode("v-if", true)]),
|
|
509
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "header")]),
|
|
510
|
+
_: 2
|
|
511
|
+
}, [showHeaderLogo.value ? {
|
|
512
|
+
name: "logo",
|
|
513
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "logo")]),
|
|
514
|
+
key: "0"
|
|
515
|
+
} : void 0]), 1032, [
|
|
516
|
+
"full-width",
|
|
517
|
+
"height",
|
|
518
|
+
"is-mobile",
|
|
519
|
+
"show",
|
|
520
|
+
"sidebar-width",
|
|
521
|
+
"theme",
|
|
522
|
+
"width",
|
|
523
|
+
"z-index",
|
|
524
|
+
"logo-visible"
|
|
525
|
+
])) : createCommentVNode("v-if", true), __props.tabbarEnable ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
526
|
+
key: 1,
|
|
527
|
+
height: __props.tabbarHeight,
|
|
528
|
+
style: normalizeStyle(tabbarStyle.value)
|
|
529
|
+
}, {
|
|
530
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "tabbar")]),
|
|
531
|
+
_: 3
|
|
532
|
+
}, 8, ["height", "style"])) : createCommentVNode("v-if", true)], 6)], 8, ["disabled"])), createElementVNode("div", {
|
|
533
|
+
id: unref(idLayoutScroll),
|
|
534
|
+
ref_key: "contentRef",
|
|
535
|
+
ref: contentRef,
|
|
536
|
+
"data-layout-region": "scroll",
|
|
537
|
+
style: normalizeStyle(layoutScrollStyle.value),
|
|
538
|
+
class: "bg-background-elevated flex flex-1 flex-col min-h-0 overflow-x-hidden overflow-y-auto"
|
|
539
|
+
}, [
|
|
540
|
+
createElementVNode("div", {
|
|
541
|
+
id: idLayoutStaticHeader,
|
|
542
|
+
class: "contents"
|
|
543
|
+
}),
|
|
544
|
+
createVNode(unref(_sfc_main$2), {
|
|
545
|
+
id: unref(idMainContent),
|
|
546
|
+
"content-compact": __props.contentCompact,
|
|
547
|
+
"content-compact-width": __props.contentCompactWidth,
|
|
548
|
+
padding: __props.contentPadding,
|
|
549
|
+
"padding-bottom": __props.contentPaddingBottom,
|
|
550
|
+
"padding-left": __props.contentPaddingLeft,
|
|
551
|
+
"padding-right": __props.contentPaddingRight,
|
|
552
|
+
"padding-top": __props.contentPaddingTop,
|
|
553
|
+
style: normalizeStyle(contentStyle.value)
|
|
554
|
+
}, {
|
|
555
|
+
overlay: withCtx(() => [renderSlot(_ctx.$slots, "content-overlay")]),
|
|
556
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "content")]),
|
|
557
|
+
_: 3
|
|
558
|
+
}, 8, [
|
|
559
|
+
"id",
|
|
560
|
+
"content-compact",
|
|
561
|
+
"content-compact-width",
|
|
562
|
+
"padding",
|
|
563
|
+
"padding-bottom",
|
|
564
|
+
"padding-left",
|
|
565
|
+
"padding-right",
|
|
566
|
+
"padding-top",
|
|
567
|
+
"style"
|
|
568
|
+
]),
|
|
569
|
+
__props.footerEnable ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
570
|
+
key: 0,
|
|
571
|
+
fixed: __props.footerFixed,
|
|
572
|
+
height: __props.footerHeight,
|
|
573
|
+
show: !unref(isFullContent),
|
|
574
|
+
width: footerWidth.value,
|
|
575
|
+
"z-index": __props.zIndex
|
|
576
|
+
}, {
|
|
577
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
|
|
578
|
+
_: 3
|
|
579
|
+
}, 8, [
|
|
580
|
+
"fixed",
|
|
581
|
+
"height",
|
|
582
|
+
"show",
|
|
583
|
+
"width",
|
|
584
|
+
"z-index"
|
|
585
|
+
])) : createCommentVNode("v-if", true)
|
|
586
|
+
], 12, _hoisted_2)], 512),
|
|
587
|
+
renderSlot(_ctx.$slots, "extra"),
|
|
588
|
+
createVNode(Transition, { name: "mobile-sidebar-mask" }, {
|
|
589
|
+
default: withCtx(() => [maskVisible.value ? (openBlock(), createElementBlock("div", {
|
|
590
|
+
key: 0,
|
|
591
|
+
"data-layout-region": "sidebar-mask",
|
|
592
|
+
style: normalizeStyle(maskStyle.value),
|
|
593
|
+
class: "bg-background-elevated/75 size-full left-0 top-0 fixed",
|
|
594
|
+
onClick: handleClickMask
|
|
595
|
+
}, null, 4)) : createCommentVNode("v-if", true)]),
|
|
596
|
+
_: 1
|
|
597
|
+
})
|
|
598
|
+
], 8, _hoisted_1);
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
//#endregion
|
|
603
|
+
export { _sfc_main as default };
|