@betterstore/react 0.3.47 → 0.3.49

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.49
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fixes
8
+
9
+ ## 0.3.48
10
+
11
+ ### Patch Changes
12
+
13
+ - bug fixes
14
+
3
15
  ## 0.3.47
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -11633,30 +11633,34 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
11633
11633
  validateStep();
11634
11634
  }, [step]);
11635
11635
  React.useEffect(() => {
11636
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19;
11636
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21;
11637
11637
  if (checkoutId !== storedCheckoutId) {
11638
11638
  setStep("customer");
11639
11639
  setCheckoutId(checkoutId);
11640
11640
  if (customer) {
11641
+ if ((_a = customer === null || customer === void 0 ? void 0 : customer.address) === null || _a === void 0 ? void 0 : _a.city) {
11642
+ setStep("shipping");
11643
+ }
11641
11644
  setFormData({
11642
11645
  customerId: customer.id,
11643
11646
  customer: {
11644
- firstName: (_c = (_b = (_a = customer.address) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.split(" ")[0]) !== null && _c !== void 0 ? _c : "",
11645
- lastName: (_f = (_e = (_d = customer.address) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.split(" ")[1]) !== null && _f !== void 0 ? _f : "",
11646
- phone: (_h = (_g = customer.address) === null || _g === void 0 ? void 0 : _g.phone) !== null && _h !== void 0 ? _h : "",
11647
- email: (_j = customer.email) !== null && _j !== void 0 ? _j : "",
11647
+ firstName: (_d = (_c = (_b = customer.address) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.split(" ")[0]) !== null && _d !== void 0 ? _d : "",
11648
+ lastName: (_g = (_f = (_e = customer.address) === null || _e === void 0 ? void 0 : _e.name) === null || _f === void 0 ? void 0 : _f.split(" ")[1]) !== null && _g !== void 0 ? _g : "",
11649
+ phone: (_j = (_h = customer.address) === null || _h === void 0 ? void 0 : _h.phone) !== null && _j !== void 0 ? _j : "",
11650
+ email: (_k = customer.email) !== null && _k !== void 0 ? _k : "",
11648
11651
  address: {
11649
- line1: (_l = (_k = customer.address) === null || _k === void 0 ? void 0 : _k.line1) !== null && _l !== void 0 ? _l : "",
11650
- line2: (_o = (_m = customer.address) === null || _m === void 0 ? void 0 : _m.line2) !== null && _o !== void 0 ? _o : "",
11651
- city: (_q = (_p = customer.address) === null || _p === void 0 ? void 0 : _p.city) !== null && _q !== void 0 ? _q : "",
11652
- zipCode: (_s = (_r = customer.address) === null || _r === void 0 ? void 0 : _r.zipCode) !== null && _s !== void 0 ? _s : "",
11653
- country: (_u = (_t = customer.address) === null || _t === void 0 ? void 0 : _t.country) !== null && _u !== void 0 ? _u : "",
11654
- countryCode: (_w = (_v = customer.address) === null || _v === void 0 ? void 0 : _v.countryCode) !== null && _w !== void 0 ? _w : "",
11652
+ line1: (_m = (_l = customer.address) === null || _l === void 0 ? void 0 : _l.line1) !== null && _m !== void 0 ? _m : "",
11653
+ line2: (_p = (_o = customer.address) === null || _o === void 0 ? void 0 : _o.line2) !== null && _p !== void 0 ? _p : "",
11654
+ city: (_r = (_q = customer.address) === null || _q === void 0 ? void 0 : _q.city) !== null && _r !== void 0 ? _r : "",
11655
+ zipCode: (_t = (_s = customer.address) === null || _s === void 0 ? void 0 : _s.zipCode) !== null && _t !== void 0 ? _t : "",
11656
+ country: (_v = (_u = customer.address) === null || _u === void 0 ? void 0 : _u.country) !== null && _v !== void 0 ? _v : "",
11657
+ countryCode: (_x = (_w = customer.address) === null || _w === void 0 ? void 0 : _w.countryCode) !== null && _x !== void 0 ? _x : "",
11655
11658
  },
11656
11659
  },
11657
11660
  });
11661
+ return;
11658
11662
  }
11659
- else if ((_x = formData.customer) === null || _x === void 0 ? void 0 : _x.email) {
11663
+ else if ((_y = formData.customer) === null || _y === void 0 ? void 0 : _y.email) {
11660
11664
  setFormData({
11661
11665
  customer: formData.customer,
11662
11666
  });
@@ -11666,22 +11670,25 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
11666
11670
  }
11667
11671
  return;
11668
11672
  }
11669
- if (customer && !((_y = formData.customer) === null || _y === void 0 ? void 0 : _y.email)) {
11673
+ if (customer && !((_z = formData.customer) === null || _z === void 0 ? void 0 : _z.email)) {
11674
+ setStep("customer");
11675
+ if ((_0 = customer.address) === null || _0 === void 0 ? void 0 : _0.city) {
11676
+ setStep("shipping");
11677
+ }
11670
11678
  setFormData(Object.assign(Object.assign({}, formData), { customerId: customer.id, customer: {
11671
- firstName: (_1 = (_0 = (_z = customer.address) === null || _z === void 0 ? void 0 : _z.name) === null || _0 === void 0 ? void 0 : _0.split(" ")[0]) !== null && _1 !== void 0 ? _1 : "",
11672
- lastName: (_4 = (_3 = (_2 = customer.address) === null || _2 === void 0 ? void 0 : _2.name) === null || _3 === void 0 ? void 0 : _3.split(" ")[1]) !== null && _4 !== void 0 ? _4 : "",
11673
- phone: (_6 = (_5 = customer.address) === null || _5 === void 0 ? void 0 : _5.phone) !== null && _6 !== void 0 ? _6 : "",
11674
- email: (_7 = customer.email) !== null && _7 !== void 0 ? _7 : "",
11679
+ firstName: (_3 = (_2 = (_1 = customer.address) === null || _1 === void 0 ? void 0 : _1.name) === null || _2 === void 0 ? void 0 : _2.split(" ")[0]) !== null && _3 !== void 0 ? _3 : "",
11680
+ lastName: (_6 = (_5 = (_4 = customer.address) === null || _4 === void 0 ? void 0 : _4.name) === null || _5 === void 0 ? void 0 : _5.split(" ")[1]) !== null && _6 !== void 0 ? _6 : "",
11681
+ phone: (_8 = (_7 = customer.address) === null || _7 === void 0 ? void 0 : _7.phone) !== null && _8 !== void 0 ? _8 : "",
11682
+ email: (_9 = customer.email) !== null && _9 !== void 0 ? _9 : "",
11675
11683
  address: {
11676
- line1: (_9 = (_8 = customer.address) === null || _8 === void 0 ? void 0 : _8.line1) !== null && _9 !== void 0 ? _9 : "",
11677
- line2: (_11 = (_10 = customer.address) === null || _10 === void 0 ? void 0 : _10.line2) !== null && _11 !== void 0 ? _11 : "",
11678
- city: (_13 = (_12 = customer.address) === null || _12 === void 0 ? void 0 : _12.city) !== null && _13 !== void 0 ? _13 : "",
11679
- zipCode: (_15 = (_14 = customer.address) === null || _14 === void 0 ? void 0 : _14.zipCode) !== null && _15 !== void 0 ? _15 : "",
11680
- country: (_17 = (_16 = customer.address) === null || _16 === void 0 ? void 0 : _16.country) !== null && _17 !== void 0 ? _17 : "",
11681
- countryCode: (_19 = (_18 = customer.address) === null || _18 === void 0 ? void 0 : _18.countryCode) !== null && _19 !== void 0 ? _19 : "",
11684
+ line1: (_11 = (_10 = customer.address) === null || _10 === void 0 ? void 0 : _10.line1) !== null && _11 !== void 0 ? _11 : "",
11685
+ line2: (_13 = (_12 = customer.address) === null || _12 === void 0 ? void 0 : _12.line2) !== null && _13 !== void 0 ? _13 : "",
11686
+ city: (_15 = (_14 = customer.address) === null || _14 === void 0 ? void 0 : _14.city) !== null && _15 !== void 0 ? _15 : "",
11687
+ zipCode: (_17 = (_16 = customer.address) === null || _16 === void 0 ? void 0 : _16.zipCode) !== null && _17 !== void 0 ? _17 : "",
11688
+ country: (_19 = (_18 = customer.address) === null || _18 === void 0 ? void 0 : _18.country) !== null && _19 !== void 0 ? _19 : "",
11689
+ countryCode: (_21 = (_20 = customer.address) === null || _20 === void 0 ? void 0 : _20.countryCode) !== null && _21 !== void 0 ? _21 : "",
11682
11690
  },
11683
11691
  } }));
11684
- setStep("customer");
11685
11692
  }
11686
11693
  }, [customer]);
11687
11694
  React.useEffect(() => {
@@ -11915,7 +11922,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
11915
11922
  "hidden md:block": !isOpen,
11916
11923
  block: isOpen,
11917
11924
  }) }),
11918
- React.createElement("div", { className: clsx("gap-0 order-3 md:order-none", {
11925
+ React.createElement("div", { className: clsx("gap-5 order-3 md:order-none", {
11919
11926
  "hidden md:grid": !isOpen,
11920
11927
  grid: isOpen,
11921
11928
  }) }, lineItems.map((item, index) => {
@@ -11952,7 +11959,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
11952
11959
  "/placeholder.svg", alt: ((_c = item.productData) === null || _c === void 0 ? void 0 : _c.title) || "", className: "object-cover w-full h-full", sizes: "64px" }))),
11953
11960
  React.createElement("div", { className: "absolute -top-2 -right-2 w-6 h-6 bg-primary rounded-full flex items-center text-background justify-center text-sm" }, item.quantity)),
11954
11961
  React.createElement("div", { className: "ml-4 flex-1" },
11955
- React.createElement("h3", { className: "text-lg font-medium" }, (_d = item.productData) === null || _d === void 0 ? void 0 : _d.title),
11962
+ React.createElement("h3", { className: "text-base font-medium" }, (_d = item.productData) === null || _d === void 0 ? void 0 : _d.title),
11956
11963
  React.createElement("p", { className: "text-muted-foreground text-ellipsis line-clamp-1 md:max-w-[75%] text-sm" }, item.variantOptions
11957
11964
  .map((option) => `${option.name}: ${option.value}`)
11958
11965
  .join(", "))),
@@ -11960,7 +11967,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
11960
11967
  React.createElement("p", { className: "text-sm font-medium -mb-0.5 line-through text-muted-foreground" }, storeHelpers.formatPrice((_e = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _e !== void 0 ? _e : 0, currency, exchangeRate)),
11961
11968
  React.createElement("p", { className: "text-lg font-medium" }, discountedPrice <= 0
11962
11969
  ? t("CheckoutEmbed.Summary.free")
11963
- : storeHelpers.formatPrice(discountedPrice, currency, exchangeRate)))) : (React.createElement("p", { className: "text-lg font-medium" }, storeHelpers.formatPrice((_f = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate))))));
11970
+ : storeHelpers.formatPrice(discountedPrice, currency, exchangeRate)))) : (React.createElement("p", { className: "text-base font-medium" }, storeHelpers.formatPrice((_f = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate))))));
11964
11971
  }))));
