vlite3 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AppShell/AppShellLayoutStorefront.vue.js +2 -2
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +2 -2
- package/components/Cart/Cart.vue.d.ts +27 -0
- package/components/Cart/Cart.vue.js +242 -0
- package/components/Cart/Cart.vue2.js +4 -0
- package/components/Cart/CartCouponInput.vue.d.ts +32 -0
- package/components/Cart/CartCouponInput.vue.js +176 -0
- package/components/Cart/CartCouponInput.vue2.js +4 -0
- package/components/Cart/CartEmptyState.vue.d.ts +17 -0
- package/components/Cart/CartEmptyState.vue.js +48 -0
- package/components/Cart/CartEmptyState.vue2.js +4 -0
- package/components/Cart/CartLineItem.vue.d.ts +29 -0
- package/components/Cart/CartLineItem.vue.js +341 -0
- package/components/Cart/CartLineItem.vue2.js +4 -0
- package/components/Cart/CartSummary.vue.d.ts +29 -0
- package/components/Cart/CartSummary.vue.js +157 -0
- package/components/Cart/CartSummary.vue2.js +4 -0
- package/components/Cart/CartVariant1.vue.d.ts +42 -0
- package/components/Cart/CartVariant1.vue.js +156 -0
- package/components/Cart/CartVariant1.vue2.js +4 -0
- package/components/Cart/CartVariant2.vue.d.ts +42 -0
- package/components/Cart/CartVariant2.vue.js +154 -0
- package/components/Cart/CartVariant2.vue2.js +4 -0
- package/components/Cart/CartVariant3.vue.d.ts +41 -0
- package/components/Cart/CartVariant3.vue.js +192 -0
- package/components/Cart/CartVariant3.vue2.js +4 -0
- package/components/Cart/CartVariant4.vue.d.ts +41 -0
- package/components/Cart/CartVariant4.vue.js +145 -0
- package/components/Cart/CartVariant4.vue2.js +4 -0
- package/components/Cart/composables/useCart.d.ts +46 -0
- package/components/Cart/composables/useCart.js +110 -0
- package/components/Cart/composables/useCartCalculation.d.ts +91 -0
- package/components/Cart/composables/useCartCalculation.js +145 -0
- package/components/Cart/index.d.ts +9 -0
- package/components/Cart/types.d.ts +391 -0
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.js +3 -3
- package/components/CategoryManager/CategoryManager.vue2.js +224 -248
- package/components/CategoryManager/utils.d.ts +3 -0
- package/components/CategoryManager/utils.js +31 -0
- package/components/CategoryMenu/CategoryMenu.vue.d.ts +2 -0
- package/components/CategoryMenu/CategoryMenu.vue.js +46 -40
- package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +5 -1
- package/components/CategoryMenu/CategoryMenuVariant1.vue.js +5 -144
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +220 -2
- package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +5 -1
- package/components/CategoryMenu/CategoryMenuVariant2.vue.js +5 -160
- package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +235 -2
- package/components/CategoryMenu/types.d.ts +5 -2
- package/components/Clipboard.vue.d.ts +2 -2
- package/components/Dropdown/Dropdown.vue.d.ts +1 -0
- package/components/Dropdown/Dropdown.vue.js +31 -29
- package/components/FilePicker/FilePicker.vue.d.ts +2 -2
- package/components/FilePicker/FilePicker.vue.js +278 -202
- package/components/Form/CustomFields.vue.d.ts +4 -0
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +349 -145
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +1 -1
- package/components/Form/types.d.ts +3 -0
- package/components/Modal.vue.d.ts +2 -0
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +30 -28
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/Rating/Rating.vue.d.ts +1 -1
- package/components/Screen/ScreenFilter.vue.js +3 -2
- package/components/SidePanel.vue.d.ts +2 -0
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +25 -23
- package/components/SidebarMenu/SidebarMenu.vue.js +145 -128
- package/components/index.d.ts +1 -0
- package/core/config.d.ts +128 -0
- package/index.d.ts +1 -0
- package/index.js +327 -306
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/config.type.d.ts +2 -0
|
@@ -266,7 +266,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
266
266
|
maxFiles: e.field.maxFiles || e.field.props?.maxFiles,
|
|
267
267
|
fileTypes: e.field.props?.accept ? e.field.props.accept.split(",") : [],
|
|
268
268
|
returnFormat: "base64",
|
|
269
|
-
variant: a === "file" ? "input" : "dropzone",
|
|
269
|
+
variant: e.field.props?.variant ?? (a === "file" ? "input" : "dropzone"),
|
|
270
270
|
placeholder: o,
|
|
271
271
|
size: e.size,
|
|
272
272
|
rounded: e.rounded,
|
|
@@ -83,6 +83,9 @@ export interface IFormCustomFieldsProps {
|
|
|
83
83
|
schema: IForm[];
|
|
84
84
|
headers?: string[];
|
|
85
85
|
draggable?: boolean;
|
|
86
|
+
layout?: 'table' | 'accordion';
|
|
87
|
+
accordionTitleKey?: string;
|
|
88
|
+
addButtonText?: string;
|
|
86
89
|
}
|
|
87
90
|
/**
|
|
88
91
|
* Layout for grouped schemas (schema: IForm[][]).
|
|
@@ -13,6 +13,7 @@ interface Props {
|
|
|
13
13
|
headerClass?: string;
|
|
14
14
|
footerClass?: string;
|
|
15
15
|
body?: Component;
|
|
16
|
+
styles?: any;
|
|
16
17
|
bodyProps?: Record<string, any>;
|
|
17
18
|
}
|
|
18
19
|
declare function __VLS_template(): {
|
|
@@ -46,6 +47,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
46
47
|
maxWidth: string;
|
|
47
48
|
closeOutside: boolean;
|
|
48
49
|
backdrop: boolean;
|
|
50
|
+
styles: any;
|
|
49
51
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
50
52
|
modalRef: HTMLDivElement;
|
|
51
53
|
}, any>;
|
package/components/Modal.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-208854bc"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
package/components/Modal.vue2.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as R, ref as f, inject as V, computed as p, markRaw as W, watch as T, provide as K, nextTick as L, onMounted as A, onUnmounted as U, openBlock as s, createElementBlock as a, Fragment as q, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as r, createBlock as
|
|
2
|
-
import
|
|
3
|
-
import { useKeyStroke as
|
|
1
|
+
import { defineComponent as R, ref as f, inject as V, computed as p, markRaw as W, watch as T, provide as K, nextTick as L, onMounted as A, onUnmounted as U, openBlock as s, createElementBlock as a, Fragment as q, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as r, createBlock as z, Teleport as G, normalizeClass as i, createVNode as I, Transition as H, withCtx as J, normalizeStyle as Q, createElementVNode as h, toDisplayString as F, resolveDynamicComponent as X } from "vue";
|
|
2
|
+
import Y from "./Button.vue.js";
|
|
3
|
+
import { useKeyStroke as Z } from "../composables/useKeyStroke.js";
|
|
4
4
|
import { $t as O } from "../utils/i18n.js";
|
|
5
|
-
const
|
|
5
|
+
const _ = ["data-testid"], ee = ["data-testid"], te = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
|
|
8
|
-
},
|
|
8
|
+
}, oe = { class: "text-lg font-semibold leading-none tracking-tight" }, le = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-sm text-muted-foreground mb-3.5"
|
|
11
|
-
},
|
|
11
|
+
}, ne = /* @__PURE__ */ R({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "Modal",
|
|
14
14
|
props: {
|
|
@@ -25,13 +25,14 @@ const Z = ["data-testid"], _ = ["data-testid"], ee = {
|
|
|
25
25
|
headerClass: {},
|
|
26
26
|
footerClass: {},
|
|
27
27
|
body: {},
|
|
28
|
+
styles: { default: {} },
|
|
28
29
|
bodyProps: {}
|
|
29
30
|
},
|
|
30
31
|
emits: ["close", "update:show", "onOpen"],
|
|
31
32
|
setup(o, { emit: j }) {
|
|
32
|
-
const t = o, u = j, l = f(t.show), k = f(!1),
|
|
33
|
+
const t = o, u = j, l = f(t.show), k = f(!1), y = f(!1), C = f(null);
|
|
33
34
|
let c = null;
|
|
34
|
-
const
|
|
35
|
+
const b = f(!1), d = V("dropdown-context", null), w = p(() => t.body ? W(t.body) : void 0);
|
|
35
36
|
T(
|
|
36
37
|
() => t.show,
|
|
37
38
|
(e) => {
|
|
@@ -43,24 +44,24 @@ const Z = ["data-testid"], _ = ["data-testid"], ee = {
|
|
|
43
44
|
}, E = (e) => {
|
|
44
45
|
k.value = e;
|
|
45
46
|
}, M = (e) => {
|
|
46
|
-
|
|
47
|
+
b.value = e;
|
|
47
48
|
}, m = () => {
|
|
48
49
|
if (k.value) {
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
y.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
51
|
+
y.value = !1;
|
|
51
52
|
}, 1e3);
|
|
52
53
|
return;
|
|
53
54
|
}
|
|
54
55
|
l.value = !1, u("update:show", !1), u("close");
|
|
55
|
-
},
|
|
56
|
+
}, g = () => {
|
|
56
57
|
l.value = !1, u("update:show", !1), u("close");
|
|
57
58
|
};
|
|
58
59
|
K("modal-context", { close: m, setSubmitting: E, registerFormFooter: M });
|
|
59
60
|
const N = () => {
|
|
60
61
|
t.closeOutside && m();
|
|
61
|
-
}, { onKeyStroke: P } =
|
|
62
|
+
}, { onKeyStroke: P } = Z();
|
|
62
63
|
P("Escape", m), T(l, async (e) => {
|
|
63
|
-
e ? (d?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await L(), C.value?.focus()) : (document.body.style.overflow = "", d?.onChildToggle?.(!1),
|
|
64
|
+
e ? (d?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await L(), C.value?.focus()) : (document.body.style.overflow = "", d?.onChildToggle?.(!1), b.value = !1);
|
|
64
65
|
}), A(() => {
|
|
65
66
|
l.value && d?.onChildToggle?.(!0);
|
|
66
67
|
}), U(() => {
|
|
@@ -80,14 +81,14 @@ const Z = ["data-testid"], _ = ["data-testid"], ee = {
|
|
|
80
81
|
v(e.$slots, "trigger", {}, () => [
|
|
81
82
|
o.body ? v(e.$slots, "default", { key: 0 }, void 0, !0) : r("", !0)
|
|
82
83
|
], !0)
|
|
83
|
-
], 16,
|
|
84
|
-
(s(),
|
|
84
|
+
], 16, _)) : r("", !0),
|
|
85
|
+
(s(), z(G, { to: "body" }, [
|
|
85
86
|
l.value ? (s(), a("div", {
|
|
86
87
|
key: 0,
|
|
87
88
|
class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", o.backdrop ? "v-modal-backdrop" : ""]),
|
|
88
89
|
onClick: N
|
|
89
90
|
}, [
|
|
90
|
-
|
|
91
|
+
I(H, { name: "modal-dialog" }, {
|
|
91
92
|
default: J(() => [
|
|
92
93
|
l.value ? (s(), a("div", {
|
|
93
94
|
key: 0,
|
|
@@ -96,43 +97,44 @@ const Z = ["data-testid"], _ = ["data-testid"], ee = {
|
|
|
96
97
|
tabindex: "-1",
|
|
97
98
|
role: "dialog",
|
|
98
99
|
"aria-modal": "true",
|
|
100
|
+
style: Q(o.styles),
|
|
99
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", [o.maxWidth]]),
|
|
100
102
|
"data-testid": e.$attrs["data-testid"] || (n.value ? `modal-${n.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal"),
|
|
101
103
|
onClick: $[0] || ($[0] = S(() => {
|
|
102
104
|
}, ["stop"]))
|
|
103
105
|
}, [
|
|
104
|
-
n.value ? (s(), a("div",
|
|
106
|
+
n.value ? (s(), a("div", te, [
|
|
105
107
|
h("div", {
|
|
106
108
|
class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", o.headerClass])
|
|
107
109
|
}, [
|
|
108
|
-
h("h3",
|
|
109
|
-
|
|
110
|
+
h("h3", oe, F(n.value), 1),
|
|
111
|
+
I(Y, {
|
|
110
112
|
rounded: "full",
|
|
111
113
|
size: "sm",
|
|
112
114
|
icon: "lucide:x",
|
|
113
115
|
variant: "ghost",
|
|
114
|
-
class: i({ "blink-bg":
|
|
116
|
+
class: i({ "blink-bg": y.value }),
|
|
115
117
|
"data-testid": "modal-close-btn",
|
|
116
118
|
onClick: m
|
|
117
119
|
}, null, 8, ["class"])
|
|
118
120
|
], 2)
|
|
119
121
|
])) : r("", !0),
|
|
120
122
|
h("div", {
|
|
121
|
-
class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [
|
|
123
|
+
class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [b.value ? "pb-0" : "pb-3.5", o.bodyClass]])
|
|
122
124
|
}, [
|
|
123
|
-
x.value ? (s(), a("p",
|
|
124
|
-
w.value ? (s(),
|
|
125
|
+
x.value ? (s(), a("p", le, F(x.value), 1)) : r("", !0),
|
|
126
|
+
w.value ? (s(), z(X(w.value), B({ key: 1 }, { ...o.bodyProps, ...e.$attrs }, { close: g }), null, 16)) : v(e.$slots, "default", {
|
|
125
127
|
key: 2,
|
|
126
|
-
close:
|
|
128
|
+
close: g
|
|
127
129
|
}, void 0, !0)
|
|
128
130
|
], 2),
|
|
129
131
|
e.$slots.footer ? (s(), a("div", {
|
|
130
132
|
key: 1,
|
|
131
133
|
class: i([o.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/90 rounded-b-xl bg-body"])
|
|
132
134
|
}, [
|
|
133
|
-
v(e.$slots, "footer", { close:
|
|
135
|
+
v(e.$slots, "footer", { close: g }, void 0, !0)
|
|
134
136
|
], 2)) : r("", !0)
|
|
135
|
-
],
|
|
137
|
+
], 14, ee)) : r("", !0)
|
|
136
138
|
]),
|
|
137
139
|
_: 3
|
|
138
140
|
})
|
|
@@ -142,5 +144,5 @@ const Z = ["data-testid"], _ = ["data-testid"], ee = {
|
|
|
142
144
|
}
|
|
143
145
|
});
|
|
144
146
|
export {
|
|
145
|
-
|
|
147
|
+
ne as default
|
|
146
148
|
};
|
|
@@ -37,8 +37,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
37
37
|
mask: boolean;
|
|
38
38
|
variant: "solid" | "outline" | "ghost";
|
|
39
39
|
size: "sm" | "md" | "lg";
|
|
40
|
-
placeholder: string;
|
|
41
40
|
error: boolean;
|
|
41
|
+
placeholder: string;
|
|
42
42
|
disabled: boolean;
|
|
43
43
|
modelValue: string;
|
|
44
44
|
autofocus: boolean;
|
|
@@ -23,6 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<RatingProps, {}, {}
|
|
|
23
23
|
icon: string | string[];
|
|
24
24
|
size: "sm" | "md" | "lg" | "xl";
|
|
25
25
|
solid: boolean;
|
|
26
|
+
clearable: boolean;
|
|
26
27
|
readonly: boolean;
|
|
27
28
|
disabled: boolean;
|
|
28
29
|
modelValue: number;
|
|
@@ -32,7 +33,6 @@ declare const __VLS_component: import('vue').DefineComponent<RatingProps, {}, {}
|
|
|
32
33
|
activeIcon: string | string[];
|
|
33
34
|
activeColor: string;
|
|
34
35
|
inactiveColor: string;
|
|
35
|
-
clearable: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
37
37
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
38
|
export default _default;
|
|
@@ -18,6 +18,7 @@ import "@vueuse/core";
|
|
|
18
18
|
/* empty css */
|
|
19
19
|
import "iconify-icon-picker";
|
|
20
20
|
import "iconify-icon-picker/style.css";
|
|
21
|
+
/* empty css */
|
|
21
22
|
/* empty css */
|
|
22
23
|
/* empty css */
|
|
23
24
|
/* empty css */
|
|
@@ -28,7 +29,7 @@ import "../../core/config.js";
|
|
|
28
29
|
const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
|
|
29
30
|
class: "pt-2 px-2 min-w-[295px]",
|
|
30
31
|
style: { "will-change": "transform", contain: "layout style" }
|
|
31
|
-
},
|
|
32
|
+
}, ue = /* @__PURE__ */ B({
|
|
32
33
|
__name: "ScreenFilter",
|
|
33
34
|
props: {
|
|
34
35
|
schema: {},
|
|
@@ -191,5 +192,5 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
191
192
|
}
|
|
192
193
|
});
|
|
193
194
|
export {
|
|
194
|
-
|
|
195
|
+
ue as default
|
|
195
196
|
};
|
|
@@ -18,6 +18,7 @@ interface Props {
|
|
|
18
18
|
footerClass?: string;
|
|
19
19
|
backdrop?: boolean;
|
|
20
20
|
body?: Component;
|
|
21
|
+
styles?: any;
|
|
21
22
|
bodyProps?: Record<string, any>;
|
|
22
23
|
}
|
|
23
24
|
declare function __VLS_template(): {
|
|
@@ -60,6 +61,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
60
61
|
triggerClass: string;
|
|
61
62
|
bodyClass: string;
|
|
62
63
|
footerClass: string;
|
|
64
|
+
styles: any;
|
|
63
65
|
hideCloseButton: boolean;
|
|
64
66
|
overlayClass: string;
|
|
65
67
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-69e4da90"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as E, ref as N, inject as P, computed as f, markRaw as D, watch as h, onMounted as L, onUnmounted as V, openBlock as l, createElementBlock as i, Fragment as j, createElementVNode as
|
|
2
|
-
import
|
|
3
|
-
import { useKeyStroke as
|
|
1
|
+
import { defineComponent as E, ref as N, inject as P, computed as f, markRaw as D, watch as h, onMounted as L, onUnmounted as V, openBlock as l, createElementBlock as i, Fragment as j, createElementVNode as p, mergeProps as w, withModifiers as K, renderSlot as c, createCommentVNode as a, createBlock as g, Teleport as M, normalizeClass as m, createVNode as F, Transition as R, withCtx as U, normalizeStyle as q, toDisplayString as $, resolveDynamicComponent as G } from "vue";
|
|
2
|
+
import H from "./Button.vue.js";
|
|
3
|
+
import { useKeyStroke as J } from "../composables/useKeyStroke.js";
|
|
4
4
|
import { $t as k } from "../utils/i18n.js";
|
|
5
|
-
const
|
|
5
|
+
const Q = ["data-testid"], W = ["data-testid"], X = { class: "text-lg font-bold text-foreground" }, Y = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "-text-fs-2 text-muted-foreground"
|
|
8
|
-
},
|
|
8
|
+
}, oe = /* @__PURE__ */ E({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "SidePanel",
|
|
11
11
|
props: {
|
|
@@ -26,6 +26,7 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
26
26
|
footerClass: { default: "" },
|
|
27
27
|
backdrop: { type: Boolean, default: !0 },
|
|
28
28
|
body: {},
|
|
29
|
+
styles: { default: {} },
|
|
29
30
|
bodyProps: {}
|
|
30
31
|
},
|
|
31
32
|
emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
|
|
@@ -45,7 +46,7 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
45
46
|
s.value = !1, v("update:show", !1), v("close");
|
|
46
47
|
}, T = () => {
|
|
47
48
|
t.closeOutside && n();
|
|
48
|
-
}, { onKeyStroke: z } =
|
|
49
|
+
}, { onKeyStroke: z } = J();
|
|
49
50
|
z("Escape", n), h(s, (e) => {
|
|
50
51
|
u && clearTimeout(u), e ? (r?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
|
|
51
52
|
r?.onChildToggle?.(!1);
|
|
@@ -55,17 +56,17 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
55
56
|
}), V(() => {
|
|
56
57
|
u && clearTimeout(u), s.value && r?.onChildToggle?.(!1), document.body.style.overflow = "";
|
|
57
58
|
});
|
|
58
|
-
const
|
|
59
|
+
const S = {
|
|
59
60
|
sm: "max-w-sm",
|
|
60
61
|
md: "max-w-md",
|
|
61
62
|
lg: "max-w-lg",
|
|
62
63
|
xl: "max-w-xl",
|
|
63
64
|
full: "max-w-full"
|
|
64
|
-
},
|
|
65
|
+
}, A = f(() => t.position === "left" ? "left-0 rounded-r-lg" : "right-0 rounded-l-md"), O = f(() => t.position === "left" ? "slide-left" : "slide-right"), d = f(() => t.titleI18n ? k(t.titleI18n) : t.title), C = f(
|
|
65
66
|
() => t.descriptionI18n ? k(t.descriptionI18n) : t.description
|
|
66
67
|
);
|
|
67
|
-
return (e,
|
|
68
|
-
|
|
68
|
+
return (e, y) => (l(), i(j, null, [
|
|
69
|
+
p("span", w({
|
|
69
70
|
onClick: K(B, ["stop"]),
|
|
70
71
|
class: `${o.triggerClass}`
|
|
71
72
|
}, e.$attrs, {
|
|
@@ -74,7 +75,7 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
74
75
|
c(e.$slots, "trigger", {}, () => [
|
|
75
76
|
o.body ? c(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
|
|
76
77
|
], !0)
|
|
77
|
-
], 16,
|
|
78
|
+
], 16, Q),
|
|
78
79
|
(l(), g(M, { to: "body" }, [
|
|
79
80
|
s.value ? (l(), i("div", {
|
|
80
81
|
key: 0,
|
|
@@ -82,16 +83,17 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
82
83
|
onClick: T
|
|
83
84
|
}, null, 2)) : a("", !0),
|
|
84
85
|
F(R, {
|
|
85
|
-
name:
|
|
86
|
-
onAfterEnter:
|
|
87
|
-
onAfterLeave:
|
|
86
|
+
name: O.value,
|
|
87
|
+
onAfterEnter: y[0] || (y[0] = (I) => e.$emit("onAfterOpen")),
|
|
88
|
+
onAfterLeave: y[1] || (y[1] = (I) => e.$emit("onAfterClose"))
|
|
88
89
|
}, {
|
|
89
90
|
default: U(() => [
|
|
90
91
|
s.value ? (l(), i("div", {
|
|
91
92
|
key: 0,
|
|
92
93
|
role: "dialog",
|
|
94
|
+
style: q(o.styles),
|
|
93
95
|
"aria-modal": "true",
|
|
94
|
-
class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border border-border/80 w-full", [
|
|
96
|
+
class: m(["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]]),
|
|
95
97
|
"data-testid": e.$attrs["data-testid"] || (d.value ? `sidepanel-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
|
|
96
98
|
}, [
|
|
97
99
|
d.value || e.$slots.header ? (l(), i("div", {
|
|
@@ -99,12 +101,12 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
99
101
|
class: m([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
|
|
100
102
|
}, [
|
|
101
103
|
c(e.$slots, "header", {}, () => [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
C.value ? (l(), i("p",
|
|
104
|
+
p("div", null, [
|
|
105
|
+
p("h3", X, $(d.value), 1),
|
|
106
|
+
C.value ? (l(), i("p", Y, $(C.value), 1)) : a("", !0)
|
|
105
107
|
])
|
|
106
108
|
], !0),
|
|
107
|
-
o.hideCloseButton ? a("", !0) : (l(), g(
|
|
109
|
+
o.hideCloseButton ? a("", !0) : (l(), g(H, {
|
|
108
110
|
key: 0,
|
|
109
111
|
rounded: "full",
|
|
110
112
|
size: "sm",
|
|
@@ -115,10 +117,10 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
115
117
|
"data-testid": "sidepanel-close-btn"
|
|
116
118
|
}))
|
|
117
119
|
], 2)) : a("", !0),
|
|
118
|
-
|
|
120
|
+
p("div", {
|
|
119
121
|
class: m(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
|
|
120
122
|
}, [
|
|
121
|
-
b.value ? (l(), g(
|
|
123
|
+
b.value ? (l(), g(G(b.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : c(e.$slots, "default", {
|
|
122
124
|
key: 1,
|
|
123
125
|
close: n
|
|
124
126
|
}, void 0, !0)
|
|
@@ -129,7 +131,7 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
129
131
|
}, [
|
|
130
132
|
c(e.$slots, "footer", { close: n }, void 0, !0)
|
|
131
133
|
], 2)) : a("", !0)
|
|
132
|
-
],
|
|
134
|
+
], 14, W)) : a("", !0)
|
|
133
135
|
]),
|
|
134
136
|
_: 3
|
|
135
137
|
}, 8, ["name"])
|
|
@@ -138,5 +140,5 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
138
140
|
}
|
|
139
141
|
});
|
|
140
142
|
export {
|
|
141
|
-
|
|
143
|
+
oe as default
|
|
142
144
|
};
|