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.
Files changed (77) hide show
  1. package/components/AppShell/AppShellLayoutStorefront.vue.js +2 -2
  2. package/components/AvatarUploader/AvatarUploader.vue.d.ts +2 -2
  3. package/components/Cart/Cart.vue.d.ts +27 -0
  4. package/components/Cart/Cart.vue.js +242 -0
  5. package/components/Cart/Cart.vue2.js +4 -0
  6. package/components/Cart/CartCouponInput.vue.d.ts +32 -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.d.ts +17 -0
  10. package/components/Cart/CartEmptyState.vue.js +48 -0
  11. package/components/Cart/CartEmptyState.vue2.js +4 -0
  12. package/components/Cart/CartLineItem.vue.d.ts +29 -0
  13. package/components/Cart/CartLineItem.vue.js +341 -0
  14. package/components/Cart/CartLineItem.vue2.js +4 -0
  15. package/components/Cart/CartSummary.vue.d.ts +29 -0
  16. package/components/Cart/CartSummary.vue.js +157 -0
  17. package/components/Cart/CartSummary.vue2.js +4 -0
  18. package/components/Cart/CartVariant1.vue.d.ts +42 -0
  19. package/components/Cart/CartVariant1.vue.js +156 -0
  20. package/components/Cart/CartVariant1.vue2.js +4 -0
  21. package/components/Cart/CartVariant2.vue.d.ts +42 -0
  22. package/components/Cart/CartVariant2.vue.js +154 -0
  23. package/components/Cart/CartVariant2.vue2.js +4 -0
  24. package/components/Cart/CartVariant3.vue.d.ts +41 -0
  25. package/components/Cart/CartVariant3.vue.js +192 -0
  26. package/components/Cart/CartVariant3.vue2.js +4 -0
  27. package/components/Cart/CartVariant4.vue.d.ts +41 -0
  28. package/components/Cart/CartVariant4.vue.js +145 -0
  29. package/components/Cart/CartVariant4.vue2.js +4 -0
  30. package/components/Cart/composables/useCart.d.ts +46 -0
  31. package/components/Cart/composables/useCart.js +110 -0
  32. package/components/Cart/composables/useCartCalculation.d.ts +91 -0
  33. package/components/Cart/composables/useCartCalculation.js +145 -0
  34. package/components/Cart/index.d.ts +9 -0
  35. package/components/Cart/types.d.ts +391 -0
  36. package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
  37. package/components/CategoryManager/CategoryManager.vue.js +3 -3
  38. package/components/CategoryManager/CategoryManager.vue2.js +224 -248
  39. package/components/CategoryManager/utils.d.ts +3 -0
  40. package/components/CategoryManager/utils.js +31 -0
  41. package/components/CategoryMenu/CategoryMenu.vue.d.ts +2 -0
  42. package/components/CategoryMenu/CategoryMenu.vue.js +46 -40
  43. package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +5 -1
  44. package/components/CategoryMenu/CategoryMenuVariant1.vue.js +5 -144
  45. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +220 -2
  46. package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +5 -1
  47. package/components/CategoryMenu/CategoryMenuVariant2.vue.js +5 -160
  48. package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +235 -2
  49. package/components/CategoryMenu/types.d.ts +5 -2
  50. package/components/Clipboard.vue.d.ts +2 -2
  51. package/components/Dropdown/Dropdown.vue.d.ts +1 -0
  52. package/components/Dropdown/Dropdown.vue.js +31 -29
  53. package/components/FilePicker/FilePicker.vue.d.ts +2 -2
  54. package/components/FilePicker/FilePicker.vue.js +278 -202
  55. package/components/Form/CustomFields.vue.d.ts +4 -0
  56. package/components/Form/CustomFields.vue.js +2 -2
  57. package/components/Form/CustomFields.vue2.js +349 -145
  58. package/components/Form/FormField.vue.d.ts +1 -1
  59. package/components/Form/FormField.vue.js +1 -1
  60. package/components/Form/types.d.ts +3 -0
  61. package/components/Modal.vue.d.ts +2 -0
  62. package/components/Modal.vue.js +1 -1
  63. package/components/Modal.vue2.js +30 -28
  64. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  65. package/components/Rating/Rating.vue.d.ts +1 -1
  66. package/components/Screen/ScreenFilter.vue.js +3 -2
  67. package/components/SidePanel.vue.d.ts +2 -0
  68. package/components/SidePanel.vue.js +1 -1
  69. package/components/SidePanel.vue2.js +25 -23
  70. package/components/SidebarMenu/SidebarMenu.vue.js +145 -128
  71. package/components/index.d.ts +1 -0
  72. package/core/config.d.ts +128 -0
  73. package/index.d.ts +1 -0
  74. package/index.js +327 -306
  75. package/package.json +1 -1
  76. package/style.css +1 -1
  77. package/types/config.type.d.ts +2 -0
@@ -1,16 +1,16 @@
1
- import { defineComponent as Y, inject as Z, ref as y, computed as r, watch as I, reactive as ee, provide as te, openBlock as d, createElementBlock as m, normalizeClass as V, createVNode as D, TransitionGroup as le, withCtx as ne, createBlock as B, createCommentVNode as S, createElementVNode as R, toDisplayString as ae, Fragment as W, renderList as H } from "vue";
2
- import { useRoute as re, useRouter as oe } from "vue-router";
3
- import { useBreakpoints as ie, breakpointsTailwind as se } from "@vueuse/core";
1
+ import { defineComponent as Z, inject as ee, ref as C, computed as r, watch as B, reactive as te, provide as ne, openBlock as d, createElementBlock as v, normalizeClass as D, createVNode as R, TransitionGroup as le, withCtx as ae, createBlock as S, createCommentVNode as P, createElementVNode as W, toDisplayString as re, Fragment as H, renderList as A } from "vue";
2
+ import { useRoute as oe, useRouter as se } from "vue-router";
3
+ import { useBreakpoints as ie, breakpointsTailwind as ue } from "@vueuse/core";
4
4
  import F from "./SidebarMenuItem.vue.js";
5
5
  /* empty css */
6
6
  import $ from "../Icon.vue.js";
