vlite3 1.4.22 → 1.4.23
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/Cart/Cart.vue.js +53 -49
- package/components/Cart/CartCouponInput.vue.d.ts +1 -0
- package/components/Cart/CartCouponInput.vue.js +36 -33
- package/components/Cart/CartLineItem.vue.d.ts +1 -0
- package/components/Cart/CartLineItem.vue.js +121 -113
- package/components/Cart/CartSummary.vue.d.ts +1 -0
- package/components/Cart/CartSummary.vue.js +59 -51
- package/components/Cart/CartVariant1.vue.js +66 -63
- package/components/Cart/CartVariant2.vue.js +50 -47
- package/components/Cart/CartVariant3.vue.js +61 -58
- package/components/Cart/CartVariant4.vue.js +72 -68
- package/components/CategoryManager/CategoryManager.vue2.js +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Price/Price.vue.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/package.json +1 -1
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
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 o, createVNode as u, Fragment as I, createTextVNode as M } from "vue";
|
|
2
|
+
import d from "../Price/Price.vue.js";
|
|
3
3
|
import m from "../Button.vue.js";
|
|
4
|
-
const
|
|
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
|
+
}, $ = { class: "flex items-center justify-between gap-2 mt-1.5" }, L = { class: "flex items-center gap-1.5" }, O = ["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 = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "text-muted-foreground"
|
|
13
|
-
},
|
|
13
|
+
}, J = { class: "text-muted-foreground tabular-nums" }, K = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "inline-flex items-center rounded border border-input bg-background overflow-hidden h-6"
|
|
16
|
-
},
|
|
16
|
+
}, U = { class: "w-6 text-center text-[11px] font-semibold tabular-nums" }, W = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "text-xs font-semibold tabular-nums text-foreground"
|
|
19
|
-
},
|
|
19
|
+
}, X = ["src", "alt"], Y = { class: "flex-1 min-w-0 flex flex-col gap-1.5" }, Z = { class: "flex items-start justify-between gap-2" }, p = { class: "min-w-0 flex-1" }, _ = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "text-muted-foreground uppercase tracking-wider font-medium"
|
|
22
22
|
}, ee = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "inline-flex items-center px-1.5 py-0.5 rounded bg-muted text-muted-foreground font-medium"
|
|
25
|
-
}, te = { class: "flex items-center justify-between" }, ae = { class: "flex items-center gap-2" },
|
|
25
|
+
}, te = { class: "flex items-center justify-between" }, ae = { class: "flex items-center gap-2" }, ne = { class: "flex items-center gap-1.5" }, ie = ["value", "aria-label"], le = { class: "flex-1 min-w-0" }, re = /* @__PURE__ */ R({
|
|
26
26
|
__name: "CartLineItem",
|
|
27
27
|
props: {
|
|
28
28
|
item: {},
|
|
@@ -30,29 +30,30 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
30
30
|
labels: {},
|
|
31
31
|
compact: { type: Boolean, default: !1 },
|
|
32
32
|
readonly: { type: Boolean, default: !1 },
|
|
33
|
-
layout: { default: "drawer" }
|
|
33
|
+
layout: { default: "drawer" },
|
|
34
|
+
currency: {}
|
|
34
35
|
},
|
|
35
36
|
emits: ["update:quantity", "remove"],
|
|
36
|
-
setup(e, { emit:
|
|
37
|
-
const
|
|
37
|
+
setup(e, { emit: D }) {
|
|
38
|
+
const i = e, y = D, f = r(() => i.labels || {}), N = r(() => i.features.thumbnails && i.layout !== "compact" && i.layout !== "mini"), S = 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));
|
|
38
39
|
function j() {
|
|
39
|
-
|
|
40
|
+
h.value || y("update:quantity", i.item.id, i.item.quantity + 1);
|
|
40
41
|
}
|
|
41
42
|
function Q() {
|
|
42
|
-
k.value ||
|
|
43
|
+
k.value || y("update:quantity", i.item.id, i.item.quantity - 1);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
const x = Number(
|
|
46
|
-
Number.isFinite(x) && x > 0 &&
|
|
45
|
+
function V(B) {
|
|
46
|
+
const x = Number(B.target.value);
|
|
47
|
+
Number.isFinite(x) && x > 0 && y("update:quantity", i.item.id, Math.floor(x));
|
|
47
48
|
}
|
|
48
49
|
function w() {
|
|
49
|
-
|
|
50
|
+
y("remove", i.item.id);
|
|
50
51
|
}
|
|
51
|
-
return (
|
|
52
|
+
return (B, x) => e.layout === "drawer" ? (a(), l("div", {
|
|
52
53
|
key: 0,
|
|
53
54
|
class: t(["v-cart-line flex gap-3 items-start", [e.item.inStock === !1 ? "opacity-60" : "", e.compact ? "py-2" : "py-3"]])
|
|
54
55
|
}, [
|
|
55
|
-
|
|
56
|
+
N.value ? (a(), l("div", {
|
|
56
57
|
key: 0,
|
|
57
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"])
|
|
58
59
|
}, [
|
|
@@ -61,50 +62,52 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
61
62
|
src: e.item.thumbnail,
|
|
62
63
|
alt: e.item.name,
|
|
63
64
|
class: "w-full h-full object-cover"
|
|
64
|
-
}, null, 8,
|
|
65
|
-
], 2)) :
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
}, null, 8, P)) : c("", !0)
|
|
66
|
+
], 2)) : c("", !0),
|
|
67
|
+
n("div", T, [
|
|
68
|
+
n("p", {
|
|
68
69
|
class: t(["font-semibold text-foreground leading-tight truncate", e.compact ? "text-xs" : "text-sm"]),
|
|
69
70
|
title: e.item.name
|
|
70
|
-
},
|
|
71
|
-
|
|
71
|
+
}, s(e.item.name), 11, E),
|
|
72
|
+
S.value && e.item.description ? (a(), l("p", {
|
|
72
73
|
key: 0,
|
|
73
74
|
class: t(["text-muted-foreground leading-snug line-clamp-1", e.compact ? "text-[10px]" : "text-xs"])
|
|
74
|
-
},
|
|
75
|
-
|
|
75
|
+
}, s(e.item.description), 3)) : c("", !0),
|
|
76
|
+
n("div", {
|
|
76
77
|
class: t(["flex items-center gap-2 flex-wrap", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-1"])
|
|
77
78
|
}, [
|
|
78
|
-
q.value && e.item.sku ? (a(), l("span",
|
|
79
|
-
|
|
79
|
+
q.value && e.item.sku ? (a(), l("span", F, s(e.item.sku), 1)) : c("", !0),
|
|
80
|
+
b.value ? (a(), l("span", {
|
|
80
81
|
key: 1,
|
|
81
82
|
class: t(["inline-flex items-center px-1.5 py-0.5 rounded bg-muted text-muted-foreground font-medium", e.compact ? "text-[9px]" : "text-[10px]"])
|
|
82
|
-
},
|
|
83
|
+
}, s(e.item.variant), 3)) : c("", !0),
|
|
83
84
|
e.item.inStock === !1 ? (a(), l("span", {
|
|
84
85
|
key: 2,
|
|
85
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]"])
|
|
86
|
-
}, " Out of stock ", 2)) :
|
|
87
|
+
}, " Out of stock ", 2)) : c("", !0)
|
|
87
88
|
], 2),
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
n("div", $, [
|
|
90
|
+
n("div", {
|
|
90
91
|
class: t(["flex items-center gap-1.5", e.compact ? "text-xs" : "text-sm"])
|
|
91
92
|
}, [
|
|
92
|
-
e.item.originalPrice && e.item.originalPrice > e.item.price ? (a(), v(d
|
|
93
|
+
e.item.originalPrice && e.item.originalPrice > e.item.price ? (a(), v(o(d), {
|
|
93
94
|
key: 0,
|
|
94
95
|
value: e.item.originalPrice,
|
|
96
|
+
currency: e.currency,
|
|
95
97
|
class: t(["text-muted-foreground line-through tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
|
|
96
|
-
}, null, 8, ["value", "class"])) :
|
|
97
|
-
|
|
98
|
+
}, null, 8, ["value", "currency", "class"])) : c("", !0),
|
|
99
|
+
u(o(d), {
|
|
98
100
|
value: e.item.price,
|
|
101
|
+
currency: e.currency,
|
|
99
102
|
class: t(["font-bold text-foreground tabular-nums", e.compact ? "text-xs" : "text-sm"])
|
|
100
|
-
}, null, 8, ["value", "class"])
|
|
103
|
+
}, null, 8, ["value", "currency", "class"])
|
|
101
104
|
], 2),
|
|
102
|
-
|
|
105
|
+
n("div", L, [
|
|
103
106
|
z.value ? (a(), l("div", {
|
|
104
107
|
key: 0,
|
|
105
108
|
class: t(["inline-flex items-center rounded border border-input bg-background overflow-hidden", e.compact ? "h-6" : "h-7"])
|
|
106
109
|
}, [
|
|
107
|
-
|
|
110
|
+
u(m, {
|
|
108
111
|
variant: "ghost",
|
|
109
112
|
rounded: "none",
|
|
110
113
|
size: e.compact ? "xs" : "sm",
|
|
@@ -114,36 +117,36 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
114
117
|
"aria-label": "Decrease quantity",
|
|
115
118
|
onClick: Q
|
|
116
119
|
}, null, 8, ["size", "disabled"]),
|
|
117
|
-
|
|
120
|
+
n("input", {
|
|
118
121
|
type: "text",
|
|
119
122
|
inputmode: "numeric",
|
|
120
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"]),
|
|
121
124
|
value: e.item.quantity,
|
|
122
125
|
"aria-label": f.value.quantity || "Quantity",
|
|
123
|
-
onChange:
|
|
124
|
-
}, null, 42,
|
|
125
|
-
|
|
126
|
+
onChange: V
|
|
127
|
+
}, null, 42, O),
|
|
128
|
+
u(m, {
|
|
126
129
|
variant: "ghost",
|
|
127
130
|
rounded: "none",
|
|
128
131
|
size: e.compact ? "xs" : "sm",
|
|
129
132
|
icon: "lucide:plus",
|
|
130
133
|
class: "!h-full !px-1.5",
|
|
131
|
-
disabled:
|
|
134
|
+
disabled: h.value,
|
|
132
135
|
"aria-label": "Increase quantity",
|
|
133
136
|
onClick: j
|
|
134
137
|
}, null, 8, ["size", "disabled"])
|
|
135
138
|
], 2)) : (a(), l("span", {
|
|
136
139
|
key: 1,
|
|
137
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"]])
|
|
138
|
-
}, " ×" +
|
|
139
|
-
|
|
141
|
+
}, " ×" + s(e.item.quantity), 3)),
|
|
142
|
+
g.value ? (a(), v(m, {
|
|
140
143
|
key: 2,
|
|
141
144
|
variant: "ghost",
|
|
142
145
|
size: e.compact ? "xs" : "sm",
|
|
143
146
|
icon: "lucide:trash-2",
|
|
144
147
|
"aria-label": f.value.remove || "Remove",
|
|
145
148
|
onClick: w
|
|
146
|
-
}, null, 8, ["size", "aria-label"])) :
|
|
149
|
+
}, null, 8, ["size", "aria-label"])) : c("", !0)
|
|
147
150
|
])
|
|
148
151
|
])
|
|
149
152
|
])
|
|
@@ -151,26 +154,27 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
151
154
|
key: 1,
|
|
152
155
|
class: t(["v-cart-line flex items-center gap-2", e.compact ? "py-1.5" : "py-2"])
|
|
153
156
|
}, [
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
n("div", A, [
|
|
158
|
+
n("p", {
|
|
156
159
|
class: t(["font-semibold text-foreground leading-tight truncate", e.compact ? "text-xs" : "text-sm"])
|
|
157
|
-
},
|
|
158
|
-
|
|
160
|
+
}, s(e.item.name), 3),
|
|
161
|
+
n("div", {
|
|
159
162
|
class: t(["flex items-center gap-1.5", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-0.5"])
|
|
160
163
|
}, [
|
|
161
|
-
q.value && e.item.sku ? (a(), l("span",
|
|
162
|
-
|
|
163
|
-
x[0] || (x[0] =
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
q.value && e.item.sku ? (a(), l("span", G, s(e.item.sku), 1)) : c("", !0),
|
|
165
|
+
b.value ? (a(), l("span", H, "· " + s(e.item.variant), 1)) : c("", !0),
|
|
166
|
+
x[0] || (x[0] = n("span", { class: "text-muted-foreground" }, "·", -1)),
|
|
167
|
+
n("span", J, [
|
|
168
|
+
u(o(d), {
|
|
166
169
|
value: e.item.price,
|
|
170
|
+
currency: e.currency,
|
|
167
171
|
class: "text-muted-foreground"
|
|
168
|
-
}, null, 8, ["value"])
|
|
172
|
+
}, null, 8, ["value", "currency"])
|
|
169
173
|
])
|
|
170
174
|
], 2)
|
|
171
175
|
]),
|
|
172
|
-
z.value ? (a(), l("div",
|
|
173
|
-
|
|
176
|
+
z.value ? (a(), l("div", K, [
|
|
177
|
+
u(m, {
|
|
174
178
|
variant: "ghost",
|
|
175
179
|
rounded: "none",
|
|
176
180
|
size: "xs",
|
|
@@ -180,23 +184,24 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
180
184
|
"aria-label": "Decrease",
|
|
181
185
|
onClick: Q
|
|
182
186
|
}, null, 8, ["disabled"]),
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
n("span", U, s(e.item.quantity), 1),
|
|
188
|
+
u(m, {
|
|
185
189
|
variant: "ghost",
|
|
186
190
|
rounded: "none",
|
|
187
191
|
size: "xs",
|
|
188
192
|
icon: "lucide:plus",
|
|
189
193
|
class: "!w-6 !h-full !px-0",
|
|
190
|
-
disabled:
|
|
194
|
+
disabled: h.value,
|
|
191
195
|
"aria-label": "Increase",
|
|
192
196
|
onClick: j
|
|
193
197
|
}, null, 8, ["disabled"])
|
|
194
|
-
])) : (a(), l("span",
|
|
195
|
-
|
|
198
|
+
])) : (a(), l("span", W, "×" + s(e.item.quantity), 1)),
|
|
199
|
+
u(o(d), {
|
|
196
200
|
value: C.value,
|
|
201
|
+
currency: e.currency,
|
|
197
202
|
class: t(["font-bold text-foreground tabular-nums shrink-0 w-16 text-right", e.compact ? "text-xs" : "text-sm"])
|
|
198
|
-
}, null, 8, ["value", "class"]),
|
|
199
|
-
|
|
203
|
+
}, null, 8, ["value", "currency", "class"]),
|
|
204
|
+
g.value ? (a(), v(m, {
|
|
200
205
|
key: 2,
|
|
201
206
|
variant: "ghost",
|
|
202
207
|
size: "xs",
|
|
@@ -204,12 +209,12 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
204
209
|
class: "!w-6 !h-6",
|
|
205
210
|
"aria-label": f.value.remove || "Remove",
|
|
206
211
|
onClick: w
|
|
207
|
-
}, null, 8, ["aria-label"])) :
|
|
212
|
+
}, null, 8, ["aria-label"])) : c("", !0)
|
|
208
213
|
], 2)) : e.layout === "card" ? (a(), l("div", {
|
|
209
214
|
key: 2,
|
|
210
215
|
class: t(["v-cart-line flex gap-3 p-3 border border-border", [e.item.inStock === !1 ? "opacity-60" : "", e.compact ? "p-2" : ""]])
|
|
211
216
|
}, [
|
|
212
|
-
|
|
217
|
+
N.value ? (a(), l("div", {
|
|
213
218
|
key: 0,
|
|
214
219
|
class: t(["shrink-0 overflow-hidden border border-border bg-muted rounded-md", e.compact ? "w-14 h-14" : "w-20 h-20"])
|
|
215
220
|
}, [
|
|
@@ -218,50 +223,52 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
218
223
|
src: e.item.thumbnail,
|
|
219
224
|
alt: e.item.name,
|
|
220
225
|
class: "w-full h-full object-cover"
|
|
221
|
-
}, null, 8,
|
|
222
|
-
], 2)) :
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
}, null, 8, X)) : c("", !0)
|
|
227
|
+
], 2)) : c("", !0),
|
|
228
|
+
n("div", Y, [
|
|
229
|
+
n("div", Z, [
|
|
230
|
+
n("div", p, [
|
|
231
|
+
n("p", {
|
|
227
232
|
class: t(["font-semibold text-foreground leading-tight", e.compact ? "text-xs" : "text-sm"])
|
|
228
|
-
},
|
|
229
|
-
|
|
233
|
+
}, s(e.item.name), 3),
|
|
234
|
+
S.value && e.item.description ? (a(), l("p", {
|
|
230
235
|
key: 0,
|
|
231
236
|
class: t(["text-muted-foreground line-clamp-2 leading-snug", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-1"])
|
|
232
|
-
},
|
|
233
|
-
|
|
237
|
+
}, s(e.item.description), 3)) : c("", !0),
|
|
238
|
+
n("div", {
|
|
234
239
|
class: t(["flex items-center gap-2 flex-wrap", e.compact ? "text-[10px] mt-1" : "text-xs mt-1.5"])
|
|
235
240
|
}, [
|
|
236
|
-
q.value && e.item.sku ? (a(), l("span", _,
|
|
237
|
-
|
|
241
|
+
q.value && e.item.sku ? (a(), l("span", _, s(e.item.sku), 1)) : c("", !0),
|
|
242
|
+
b.value ? (a(), l("span", ee, s(e.item.variant), 1)) : c("", !0)
|
|
238
243
|
], 2)
|
|
239
244
|
]),
|
|
240
|
-
|
|
245
|
+
u(o(d), {
|
|
241
246
|
value: C.value,
|
|
247
|
+
currency: e.currency,
|
|
242
248
|
class: t(["font-extrabold text-foreground tabular-nums shrink-0", e.compact ? "text-sm" : "text-base"])
|
|
243
|
-
}, null, 8, ["value", "class"])
|
|
249
|
+
}, null, 8, ["value", "currency", "class"])
|
|
244
250
|
]),
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
251
|
+
n("div", te, [
|
|
252
|
+
n("div", ae, [
|
|
253
|
+
n("span", {
|
|
248
254
|
class: t(["text-muted-foreground tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
|
|
249
255
|
}, [
|
|
250
|
-
|
|
256
|
+
u(o(d), {
|
|
251
257
|
value: e.item.price,
|
|
258
|
+
currency: e.currency,
|
|
252
259
|
class: "text-muted-foreground"
|
|
253
|
-
}, null, 8, ["value"]),
|
|
254
|
-
e.item.quantity > 1 ? (a(), l(
|
|
255
|
-
|
|
256
|
-
], 64)) :
|
|
260
|
+
}, null, 8, ["value", "currency"]),
|
|
261
|
+
e.item.quantity > 1 ? (a(), l(I, { key: 0 }, [
|
|
262
|
+
M(" × " + s(e.item.quantity), 1)
|
|
263
|
+
], 64)) : c("", !0)
|
|
257
264
|
], 2)
|
|
258
265
|
]),
|
|
259
|
-
|
|
266
|
+
n("div", ne, [
|
|
260
267
|
z.value ? (a(), l("div", {
|
|
261
268
|
key: 0,
|
|
262
269
|
class: t(["inline-flex items-center rounded border border-input bg-background overflow-hidden", e.compact ? "h-7" : "h-8"])
|
|
263
270
|
}, [
|
|
264
|
-
|
|
271
|
+
u(m, {
|
|
265
272
|
variant: "ghost",
|
|
266
273
|
rounded: "none",
|
|
267
274
|
size: e.compact ? "xs" : "sm",
|
|
@@ -271,36 +278,36 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
271
278
|
"aria-label": "Decrease",
|
|
272
279
|
onClick: Q
|
|
273
280
|
}, null, 8, ["size", "disabled"]),
|
|
274
|
-
|
|
281
|
+
n("input", {
|
|
275
282
|
type: "text",
|
|
276
283
|
inputmode: "numeric",
|
|
277
284
|
class: t(["w-8 text-center bg-transparent border-0 outline-none font-semibold tabular-nums", e.compact ? "text-xs" : "text-sm"]),
|
|
278
285
|
value: e.item.quantity,
|
|
279
286
|
"aria-label": f.value.quantity || "Quantity",
|
|
280
|
-
onChange:
|
|
281
|
-
}, null, 42,
|
|
282
|
-
|
|
287
|
+
onChange: V
|
|
288
|
+
}, null, 42, ie),
|
|
289
|
+
u(m, {
|
|
283
290
|
variant: "ghost",
|
|
284
291
|
rounded: "none",
|
|
285
292
|
size: e.compact ? "xs" : "sm",
|
|
286
293
|
icon: "lucide:plus",
|
|
287
294
|
class: "!w-7 !h-full !px-0",
|
|
288
|
-
disabled:
|
|
295
|
+
disabled: h.value,
|
|
289
296
|
"aria-label": "Increase",
|
|
290
297
|
onClick: j
|
|
291
298
|
}, null, 8, ["size", "disabled"])
|
|
292
299
|
], 2)) : (a(), l("span", {
|
|
293
300
|
key: 1,
|
|
294
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"]])
|
|
295
|
-
}, " ×" +
|
|
296
|
-
|
|
302
|
+
}, " ×" + s(e.item.quantity), 3)),
|
|
303
|
+
g.value ? (a(), v(m, {
|
|
297
304
|
key: 2,
|
|
298
305
|
variant: "ghost",
|
|
299
306
|
size: e.compact ? "sm" : "sm2",
|
|
300
307
|
icon: "lucide:trash-2",
|
|
301
308
|
"aria-label": f.value.remove || "Remove",
|
|
302
309
|
onClick: w
|
|
303
|
-
}, null, 8, ["size", "aria-label"])) :
|
|
310
|
+
}, null, 8, ["size", "aria-label"])) : c("", !0)
|
|
304
311
|
])
|
|
305
312
|
])
|
|
306
313
|
])
|
|
@@ -308,23 +315,24 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
308
315
|
key: 3,
|
|
309
316
|
class: t(["v-cart-line flex items-center justify-between gap-2", e.compact ? "py-1.5" : "py-2"])
|
|
310
317
|
}, [
|
|
311
|
-
|
|
312
|
-
|
|
318
|
+
n("div", le, [
|
|
319
|
+
n("p", {
|
|
313
320
|
class: t(["font-medium text-foreground leading-tight truncate", e.compact ? "text-xs" : "text-sm"])
|
|
314
|
-
},
|
|
315
|
-
|
|
321
|
+
}, s(e.item.name), 3),
|
|
322
|
+
b.value ? (a(), l("p", {
|
|
316
323
|
key: 0,
|
|
317
324
|
class: t(["text-muted-foreground", e.compact ? "text-[10px]" : "text-xs"])
|
|
318
|
-
},
|
|
325
|
+
}, s(e.item.variant), 3)) : c("", !0)
|
|
319
326
|
]),
|
|
320
|
-
|
|
327
|
+
n("span", {
|
|
321
328
|
class: t(["text-muted-foreground tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
|
|
322
|
-
}, " ×" +
|
|
323
|
-
|
|
329
|
+
}, " ×" + s(e.item.quantity), 3),
|
|
330
|
+
u(o(d), {
|
|
324
331
|
value: C.value,
|
|
332
|
+
currency: e.currency,
|
|
325
333
|
class: t(["font-semibold text-foreground tabular-nums shrink-0", e.compact ? "text-xs" : "text-sm"])
|
|
326
|
-
}, null, 8, ["value", "class"]),
|
|
327
|
-
|
|
334
|
+
}, null, 8, ["value", "currency", "class"]),
|
|
335
|
+
g.value ? (a(), v(m, {
|
|
328
336
|
key: 0,
|
|
329
337
|
variant: "ghost",
|
|
330
338
|
size: "xs",
|
|
@@ -332,10 +340,10 @@ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" },
|
|
|
332
340
|
class: "!w-5 !h-5 !min-w-5 !min-h-5",
|
|
333
341
|
"aria-label": "Remove",
|
|
334
342
|
onClick: w
|
|
335
|
-
})) :
|
|
343
|
+
})) : c("", !0)
|
|
336
344
|
], 2));
|
|
337
345
|
}
|
|
338
346
|
});
|
|
339
347
|
export {
|
|
340
|
-
|
|
348
|
+
re as default
|
|
341
349
|
};
|
|
@@ -21,6 +21,7 @@ type __VLS_Props = {
|
|
|
21
21
|
variant?: CartVariant;
|
|
22
22
|
/** Currently applied coupon (for the discount-row caption + pill) */
|
|
23
23
|
coupon?: CartCoupon;
|
|
24
|
+
currency?: string;
|
|
24
25
|
};
|
|
25
26
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
27
|
variant: CartVariant;
|