vlite3 1.4.4 → 1.4.6

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.
Files changed (102) hide show
  1. package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +4 -17
  2. package/components/AppShell/AppShellLayoutStorefront.vue.js +116 -152
  3. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  4. package/components/AvatarUploader/AvatarUploader.vue.js +1 -1
  5. package/components/Cart/Cart.vue.js +242 -0
  6. package/components/Cart/Cart.vue2.js +4 -0
  7. package/components/Cart/CartCouponInput.vue.js +176 -0
  8. package/components/Cart/CartCouponInput.vue2.js +4 -0
  9. package/components/Cart/CartEmptyState.vue.js +48 -0
  10. package/components/Cart/CartEmptyState.vue2.js +4 -0
  11. package/components/Cart/CartLineItem.vue.js +341 -0
  12. package/components/Cart/CartLineItem.vue2.js +4 -0
  13. package/components/Cart/CartSummary.vue.js +157 -0
  14. package/components/Cart/CartSummary.vue2.js +4 -0
  15. package/components/Cart/CartVariant1.vue.js +156 -0
  16. package/components/Cart/CartVariant1.vue2.js +4 -0
  17. package/components/Cart/CartVariant2.vue.js +154 -0
  18. package/components/Cart/CartVariant2.vue2.js +4 -0
  19. package/components/Cart/CartVariant3.vue.js +192 -0
  20. package/components/Cart/CartVariant3.vue2.js +4 -0
  21. package/components/Cart/CartVariant4.vue.js +145 -0
  22. package/components/Cart/CartVariant4.vue2.js +4 -0
  23. package/components/Cart/composables/useCart.d.ts +46 -0
  24. package/components/Cart/composables/useCart.js +110 -0
  25. package/components/Cart/composables/useCartCalculation.js +145 -0
  26. package/components/Cart/index.d.ts +2 -0
  27. package/components/CategoryManager/CategoryManager.vue.js +3 -3
  28. package/components/CategoryManager/CategoryManager.vue2.js +225 -249
  29. package/components/CategoryManager/utils.d.ts +3 -0
  30. package/components/CategoryManager/utils.js +31 -0
  31. package/components/CategoryMenu/CategoryMenu.vue.d.ts +2 -0
  32. package/components/CategoryMenu/CategoryMenu.vue.js +46 -40
  33. package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +5 -1
  34. package/components/CategoryMenu/CategoryMenuVariant1.vue.js +5 -144
  35. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +220 -2
  36. package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +5 -1
  37. package/components/CategoryMenu/CategoryMenuVariant2.vue.js +5 -160
  38. package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +235 -2
  39. package/components/CategoryMenu/types.d.ts +5 -2
  40. package/components/Chat/ChatInterface.vue.js +1 -1
  41. package/components/Comment/CommentEditor.vue.js +1 -1
  42. package/components/Dropdown/Dropdown.vue.d.ts +1 -0
  43. package/components/Dropdown/Dropdown.vue.js +31 -29
  44. package/components/FilePicker/FilePickerDropzone.vue.d.ts +27 -0
  45. package/components/FilePicker/FilePickerDropzone.vue.js +117 -0
  46. package/components/FilePicker/FilePickerDropzone.vue2.js +4 -0
  47. package/components/FilePicker/FilePickerInput.vue.d.ts +22 -0
  48. package/components/FilePicker/FilePickerInput.vue.js +147 -0
  49. package/components/FilePicker/FilePickerInput.vue2.js +4 -0
  50. package/components/FilePicker/FilePreview.vue.d.ts +21 -0
  51. package/components/FilePicker/FilePreview.vue.js +95 -0
  52. package/components/FilePicker/FilePreview.vue2.js +4 -0
  53. package/components/FilePicker/composables/useFileProcessing.d.ts +65 -0
  54. package/components/FilePicker/composables/useFileProcessing.js +141 -0
  55. package/components/FilePicker/index.d.ts +2 -2
  56. package/components/FilePicker/{FilePicker.vue.d.ts → index.vue.d.ts} +11 -18
  57. package/components/FilePicker/index.vue.js +131 -0
  58. package/components/FilePicker/index.vue2.js +4 -0
  59. package/components/FilePicker/types.d.ts +17 -0
  60. package/components/FilePicker/utils.d.ts +23 -0
  61. package/components/FilePicker/utils.js +37 -0
  62. package/components/Form/AccordionView.vue.d.ts +26 -0
  63. package/components/Form/AccordionView.vue.js +219 -0
  64. package/components/Form/AccordionView.vue2.js +4 -0
  65. package/components/Form/FormField.vue.js +3 -3
  66. package/components/Form/FormFields.vue.js +2 -2
  67. package/components/Form/TableRow.vue.d.ts +18 -0
  68. package/components/Form/TableRow.vue.js +88 -0
  69. package/components/Form/TableRow.vue2.js +4 -0
  70. package/components/Form/TableView.vue.d.ts +23 -0
  71. package/components/Form/TableView.vue.js +88 -0
  72. package/components/Form/TableView.vue2.js +4 -0
  73. package/components/Form/composables/useCustomFieldRows.d.ts +52 -0
  74. package/components/Form/composables/useCustomFieldRows.js +77 -0
  75. package/components/Form/index.d.ts +1 -1
  76. package/components/Form/{CustomFields.vue.d.ts → index.vue.d.ts} +8 -5
  77. package/components/Form/index.vue.js +7 -0
  78. package/components/Form/index.vue2.js +141 -0
  79. package/components/Form/rowHelpers.d.ts +45 -0
  80. package/components/Form/rowHelpers.js +40 -0
  81. package/components/Form/types.d.ts +3 -0
  82. package/components/IconPicker.vue.d.ts +2 -2
  83. package/components/Modal.vue.d.ts +2 -0
  84. package/components/Modal.vue.js +1 -1
  85. package/components/Modal.vue2.js +30 -28
  86. package/components/Screen/ScreenFilter.vue.js +4 -3
  87. package/components/SidePanel.vue.d.ts +2 -0
  88. package/components/SidePanel.vue.js +1 -1
  89. package/components/SidePanel.vue2.js +25 -23
  90. package/components/SidebarMenu/SidebarMenu.vue.js +145 -128
  91. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +1 -1
  92. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +1 -1
  93. package/components/index.d.ts +2 -1
  94. package/core/config.d.ts +6 -6
  95. package/index.d.ts +1 -0
  96. package/index.js +328 -307
  97. package/package.json +1 -1
  98. package/style.css +1 -1
  99. package/components/FilePicker/FilePicker.vue.js +0 -361
  100. package/components/FilePicker/FilePicker.vue2.js +0 -4
  101. package/components/Form/CustomFields.vue.js +0 -7
  102. package/components/Form/CustomFields.vue2.js +0 -261
@@ -0,0 +1,176 @@
1
+ import { defineComponent as S, computed as t, ref as K, watch as D, openBlock as a, createElementBlock as i, normalizeClass as n, createElementVNode as p, createVNode as u, withKeys as L, createSlots as M, withCtx as T, createTextVNode as x, toDisplayString as f, createCommentVNode as r, unref as z, createBlock as R } from "vue";
2
+ import C from "../Icon.vue.js";
3
+ import U from "../Input.vue.js";
4
+ /* empty css */
5
+ import B from "../Button.vue.js";
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__ */ S({
8
+ __name: "CartCouponInput",
9
+ props: {
10
+ coupon: {},
11
+ labels: {},
12
+ compact: { type: Boolean, default: !1 },
13
+ readonly: { type: Boolean, default: !1 }
14
+ },
15
+ emits: ["apply", "remove", "change"],
16
+ setup(e, { emit: N }) {
17
+ const c = e, g = N, m = t(() => c.labels || {}), o = K(c.coupon?.code ?? "");
18
+ D(
19
+ () => c.coupon?.code,
20
+ (l) => {
21
+ l !== void 0 && l !== o.value && (o.value = l);
22
+ }
23
+ );
24
+ const v = t(() => c.coupon?.state ?? "idle"), h = t(() => v.value === "applied"), A = t(() => v.value === "applying"), b = t(() => v.value === "invalid"), y = t(() => v.value === "expired"), k = t(() => v.value === "error"), I = t(() => A.value || h.value || c.readonly), w = t(() => b.value ? c.coupon?.message || "Invalid coupon code. Please try again." : y.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(() => b.value ? {
25
+ rightIcon: "lucide:circle-x",
26
+ borderClass: "border-danger focus-within:border-danger",
27
+ helperClass: "text-danger",
28
+ helperText: w.value
29
+ } : y.value ? {
30
+ rightIcon: "lucide:clock-alert",
31
+ borderClass: "border-warning focus-within:border-warning",
32
+ helperClass: "text-warning",
33
+ helperText: w.value
34
+ } : k.value ? {
35
+ rightIcon: "lucide:triangle-alert",
36
+ borderClass: "border-danger focus-within:border-danger",
37
+ helperClass: "text-danger",
38
+ helperText: w.value
39
+ } : null);
40
+ function $(l) {
41
+ o.value = String(l), g("change", o.value);
42
+ }
43
+ function V() {
44
+ const l = o.value.trim();
45
+ l && g("apply", l);
46
+ }
47
+ function j() {
48
+ o.value = "", g("remove");
49
+ }
50
+ return (l, d) => (a(), i("div", {
51
+ class: n(["v-cart-coupon w-full", e.compact ? "space-y-1.5" : "space-y-2"])
52
+ }, [
53
+ h.value ? r("", !0) : (a(), i("div", {
54
+ key: 0,
55
+ class: n(["flex items-center gap-2", e.compact ? "flex-col items-stretch gap-1.5" : "flex-col sm:flex-row sm:items-stretch"])
56
+ }, [
57
+ p("div", W, [
58
+ u(U, {
59
+ modelValue: o.value,
60
+ "onUpdate:modelValue": [
61
+ d[0] || (d[0] = (P) => o.value = P),
62
+ $
63
+ ],
64
+ placeholder: m.value.couponPlaceholder || "Enter coupon code",
65
+ icon: "lucide:ticket-percent",
66
+ "input-class": s.value ? s.value.borderClass : "",
67
+ disabled: I.value,
68
+ readonly: e.readonly,
69
+ "show-clear-button": !1,
70
+ size: "md",
71
+ rounded: "md",
72
+ "aria-label": m.value.coupon || "Coupon code",
73
+ onKeyup: L(V, ["enter"])
74
+ }, M({ _: 2 }, [
75
+ s.value ? {
76
+ name: "addon-right",
77
+ fn: T(() => [
78
+ u(C, {
79
+ icon: s.value.rightIcon,
80
+ class: n([
81
+ "h-4 w-4",
82
+ b.value || k.value ? "text-danger" : y.value ? "text-warning" : ""
83
+ ])
84
+ }, null, 8, ["icon", "class"])
85
+ ]),
86
+ key: "0"
87
+ } : void 0
88
+ ]), 1032, ["modelValue", "placeholder", "input-class", "disabled", "readonly", "aria-label"])
89
+ ]),
90
+ u(B, {
91
+ variant: "primary",
92
+ size: "md",
93
+ loading: A.value,
94
+ disabled: !o.value.trim() || I.value,
95
+ "aria-label": m.value.applyCoupon || "Apply coupon",
96
+ class: "shrink-0",
97
+ onClick: V
98
+ }, {
99
+ default: T(() => [
100
+ x(f(m.value.applyCoupon || "Apply"), 1)
101
+ ]),
102
+ _: 1
103
+ }, 8, ["loading", "disabled", "aria-label"])
104
+ ], 2)),
105
+ s.value && !e.compact ? (a(), i("p", {
106
+ key: 1,
107
+ class: n(["text-xs font-medium flex items-center gap-1.5", s.value.helperClass])
108
+ }, [
109
+ u(C, {
110
+ icon: s.value.rightIcon,
111
+ class: "w-3.5 h-3.5 shrink-0"
112
+ }, null, 8, ["icon"]),
113
+ x(" " + f(s.value.helperText), 1)
114
+ ], 2)) : r("", !0),
115
+ h.value && e.coupon ? (a(), i("div", {
116
+ key: 2,
117
+ class: n(["flex items-center justify-between gap-2 rounded-md border border-success/40 bg-success-light/40 p-2.5", e.compact ? "p-2" : "p-2.5"])
118
+ }, [
119
+ p("div", q, [
120
+ p("div", F, [
121
+ u(C, {
122
+ icon: "lucide:check",
123
+ class: "w-4 h-4"
124
+ })
125
+ ]),
126
+ p("div", G, [
127
+ p("div", H, [
128
+ p("p", {
129
+ class: n(["font-bold text-foreground uppercase tracking-wider", e.compact ? "text-[10px]" : "text-xs"])
130
+ }, f(e.coupon.code), 3),
131
+ e.coupon.definition?.type === "percentage" ? (a(), i("span", {
132
+ key: 0,
133
+ class: n(["inline-flex items-center px-1.5 py-0.5 rounded bg-success/30 text-success font-bold tabular-nums", e.compact ? "text-[9px]" : "text-[10px]"])
134
+ }, " −" + f(e.coupon.definition.value) + "% ", 3)) : e.coupon.discountAmount && e.coupon.discountAmount > 0 ? (a(), i("span", {
135
+ key: 1,
136
+ 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]"])
137
+ }, [
138
+ d[1] || (d[1] = x(" −", -1)),
139
+ u(z(E), {
140
+ value: e.coupon.discountAmount,
141
+ class: "text-success"
142
+ }, null, 8, ["value"])
143
+ ], 2)) : r("", !0),
144
+ e.coupon.definition?.type === "percentage" && e.coupon.discountAmount && e.coupon.discountAmount > 0 ? (a(), i("span", {
145
+ key: 2,
146
+ 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]"])
147
+ }, [
148
+ u(z(E), {
149
+ value: e.coupon.discountAmount,
150
+ class: "text-success"
151
+ }, null, 8, ["value"]),
152
+ d[2] || (d[2] = x(" off ", -1))
153
+ ], 2)) : r("", !0)
154
+ ]),
155
+ e.coupon.description ? (a(), i("p", {
156
+ key: 0,
157
+ class: n(["text-muted-foreground leading-snug truncate", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-0.5"])
158
+ }, f(e.coupon.description), 3)) : r("", !0)
159
+ ])
160
+ ]),
161
+ e.readonly ? r("", !0) : (a(), R(B, {
162
+ key: 0,
163
+ variant: "ghost",
164
+ size: e.compact ? "xs" : "sm",
165
+ icon: "lucide:x",
166
+ 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",
167
+ "aria-label": m.value.removeCoupon || "Remove coupon",
168
+ onClick: j
169
+ }, null, 8, ["size", "aria-label"]))
170
+ ], 2)) : r("", !0)
171
+ ], 2));
172
+ }
173
+ });
174
+ export {
175
+ _ as default
176
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CartCouponInput.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,48 @@
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
+ import y from "../Icon.vue.js";
3
+ import g from "../Button.vue.js";
4
+ const h = { class: "space-y-1" }, z = /* @__PURE__ */ r({
5
+ __name: "CartEmptyState",
6
+ props: {
7
+ labels: {},
8
+ compact: { type: Boolean, default: !1 }
9
+ },
10
+ emits: ["continue-shopping"],
11
+ setup(e, { emit: i }) {
12
+ const m = e, l = i, c = p(() => m.labels || {});
13
+ return (v, a) => (u(), d("div", {
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
+ }, [
16
+ o("div", {
17
+ class: t(["inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground", e.compact ? "w-14 h-14" : "w-20 h-20"])
18
+ }, [
19
+ s(y, {
20
+ icon: "lucide:shopping-bag",
21
+ class: t(e.compact ? "w-6 h-6" : "w-9 h-9")
22
+ }, null, 8, ["class"])
23
+ ], 2),
24
+ o("div", h, [
25
+ o("p", {
26
+ class: t(["font-bold text-foreground", e.compact ? "text-sm" : "text-lg"])
27
+ }, n(c.value.emptyTitle || "Your cart is empty"), 3),
28
+ o("p", {
29
+ class: t(["text-muted-foreground max-w-xs", e.compact ? "text-xs" : "text-sm"])
30
+ }, n(c.value.emptyDescription || "Add items to your cart to see them here."), 3)
31
+ ]),
32
+ s(g, {
33
+ variant: "primary",
34
+ size: e.compact ? "sm" : "md",
35
+ icon: "lucide:arrow-left",
36
+ onClick: a[0] || (a[0] = (w) => l("continue-shopping"))
37
+ }, {
38
+ default: f(() => [
39
+ x(n(c.value.emptyAction || "Continue shopping"), 1)
40
+ ]),
41
+ _: 1
42
+ }, 8, ["size"])
43
+ ], 2));
44
+ }
45
+ });
46
+ export {
47
+ z as default
48
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CartEmptyState.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,341 @@
1
+ import { defineComponent as D, computed as o, openBlock as a, createElementBlock as l, normalizeClass as t, createCommentVNode as s, createElementVNode as i, toDisplayString as u, createBlock as v, unref as d, createVNode as c, Fragment as R, createTextVNode as I } from "vue";
2
+ import r from "../Price/Price.vue.js";
3
+ import m from "../Button.vue.js";
4
+ const M = ["src", "alt"], P = { class: "flex-1 min-w-0 flex flex-col gap-0.5" }, T = ["title"], E = {
5
+ key: 0,
6
+ class: "text-muted-foreground uppercase tracking-wider font-medium"
7
+ }, F = { class: "flex items-center justify-between gap-2 mt-1.5" }, $ = { class: "flex items-center gap-1.5" }, L = ["value", "aria-label"], O = { class: "flex-1 min-w-0" }, A = {
8
+ key: 0,
9
+ class: "text-muted-foreground uppercase tracking-wider"
10
+ }, G = {
11
+ key: 1,
12
+ class: "text-muted-foreground"
13
+ }, H = { class: "text-muted-foreground tabular-nums" }, J = {
14
+ key: 0,
15
+ class: "inline-flex items-center rounded border border-input bg-background overflow-hidden h-6"
16
+ }, K = { class: "w-6 text-center text-[11px] font-semibold tabular-nums" }, U = {
17
+ key: 1,
18
+ class: "text-xs font-semibold tabular-nums text-foreground"
19
+ }, W = ["src", "alt"], X = { class: "flex-1 min-w-0 flex flex-col gap-1.5" }, Y = { class: "flex items-start justify-between gap-2" }, Z = { class: "min-w-0 flex-1" }, _ = {
20
+ key: 0,
21
+ class: "text-muted-foreground uppercase tracking-wider font-medium"
22
+ }, ee = {
23
+ key: 1,
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" }, ie = { class: "flex items-center gap-1.5" }, ne = ["value", "aria-label"], le = { class: "flex-1 min-w-0" }, oe = /* @__PURE__ */ D({
26
+ __name: "CartLineItem",
27
+ props: {
28
+ item: {},
29
+ features: {},
30
+ labels: {},
31
+ compact: { type: Boolean, default: !1 },
32
+ readonly: { type: Boolean, default: !1 },
33
+ layout: { default: "drawer" }
34
+ },
35
+ emits: ["update:quantity", "remove"],
36
+ setup(e, { emit: B }) {
37
+ const n = e, b = B, f = o(() => n.labels || {}), p = o(() => n.features.thumbnails && n.layout !== "compact" && n.layout !== "mini"), N = o(() => n.features.description && !n.compact), q = o(() => n.features.sku), g = o(() => n.features.itemVariant && !!n.item.variant), z = o(() => n.features.editableQuantity && !n.readonly), h = o(() => n.features.removable && !n.readonly), y = o(() => n.item.maxQuantity !== void 0 && n.item.quantity >= n.item.maxQuantity), k = o(() => n.item.quantity <= 1), C = o(() => (n.item.price || 0) * (n.item.quantity || 0));
38
+ function j() {
39
+ y.value || b("update:quantity", n.item.id, n.item.quantity + 1);
40
+ }
41
+ function Q() {
42
+ k.value || b("update:quantity", n.item.id, n.item.quantity - 1);
43
+ }
44
+ function S(V) {
45
+ const x = Number(V.target.value);
46
+ Number.isFinite(x) && x > 0 && b("update:quantity", n.item.id, Math.floor(x));
47
+ }
48
+ function w() {
49
+ b("remove", n.item.id);
50
+ }
51
+ return (V, x) => e.layout === "drawer" ? (a(), l("div", {
52
+ key: 0,
53
+ class: t(["v-cart-line flex gap-3 items-start", [e.item.inStock === !1 ? "opacity-60" : "", e.compact ? "py-2" : "py-3"]])
54
+ }, [
55
+ p.value ? (a(), l("div", {
56
+ key: 0,
57
+ 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
+ e.item.thumbnail ? (a(), l("img", {
60
+ key: 0,
61
+ src: e.item.thumbnail,
62
+ alt: e.item.name,
63
+ class: "w-full h-full object-cover"
64
+ }, null, 8, M)) : s("", !0)
65
+ ], 2)) : s("", !0),
66
+ i("div", P, [
67
+ i("p", {
68
+ class: t(["font-semibold text-foreground leading-tight truncate", e.compact ? "text-xs" : "text-sm"]),
69
+ title: e.item.name
70
+ }, u(e.item.name), 11, T),
71
+ N.value && e.item.description ? (a(), l("p", {
72
+ key: 0,
73
+ class: t(["text-muted-foreground leading-snug line-clamp-1", e.compact ? "text-[10px]" : "text-xs"])
74
+ }, u(e.item.description), 3)) : s("", !0),
75
+ i("div", {
76
+ class: t(["flex items-center gap-2 flex-wrap", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-1"])
77
+ }, [
78
+ q.value && e.item.sku ? (a(), l("span", E, u(e.item.sku), 1)) : s("", !0),
79
+ g.value ? (a(), l("span", {
80
+ key: 1,
81
+ 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
+ }, u(e.item.variant), 3)) : s("", !0),
83
+ e.item.inStock === !1 ? (a(), l("span", {
84
+ key: 2,
85
+ 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)) : s("", !0)
87
+ ], 2),
88
+ i("div", F, [
89
+ i("div", {
90
+ class: t(["flex items-center gap-1.5", e.compact ? "text-xs" : "text-sm"])
91
+ }, [
92
+ e.item.originalPrice && e.item.originalPrice > e.item.price ? (a(), v(d(r), {
93
+ key: 0,
94
+ value: e.item.originalPrice,
95
+ class: t(["text-muted-foreground line-through tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
96
+ }, null, 8, ["value", "class"])) : s("", !0),
97
+ c(d(r), {
98
+ value: e.item.price,
99
+ class: t(["font-bold text-foreground tabular-nums", e.compact ? "text-xs" : "text-sm"])
100
+ }, null, 8, ["value", "class"])
101
+ ], 2),
102
+ i("div", $, [
103
+ z.value ? (a(), l("div", {
104
+ key: 0,
105
+ class: t(["inline-flex items-center rounded border border-input bg-background overflow-hidden", e.compact ? "h-6" : "h-7"])
106
+ }, [
107
+ c(m, {
108
+ variant: "ghost",
109
+ rounded: "none",
110
+ size: e.compact ? "xs" : "sm",
111
+ icon: "lucide:minus",
112
+ class: "!h-full !px-1.5",
113
+ disabled: k.value,
114
+ "aria-label": "Decrease quantity",
115
+ onClick: Q
116
+ }, null, 8, ["size", "disabled"]),
117
+ i("input", {
118
+ type: "text",
119
+ inputmode: "numeric",
120
+ 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
+ value: e.item.quantity,
122
+ "aria-label": f.value.quantity || "Quantity",
123
+ onChange: S
124
+ }, null, 42, L),
125
+ c(m, {
126
+ variant: "ghost",
127
+ rounded: "none",
128
+ size: e.compact ? "xs" : "sm",
129
+ icon: "lucide:plus",
130
+ class: "!h-full !px-1.5",
131
+ disabled: y.value,
132
+ "aria-label": "Increase quantity",
133
+ onClick: j
134
+ }, null, 8, ["size", "disabled"])
135
+ ], 2)) : (a(), l("span", {
136
+ key: 1,
137
+ 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
+ }, " ×" + u(e.item.quantity), 3)),
139
+ h.value ? (a(), v(m, {
140
+ key: 2,
141
+ variant: "ghost",
142
+ size: e.compact ? "xs" : "sm",
143
+ icon: "lucide:trash-2",
144
+ "aria-label": f.value.remove || "Remove",
145
+ onClick: w
146
+ }, null, 8, ["size", "aria-label"])) : s("", !0)
147
+ ])
148
+ ])
149
+ ])
150
+ ], 2)) : e.layout === "compact" ? (a(), l("div", {
151
+ key: 1,
152
+ class: t(["v-cart-line flex items-center gap-2", e.compact ? "py-1.5" : "py-2"])
153
+ }, [
154
+ i("div", O, [
155
+ i("p", {
156
+ class: t(["font-semibold text-foreground leading-tight truncate", e.compact ? "text-xs" : "text-sm"])
157
+ }, u(e.item.name), 3),
158
+ i("div", {
159
+ class: t(["flex items-center gap-1.5", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-0.5"])
160
+ }, [
161
+ q.value && e.item.sku ? (a(), l("span", A, u(e.item.sku), 1)) : s("", !0),
162
+ g.value ? (a(), l("span", G, "· " + u(e.item.variant), 1)) : s("", !0),
163
+ x[0] || (x[0] = i("span", { class: "text-muted-foreground" }, "·", -1)),
164
+ i("span", H, [
165
+ c(d(r), {
166
+ value: e.item.price,
167
+ class: "text-muted-foreground"
168
+ }, null, 8, ["value"])
169
+ ])
170
+ ], 2)
171
+ ]),
172
+ z.value ? (a(), l("div", J, [
173
+ c(m, {
174
+ variant: "ghost",
175
+ rounded: "none",
176
+ size: "xs",
177
+ icon: "lucide:minus",
178
+ class: "!w-6 !h-full !px-0",
179
+ disabled: k.value,
180
+ "aria-label": "Decrease",
181
+ onClick: Q
182
+ }, null, 8, ["disabled"]),
183
+ i("span", K, u(e.item.quantity), 1),
184
+ c(m, {
185
+ variant: "ghost",
186
+ rounded: "none",
187
+ size: "xs",
188
+ icon: "lucide:plus",
189
+ class: "!w-6 !h-full !px-0",
190
+ disabled: y.value,
191
+ "aria-label": "Increase",
192
+ onClick: j
193
+ }, null, 8, ["disabled"])
194
+ ])) : (a(), l("span", U, "×" + u(e.item.quantity), 1)),
195
+ c(d(r), {
196
+ value: C.value,
197
+ 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
+ h.value ? (a(), v(m, {
200
+ key: 2,
201
+ variant: "ghost",
202
+ size: "xs",
203
+ icon: "lucide:x",
204
+ class: "!w-6 !h-6",
205
+ "aria-label": f.value.remove || "Remove",
206
+ onClick: w
207
+ }, null, 8, ["aria-label"])) : s("", !0)
208
+ ], 2)) : e.layout === "card" ? (a(), l("div", {
209
+ key: 2,
210
+ class: t(["v-cart-line flex gap-3 p-3 border border-border", [e.item.inStock === !1 ? "opacity-60" : "", e.compact ? "p-2" : ""]])
211
+ }, [
212
+ p.value ? (a(), l("div", {
213
+ key: 0,
214
+ class: t(["shrink-0 overflow-hidden border border-border bg-muted rounded-md", e.compact ? "w-14 h-14" : "w-20 h-20"])
215
+ }, [
216
+ e.item.thumbnail ? (a(), l("img", {
217
+ key: 0,
218
+ src: e.item.thumbnail,
219
+ alt: e.item.name,
220
+ class: "w-full h-full object-cover"
221
+ }, null, 8, W)) : s("", !0)
222
+ ], 2)) : s("", !0),
223
+ i("div", X, [
224
+ i("div", Y, [
225
+ i("div", Z, [
226
+ i("p", {
227
+ class: t(["font-semibold text-foreground leading-tight", e.compact ? "text-xs" : "text-sm"])
228
+ }, u(e.item.name), 3),
229
+ N.value && e.item.description ? (a(), l("p", {
230
+ key: 0,
231
+ class: t(["text-muted-foreground line-clamp-2 leading-snug", e.compact ? "text-[10px] mt-0.5" : "text-xs mt-1"])
232
+ }, u(e.item.description), 3)) : s("", !0),
233
+ i("div", {
234
+ class: t(["flex items-center gap-2 flex-wrap", e.compact ? "text-[10px] mt-1" : "text-xs mt-1.5"])
235
+ }, [
236
+ q.value && e.item.sku ? (a(), l("span", _, u(e.item.sku), 1)) : s("", !0),
237
+ g.value ? (a(), l("span", ee, u(e.item.variant), 1)) : s("", !0)
238
+ ], 2)
239
+ ]),
240
+ c(d(r), {
241
+ value: C.value,
242
+ class: t(["font-extrabold text-foreground tabular-nums shrink-0", e.compact ? "text-sm" : "text-base"])
243
+ }, null, 8, ["value", "class"])
244
+ ]),
245
+ i("div", te, [
246
+ i("div", ae, [
247
+ i("span", {
248
+ class: t(["text-muted-foreground tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
249
+ }, [
250
+ c(d(r), {
251
+ value: e.item.price,
252
+ class: "text-muted-foreground"
253
+ }, null, 8, ["value"]),
254
+ e.item.quantity > 1 ? (a(), l(R, { key: 0 }, [
255
+ I(" × " + u(e.item.quantity), 1)
256
+ ], 64)) : s("", !0)
257
+ ], 2)
258
+ ]),
259
+ i("div", ie, [
260
+ z.value ? (a(), l("div", {
261
+ key: 0,
262
+ class: t(["inline-flex items-center rounded border border-input bg-background overflow-hidden", e.compact ? "h-7" : "h-8"])
263
+ }, [
264
+ c(m, {
265
+ variant: "ghost",
266
+ rounded: "none",
267
+ size: e.compact ? "xs" : "sm",
268
+ icon: "lucide:minus",
269
+ class: "!w-7 !h-full !px-0",
270
+ disabled: k.value,
271
+ "aria-label": "Decrease",
272
+ onClick: Q
273
+ }, null, 8, ["size", "disabled"]),
274
+ i("input", {
275
+ type: "text",
276
+ inputmode: "numeric",
277
+ class: t(["w-8 text-center bg-transparent border-0 outline-none font-semibold tabular-nums", e.compact ? "text-xs" : "text-sm"]),
278
+ value: e.item.quantity,
279
+ "aria-label": f.value.quantity || "Quantity",
280
+ onChange: S
281
+ }, null, 42, ne),
282
+ c(m, {
283
+ variant: "ghost",
284
+ rounded: "none",
285
+ size: e.compact ? "xs" : "sm",
286
+ icon: "lucide:plus",
287
+ class: "!w-7 !h-full !px-0",
288
+ disabled: y.value,
289
+ "aria-label": "Increase",
290
+ onClick: j
291
+ }, null, 8, ["size", "disabled"])
292
+ ], 2)) : (a(), l("span", {
293
+ key: 1,
294
+ 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
+ }, " ×" + u(e.item.quantity), 3)),
296
+ h.value ? (a(), v(m, {
297
+ key: 2,
298
+ variant: "ghost",
299
+ size: e.compact ? "sm" : "sm2",
300
+ icon: "lucide:trash-2",
301
+ "aria-label": f.value.remove || "Remove",
302
+ onClick: w
303
+ }, null, 8, ["size", "aria-label"])) : s("", !0)
304
+ ])
305
+ ])
306
+ ])
307
+ ], 2)) : (a(), l("div", {
308
+ key: 3,
309
+ class: t(["v-cart-line flex items-center justify-between gap-2", e.compact ? "py-1.5" : "py-2"])
310
+ }, [
311
+ i("div", le, [
312
+ i("p", {
313
+ class: t(["font-medium text-foreground leading-tight truncate", e.compact ? "text-xs" : "text-sm"])
314
+ }, u(e.item.name), 3),
315
+ g.value ? (a(), l("p", {
316
+ key: 0,
317
+ class: t(["text-muted-foreground", e.compact ? "text-[10px]" : "text-xs"])
318
+ }, u(e.item.variant), 3)) : s("", !0)
319
+ ]),
320
+ i("span", {
321
+ class: t(["text-muted-foreground tabular-nums", e.compact ? "text-[10px]" : "text-xs"])
322
+ }, " ×" + u(e.item.quantity), 3),
323
+ c(d(r), {
324
+ value: C.value,
325
+ class: t(["font-semibold text-foreground tabular-nums shrink-0", e.compact ? "text-xs" : "text-sm"])
326
+ }, null, 8, ["value", "class"]),
327
+ h.value ? (a(), v(m, {
328
+ key: 0,
329
+ variant: "ghost",
330
+ size: "xs",
331
+ icon: "lucide:x",
332
+ class: "!w-5 !h-5 !min-w-5 !min-h-5",
333
+ "aria-label": "Remove",
334
+ onClick: w
335
+ })) : s("", !0)
336
+ ], 2));
337
+ }
338
+ });
339
+ export {
340
+ oe as default
341
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CartLineItem.vue.js";
2
+ export {
3
+ f as default
4
+ };