vlite3 1.5.23 → 1.5.25
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/components/AppShell/AppShell.vue.d.ts +1 -1
- package/components/CategoryManager/CategoryManager2.vue.js +3 -3
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -0
- package/components/ColorPicker/ColorPicker.vue.js +16 -14
- package/components/DatePicker.vue.d.ts +2 -0
- package/components/DatePicker.vue.js +19 -17
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +111 -106
- package/components/Dropdown/DropdownMenu.vue.d.ts +2 -0
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/{DropdownMenu3.vue.js → DropdownMenu2.vue.js} +24 -23
- package/components/Form/{AccordionView2.vue.js → AccordionView.vue.js} +1 -1
- package/components/Form/index2.vue.js +1 -1
- package/components/Modal.vue.d.ts +4 -0
- package/components/Modal.vue.js +2 -2
- package/components/Modal2.vue.js +59 -55
- package/components/Navbar/Navbar.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover3.vue.js +2 -2
- package/components/RichTextEditor/RichTextToolbar3.vue.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +3 -3
- package/components/SidePanel.vue.d.ts +3 -1
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel2.vue.js +39 -37
- package/components/ThemeProvider/themeVars.js +115 -115
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/Tooltip.vue.d.ts +2 -0
- package/components/Tooltip.vue.js +13 -10
- package/composables/useOverlayPortal.d.ts +14 -0
- package/composables/useOverlayPortal.js +16 -0
- package/composables/useTheme.d.ts +2 -2
- package/composables/useTheme.js +64 -29
- package/docs/components/modal.md +18 -16
- package/docs-manifest.json +3 -3
- package/index.d.ts +1 -0
- package/index.js +334 -330
- package/package.json +2 -2
- package/style.css +193 -107
- /package/components/RichTextEditor/{RichTextLinkPopover2.vue.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar2.vue.js → RichTextToolbar.vue.js} +0 -0
package/components/Modal2.vue.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useKeyStroke as
|
|
4
|
-
import { $t as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as P, ref as f, inject as R, computed as p, markRaw as W, watch as $, provide as K, nextTick as A, onMounted as U, onUnmounted as q, openBlock as s, createElementBlock as a, Fragment as G, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as r, createBlock as z, Teleport as H, unref as J, normalizeClass as i, createVNode as I, Transition as Q, withCtx as X, normalizeStyle as Y, createElementVNode as h, toDisplayString as O, resolveDynamicComponent as Z } from "vue";
|
|
2
|
+
import _ from "./Button.vue.js";
|
|
3
|
+
import { useKeyStroke as ee } from "../composables/useKeyStroke.js";
|
|
4
|
+
import { $t as F } from "../utils/i18n.js";
|
|
5
|
+
import { useVLiteOverlayTarget as te } from "../composables/useOverlayPortal.js";
|
|
6
|
+
const oe = ["data-testid"], le = ["data-testid"], se = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
|
|
8
|
-
},
|
|
9
|
+
}, ae = { class: "text-lg font-semibold leading-none tracking-tight" }, re = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "text-sm text-muted-foreground mb-3.5"
|
|
11
|
-
},
|
|
12
|
+
}, fe = /* @__PURE__ */ P({
|
|
12
13
|
inheritAttrs: !1,
|
|
13
14
|
__name: "Modal",
|
|
14
15
|
props: {
|
|
@@ -22,19 +23,22 @@ const _ = ["data-testid"], ee = ["data-testid"], te = {
|
|
|
22
23
|
descriptionI18n: {},
|
|
23
24
|
triggerClass: {},
|
|
24
25
|
bodyClass: {},
|
|
26
|
+
modalClass: {},
|
|
27
|
+
overlayClass: {},
|
|
25
28
|
headerClass: {},
|
|
26
29
|
footerClass: {},
|
|
27
30
|
body: {},
|
|
28
31
|
styles: { default: {} },
|
|
29
|
-
bodyProps: {}
|
|
32
|
+
bodyProps: {},
|
|
33
|
+
teleportTarget: {}
|
|
30
34
|
},
|
|
31
35
|
emits: ["close", "update:show", "onOpen"],
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
36
|
+
setup(t, { emit: V }) {
|
|
37
|
+
const o = t, u = V, l = f(o.show), j = te(() => o.teleportTarget), C = f(!1), g = f(!1), k = f(null);
|
|
34
38
|
let c = null;
|
|
35
|
-
const y = f(!1), d =
|
|
36
|
-
|
|
37
|
-
() =>
|
|
39
|
+
const y = f(!1), d = R("dropdown-context", null), w = p(() => o.body ? W(o.body) : void 0);
|
|
40
|
+
$(
|
|
41
|
+
() => o.show,
|
|
38
42
|
(e) => {
|
|
39
43
|
l.value = e, e && (u("onOpen"), d?.close());
|
|
40
44
|
}
|
|
@@ -42,104 +46,104 @@ const _ = ["data-testid"], ee = ["data-testid"], te = {
|
|
|
42
46
|
const D = () => {
|
|
43
47
|
l.value = !0, d?.close();
|
|
44
48
|
}, E = (e) => {
|
|
45
|
-
|
|
46
|
-
},
|
|
49
|
+
C.value = e;
|
|
50
|
+
}, L = (e) => {
|
|
47
51
|
y.value = e;
|
|
48
52
|
}, m = () => {
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
if (C.value) {
|
|
54
|
+
g.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
55
|
+
g.value = !1;
|
|
52
56
|
}, 1e3);
|
|
53
57
|
return;
|
|
54
58
|
}
|
|
55
59
|
l.value = !1, u("update:show", !1), u("close");
|
|
56
|
-
},
|
|
60
|
+
}, b = () => {
|
|
57
61
|
l.value = !1, u("update:show", !1), u("close");
|
|
58
62
|
};
|
|
59
|
-
K("modal-context", { close: m, setSubmitting: E, registerFormFooter:
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
}, { onKeyStroke:
|
|
63
|
-
|
|
64
|
-
e ? (d?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await
|
|
65
|
-
}), A(() => {
|
|
66
|
-
l.value && d?.onChildToggle?.(!0);
|
|
63
|
+
K("modal-context", { close: m, setSubmitting: E, registerFormFooter: L });
|
|
64
|
+
const M = () => {
|
|
65
|
+
o.closeOutside && m();
|
|
66
|
+
}, { onKeyStroke: N } = ee();
|
|
67
|
+
N("Escape", m), $(l, async (e) => {
|
|
68
|
+
e ? (d?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await A(), k.value?.focus()) : (document.body.style.overflow = "", d?.onChildToggle?.(!1), y.value = !1);
|
|
67
69
|
}), U(() => {
|
|
70
|
+
l.value && d?.onChildToggle?.(!0);
|
|
71
|
+
}), q(() => {
|
|
68
72
|
l.value && d?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
|
|
69
73
|
});
|
|
70
|
-
const n = p(() =>
|
|
71
|
-
() =>
|
|
74
|
+
const n = p(() => o.titleI18n ? F(o.titleI18n) : o.title), x = p(
|
|
75
|
+
() => o.descriptionI18n ? F(o.descriptionI18n) : o.description
|
|
72
76
|
);
|
|
73
|
-
return (e,
|
|
77
|
+
return (e, T) => (s(), a(G, null, [
|
|
74
78
|
e.$slots?.trigger || e.$slots?.default ? (s(), a("span", B({
|
|
75
79
|
key: 0,
|
|
76
80
|
onClick: S(D, ["stop"]),
|
|
77
|
-
class: `${
|
|
81
|
+
class: `${t.triggerClass}`
|
|
78
82
|
}, e.$attrs, {
|
|
79
83
|
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : n.value ? `modal-trigger-${n.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal-trigger"
|
|
80
84
|
}), [
|
|
81
85
|
v(e.$slots, "trigger", {}, () => [
|
|
82
|
-
|
|
86
|
+
t.body ? v(e.$slots, "default", {}, void 0, !0, 0) : r("", !0)
|
|
83
87
|
], !0)
|
|
84
|
-
], 16,
|
|
85
|
-
(s(), z(
|
|
88
|
+
], 16, oe)) : r("", !0),
|
|
89
|
+
(s(), z(H, { to: J(j) }, [
|
|
86
90
|
l.value ? (s(), a("div", {
|
|
87
91
|
key: 0,
|
|
88
|
-
class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay",
|
|
89
|
-
onClick:
|
|
92
|
+
class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", [t.backdrop ? "v-modal-backdrop" : "", t.overlayClass]]),
|
|
93
|
+
onClick: M
|
|
90
94
|
}, [
|
|
91
|
-
I(
|
|
92
|
-
default:
|
|
95
|
+
I(Q, { name: "modal-dialog" }, {
|
|
96
|
+
default: X(() => [
|
|
93
97
|
l.value ? (s(), a("div", {
|
|
94
98
|
key: 0,
|
|
95
99
|
ref_key: "modalRef",
|
|
96
|
-
ref:
|
|
100
|
+
ref: k,
|
|
97
101
|
tabindex: "-1",
|
|
98
102
|
role: "dialog",
|
|
99
103
|
"aria-modal": "true",
|
|
100
|
-
style:
|
|
101
|
-
class: i(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [
|
|
104
|
+
style: Y(t.styles),
|
|
105
|
+
class: i(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [t.maxWidth, t.modalClass]]),
|
|
102
106
|
"data-testid": e.$attrs["data-testid"] || (n.value ? `modal-${n.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal"),
|
|
103
|
-
onClick:
|
|
107
|
+
onClick: T[0] || (T[0] = S(() => {
|
|
104
108
|
}, ["stop"]))
|
|
105
109
|
}, [
|
|
106
|
-
n.value ? (s(), a("div",
|
|
110
|
+
n.value ? (s(), a("div", se, [
|
|
107
111
|
h("div", {
|
|
108
|
-
class: i(["flex items-center justify-between py-2 px-4 rounded-t-md",
|
|
112
|
+
class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", t.headerClass])
|
|
109
113
|
}, [
|
|
110
|
-
h("h3",
|
|
111
|
-
I(
|
|
114
|
+
h("h3", ae, O(n.value), 1),
|
|
115
|
+
I(_, {
|
|
112
116
|
rounded: "full",
|
|
113
117
|
size: "sm",
|
|
114
118
|
icon: "lucide:x",
|
|
115
119
|
variant: "ghost",
|
|
116
|
-
class: i({ "blink-bg":
|
|
120
|
+
class: i({ "blink-bg": g.value }),
|
|
117
121
|
"data-testid": "modal-close-btn",
|
|
118
122
|
onClick: m
|
|
119
123
|
}, null, 8, ["class"])
|
|
120
124
|
], 2)
|
|
121
125
|
])) : r("", !0),
|
|
122
126
|
h("div", {
|
|
123
|
-
class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [y.value ? "pb-0" : "pb-3.5",
|
|
127
|
+
class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [y.value ? "pb-0" : "pb-3.5", t.bodyClass]])
|
|
124
128
|
}, [
|
|
125
|
-
x.value ? (s(), a("p",
|
|
126
|
-
w.value ? (s(), z(
|
|
129
|
+
x.value ? (s(), a("p", re, O(x.value), 1)) : r("", !0),
|
|
130
|
+
w.value ? (s(), z(Z(w.value), B({ key: 1 }, { ...t.bodyProps, ...e.$attrs }, { close: b }), null, 16)) : v(e.$slots, "default", { close: b }, void 0, !0, 2)
|
|
127
131
|
], 2),
|
|
128
132
|
e.$slots.footer ? (s(), a("div", {
|
|
129
133
|
key: 1,
|
|
130
|
-
class: i([
|
|
134
|
+
class: i([t.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/90 rounded-b-xl bg-body"])
|
|
131
135
|
}, [
|
|
132
|
-
v(e.$slots, "footer", { close:
|
|
136
|
+
v(e.$slots, "footer", { close: b }, void 0, !0)
|
|
133
137
|
], 2)) : r("", !0)
|
|
134
|
-
], 14,
|
|
138
|
+
], 14, le)) : r("", !0)
|
|
135
139
|
]),
|
|
136
140
|
_: 3
|
|
137
141
|
})
|
|
138
142
|
], 2)) : r("", !0)
|
|
139
|
-
]))
|
|
143
|
+
], 8, ["to"]))
|
|
140
144
|
], 64));
|
|
141
145
|
}
|
|
142
146
|
});
|
|
143
147
|
export {
|
|
144
|
-
|
|
148
|
+
fe as default
|
|
145
149
|
};
|
|
@@ -43,12 +43,12 @@ declare const __VLS_component: import('vue').DefineComponent<NavbarProps, {}, {}
|
|
|
43
43
|
variant: import('../../types/navbar.type').NavbarVariant;
|
|
44
44
|
floating: boolean;
|
|
45
45
|
compact: boolean;
|
|
46
|
+
menuClass: string;
|
|
46
47
|
position: import('../../types/navbar.type').NavbarPosition;
|
|
47
48
|
contentClass: string;
|
|
48
49
|
centerPosition: import('../../types/navbar.type').NavbarCenterPosition;
|
|
49
50
|
glass: boolean;
|
|
50
51
|
mobileBreakpoint: "sm" | "md" | "lg" | "xl";
|
|
51
|
-
menuClass: string;
|
|
52
52
|
rightClass: string;
|
|
53
53
|
mobileTriggerClass: string;
|
|
54
54
|
mobileMenuVariant: "sidepanel" | "dropdown";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import se from "./
|
|
4
|
-
/* empty css
|
|
5
|
-
import de from "./
|
|
6
|
-
/* empty css
|
|
3
|
+
import se from "./RichTextToolbar.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import de from "./RichTextLinkPopover.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
|
|
8
8
|
import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
|
|
9
9
|
const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
|
|
@@ -23,11 +23,11 @@ import "iconify-icon-picker/style.css";
|
|
|
23
23
|
import "../../icons/IconRegistry.js";
|
|
24
24
|
/* empty css */
|
|
25
25
|
/* empty css */
|
|
26
|
-
/* empty css
|
|
26
|
+
/* empty css */
|
|
27
27
|
/* empty css */
|
|
28
28
|
/* empty css */
|
|
29
|
-
/* empty css
|
|
30
|
-
/* empty css
|
|
29
|
+
/* empty css */
|
|
30
|
+
/* empty css */
|
|
31
31
|
import "../../core/config.js";
|
|
32
32
|
/* empty css */
|
|
33
33
|
/* empty css */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
import { SidePanelPosition, SidePanelSize } from '../types';
|
|
3
|
+
import { VLiteOverlayTarget } from '../composables/useOverlayPortal';
|
|
3
4
|
interface Props {
|
|
4
5
|
show?: boolean;
|
|
5
6
|
title?: string;
|
|
@@ -20,6 +21,7 @@ interface Props {
|
|
|
20
21
|
body?: Component;
|
|
21
22
|
styles?: any;
|
|
22
23
|
bodyProps?: Record<string, any>;
|
|
24
|
+
teleportTarget?: VLiteOverlayTarget;
|
|
23
25
|
}
|
|
24
26
|
declare function __VLS_template(): {
|
|
25
27
|
attrs: Partial<{}>;
|
|
@@ -60,10 +62,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
60
62
|
backdrop: boolean;
|
|
61
63
|
triggerClass: string;
|
|
62
64
|
bodyClass: string;
|
|
65
|
+
overlayClass: string;
|
|
63
66
|
footerClass: string;
|
|
64
67
|
styles: any;
|
|
65
68
|
hideCloseButton: boolean;
|
|
66
|
-
overlayClass: string;
|
|
67
69
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
68
70
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
69
71
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-50488cf7"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useKeyStroke as
|
|
1
|
+
import { defineComponent as L, ref as N, inject as P, computed as f, markRaw as V, watch as w, onMounted as D, onUnmounted as j, openBlock as l, createElementBlock as i, Fragment as K, createElementVNode as y, mergeProps as h, withModifiers as M, renderSlot as m, createCommentVNode as a, createBlock as v, Teleport as F, unref as R, normalizeClass as c, createVNode as U, Transition as q, withCtx as G, normalizeStyle as H, toDisplayString as $, resolveDynamicComponent as J } from "vue";
|
|
2
|
+
import Q from "./Button.vue.js";
|
|
3
|
+
import { useKeyStroke as W } from "../composables/useKeyStroke.js";
|
|
4
4
|
import { $t as k } from "../utils/i18n.js";
|
|
5
|
-
|
|
5
|
+
import { useVLiteOverlayTarget as X } from "../composables/useOverlayPortal.js";
|
|
6
|
+
const Y = ["data-testid"], Z = ["data-testid"], _ = { class: "text-lg font-bold text-foreground" }, ee = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "-text-fs-2 text-muted-foreground"
|
|
8
|
-
},
|
|
9
|
+
}, re = /* @__PURE__ */ L({
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
__name: "SidePanel",
|
|
11
12
|
props: {
|
|
@@ -27,33 +28,34 @@ const Q = ["data-testid"], W = ["data-testid"], X = { class: "text-lg font-bold
|
|
|
27
28
|
backdrop: { type: Boolean, default: !0 },
|
|
28
29
|
body: {},
|
|
29
30
|
styles: { default: {} },
|
|
30
|
-
bodyProps: {}
|
|
31
|
+
bodyProps: {},
|
|
32
|
+
teleportTarget: {}
|
|
31
33
|
},
|
|
32
34
|
emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
|
|
33
35
|
setup(o, { emit: x }) {
|
|
34
|
-
const t = o,
|
|
36
|
+
const t = o, g = x, s = N(t.show), T = X(() => t.teleportTarget);
|
|
35
37
|
let u = null;
|
|
36
|
-
const r = P("dropdown-context", null), b = f(() => t.body ?
|
|
38
|
+
const r = P("dropdown-context", null), b = f(() => t.body ? V(t.body) : void 0);
|
|
37
39
|
w(
|
|
38
40
|
() => t.show,
|
|
39
41
|
(e) => {
|
|
40
|
-
s.value = e, e && (
|
|
42
|
+
s.value = e, e && (g("onOpen"), r?.close());
|
|
41
43
|
}
|
|
42
44
|
);
|
|
43
45
|
const B = () => {
|
|
44
46
|
s.value = !0, r?.close();
|
|
45
47
|
}, n = () => {
|
|
46
|
-
s.value = !1,
|
|
47
|
-
},
|
|
48
|
+
s.value = !1, g("update:show", !1), g("close");
|
|
49
|
+
}, z = () => {
|
|
48
50
|
t.closeOutside && n();
|
|
49
|
-
}, { onKeyStroke:
|
|
50
|
-
|
|
51
|
+
}, { onKeyStroke: O } = W();
|
|
52
|
+
O("Escape", n), w(s, (e) => {
|
|
51
53
|
u && clearTimeout(u), e ? (r?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
|
|
52
54
|
r?.onChildToggle?.(!1);
|
|
53
55
|
}, 150));
|
|
54
|
-
}),
|
|
56
|
+
}), D(() => {
|
|
55
57
|
s.value && r?.onChildToggle?.(!0);
|
|
56
|
-
}),
|
|
58
|
+
}), j(() => {
|
|
57
59
|
u && clearTimeout(u), s.value && r?.onChildToggle?.(!1), document.body.style.overflow = "";
|
|
58
60
|
});
|
|
59
61
|
const S = {
|
|
@@ -62,12 +64,12 @@ const Q = ["data-testid"], W = ["data-testid"], X = { class: "text-lg font-bold
|
|
|
62
64
|
lg: "max-w-full sm:max-w-lg",
|
|
63
65
|
xl: "max-w-full sm:max-w-xl",
|
|
64
66
|
full: "max-w-full"
|
|
65
|
-
}, A = f(() => t.position === "left" ? "start-0 rounded-e-lg" : "end-0 rounded-s-md"),
|
|
67
|
+
}, A = f(() => t.position === "left" ? "start-0 rounded-e-lg" : "end-0 rounded-s-md"), I = f(() => t.position === "left" ? "slide-left" : "slide-right"), d = f(() => t.titleI18n ? k(t.titleI18n) : t.title), C = f(
|
|
66
68
|
() => t.descriptionI18n ? k(t.descriptionI18n) : t.description
|
|
67
69
|
);
|
|
68
|
-
return (e,
|
|
69
|
-
|
|
70
|
-
onClick:
|
|
70
|
+
return (e, p) => (l(), i(K, null, [
|
|
71
|
+
y("span", h({
|
|
72
|
+
onClick: M(B, ["stop"]),
|
|
71
73
|
class: `${o.triggerClass}`
|
|
72
74
|
}, e.$attrs, {
|
|
73
75
|
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : d.value ? `sidepanel-trigger-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel-trigger"
|
|
@@ -75,23 +77,23 @@ const Q = ["data-testid"], W = ["data-testid"], X = { class: "text-lg font-bold
|
|
|
75
77
|
m(e.$slots, "trigger", {}, () => [
|
|
76
78
|
o.body ? m(e.$slots, "default", {}, void 0, !0, 0) : a("", !0)
|
|
77
79
|
], !0)
|
|
78
|
-
], 16,
|
|
79
|
-
(l(),
|
|
80
|
+
], 16, Y),
|
|
81
|
+
(l(), v(F, { to: R(T) }, [
|
|
80
82
|
s.value ? (l(), i("div", {
|
|
81
83
|
key: 0,
|
|
82
84
|
class: c(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
|
|
83
|
-
onClick:
|
|
85
|
+
onClick: z
|
|
84
86
|
}, null, 2)) : a("", !0),
|
|
85
|
-
|
|
86
|
-
name:
|
|
87
|
-
onAfterEnter:
|
|
88
|
-
onAfterLeave:
|
|
87
|
+
U(q, {
|
|
88
|
+
name: I.value,
|
|
89
|
+
onAfterEnter: p[0] || (p[0] = (E) => e.$emit("onAfterOpen")),
|
|
90
|
+
onAfterLeave: p[1] || (p[1] = (E) => e.$emit("onAfterClose"))
|
|
89
91
|
}, {
|
|
90
|
-
default:
|
|
92
|
+
default: G(() => [
|
|
91
93
|
s.value ? (l(), i("div", {
|
|
92
94
|
key: 0,
|
|
93
95
|
role: "dialog",
|
|
94
|
-
style:
|
|
96
|
+
style: H(o.styles),
|
|
95
97
|
"aria-modal": "true",
|
|
96
98
|
class: c(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border border-border/80 w-full", [S[o.size], A.value, t.class]]),
|
|
97
99
|
"data-testid": e.$attrs["data-testid"] || (d.value ? `sidepanel-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
|
|
@@ -101,12 +103,12 @@ const Q = ["data-testid"], W = ["data-testid"], X = { class: "text-lg font-bold
|
|
|
101
103
|
class: c([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
|
|
102
104
|
}, [
|
|
103
105
|
m(e.$slots, "header", {}, () => [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
C.value ? (l(), i("p",
|
|
106
|
+
y("div", null, [
|
|
107
|
+
y("h3", _, $(d.value), 1),
|
|
108
|
+
C.value ? (l(), i("p", ee, $(C.value), 1)) : a("", !0)
|
|
107
109
|
])
|
|
108
110
|
], !0),
|
|
109
|
-
o.hideCloseButton ? a("", !0) : (l(),
|
|
111
|
+
o.hideCloseButton ? a("", !0) : (l(), v(Q, {
|
|
110
112
|
key: 0,
|
|
111
113
|
rounded: "full",
|
|
112
114
|
size: "sm",
|
|
@@ -117,10 +119,10 @@ const Q = ["data-testid"], W = ["data-testid"], X = { class: "text-lg font-bold
|
|
|
117
119
|
"data-testid": "sidepanel-close-btn"
|
|
118
120
|
}))
|
|
119
121
|
], 2)) : a("", !0),
|
|
120
|
-
|
|
122
|
+
y("div", {
|
|
121
123
|
class: c(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
|
|
122
124
|
}, [
|
|
123
|
-
b.value ? (l(),
|
|
125
|
+
b.value ? (l(), v(J(b.value), h({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : m(e.$slots, "default", { close: n }, void 0, !0, 1)
|
|
124
126
|
], 2),
|
|
125
127
|
e.$slots.footer ? (l(), i("div", {
|
|
126
128
|
key: 1,
|
|
@@ -128,14 +130,14 @@ const Q = ["data-testid"], W = ["data-testid"], X = { class: "text-lg font-bold
|
|
|
128
130
|
}, [
|
|
129
131
|
m(e.$slots, "footer", { close: n }, void 0, !0)
|
|
130
132
|
], 2)) : a("", !0)
|
|
131
|
-
], 14,
|
|
133
|
+
], 14, Z)) : a("", !0)
|
|
132
134
|
]),
|
|
133
135
|
_: 3
|
|
134
136
|
}, 8, ["name"])
|
|
135
|
-
]))
|
|
137
|
+
], 8, ["to"]))
|
|
136
138
|
], 64));
|
|
137
139
|
}
|
|
138
140
|
});
|
|
139
141
|
export {
|
|
140
|
-
|
|
142
|
+
re as default
|
|
141
143
|
};
|