vlite3 1.4.40 → 1.5.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/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -1
- package/components/DataTable/DataTable.vue.js +374 -263
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +6 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +25 -4
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +274 -211
- package/components/Tabes/tabes.utils.d.ts +30 -0
- package/components/Tabes/tabes.utils.js +49 -18
- package/components/Tabes/types.d.ts +7 -0
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +5 -4
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as M, ref as k, onMounted as W, onUnmounted as j, computed as p, openBlock as b, createElementBlock as E, createVNode as n, unref as A, withCtx as i, createElementVNode as w, createTextVNode as f, toDisplayString as r } from "vue";
|
|
2
|
+
import L from "v-event-calendar";
|
|
3
3
|
import l from "../Button.vue.js";
|
|
4
4
|
import h from "../ButtonGroup.vue.js";
|
|
5
5
|
import { $t as B } from "../../utils/i18n.js";
|
|
6
6
|
import "v-event-calendar/style.css";
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import P from "./CalendarEventItem.vue.js";
|
|
8
|
+
const R = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border-border rounded-xl shadow-sm overflow-hidden flex flex-col" }, _ = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex items-center justify-between p-4 border-b border-border bg-body"
|
|
11
11
|
}, G = { class: "flex items-center gap-2" }, I = { class: "text-lg font-bold text-foreground truncate mx-2" }, q = { class: "flex items-center gap-2" }, F = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "flex max-sm:flex-col sm:justify-between gap-2 sm:px-4 py-4 border-b border-border bg-body"
|
|
14
|
-
}, H = { class: "text-base font-bold text-foreground text-center" }, ee = /* @__PURE__ */
|
|
14
|
+
}, H = { class: "text-base font-bold text-foreground text-center" }, ee = /* @__PURE__ */ M({
|
|
15
15
|
__name: "Calendar",
|
|
16
16
|
props: {
|
|
17
17
|
events: {},
|
|
@@ -29,14 +29,14 @@ const P = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border
|
|
|
29
29
|
"dateChange",
|
|
30
30
|
"dayClick"
|
|
31
31
|
],
|
|
32
|
-
setup(c, { emit:
|
|
33
|
-
const d =
|
|
32
|
+
setup(c, { emit: N }) {
|
|
33
|
+
const d = N, s = k(), v = k("month"), x = k(!1), C = () => {
|
|
34
34
|
const o = window.innerWidth < 1200;
|
|
35
35
|
o !== x.value && (x.value = o, o && (v.value = "date", s.value?.setView("date")));
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
W(() => {
|
|
38
38
|
C(), window.addEventListener("resize", C);
|
|
39
|
-
}),
|
|
39
|
+
}), j(() => {
|
|
40
40
|
window.removeEventListener("resize", C);
|
|
41
41
|
});
|
|
42
42
|
const g = (o) => {
|
|
@@ -44,9 +44,9 @@ const P = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border
|
|
|
44
44
|
}, z = () => s.value?.goToToday(), T = () => s.value?.goToPrevious(), D = () => s.value?.goToNext(), y = (o, e, t) => {
|
|
45
45
|
const a = t ? B(o, t) : B(o);
|
|
46
46
|
return a !== o ? a : e;
|
|
47
|
-
},
|
|
48
|
-
return (o, e) => (b(), E("div",
|
|
49
|
-
n(
|
|
47
|
+
}, S = p(() => y("vlite.calendar.month", "Month")), $ = p(() => y("vlite.calendar.week", "Week")), U = p(() => y("vlite.calendar.day", "Day")), V = p(() => y("vlite.calendar.today", "Today"));
|
|
48
|
+
return (o, e) => (b(), E("div", R, [
|
|
49
|
+
n(A(L), {
|
|
50
50
|
ref_key: "calendarRef",
|
|
51
51
|
ref: s,
|
|
52
52
|
events: c.events,
|
|
@@ -91,7 +91,7 @@ const P = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border
|
|
|
91
91
|
]),
|
|
92
92
|
_: 1
|
|
93
93
|
})
|
|
94
|
-
])) : (b(), E("div",
|
|
94
|
+
])) : (b(), E("div", _, [
|
|
95
95
|
w("div", G, [
|
|
96
96
|
n(h, null, {
|
|
97
97
|
default: i(() => [
|
|
@@ -102,7 +102,7 @@ const P = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border
|
|
|
102
102
|
onClick: e[0] || (e[0] = (a) => g("month"))
|
|
103
103
|
}, {
|
|
104
104
|
default: i(() => [
|
|
105
|
-
f(r(
|
|
105
|
+
f(r(S.value), 1)
|
|
106
106
|
]),
|
|
107
107
|
_: 1
|
|
108
108
|
}, 8, ["variant"]),
|
|
@@ -113,7 +113,7 @@ const P = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border
|
|
|
113
113
|
onClick: e[1] || (e[1] = (a) => g("week"))
|
|
114
114
|
}, {
|
|
115
115
|
default: i(() => [
|
|
116
|
-
f(r(
|
|
116
|
+
f(r($.value), 1)
|
|
117
117
|
]),
|
|
118
118
|
_: 1
|
|
119
119
|
}, 8, ["variant"]),
|
|
@@ -165,7 +165,7 @@ const P = { class: "h-[calc(100vh-1px)] v-calendar lg:mt-2 bg-body border border
|
|
|
165
165
|
]))
|
|
166
166
|
]),
|
|
167
167
|
event: i(({ event: t, view: a, displayTime: u }) => [
|
|
168
|
-
n(
|
|
168
|
+
n(P, {
|
|
169
169
|
event: t,
|
|
170
170
|
view: a,
|
|
171
171
|
displayTime: u,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, computed as t, ref as K, watch as D, openBlock as a, createElementBlock as u, normalizeClass as n, createElementVNode as p, createVNode as i, withKeys as L, createSlots as M, withCtx as B, createTextVNode as x, toDisplayString as f, createCommentVNode as r, unref as T, createBlock as R } from "vue";
|
|
2
2
|
import C from "../Icon.vue.js";
|
|
3
3
|
import U from "../Input.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
5
|
+
import z from "../Button.vue.js";
|
|
6
6
|
import E from "../Price/Price.vue.js";
|
|
7
|
-
const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min-w-0 flex-1" }, F = { class: "shrink-0 inline-flex items-center justify-center w-7 h-7 rounded-full bg-success text-success-fg" }, G = { class: "min-w-0 flex-1" }, H = { class: "flex items-center gap-1.5 flex-wrap" }, _ = /* @__PURE__ */
|
|
7
|
+
const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min-w-0 flex-1" }, F = { class: "shrink-0 inline-flex items-center justify-center w-7 h-7 rounded-full bg-success text-success-fg" }, G = { class: "min-w-0 flex-1" }, H = { class: "flex items-center gap-1.5 flex-wrap" }, _ = /* @__PURE__ */ $({
|
|
8
8
|
__name: "CartCouponInput",
|
|
9
9
|
props: {
|
|
10
10
|
coupon: {},
|
|
@@ -15,11 +15,11 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["apply", "remove", "change"],
|
|
17
17
|
setup(e, { emit: N }) {
|
|
18
|
-
const c = e, g = N, m = t(() => c.labels || {}),
|
|
18
|
+
const c = e, g = N, m = t(() => c.labels || {}), o = K(c.coupon?.code ?? "");
|
|
19
19
|
D(
|
|
20
20
|
() => c.coupon?.code,
|
|
21
|
-
(
|
|
22
|
-
|
|
21
|
+
(l) => {
|
|
22
|
+
l !== void 0 && l !== o.value && (o.value = l);
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
25
|
const v = t(() => c.coupon?.state ?? "idle"), y = t(() => v.value === "applied"), A = t(() => v.value === "applying"), h = t(() => v.value === "invalid"), b = t(() => v.value === "expired"), k = t(() => v.value === "error"), I = t(() => A.value || y.value || c.readonly), w = t(() => h.value ? c.coupon?.message || "Invalid coupon code. Please try again." : b.value ? c.coupon?.message || "This coupon has expired and can no longer be applied." : k.value ? c.coupon?.message || "We could not apply this coupon. Please try again." : ""), s = t(() => h.value ? {
|
|
@@ -38,17 +38,17 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
38
38
|
helperClass: "text-danger",
|
|
39
39
|
helperText: w.value
|
|
40
40
|
} : null);
|
|
41
|
-
function
|
|
42
|
-
|
|
41
|
+
function j(l) {
|
|
42
|
+
o.value = String(l), g("change", o.value);
|
|
43
43
|
}
|
|
44
44
|
function V() {
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const l = o.value.trim();
|
|
46
|
+
l && g("apply", l);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
48
|
+
function P() {
|
|
49
|
+
o.value = "", g("remove");
|
|
50
50
|
}
|
|
51
|
-
return (
|
|
51
|
+
return (l, d) => (a(), u("div", {
|
|
52
52
|
class: n(["v-cart-coupon w-full", e.compact ? "space-y-1.5" : "space-y-2"])
|
|
53
53
|
}, [
|
|
54
54
|
y.value ? r("", !0) : (a(), u("div", {
|
|
@@ -57,10 +57,10 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
57
57
|
}, [
|
|
58
58
|
p("div", W, [
|
|
59
59
|
i(U, {
|
|
60
|
-
modelValue:
|
|
60
|
+
modelValue: o.value,
|
|
61
61
|
"onUpdate:modelValue": [
|
|
62
|
-
d[0] || (d[0] = (
|
|
63
|
-
|
|
62
|
+
d[0] || (d[0] = (S) => o.value = S),
|
|
63
|
+
j
|
|
64
64
|
],
|
|
65
65
|
placeholder: m.value.couponPlaceholder || "Enter coupon code",
|
|
66
66
|
icon: "lucide:ticket-percent",
|
|
@@ -75,7 +75,7 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
75
75
|
}, M({ _: 2 }, [
|
|
76
76
|
s.value ? {
|
|
77
77
|
name: "addon-right",
|
|
78
|
-
fn:
|
|
78
|
+
fn: B(() => [
|
|
79
79
|
i(C, {
|
|
80
80
|
icon: s.value.rightIcon,
|
|
81
81
|
class: n([
|
|
@@ -88,16 +88,16 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
88
88
|
} : void 0
|
|
89
89
|
]), 1032, ["modelValue", "placeholder", "input-class", "disabled", "readonly", "aria-label"])
|
|
90
90
|
]),
|
|
91
|
-
i(
|
|
91
|
+
i(z, {
|
|
92
92
|
variant: "primary",
|
|
93
93
|
size: "md",
|
|
94
94
|
loading: A.value,
|
|
95
|
-
disabled: !
|
|
95
|
+
disabled: !o.value.trim() || I.value,
|
|
96
96
|
"aria-label": m.value.applyCoupon || "Apply coupon",
|
|
97
97
|
class: "shrink-0",
|
|
98
98
|
onClick: V
|
|
99
99
|
}, {
|
|
100
|
-
default:
|
|
100
|
+
default: B(() => [
|
|
101
101
|
x(f(m.value.applyCoupon || "Apply"), 1)
|
|
102
102
|
]),
|
|
103
103
|
_: 1
|
|
@@ -137,7 +137,7 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
137
137
|
class: n(["inline-flex items-center px-1.5 py-0.5 rounded bg-success/10 text-success font-bold", e.compact ? "text-[9px]" : "text-[10px]"])
|
|
138
138
|
}, [
|
|
139
139
|
d[1] || (d[1] = x(" −", -1)),
|
|
140
|
-
i(
|
|
140
|
+
i(T(E), {
|
|
141
141
|
value: e.coupon.discountAmount,
|
|
142
142
|
currency: e.currency,
|
|
143
143
|
class: "text-success"
|
|
@@ -147,7 +147,7 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
147
147
|
key: 2,
|
|
148
148
|
class: n(["inline-flex items-center px-1.5 py-0.5 rounded bg-success/5 text-success font-semibold", e.compact ? "text-[9px]" : "text-[10px]"])
|
|
149
149
|
}, [
|
|
150
|
-
i(
|
|
150
|
+
i(T(E), {
|
|
151
151
|
value: e.coupon.discountAmount,
|
|
152
152
|
currency: e.currency,
|
|
153
153
|
class: "text-success"
|
|
@@ -161,14 +161,14 @@ const W = { class: "flex-1 min-w-0" }, q = { class: "flex items-center gap-2 min
|
|
|
161
161
|
}, f(e.coupon.description), 3)) : r("", !0)
|
|
162
162
|
])
|
|
163
163
|
]),
|
|
164
|
-
e.readonly ? r("", !0) : (a(), R(
|
|
164
|
+
e.readonly ? r("", !0) : (a(), R(z, {
|
|
165
165
|
key: 0,
|
|
166
166
|
variant: "ghost",
|
|
167
167
|
size: e.compact ? "xs" : "sm",
|
|
168
168
|
icon: "lucide:x",
|
|
169
169
|
class: "shrink-0 inline-flex items-center justify-center rounded-md text-muted-foreground hover:bg-success/20 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
170
170
|
"aria-label": m.value.removeCoupon || "Remove coupon",
|
|
171
|
-
onClick:
|
|
171
|
+
onClick: P
|
|
172
172
|
}, null, 8, ["size", "aria-label"]))
|
|
173
173
|
], 2)) : r("", !0)
|
|
174
174
|
], 2));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r, computed as p, openBlock as u, createElementBlock as d, normalizeClass as t, createElementVNode as o, createVNode as s, toDisplayString as n, withCtx as f, createTextVNode as x } from "vue";
|
|
2
2
|
import y from "../Icon.vue.js";
|
|
3
3
|
import g from "../Button.vue.js";
|
|
4
|
-
const h = { class: "space-y-1" },
|
|
4
|
+
const h = { class: "space-y-1" }, k = /* @__PURE__ */ r({
|
|
5
5
|
__name: "CartEmptyState",
|
|
6
6
|
props: {
|
|
7
7
|
labels: {},
|
|
@@ -9,7 +9,7 @@ const h = { class: "space-y-1" }, z = /* @__PURE__ */ r({
|
|
|
9
9
|
},
|
|
10
10
|
emits: ["continue-shopping"],
|
|
11
11
|
setup(e, { emit: i }) {
|
|
12
|
-
const
|
|
12
|
+
const l = e, m = i, c = p(() => l.labels || {});
|
|
13
13
|
return (v, a) => (u(), d("div", {
|
|
14
14
|
class: t(["v-cart-empty flex flex-col items-center justify-center text-center", e.compact ? "py-10 px-4 gap-3" : "py-16 px-6 gap-4"])
|
|
15
15
|
}, [
|
|
@@ -33,7 +33,7 @@ const h = { class: "space-y-1" }, z = /* @__PURE__ */ r({
|
|
|
33
33
|
variant: "primary",
|
|
34
34
|
size: e.compact ? "sm" : "md",
|
|
35
35
|
icon: "lucide:arrow-left",
|
|
36
|
-
onClick: a[0] || (a[0] = (w) =>
|
|
36
|
+
onClick: a[0] || (a[0] = (w) => m("continue-shopping"))
|
|
37
37
|
}, {
|
|
38
38
|
default: f(() => [
|
|
39
39
|
x(n(c.value.emptyAction || "Continue shopping"), 1)
|
|
@@ -44,5 +44,5 @@ const h = { class: "space-y-1" }, z = /* @__PURE__ */ r({
|
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
k as default
|
|
48
48
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as R, computed as r, openBlock as a, createElementBlock as l, normalizeClass as t, createCommentVNode as c, createElementVNode as n, toDisplayString as s, createBlock as v, unref as
|
|
1
|
+
import { defineComponent as R, computed as r, openBlock as a, createElementBlock as l, normalizeClass as t, createCommentVNode as c, createElementVNode as n, toDisplayString as s, createBlock as v, unref as m, createVNode as u, Fragment as I, createTextVNode as M } from "vue";
|
|
2
2
|
import d from "../Price/Price.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import o from "../Button.vue.js";
|
|
4
4
|
const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" }, E = ["title"], F = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-muted-foreground uppercase tracking-wider font-medium"
|
|
7
|
-
},
|
|
7
|
+
}, L = { class: "flex items-center justify-between gap-2 mt-1.5" }, O = { class: "flex items-center gap-1.5" }, $ = ["value", "aria-label"], A = { class: "flex-1 min-w-0" }, G = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-muted-foreground uppercase tracking-wider"
|
|
10
10
|
}, H = {
|
|
@@ -35,25 +35,25 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:quantity", "remove"],
|
|
37
37
|
setup(e, { emit: D }) {
|
|
38
|
-
const i = e, y = D, f = r(() => i.labels || {}),
|
|
38
|
+
const i = e, y = D, f = r(() => i.labels || {}), B = r(() => i.features.thumbnails && i.layout !== "compact" && i.layout !== "mini"), N = r(() => i.features.description && !i.compact), q = r(() => i.features.sku), b = r(() => i.features.itemVariant && !!i.item.variant), z = r(() => i.features.editableQuantity && !i.readonly), g = r(() => i.features.removable && !i.readonly), h = r(() => i.item.maxQuantity !== void 0 && i.item.quantity >= i.item.maxQuantity), k = r(() => i.item.quantity <= 1), C = r(() => (i.item.price || 0) * (i.item.quantity || 0));
|
|
39
39
|
function j() {
|
|
40
40
|
h.value || y("update:quantity", i.item.id, i.item.quantity + 1);
|
|
41
41
|
}
|
|
42
42
|
function Q() {
|
|
43
43
|
k.value || y("update:quantity", i.item.id, i.item.quantity - 1);
|
|
44
44
|
}
|
|
45
|
-
function V
|
|
46
|
-
const x = Number(
|
|
45
|
+
function S(V) {
|
|
46
|
+
const x = Number(V.target.value);
|
|
47
47
|
Number.isFinite(x) && x > 0 && y("update:quantity", i.item.id, Math.floor(x));
|
|
48
48
|
}
|
|
49
49
|
function w() {
|
|
50
50
|
y("remove", i.item.id);
|
|
51
51
|
}
|
|
52
|
-
return (
|
|
52
|
+
return (V, x) => e.layout === "drawer" ? (a(), l("div", {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: t(["v-cart-line flex gap-3 items-start", [e.item.inStock === !1 ? "opacity-60" : "", e.compact ? "py-2" : "py-3"]])
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
B.value ? (a(), l("div", {
|
|
57
57
|
key: 0,
|
|
58
58
|
class: t(["shrink-0 overflow-hidden border border-border bg-muted", e.compact ? "w-12 h-12 rounded" : "w-16 h-16 rounded-md"])
|
|
59
59
|
}, [
|
|
@@ -69,7 +69,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
69
69
|
class: t(["font-semibold text-foreground leading-tight truncate", e.compact ? "text-xs" : "text-sm"]),
|
|
70
70
|
title: e.item.name
|
|
71
71
|
}, s(e.item.name), 11, E),
|
|
72
|
-
|
|
72
|
+
N.value && e.item.description ? (a(), l("p", {
|
|
73
73
|
key: 0,
|
|
74
74
|
class: t(["text-muted-foreground leading-snug line-clamp-1", e.compact ? "text-[10px]" : "text-xs"])
|
|
75
75
|
}, s(e.item.description), 3)) : c("", !0),
|
|
@@ -86,28 +86,28 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
86
86
|
class: t(["inline-flex items-center px-1.5 py-0.5 rounded bg-danger-light text-danger font-semibold uppercase tracking-wider", e.compact ? "text-[9px]" : "text-[10px]"])
|
|
87
87
|
}, " Out of stock ", 2)) : c("", !0)
|
|
88
88
|
], 2),
|
|
89
|
-
n("div",
|
|
89
|
+
n("div", L, [
|
|
90
90
|
n("div", {
|
|
91
91
|
class: t(["flex items-center gap-1.5", e.compact ? "text-xs" : "text-sm"])
|
|
92
92
|
}, [
|
|
93
|
-
e.item.originalPrice && e.item.originalPrice > e.item.price ? (a(), v(
|
|
93
|
+
e.item.originalPrice && e.item.originalPrice > e.item.price ? (a(), v(m(d), {
|
|
94
94
|
key: 0,
|
|
95
95
|
value: e.item.originalPrice,
|
|
96
96
|
currency: e.currency,
|
|
97
97
|
class: t(["text-muted-foreground line-through tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
|
|
98
98
|
}, null, 8, ["value", "currency", "class"])) : c("", !0),
|
|
99
|
-
u(
|
|
99
|
+
u(m(d), {
|
|
100
100
|
value: e.item.price,
|
|
101
101
|
currency: e.currency,
|
|
102
102
|
class: t(["font-bold text-foreground tabular-nums", e.compact ? "text-xs" : "text-sm"])
|
|
103
103
|
}, null, 8, ["value", "currency", "class"])
|
|
104
104
|
], 2),
|
|
105
|
-
n("div",
|
|
105
|
+
n("div", O, [
|
|
106
106
|
z.value ? (a(), l("div", {
|
|
107
107
|
key: 0,
|
|
108
108
|
class: t(["inline-flex items-center rounded border border-input bg-background overflow-hidden", e.compact ? "h-6" : "h-7"])
|
|
109
109
|
}, [
|
|
110
|
-
u(
|
|
110
|
+
u(o, {
|
|
111
111
|
variant: "ghost",
|
|
112
112
|
rounded: "none",
|
|
113
113
|
size: e.compact ? "xs" : "sm",
|
|
@@ -123,9 +123,9 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
123
123
|
class: t(["w-7 text-center bg-transparent border-0 outline-none text-foreground font-semibold tabular-nums", e.compact ? "text-[11px]" : "text-xs"]),
|
|
124
124
|
value: e.item.quantity,
|
|
125
125
|
"aria-label": f.value.quantity || "Quantity",
|
|
126
|
-
onChange:
|
|
127
|
-
}, null, 42,
|
|
128
|
-
u(
|
|
126
|
+
onChange: S
|
|
127
|
+
}, null, 42, $),
|
|
128
|
+
u(o, {
|
|
129
129
|
variant: "ghost",
|
|
130
130
|
rounded: "none",
|
|
131
131
|
size: e.compact ? "xs" : "sm",
|
|
@@ -139,7 +139,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
139
139
|
key: 1,
|
|
140
140
|
class: t(["inline-flex items-center justify-center px-2 rounded bg-muted text-foreground font-semibold tabular-nums", [e.compact ? "h-6 text-[11px]" : "h-7 text-xs"]])
|
|
141
141
|
}, " ×" + s(e.item.quantity), 3)),
|
|
142
|
-
g.value ? (a(), v(
|
|
142
|
+
g.value ? (a(), v(o, {
|
|
143
143
|
key: 2,
|
|
144
144
|
variant: "ghost",
|
|
145
145
|
size: e.compact ? "xs" : "sm",
|
|
@@ -165,7 +165,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
165
165
|
b.value ? (a(), l("span", H, "· " + s(e.item.variant), 1)) : c("", !0),
|
|
166
166
|
x[0] || (x[0] = n("span", { class: "text-muted-foreground" }, "·", -1)),
|
|
167
167
|
n("span", J, [
|
|
168
|
-
u(
|
|
168
|
+
u(m(d), {
|
|
169
169
|
value: e.item.price,
|
|
170
170
|
currency: e.currency,
|
|
171
171
|
class: "text-muted-foreground"
|
|
@@ -174,7 +174,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
174
174
|
], 2)
|
|
175
175
|
]),
|
|
176
176
|
z.value ? (a(), l("div", K, [
|
|
177
|
-
u(
|
|
177
|
+
u(o, {
|
|
178
178
|
variant: "ghost",
|
|
179
179
|
rounded: "none",
|
|
180
180
|
size: "xs",
|
|
@@ -185,7 +185,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
185
185
|
onClick: Q
|
|
186
186
|
}, null, 8, ["disabled"]),
|
|
187
187
|
n("span", U, s(e.item.quantity), 1),
|
|
188
|
-
u(
|
|
188
|
+
u(o, {
|
|
189
189
|
variant: "ghost",
|
|
190
190
|
rounded: "none",
|
|
191
191
|
size: "xs",
|
|
@@ -196,12 +196,12 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
196
196
|
onClick: j
|
|
197
197
|
}, null, 8, ["disabled"])
|
|
198
198
|
])) : (a(), l("span", W, "×" + s(e.item.quantity), 1)),
|
|
199
|
-
u(
|
|
199
|
+
u(m(d), {
|
|
200
200
|
value: C.value,
|
|
201
201
|
currency: e.currency,
|
|
202
202
|
class: t(["font-bold text-foreground tabular-nums shrink-0 w-16 text-right", e.compact ? "text-xs" : "text-sm"])
|
|
203
203
|
}, null, 8, ["value", "currency", "class"]),
|
|
204
|
-
g.value ? (a(), v(
|
|
204
|
+
g.value ? (a(), v(o, {
|
|
205
205
|
key: 2,
|
|
206
206
|
variant: "ghost",
|
|
207
207
|
size: "xs",
|
|
@@ -214,7 +214,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
214
214
|
key: 2,
|
|
215
215
|
class: t(["v-cart-line flex gap-3 p-3 border border-border", [e.item.inStock === !1 ? "opacity-60" : "", e.compact ? "p-2" : ""]])
|
|
216
216
|
}, [
|
|
217
|
-
|
|
217
|
+
B.value ? (a(), l("div", {
|
|
218
218
|
key: 0,
|
|
219
219
|
class: t(["shrink-0 overflow-hidden border border-border bg-muted rounded-md", e.compact ? "w-14 h-14" : "w-20 h-20"])
|
|
220
220
|
}, [
|
|
@@ -231,7 +231,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
231
231
|
n("p", {
|
|
232
232
|
class: t(["font-semibold text-foreground leading-tight", e.compact ? "text-xs" : "text-sm"])
|
|
233
233
|
}, s(e.item.name), 3),
|
|
234
|
-
|
|
234
|
+
N.value && e.item.description ? (a(), l("p", {
|
|
235
235
|
key: 0,
|
|
236
236
|
class: t(["text-muted-foreground line-clamp-2 leading-snug", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-1"])
|
|
237
237
|
}, s(e.item.description), 3)) : c("", !0),
|
|
@@ -242,7 +242,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
242
242
|
b.value ? (a(), l("span", ee, s(e.item.variant), 1)) : c("", !0)
|
|
243
243
|
], 2)
|
|
244
244
|
]),
|
|
245
|
-
u(
|
|
245
|
+
u(m(d), {
|
|
246
246
|
value: C.value,
|
|
247
247
|
currency: e.currency,
|
|
248
248
|
class: t(["font-extrabold text-foreground tabular-nums shrink-0", e.compact ? "text-sm" : "text-base"])
|
|
@@ -253,7 +253,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
253
253
|
n("span", {
|
|
254
254
|
class: t(["text-muted-foreground tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
|
|
255
255
|
}, [
|
|
256
|
-
u(
|
|
256
|
+
u(m(d), {
|
|
257
257
|
value: e.item.price,
|
|
258
258
|
currency: e.currency,
|
|
259
259
|
class: "text-muted-foreground"
|
|
@@ -268,7 +268,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
268
268
|
key: 0,
|
|
269
269
|
class: t(["inline-flex items-center rounded border border-input bg-background overflow-hidden", e.compact ? "h-7" : "h-8"])
|
|
270
270
|
}, [
|
|
271
|
-
u(
|
|
271
|
+
u(o, {
|
|
272
272
|
variant: "ghost",
|
|
273
273
|
rounded: "none",
|
|
274
274
|
size: e.compact ? "xs" : "sm",
|
|
@@ -284,9 +284,9 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
284
284
|
class: t(["w-8 text-center bg-transparent border-0 outline-none font-semibold tabular-nums", e.compact ? "text-xs" : "text-sm"]),
|
|
285
285
|
value: e.item.quantity,
|
|
286
286
|
"aria-label": f.value.quantity || "Quantity",
|
|
287
|
-
onChange:
|
|
287
|
+
onChange: S
|
|
288
288
|
}, null, 42, ie),
|
|
289
|
-
u(
|
|
289
|
+
u(o, {
|
|
290
290
|
variant: "ghost",
|
|
291
291
|
rounded: "none",
|
|
292
292
|
size: e.compact ? "xs" : "sm",
|
|
@@ -300,7 +300,7 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
300
300
|
key: 1,
|
|
301
301
|
class: t(["inline-flex items-center justify-center px-2 rounded bg-muted text-foreground font-semibold tabular-nums", [e.compact ? "h-7 text-xs" : "h-8 text-sm"]])
|
|
302
302
|
}, " ×" + s(e.item.quantity), 3)),
|
|
303
|
-
g.value ? (a(), v(
|
|
303
|
+
g.value ? (a(), v(o, {
|
|
304
304
|
key: 2,
|
|
305
305
|
variant: "ghost",
|
|
306
306
|
size: e.compact ? "sm" : "sm2",
|
|
@@ -327,12 +327,12 @@ const P = ["src", "alt"], T = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
327
327
|
n("span", {
|
|
328
328
|
class: t(["text-muted-foreground tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
|
|
329
329
|
}, " ×" + s(e.item.quantity), 3),
|
|
330
|
-
u(
|
|
330
|
+
u(m(d), {
|
|
331
331
|
value: C.value,
|
|
332
332
|
currency: e.currency,
|
|
333
333
|
class: t(["font-semibold text-foreground tabular-nums shrink-0", e.compact ? "text-xs" : "text-sm"])
|
|
334
334
|
}, null, 8, ["value", "currency", "class"]),
|
|
335
|
-
g.value ? (a(), v(
|
|
335
|
+
g.value ? (a(), v(o, {
|
|
336
336
|
key: 0,
|
|
337
337
|
variant: "ghost",
|
|
338
338
|
size: "xs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as q, computed as r, openBlock as a, createElementBlock as c, normalizeStyle as D, normalizeClass as d, createElementVNode as b, createVNode as x, toDisplayString as v, createCommentVNode as i, createBlock as f, Fragment as L, renderList as N, withCtx as w, createTextVNode as S } from "vue";
|
|
2
2
|
import E from "../Icon.vue.js";
|
|
3
3
|
import C from "../Button.vue.js";
|
|
4
4
|
import I from "./CartLineItem.vue.js";
|
|
@@ -14,7 +14,7 @@ const F = { class: "min-w-0 flex-1" }, T = { class: "flex items-center gap-2" },
|
|
|
14
14
|
}, G = { class: "flex-1 min-h-0 overflow-y-auto" }, H = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "space-y-2 pt-1"
|
|
17
|
-
}, X = /* @__PURE__ */
|
|
17
|
+
}, X = /* @__PURE__ */ q({
|
|
18
18
|
__name: "CartVariant1",
|
|
19
19
|
props: {
|
|
20
20
|
data: {},
|
|
@@ -87,7 +87,7 @@ const F = { class: "min-w-0 flex-1" }, T = { class: "flex items-center gap-2" },
|
|
|
87
87
|
readonly: e.data.readonly,
|
|
88
88
|
currency: g.value,
|
|
89
89
|
layout: "drawer",
|
|
90
|
-
"onUpdate:quantity": t[2] || (t[2] = (h,
|
|
90
|
+
"onUpdate:quantity": t[2] || (t[2] = (h, B) => u("update:quantity", h, B)),
|
|
91
91
|
onRemove: t[3] || (t[3] = (h) => u("remove", h))
|
|
92
92
|
}, null, 8, ["item", "features", "labels", "compact", "readonly", "currency"])
|
|
93
93
|
]))), 128))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as B, computed as r, openBlock as a, createElementBlock as s, normalizeClass as o, createElementVNode as n, createBlock as v, createCommentVNode as d, toDisplayString as p, Fragment as L, renderList as N, createVNode as C, withCtx as w, createTextVNode as S } from "vue";
|
|
2
|
+
import q from "../Icon.vue.js";
|
|
3
3
|
import $ from "../Button.vue.js";
|
|
4
4
|
import A from "./CartLineItem.vue.js";
|
|
5
5
|
import D from "./CartSummary.vue.js";
|
|
@@ -11,7 +11,7 @@ const R = { class: "flex items-center justify-center gap-1.5" }, j = { class: "f
|
|
|
11
11
|
}, U = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "grid grid-cols-2 gap-2"
|
|
14
|
-
}, Q = /* @__PURE__ */
|
|
14
|
+
}, Q = /* @__PURE__ */ B({
|
|
15
15
|
__name: "CartVariant2",
|
|
16
16
|
props: {
|
|
17
17
|
data: {},
|
|
@@ -34,7 +34,7 @@ const R = { class: "flex items-center justify-center gap-1.5" }, j = { class: "f
|
|
|
34
34
|
class: o(["text-center border-b border-dashed border-border shrink-0", e.compact ? "p-3" : "p-4"])
|
|
35
35
|
}, [
|
|
36
36
|
n("div", R, [
|
|
37
|
-
l.value.brandLogo ? (a(), v(
|
|
37
|
+
l.value.brandLogo ? (a(), v(q, {
|
|
38
38
|
key: 0,
|
|
39
39
|
icon: l.value.brandLogo,
|
|
40
40
|
class: o(e.compact ? "w-5 h-5" : "w-6 h-6")
|
|
@@ -65,7 +65,7 @@ const R = { class: "flex items-center justify-center gap-1.5" }, j = { class: "f
|
|
|
65
65
|
n("span", { class: "w-20 text-right" }, "Amount", -1)
|
|
66
66
|
])], 2),
|
|
67
67
|
n("ul", F, [
|
|
68
|
-
(a(!0), s(
|
|
68
|
+
(a(!0), s(L, null, N(e.data.items, (i) => (a(), s("li", {
|
|
69
69
|
key: i.id
|
|
70
70
|
}, [
|
|
71
71
|
C(A, {
|