7
- const ue = {
7
+ const ce = {
8
8
  key: 0,
9
9
  class: "w-full sidebar-drilldown-container relative overflow-hidden"
10
- }, ce = { class: "truncate font-semibold text-foreground" }, de = {
10
+ }, de = { class: "truncate font-semibold text-foreground" }, fe = {
11
11
  key: 1,
12
12
  class: "h-px bg-border/60 mx-1 mb-1.5"
13
- }, ge = /* @__PURE__ */ Y({
13
+ }, we = /* @__PURE__ */ Z({
14
14
  __name: "SidebarMenu",
15
15
  props: {
16
16
  items: { default: () => [] },
@@ -36,220 +36,237 @@ const ue = {
36
36
  showTooltip: { type: Boolean, default: !1 },
37
37
  forceTreeView: { type: Boolean, default: !1 }
38
38
  },
39
- setup(v) {
40
- const b = Z("navbar-context", null), l = v, p = re();
41
- oe();
42
- const j = ie(se), c = y([...l.defaultExpanded]), C = y(null), o = y([]), g = y("forward"), w = r(() => o.value.length > 0), M = r(() => o.value.length === 0 ? l.items : o.value[o.value.length - 1].items), q = r(() => o.value.length === 0 ? "" : o.value[o.value.length - 1].label), P = r(() => {
39
+ setup(p) {
40
+ const b = ee("navbar-context", null), n = p, h = oe();
41
+ se();
42
+ const j = ie(ue), c = C([...n.defaultExpanded]), M = C(null), o = C([]), g = C("forward"), x = r(() => o.value.length > 0), T = r(() => o.value.length === 0 ? n.items : o.value[o.value.length - 1].items), q = r(() => o.value.length === 0 ? "" : o.value[o.value.length - 1].label), z = r(() => {
43
43
  if (o.value.length !== 0)
44
44
  return o.value[o.value.length - 1].icon;
45
- }), A = (e) => {
45
+ }), G = (e) => {
46
46
  e.children?.length && (g.value = "forward", o.value = [
47
47
  ...o.value,
48
48
  { items: e.children, label: e.label, icon: e.icon }
49
49
  ]);
50
- }, z = () => {
50
+ }, N = () => {
51
51
  o.value.length !== 0 && (g.value = "backward", o.value = o.value.slice(0, -1));
52
- }, G = r(() => !l.mobileBreakpoint || l.mobileBreakpoint === "none" ? !0 : j.greaterOrEqual(l.mobileBreakpoint).value), x = r(() => G.value && l.orientation || "vertical"), T = r(() => l.forceTreeView ? !1 : !!b?.renderNestedTabs?.value), k = (e) => e.id || (typeof e.to == "string" ? e.to : null) || e.label, f = (e, n) => {
52
+ }, J = r(() => !n.mobileBreakpoint || n.mobileBreakpoint === "none" ? !0 : j.greaterOrEqual(n.mobileBreakpoint).value), k = r(() => J.value && n.orientation || "vertical"), I = r(() => n.forceTreeView ? !1 : !!b?.renderNestedTabs?.value), w = (e) => e.id || (typeof e.to == "string" ? e.to : null) || e.label, K = r(() => {
53
+ const e = /* @__PURE__ */ new Map(), l = (t, a = []) => {
54
+ const i = [];
55
+ return t.forEach((u) => {
56
+ const s = w(u), f = [...a, s], y = u.children?.length ? l(u.children, f) : [];
57
+ e.set(s, {
58
+ ancestors: a,
59
+ descendants: y
60
+ }), i.push(s, ...y);
61
+ }), i;
62
+ };
63
+ return l(n.items), e;
64
+ }), m = (e, l) => {
53
65
  if (!e.to) return !1;
54
66
  const t = typeof e.to == "string" ? e.to : e.to.path;
55
67
  if (!t) return !1;
56
- if (n === t) return !0;
57
- if (t !== "/" && t.length > 1 && n.startsWith(t)) {
58
- const a = n[t.length];
68
+ if (l === t) return !0;
69
+ if (t !== "/" && t.length > 1 && l.startsWith(t)) {
70
+ const a = l[t.length];
59
71
  return !a || a === "/" || a === "?";
60
72
  }
61
73
  return !1;
62
- }, N = (e, n, t = []) => {
74
+ }, E = (e, l, t = []) => {
63
75
  for (const a of e) {
64
- const u = k(a);
76
+ const i = w(a);
65
77
  if (a.children?.length) {
66
- const s = N(a.children, n, [...t, u]);
67
- if (s !== null)
68
- return c.value.includes(u) || c.value.push(u), s;
78
+ const u = E(a.children, l, [...t, i]);
79
+ if (u !== null)
80
+ return c.value.includes(i) || c.value.push(i), u;
69
81
  }
70
- if (f(a, n))
71
- return t.forEach((s) => {
72
- c.value.includes(s) || c.value.push(s);
73
- }), u;
82
+ if (m(a, l))
83
+ return t.forEach((u) => {
84
+ c.value.includes(u) || c.value.push(u);
85
+ }), i;
74
86
  }
75
87
  return null;
76
- }, E = (e, n) => {
77
- for (const t of l.items) {
78
- if (!t.children?.length || !(f(t, e) || t.children.some(
79
- (i) => f(i, e) || i.children?.some((h) => f(h, e))
88
+ }, O = (e, l) => {
89
+ for (const t of n.items) {
90
+ if (!t.children?.length || !(m(t, e) || t.children.some(
91
+ (s) => m(s, e) || s.children?.some((f) => m(f, e))
80
92
  ))) continue;
81
- const u = t.children.map((i) => ({
82
- label: i.label,
83
- labelI18n: i.labelI18n,
84
- value: k(i),
85
- icon: i.icon,
86
- disabled: i.disabled,
87
- to: i.to,
88
- href: i.href
93
+ const i = t.children.map((s) => ({
94
+ label: s.label,
95
+ labelI18n: s.labelI18n,
96
+ value: w(s),
97
+ icon: s.icon,
98
+ disabled: s.disabled,
99
+ to: s.to,
100
+ href: s.href
89
101
  }));
90
- let s = u[0]?.value ?? "";
91
- if (n) {
92
- const i = u.find((h) => h.value === n);
93
- if (i)
94
- s = i.value;
102
+ let u = i[0]?.value ?? "";
103
+ if (l) {
104
+ const s = i.find((f) => f.value === l);
105
+ if (s)
106
+ u = s.value;
95
107
  else {
96
- const h = t.children.find(
97
- (U) => U.children?.some((X) => k(X) === n)
108
+ const f = t.children.find(
109
+ (y) => y.children?.some((Y) => w(Y) === l)
98
110
  );
99
- h && (s = k(h));
111
+ f && (u = w(f));
100
112
  }
101
113
  }
102
- return { tabs: u, activeTab: s };
114
+ return { tabs: i, activeTab: u };
103
115
  }
104
116
  return null;
105
- }, O = (e) => {
106
- const n = N(l.items, e);
107
- if (C.value = n, !T.value) return;
108
- const t = E(e, n);
117
+ }, L = (e) => {
118
+ const l = E(n.items, e);
119
+ if (M.value = l, !I.value) return;
120
+ const t = O(e, l);
109
121
  t ? b.setNestedTabs(t.tabs, t.activeTab) : b.setNestedTabs([], "");
110
122
  };
111
- I(
112
- () => p?.path,
123
+ B(
124
+ () => h?.path,
113
125
  (e) => {
114
- e && O(e);
126
+ e && L(e);
115
127
  },
116
128
  { immediate: !0 }
117
- ), I(
118
- () => l.items,
129
+ ), B(
130
+ () => n.items,
119
131
  () => {
120
- p?.path && O(p.path);
132
+ h?.path && L(h.path);
121
133
  },
122
134
  { deep: !0 }
123
135
  );
124
- const J = (e) => {
125
- c.value.includes(e) ? c.value = c.value.filter((t) => t !== e) : l.allowMultiple ? c.value.push(e) : c.value = [e];
126
- }, K = (e) => {
127
- if (C.value = e, T.value && p?.path) {
128
- const n = E(p.path, e);
129
- n ? b.setNestedTabs(n.tabs, n.activeTab) : b.setNestedTabs([], "");
136
+ const Q = (e) => {
137
+ const l = c.value.includes(e), t = K.value.get(e);
138
+ if (l) {
139
+ const a = /* @__PURE__ */ new Set([e, ...t?.descendants || []]);
140
+ c.value = c.value.filter((i) => !a.has(i));
141
+ } else
142
+ n.allowMultiple ? c.value.push(e) : c.value = [...t?.ancestors || [], e];
143
+ }, U = (e) => {
144
+ if (M.value = e, I.value && h?.path) {
145
+ const l = O(h.path, e);
146
+ l ? b.setNestedTabs(l.tabs, l.activeTab) : b.setNestedTabs([], "");
130
147
  }
131
- }, L = (e, n, t = []) => {
148
+ }, _ = (e, l, t = []) => {
132
149
  for (const a of e) {
133
- if (t.length === 0 && f(a, n)) return null;
150
+ if (t.length === 0 && m(a, l)) return null;
134
151
  if (a.children?.length) {
135
- const u = [
152
+ const i = [
136
153
  ...t,
137
154
  { items: a.children, label: a.label, icon: a.icon }
138
155
  ];
139
- for (const i of a.children)
140
- if (f(i, n)) return u;
141
- const s = L(a.children, n, u);
142
- if (s) return s;
156
+ for (const s of a.children)
157
+ if (m(s, l)) return i;
158
+ const u = _(a.children, l, i);
159
+ if (u) return u;
143
160
  }
144
161
  }
145
162
  return null;
146
- }, _ = (e, n) => {
163
+ }, V = (e, l) => {
147
164
  for (const t of e)
148
- if (f(t, n)) return !0;
165
+ if (m(t, l)) return !0;
149
166
  return !1;
150
167
  };
151
- I(
152
- () => p?.path,
168
+ B(
169
+ () => h?.path,
153
170
  (e) => {
154
- if (!e || (l.renderMode || "tree") !== "drilldown") return;
155
- const t = M.value;
156
- if (_(t, e)) return;
157
- if (_(l.items, e)) {
171
+ if (!e || (n.renderMode || "tree") !== "drilldown") return;
172
+ const t = T.value;
173
+ if (V(t, e)) return;
174
+ if (V(n.items, e)) {
158
175
  o.value.length > 0 && (g.value = "backward", o.value = []);
159
176
  return;
160
177
  }
161
- const a = L(l.items, e);
178
+ const a = _(n.items, e);
162
179
  a && a.length > 0 && (g.value = "forward", o.value = a);
163
180
  }
164
181
  );
165
- const Q = ee({
166
- activeItem: C,
182
+ const X = te({
183
+ activeItem: M,
167
184
  expandedItems: c,
168
- toggleExpand: J,
169
- setActive: K,
170
- indentSize: r(() => l.indentSize),
171
- variant: r(() => l.variant),
172
- renderMode: r(() => l.renderMode || "tree"),
185
+ toggleExpand: Q,
186
+ setActive: U,
187
+ indentSize: r(() => n.indentSize),
188
+ variant: r(() => n.variant),
189
+ renderMode: r(() => n.renderMode || "tree"),
173
190
  // Expose the effective value so SidebarMenuItem respects forceTreeView
174
- renderNestedTabs: T,
175
- compact: r(() => l.compact),
176
- showCompactLabels: r(() => l.showCompactLabels),
177
- iconSize: r(() => l.iconSize),
178
- compactIconSize: r(() => l.compactIconSize),
179
- labelClass: r(() => l.labelClass),
180
- compactLabelClass: r(() => l.compactLabelClass),
181
- itemPadding: r(() => l.itemPadding),
182
- compactItemPadding: r(() => l.compactItemPadding),
183
- nestedMenuWidth: r(() => l.nestedMenuWidth),
184
- nestedMenuMaxHeight: r(() => l.nestedMenuMaxHeight),
185
- currentOrientation: x,
186
- showTooltip: r(() => l.showTooltip),
191
+ renderNestedTabs: I,
192
+ compact: r(() => n.compact),
193
+ showCompactLabels: r(() => n.showCompactLabels),
194
+ iconSize: r(() => n.iconSize),
195
+ compactIconSize: r(() => n.compactIconSize),
196
+ labelClass: r(() => n.labelClass),
197
+ compactLabelClass: r(() => n.compactLabelClass),
198
+ itemPadding: r(() => n.itemPadding),
199
+ compactItemPadding: r(() => n.compactItemPadding),
200
+ nestedMenuWidth: r(() => n.nestedMenuWidth),
201
+ nestedMenuMaxHeight: r(() => n.nestedMenuMaxHeight),
202
+ currentOrientation: k,
203
+ showTooltip: r(() => n.showTooltip),
187
204
  drilldownStack: o,
188
- drillInto: A,
189
- drillBack: z,
190
- drilldownItems: M,
191
- isDrilldown: w
205
+ drillInto: G,
206
+ drillBack: N,
207
+ drilldownItems: T,
208
+ isDrilldown: x
192
209
  });
193
- return te("sidebar-menu-ctx", Q), (e, n) => (d(), m("nav", {
194
- class: V(["flex w-full transition-all duration-300", [
195
- x.value === "horizontal" ? "flex-row flex-wrap gap-2 items-center" : "flex-col",
196
- x.value === "vertical" && !l.compact ? "space-y-1" : ""
210
+ return ne("sidebar-menu-ctx", X), (e, l) => (d(), v("nav", {
211
+ class: D(["flex w-full transition-all duration-300", [
212
+ k.value === "horizontal" ? "flex-row flex-wrap gap-2 items-center" : "flex-col",
213
+ k.value === "vertical" && !n.compact ? "space-y-1" : ""
197
214
  ]]),
198
215
  role: "tree",
199
216
  "aria-label": "Sidebar Menu"
200
217
  }, [
201
- (l.renderMode || "tree") === "drilldown" && x.value === "vertical" ? (d(), m("div", ue, [
202
- D(le, {
218
+ (n.renderMode || "tree") === "drilldown" && k.value === "vertical" ? (d(), v("div", ce, [
219
+ R(le, {
203
220
  name: g.value === "forward" ? "drill-forward" : "drill-backward",
204
221
  tag: "div",
205
222
  class: "relative w-full"
206
223
  }, {
207
- default: ne(() => [
208
- (d(), m("div", {
224
+ default: ae(() => [
225
+ (d(), v("div", {
209
226
  key: o.value.length,
210
227
  class: "w-full"
211
228
  }, [
212
- w.value ? (d(), m("button", {
229
+ x.value ? (d(), v("button", {
213
230
  key: 0,
214
231
  type: "button",
215
232
  class: "flex items-center gap-2 w-full px-2 py-2.5 mb-1 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-accent/60 rounded-md transition-all duration-150 group cursor-pointer",
216
- onClick: z
233
+ onClick: N
217
234
  }, [
218
- D($, {
235
+ R($, {
219
236
  icon: "lucide:chevron-left",
220
237
  class: "w-4 h-4 shrink-0 transition-transform duration-200 group-hover:-translate-x-0.5"
221
238
  }),
222
- P.value ? (d(), B($, {
239
+ z.value ? (d(), S($, {
223
240
  key: 0,
224
- icon: P.value,
241
+ icon: z.value,
225
242
  class: "w-4 h-4 shrink-0 opacity-70"
226
- }, null, 8, ["icon"])) : S("", !0),
227
- R("span", ce, ae(q.value), 1)
228
- ])) : S("", !0),
229
- w.value ? (d(), m("div", de)) : S("", !0),
230
- R("div", {
231
- class: V(w.value ? "space-y-0.5" : "space-y-1")
243
+ }, null, 8, ["icon"])) : P("", !0),
244
+ W("span", de, re(q.value), 1)
245
+ ])) : P("", !0),
246
+ x.value ? (d(), v("div", fe)) : P("", !0),
247
+ W("div", {
248
+ class: D(x.value ? "space-y-0.5" : "space-y-1")
232
249
  }, [
233
- (d(!0), m(W, null, H(M.value, (t) => (d(), B(F, {
250
+ (d(!0), v(H, null, A(T.value, (t) => (d(), S(F, {
234
251
  key: t.id || t.label,
235
252
  item: t,
236
- itemClass: v.itemClass,
237
- menuOffset: v.menuOffset
253
+ itemClass: p.itemClass,
254
+ menuOffset: p.menuOffset
238
255
  }, null, 8, ["item", "itemClass", "menuOffset"]))), 128))
239
256
  ], 2)
240
257
  ]))
241
258
  ]),
242
259
  _: 1
243
260
  }, 8, ["name"])
244
- ])) : (d(!0), m(W, { key: 1 }, H(v.items, (t) => (d(), B(F, {
261
+ ])) : (d(!0), v(H, { key: 1 }, A(p.items, (t) => (d(), S(F, {
245
262
  key: t.id || t.label,
246
263
  item: t,
247
- itemClass: v.itemClass,
248
- menuOffset: v.menuOffset
264
+ itemClass: p.itemClass,
265
+ menuOffset: p.menuOffset
249
266
  }, null, 8, ["item", "itemClass", "menuOffset"]))), 128))
250
267
  ], 2));
251
268
  }
252
269
  });
253
270
  export {
254
- ge as default
271
+ we as default
255
272
  };
@@ -11,6 +11,7 @@ export { default as Button } from './Button.vue';
11
11
  export { default as BackButton } from './BackButton.vue';
12
12
  export { default as ButtonGroup } from './ButtonGroup.vue';
13
13
  export { Carousel } from './Carousel';
14
+ export * from './Cart';
14
15
  export { default as CheckBox } from './CheckBox.vue';
15
16
  export { Chip } from './Chip';
16
17
  export { ChoiceBox } from './ChoiceBox';
package/core/config.d.ts CHANGED
@@ -113,6 +113,70 @@ export declare const configState: {
113
113
  };
114
114
  containerClass?: string | any[] | Record<string, boolean>;
115
115
  };
116
+ cart?: {
117
+ variant?: import('..').CartVariant;
118
+ labels?: {
119
+ cart?: string;
120
+ emptyTitle?: string;
121
+ emptyDescription?: string;
122
+ emptyAction?: string;
123
+ subtotal?: string;
124
+ discount?: string;
125
+ estimatedTax?: string;
126
+ shipping?: string;
127
+ grandTotal?: string;
128
+ totalSavings?: string;
129
+ coupon?: string;
130
+ couponPlaceholder?: string;
131
+ applyCoupon?: string;
132
+ removeCoupon?: string;
133
+ quantity?: string;
134
+ remove?: string;
135
+ continue?: string;
136
+ continueShopping?: string;
137
+ clearCart?: string;
138
+ itemCount?: string;
139
+ };
140
+ containerClass?: string | any[] | Record<string, boolean>;
141
+ actions?: {
142
+ continueLabel?: string;
143
+ continueShoppingLabel?: string;
144
+ showContinue?: boolean;
145
+ showContinueShopping?: boolean;
146
+ continueDisabled?: boolean;
147
+ continueShoppingDisabled?: boolean;
148
+ continueIcon?: string;
149
+ continueShoppingIcon?: string;
150
+ };
151
+ features?: {
152
+ editableQuantity?: boolean;
153
+ removable?: boolean;
154
+ clearable?: boolean;
155
+ coupon?: boolean;
156
+ subtotal?: boolean;
157
+ discount?: boolean;
158
+ estimatedTax?: boolean;
159
+ shipping?: boolean;
160
+ totalSavings?: boolean;
161
+ continue?: boolean;
162
+ continueShopping?: boolean;
163
+ thumbnails?: boolean;
164
+ description?: boolean;
165
+ sku?: boolean;
166
+ itemVariant?: boolean;
167
+ emptyState?: boolean;
168
+ trustSignals?: boolean;
169
+ };
170
+ validateCoupon?: (code: string, context: {
171
+ subtotal: number;
172
+ currency?: string;
173
+ items: import('..').CartItem[];
174
+ }) => Promise<import('..').CartCouponDefinition | {
175
+ code: string;
176
+ message: string;
177
+ state?: "invalid" | "expired" | "error";
178
+ } | null>;
179
+ };
116
180
  };
117
181
  };
118
182
  /**
@@ -228,5 +292,69 @@ export declare function useVLiteConfig(): {
228
292
  };
229
293
  containerClass?: string | any[] | Record<string, boolean>;
230
294
  };
295
+ cart?: {
296
+ variant?: import('..').CartVariant;
297
+ labels?: {
298
+ cart?: string;
299
+ emptyTitle?: string;
300
+ emptyDescription?: string;
301
+ emptyAction?: string;
302
+ subtotal?: string;
303
+ discount?: string;
304
+ estimatedTax?: string;
305
+ shipping?: string;
306
+ grandTotal?: string;
307
+ totalSavings?: string;
308
+ coupon?: string;
309
+ couponPlaceholder?: string;
310
+ applyCoupon?: string;
311
+ removeCoupon?: string;
312
+ quantity?: string;
313
+ remove?: string;
314
+ continue?: string;
315
+ continueShopping?: string;
316
+ clearCart?: string;
317
+ itemCount?: string;
318
+ };
319
+ containerClass?: string | any[] | Record<string, boolean>;
320
+ actions?: {
321
+ continueLabel?: string;
322
+ continueShoppingLabel?: string;
323
+ showContinue?: boolean;
324
+ showContinueShopping?: boolean;
325
+ continueDisabled?: boolean;
326
+ continueShoppingDisabled?: boolean;
327
+ continueIcon?: string;
328
+ continueShoppingIcon?: string;
329
+ };
330
+ features?: {
331
+ editableQuantity?: boolean;
332
+ removable?: boolean;
333
+ clearable?: boolean;
334
+ coupon?: boolean;
335
+ subtotal?: boolean;
336
+ discount?: boolean;
337
+ estimatedTax?: boolean;
338
+ shipping?: boolean;
339
+ totalSavings?: boolean;
340
+ continue?: boolean;
341
+ continueShopping?: boolean;
342
+ thumbnails?: boolean;
343
+ description?: boolean;
344
+ sku?: boolean;
345
+ itemVariant?: boolean;
346
+ emptyState?: boolean;
347
+ trustSignals?: boolean;
348
+ };
349
+ validateCoupon?: (code: string, context: {
350
+ subtotal: number;
351
+ currency?: string;
352
+ items: import('..').CartItem[];
353
+ }) => Promise<import('..').CartCouponDefinition | {
354
+ code: string;
355
+ message: string;
356
+ state?: "invalid" | "expired" | "error";
357
+ } | null>;
358
+ };
231
359
  };
232
360
  };
package/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from './components/Masonry';
14
14
  export * from './components/Spinner';
15
15
  export * from './components/Barcode';
16
16
  export * from './components/Carousel';
17
+ export * from './components/Cart';
17
18
  export * from './components/Dropdown';
18
19
  export * from './components/Breadcrumb';
19
20
  export * from './components/FileTree';