11965
11972
  }
11966
11973
  function DiscountItem({ id, removeDiscount, label, canRemove, }) {
@@ -11990,7 +11997,7 @@ function CheckoutSummaryLoading() {
11990
11997
  React.createElement("div", { className: "flex justify-between items-center" },
11991
11998
  React.createElement("div", { className: "flex items-center gap-2 cursor-pointer" },
11992
11999
  React.createElement("h2", null, t("CheckoutEmbed.Summary.title")),
11993
- React.createElement(lucideReact.ChevronDown, { className: "size-5 transition-transform" })),
12000
+ React.createElement(lucideReact.ChevronDown, { className: "md:hidden size-5 transition-transform" })),
11994
12001
  React.createElement(Skeleton, { className: "w-20 h-[20px] md:hidden" }),
11995
12002
  React.createElement(Button, { className: "max-sm:hidden", variant: "link", size: "link", asChild: true },
11996
12003
  React.createElement("a", null, t("CheckoutEmbed.Summary.edit")))),
package/dist/index.mjs CHANGED
@@ -11610,30 +11610,34 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
11610
11610
  validateStep();
11611
11611
  }, [step]);
11612
11612
  useEffect(() => {
11613
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19;
11613
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21;
11614
11614
  if (checkoutId !== storedCheckoutId) {
11615
11615
  setStep("customer");
11616
11616
  setCheckoutId(checkoutId);
11617
11617
  if (customer) {
11618
+ if ((_a = customer === null || customer === void 0 ? void 0 : customer.address) === null || _a === void 0 ? void 0 : _a.city) {
11619
+ setStep("shipping");
11620
+ }
11618
11621
  setFormData({
11619
11622
  customerId: customer.id,
11620
11623
  customer: {
11621
- firstName: (_c = (_b = (_a = customer.address) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.split(" ")[0]) !== null && _c !== void 0 ? _c : "",
11622
- lastName: (_f = (_e = (_d = customer.address) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.split(" ")[1]) !== null && _f !== void 0 ? _f : "",
11623
- phone: (_h = (_g = customer.address) === null || _g === void 0 ? void 0 : _g.phone) !== null && _h !== void 0 ? _h : "",
11624
- email: (_j = customer.email) !== null && _j !== void 0 ? _j : "",
11624
+ firstName: (_d = (_c = (_b = customer.address) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.split(" ")[0]) !== null && _d !== void 0 ? _d : "",
11625
+ lastName: (_g = (_f = (_e = customer.address) === null || _e === void 0 ? void 0 : _e.name) === null || _f === void 0 ? void 0 : _f.split(" ")[1]) !== null && _g !== void 0 ? _g : "",
11626
+ phone: (_j = (_h = customer.address) === null || _h === void 0 ? void 0 : _h.phone) !== null && _j !== void 0 ? _j : "",
11627
+ email: (_k = customer.email) !== null && _k !== void 0 ? _k : "",
11625
11628
  address: {
11626
- line1: (_l = (_k = customer.address) === null || _k === void 0 ? void 0 : _k.line1) !== null && _l !== void 0 ? _l : "",
11627
- line2: (_o = (_m = customer.address) === null || _m === void 0 ? void 0 : _m.line2) !== null && _o !== void 0 ? _o : "",
11628
- city: (_q = (_p = customer.address) === null || _p === void 0 ? void 0 : _p.city) !== null && _q !== void 0 ? _q : "",
11629
- zipCode: (_s = (_r = customer.address) === null || _r === void 0 ? void 0 : _r.zipCode) !== null && _s !== void 0 ? _s : "",
11630
- country: (_u = (_t = customer.address) === null || _t === void 0 ? void 0 : _t.country) !== null && _u !== void 0 ? _u : "",
11631
- countryCode: (_w = (_v = customer.address) === null || _v === void 0 ? void 0 : _v.countryCode) !== null && _w !== void 0 ? _w : "",
11629
+ line1: (_m = (_l = customer.address) === null || _l === void 0 ? void 0 : _l.line1) !== null && _m !== void 0 ? _m : "",
11630
+ line2: (_p = (_o = customer.address) === null || _o === void 0 ? void 0 : _o.line2) !== null && _p !== void 0 ? _p : "",
11631
+ city: (_r = (_q = customer.address) === null || _q === void 0 ? void 0 : _q.city) !== null && _r !== void 0 ? _r : "",
11632
+ zipCode: (_t = (_s = customer.address) === null || _s === void 0 ? void 0 : _s.zipCode) !== null && _t !== void 0 ? _t : "",
11633
+ country: (_v = (_u = customer.address) === null || _u === void 0 ? void 0 : _u.country) !== null && _v !== void 0 ? _v : "",
11634
+ countryCode: (_x = (_w = customer.address) === null || _w === void 0 ? void 0 : _w.countryCode) !== null && _x !== void 0 ? _x : "",
11632
11635
  },
11633
11636
  },
11634
11637
  });
11638
+ return;
11635
11639
  }
11636
- else if ((_x = formData.customer) === null || _x === void 0 ? void 0 : _x.email) {
11640
+ else if ((_y = formData.customer) === null || _y === void 0 ? void 0 : _y.email) {
11637
11641
  setFormData({
11638
11642
  customer: formData.customer,
11639
11643
  });
@@ -11643,22 +11647,25 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
11643
11647
  }
11644
11648
  return;
11645
11649
  }
11646
- if (customer && !((_y = formData.customer) === null || _y === void 0 ? void 0 : _y.email)) {
11650
+ if (customer && !((_z = formData.customer) === null || _z === void 0 ? void 0 : _z.email)) {
11651
+ setStep("customer");
11652
+ if ((_0 = customer.address) === null || _0 === void 0 ? void 0 : _0.city) {
11653
+ setStep("shipping");
11654
+ }
11647
11655
  setFormData(Object.assign(Object.assign({}, formData), { customerId: customer.id, customer: {
11648
- firstName: (_1 = (_0 = (_z = customer.address) === null || _z === void 0 ? void 0 : _z.name) === null || _0 === void 0 ? void 0 : _0.split(" ")[0]) !== null && _1 !== void 0 ? _1 : "",
11649
- lastName: (_4 = (_3 = (_2 = customer.address) === null || _2 === void 0 ? void 0 : _2.name) === null || _3 === void 0 ? void 0 : _3.split(" ")[1]) !== null && _4 !== void 0 ? _4 : "",
11650
- phone: (_6 = (_5 = customer.address) === null || _5 === void 0 ? void 0 : _5.phone) !== null && _6 !== void 0 ? _6 : "",
11651
- email: (_7 = customer.email) !== null && _7 !== void 0 ? _7 : "",
11656
+ firstName: (_3 = (_2 = (_1 = customer.address) === null || _1 === void 0 ? void 0 : _1.name) === null || _2 === void 0 ? void 0 : _2.split(" ")[0]) !== null && _3 !== void 0 ? _3 : "",
11657
+ lastName: (_6 = (_5 = (_4 = customer.address) === null || _4 === void 0 ? void 0 : _4.name) === null || _5 === void 0 ? void 0 : _5.split(" ")[1]) !== null && _6 !== void 0 ? _6 : "",
11658
+ phone: (_8 = (_7 = customer.address) === null || _7 === void 0 ? void 0 : _7.phone) !== null && _8 !== void 0 ? _8 : "",
11659
+ email: (_9 = customer.email) !== null && _9 !== void 0 ? _9 : "",
11652
11660
  address: {
11653
- line1: (_9 = (_8 = customer.address) === null || _8 === void 0 ? void 0 : _8.line1) !== null && _9 !== void 0 ? _9 : "",
11654
- line2: (_11 = (_10 = customer.address) === null || _10 === void 0 ? void 0 : _10.line2) !== null && _11 !== void 0 ? _11 : "",
11655
- city: (_13 = (_12 = customer.address) === null || _12 === void 0 ? void 0 : _12.city) !== null && _13 !== void 0 ? _13 : "",
11656
- zipCode: (_15 = (_14 = customer.address) === null || _14 === void 0 ? void 0 : _14.zipCode) !== null && _15 !== void 0 ? _15 : "",
11657
- country: (_17 = (_16 = customer.address) === null || _16 === void 0 ? void 0 : _16.country) !== null && _17 !== void 0 ? _17 : "",
11658
- countryCode: (_19 = (_18 = customer.address) === null || _18 === void 0 ? void 0 : _18.countryCode) !== null && _19 !== void 0 ? _19 : "",
11661
+ line1: (_11 = (_10 = customer.address) === null || _10 === void 0 ? void 0 : _10.line1) !== null && _11 !== void 0 ? _11 : "",
11662
+ line2: (_13 = (_12 = customer.address) === null || _12 === void 0 ? void 0 : _12.line2) !== null && _13 !== void 0 ? _13 : "",
11663
+ city: (_15 = (_14 = customer.address) === null || _14 === void 0 ? void 0 : _14.city) !== null && _15 !== void 0 ? _15 : "",
11664
+ zipCode: (_17 = (_16 = customer.address) === null || _16 === void 0 ? void 0 : _16.zipCode) !== null && _17 !== void 0 ? _17 : "",
11665
+ country: (_19 = (_18 = customer.address) === null || _18 === void 0 ? void 0 : _18.country) !== null && _19 !== void 0 ? _19 : "",
11666
+ countryCode: (_21 = (_20 = customer.address) === null || _20 === void 0 ? void 0 : _20.countryCode) !== null && _21 !== void 0 ? _21 : "",
11659
11667
  },
11660
11668
  } }));
11661
- setStep("customer");
11662
11669
  }
11663
11670
  }, [customer]);
11664
11671
  useEffect(() => {
@@ -11892,7 +11899,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
11892
11899
  "hidden md:block": !isOpen,
11893
11900
  block: isOpen,
11894
11901
  }) }),
11895
- React__default.createElement("div", { className: clsx$1("gap-0 order-3 md:order-none", {
11902
+ React__default.createElement("div", { className: clsx$1("gap-5 order-3 md:order-none", {
11896
11903
  "hidden md:grid": !isOpen,
11897
11904
  grid: isOpen,
11898
11905
  }) }, lineItems.map((item, index) => {
@@ -11929,7 +11936,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
11929
11936
  "/placeholder.svg", alt: ((_c = item.productData) === null || _c === void 0 ? void 0 : _c.title) || "", className: "object-cover w-full h-full", sizes: "64px" }))),
11930
11937
  React__default.createElement("div", { className: "absolute -top-2 -right-2 w-6 h-6 bg-primary rounded-full flex items-center text-background justify-center text-sm" }, item.quantity)),
11931
11938
  React__default.createElement("div", { className: "ml-4 flex-1" },
11932
- React__default.createElement("h3", { className: "text-lg font-medium" }, (_d = item.productData) === null || _d === void 0 ? void 0 : _d.title),
11939
+ React__default.createElement("h3", { className: "text-base font-medium" }, (_d = item.productData) === null || _d === void 0 ? void 0 : _d.title),
11933
11940
  React__default.createElement("p", { className: "text-muted-foreground text-ellipsis line-clamp-1 md:max-w-[75%] text-sm" }, item.variantOptions
11934
11941
  .map((option) => `${option.name}: ${option.value}`)
11935
11942
  .join(", "))),
@@ -11937,7 +11944,7 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
11937
11944
  React__default.createElement("p", { className: "text-sm font-medium -mb-0.5 line-through text-muted-foreground" }, storeHelpers.formatPrice((_e = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _e !== void 0 ? _e : 0, currency, exchangeRate)),
11938
11945
  React__default.createElement("p", { className: "text-lg font-medium" }, discountedPrice <= 0
11939
11946
  ? t("CheckoutEmbed.Summary.free")
11940
- : storeHelpers.formatPrice(discountedPrice, currency, exchangeRate)))) : (React__default.createElement("p", { className: "text-lg font-medium" }, storeHelpers.formatPrice((_f = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate))))));
11947
+ : storeHelpers.formatPrice(discountedPrice, currency, exchangeRate)))) : (React__default.createElement("p", { className: "text-base font-medium" }, storeHelpers.formatPrice((_f = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate))))));
11941
11948
  }))));
11942
11949
  }
11943
11950
  function DiscountItem({ id, removeDiscount, label, canRemove, }) {
@@ -11967,7 +11974,7 @@ function CheckoutSummaryLoading() {
11967
11974
  React__default.createElement("div", { className: "flex justify-between items-center" },
11968
11975
  React__default.createElement("div", { className: "flex items-center gap-2 cursor-pointer" },
11969
11976
  React__default.createElement("h2", null, t("CheckoutEmbed.Summary.title")),
11970
- React__default.createElement(ChevronDown, { className: "size-5 transition-transform" })),
11977
+ React__default.createElement(ChevronDown, { className: "md:hidden size-5 transition-transform" })),
11971
11978
  React__default.createElement(Skeleton, { className: "w-20 h-[20px] md:hidden" }),
11972
11979
  React__default.createElement(Button, { className: "max-sm:hidden", variant: "link", size: "link", asChild: true },
11973
11980
  React__default.createElement("a", null, t("CheckoutEmbed.Summary.edit")))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/react",
3
- "version": "0.3.47",
3
+ "version": "0.3.49",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {