@loczer/storefront-sdk 0.198.0 → 0.200.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/StorefrontContext.d.ts +483 -0
  2. package/dist/StorefrontContext.d.ts.map +1 -0
  3. package/dist/StorefrontContext.js +39 -0
  4. package/dist/StorefrontProvider.d.ts +6 -486
  5. package/dist/StorefrontProvider.d.ts.map +1 -1
  6. package/dist/StorefrontProvider.js +34 -67
  7. package/dist/components/AboutSection/index.js +5 -5
  8. package/dist/components/BikeProductCard/index.d.ts.map +1 -1
  9. package/dist/components/BikeProductCard/index.js +27 -27
  10. package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -1
  11. package/dist/components/BookingBikeQuickAddCard/index.js +54 -61
  12. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  13. package/dist/components/BookingBikeVariantDialog/index.js +129 -116
  14. package/dist/components/ContactSection/index.js +107 -107
  15. package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
  16. package/dist/components/ContractSaleDocument/Invoice.js +117 -111
  17. package/dist/components/Header/index.js +4 -4
  18. package/dist/components/Layout/index.d.ts.map +1 -1
  19. package/dist/components/Layout/index.js +47 -40
  20. package/dist/components/ProductPriceBadge/index.d.ts +2 -1
  21. package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
  22. package/dist/components/ProductPriceBadge/index.js +72 -70
  23. package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
  24. package/dist/components/StorefrontCancellationPolicyNotice/index.js +3 -6
  25. package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -1
  26. package/dist/components/StorefrontInsuranceNotice/index.js +3 -6
  27. package/dist/components/TestimonialsSection/index.js +1 -1
  28. package/dist/i18n/en.d.ts +1 -0
  29. package/dist/i18n/en.d.ts.map +1 -1
  30. package/dist/i18n/en.js +1 -0
  31. package/dist/i18n/fr.d.ts +1 -0
  32. package/dist/i18n/fr.d.ts.map +1 -1
  33. package/dist/i18n/fr.js +1 -0
  34. package/dist/index.d.ts +15 -2
  35. package/dist/index.js +59 -58
  36. package/dist/lib/cartSummary.js +7 -7
  37. package/dist/lib/productVariants.d.ts +1 -0
  38. package/dist/lib/productVariants.d.ts.map +1 -1
  39. package/dist/lib/productVariants.js +27 -15
  40. package/dist/lib/products.d.ts +6 -0
  41. package/dist/lib/products.d.ts.map +1 -1
  42. package/dist/lib/products.js +36 -32
  43. package/dist/lib/toast.d.ts +9 -0
  44. package/dist/lib/toast.d.ts.map +1 -0
  45. package/dist/lib/toast.js +13 -0
  46. package/dist/pages/BookingPage.d.ts.map +1 -1
  47. package/dist/pages/BookingPage.js +143 -138
  48. package/dist/pages/CheckoutPage.js +217 -217
  49. package/dist/pages/CheckoutPaymentPage.js +124 -124
  50. package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
  51. package/dist/pages/ContractSaleDocumentPage.js +83 -83
  52. package/dist/pages/HomePage.js +6 -3
  53. package/dist/pages/ProductPage.d.ts.map +1 -1
  54. package/dist/pages/ProductPage.js +177 -165
  55. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BikeProductCard/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AASrD,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,cAA8B,EAC9B,QAAQ,EACR,cAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,OAAmB,EACnB,MAAM,GACP,EAAE,oBAAoB,2CAgFtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BikeProductCard/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AASrD,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,cAA8B,EAC9B,QAAQ,EACR,cAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,OAAmB,EACnB,MAAM,GACP,EAAE,oBAAoB,2CAoFtB"}
@@ -1,5 +1,5 @@
1
- import { getAvailabilityVariant as e } from "../../lib/utils.js";
2
- import { getLocalizedValue as t } from "../../localization.js";
1
+ import { getLocalizedValue as e } from "../../localization.js";
2
+ import { getAvailabilityVariant as t } from "../../lib/utils.js";
3
3
  import { Badge as n } from "../../ui/badge.js";
4
4
  import { Button as r } from "../../ui/button.js";
5
5
  import { ProductPriceBadge as i } from "../ProductPriceBadge/index.js";
@@ -8,23 +8,23 @@ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  import { Link as l } from "@rpcbase/router";
9
9
  import { useTranslation as u } from "react-i18next";
10
10
  import { cn as d } from "@rpcbase/ui";
11
- import { ArrowRight as f, Bike as p } from "lucide-react";
11
+ import { ArrowRight as f, Bike as p, Plus as m } from "lucide-react";
12
12
  //#region src/components/BikeProductCard/index.tsx
13
- function m({ bike: m, className: h, detailsPath: g, productDetailsLinkState: _, actionLabelKey: v = "product_cta", onAction: y, actionDisabled: b = !1, availabilityLabel: x, fallbackLanguage: S, variant: C = "default", testId: w }) {
14
- let { t: T, i18n: E } = u(), D = t(m.name, E.language, S), O = t(m.description, E.language, S), k = typeof m.images?.[0] == "string" ? m.images[0].trim() : "", A = a(m.primaryImageStyle), j = e(m.availabilityStatus), M = C === "booking", N = m.availabilityStatus === "OUT_OF_STOCK";
13
+ function h({ bike: h, className: g, detailsPath: _, productDetailsLinkState: v, actionLabelKey: y = "product_cta", onAction: b, actionDisabled: x = !1, availabilityLabel: S, fallbackLanguage: C, variant: w = "default", testId: T }) {
14
+ let { t: E, i18n: D } = u(), O = e(h.name, D.language, C), k = e(h.description, D.language, C), A = typeof h.images?.[0] == "string" ? h.images[0].trim() : "", j = a(h.primaryImageStyle), M = t(h.availabilityStatus), N = w === "booking", P = h.availabilityStatus === "OUT_OF_STOCK";
15
15
  return /* @__PURE__ */ c("div", {
16
- className: d("flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm", h),
17
- "data-testid": w,
16
+ className: d("flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm", g),
17
+ "data-testid": T,
18
18
  children: [/* @__PURE__ */ c("div", {
19
19
  className: "flex flex-1 items-stretch gap-4",
20
20
  children: [/* @__PURE__ */ s("div", {
21
21
  className: "w-24 shrink-0 sm:w-28",
22
22
  children: /* @__PURE__ */ c("div", {
23
- className: d("relative h-full min-h-20 overflow-hidden rounded-xl", A.className),
24
- style: A.style,
25
- children: [k ? /* @__PURE__ */ s("img", {
26
- src: k,
27
- alt: D,
23
+ className: d("relative h-full min-h-20 overflow-hidden rounded-xl", j.className),
24
+ style: j.style,
25
+ children: [A ? /* @__PURE__ */ s("img", {
26
+ src: A,
27
+ alt: O,
28
28
  className: "absolute inset-0 h-full w-full object-contain p-1",
29
29
  loading: "lazy"
30
30
  }) : /* @__PURE__ */ s("div", {
@@ -33,10 +33,10 @@ function m({ bike: m, className: h, detailsPath: g, productDetailsLinkState: _,
33
33
  className: "h-7 w-7",
34
34
  "aria-hidden": "true"
35
35
  })
36
- }), M && N ? /* @__PURE__ */ s(n, {
36
+ }), N && P ? /* @__PURE__ */ s(n, {
37
37
  variant: "destructive",
38
38
  className: "pointer-events-none absolute right-2 top-2 shadow-sm",
39
- children: /* @__PURE__ */ s("span", { children: T("availability_out_of_stock") })
39
+ children: /* @__PURE__ */ s("span", { children: E("availability_out_of_stock") })
40
40
  }) : null]
41
41
  })
42
42
  }), /* @__PURE__ */ c("div", {
@@ -44,41 +44,41 @@ function m({ bike: m, className: h, detailsPath: g, productDetailsLinkState: _,
44
44
  children: [
45
45
  /* @__PURE__ */ s("p", {
46
46
  className: "min-w-0 text-sm font-semibold text-slate-950",
47
- children: /* @__PURE__ */ s("span", { children: D })
47
+ children: /* @__PURE__ */ s("span", { children: O })
48
48
  }),
49
49
  /* @__PURE__ */ s(i, {
50
- prices: m.prices,
50
+ prices: h.prices,
51
51
  className: "self-start"
52
52
  }),
53
53
  /* @__PURE__ */ s("p", {
54
54
  className: "line-clamp-2 text-xs text-slate-600",
55
- children: /* @__PURE__ */ s("span", { children: O })
55
+ children: /* @__PURE__ */ s("span", { children: k })
56
56
  })
57
57
  ]
58
58
  })]
59
59
  }), /* @__PURE__ */ c("div", {
60
60
  className: "flex flex-wrap items-center gap-x-2 gap-y-1",
61
61
  children: [
62
- M ? null : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(n, {
63
- variant: j.variant,
64
- children: /* @__PURE__ */ s("span", { children: x ?? T(j.labelKey) })
62
+ N ? null : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(n, {
63
+ variant: M.variant,
64
+ children: /* @__PURE__ */ s("span", { children: S ?? E(M.labelKey) })
65
65
  }), /* @__PURE__ */ s("span", {
66
66
  className: "text-slate-400",
67
67
  children: "·"
68
68
  })] }),
69
69
  /* @__PURE__ */ s(l, {
70
- to: g,
71
- state: _,
70
+ to: _,
71
+ state: v,
72
72
  className: "text-xs font-medium text-slate-700 hover:text-slate-950",
73
- children: /* @__PURE__ */ s("span", { children: T("product_details_link") })
73
+ children: /* @__PURE__ */ s("span", { children: E("product_details_link") })
74
74
  }),
75
75
  /* @__PURE__ */ c(r, {
76
76
  type: "button",
77
77
  size: "sm",
78
78
  className: "ml-auto gap-2 text-xs",
79
- onClick: y,
80
- disabled: b,
81
- children: [/* @__PURE__ */ s("span", { children: T(v) }), /* @__PURE__ */ s(f, {
79
+ onClick: b,
80
+ disabled: x,
81
+ children: [/* @__PURE__ */ s("span", { children: E(y) }), s(N ? m : f, {
82
82
  className: "h-4 w-4",
83
83
  "aria-hidden": "true"
84
84
  })]
@@ -88,4 +88,4 @@ function m({ bike: m, className: h, detailsPath: g, productDetailsLinkState: _,
88
88
  });
89
89
  }
90
90
  //#endregion
91
- export { m as BikeProductCard };
91
+ export { h as BikeProductCard };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeQuickAddCard/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AA0ErD,KAAK,4BAA4B,GAAG;IAClC,IAAI,EAAE,WAAW,CAAA;IACjB,WAAW,EAA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ACxB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,WAAW,EACX,uBAAuB,EACvB,cAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,EACV,MAAM,GACP,EAAE,4BAA4B,2CAwN9B"}
@@ -1,33 +1,26 @@
1
- import { getStorefrontProductVariantDisplay as e } from "../../lib/productVariants.js";
2
- import { Button as t } from "../../ui/button.js";
3
- import { Input as n } from "../../ui/input.js";
4
- import { BikeProductCard as r } from "../BikeProductCard/index.js";
5
- import { useEffect as i, useRef as a, useState as o } from "react";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { useTranslation as l } from "react-i18next";
8
- import { cn as u } from "@rpcbase/ui";
9
- import { Plus as d } from "lucide-react";
10
- import { AnimatePresence as f, motion as p } from "framer-motion";
1
+ import { getStorefrontProductVariantDisplay as e, getStorefrontProductVariantHeightRange as t } from "../../lib/productVariants.js";
2
+ import { Button as n } from "../../ui/button.js";
3
+ import { Input as r } from "../../ui/input.js";
4
+ import { BikeProductCard as i } from "../BikeProductCard/index.js";
5
+ import { useEffect as a, useRef as o, useState as s } from "react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import { useTranslation as u } from "react-i18next";
8
+ import { cn as d } from "@rpcbase/ui";
9
+ import { Plus as f } from "lucide-react";
10
+ import { AnimatePresence as p, motion as m } from "framer-motion";
11
11
  //#region src/components/BookingBikeQuickAddCard/index.tsx
12
- var m = () => typeof window < "u" && window.matchMedia("(hover: hover) and (pointer: fine)").matches, h = (e) => {
12
+ var h = () => typeof window < "u" && window.matchMedia("(hover: hover) and (pointer: fine)").matches, g = (e) => {
13
13
  let t = Number.parseInt(e, 10);
14
14
  return !Number.isFinite(t) || t < 1 ? 1 : t;
15
- }, g = (e) => {
16
- let t = e.replace(/\D/g, "");
17
- return t ? String(h(t)) : "";
18
15
  }, _ = (e) => {
19
- if (!e) return;
20
- let t = Number(e.trim().replace(",", "."));
21
- if (!(!Number.isFinite(t) || t <= 0)) return Math.round(t);
22
- }, v = (e) => (e / 100).toFixed(2), y = (e, t) => e.attributes.find((e) => e.key.trim().toLowerCase() === t)?.value, b = (e) => {
23
- let t = _(y(e, "min_height_cm")), n = _(y(e, "max_height_cm")), r = t ? v(t) : null, i = n ? v(n) : null;
24
- return r && i ? `${r} - ${i} m` : r ? `min ${r} m` : i ? `max ${i} m` : null;
16
+ let t = e.replace(/\D/g, "");
17
+ return t ? String(g(t)) : "";
25
18
  };
26
- function x({ bike: _, detailsPath: v, productDetailsLinkState: y, actionDisabled: x = !1, fallbackLanguage: S, dimOnColumnCount: C, onAction: w, onQuickAdd: T, onHoverStart: E, onHoverEnd: D, testId: O }) {
27
- let { t: k } = l(), A = a(null), [j, M] = o(!1), [N, P] = o({}), F = _.productVariants ?? [], I = !x && F.length > 0, L = () => !I || !m() ? !1 : (M(!0), !0), R = () => {
19
+ function v({ bike: v, detailsPath: y, productDetailsLinkState: b, actionDisabled: x = !1, fallbackLanguage: S, dimOnColumnCount: C, onAction: w, onQuickAdd: T, onHoverStart: E, onHoverEnd: D, testId: O }) {
20
+ let { t: k } = u(), A = o(null), [j, M] = s(!1), [N, P] = s({}), F = v.productVariants ?? [], I = !x && F.length > 0, L = () => !I || !h() ? !1 : (M(!0), !0), R = () => {
28
21
  M(!1), P({});
29
22
  };
30
- i(() => {
23
+ a(() => {
31
24
  if (!j) return;
32
25
  let e = (e) => {
33
26
  if (e.pointerType !== "mouse") return;
@@ -61,34 +54,34 @@ function x({ bike: _, detailsPath: v, productDetailsLinkState: y, actionDisabled
61
54
  U(e, "");
62
55
  return;
63
56
  }
64
- U(e, g(n));
57
+ U(e, _(n));
65
58
  }, G = (e) => {
66
- U(e, String(h(H(e))));
59
+ U(e, String(g(H(e))));
67
60
  }, K = (e) => {
68
- let t = h(H(e));
61
+ let t = g(H(e));
69
62
  U(e, String(t)), T(e, t);
70
63
  };
71
- return /* @__PURE__ */ c("div", {
64
+ return /* @__PURE__ */ l("div", {
72
65
  ref: A,
73
66
  "data-testid": O,
74
67
  onPointerEnter: z,
75
68
  onPointerLeave: B,
76
69
  onFocusCapture: L,
77
70
  onBlurCapture: V,
78
- className: u("relative h-full overflow-visible transition-opacity duration-200", C === 1 && "opacity-20 md:opacity-100", C === 2 && "md:opacity-20", j && I && "z-30"),
79
- children: [/* @__PURE__ */ s(r, {
80
- bike: _,
81
- detailsPath: v,
82
- productDetailsLinkState: y,
71
+ className: d("relative h-full overflow-visible transition-opacity duration-200", C === 1 && "opacity-20 md:opacity-100", C === 2 && "md:opacity-20", j && I && "z-30"),
72
+ children: [/* @__PURE__ */ c(i, {
73
+ bike: v,
74
+ detailsPath: y,
75
+ productDetailsLinkState: b,
83
76
  actionLabelKey: "add_to_cart",
84
77
  onAction: w,
85
78
  actionDisabled: x,
86
79
  fallbackLanguage: S,
87
80
  variant: "booking",
88
- className: u("transition-[border-color,box-shadow,border-radius] duration-200 hover:border-primary/20 hover:shadow-md", j && I && "!rounded-b-none border-primary/20 !border-b-white shadow-lg")
89
- }), /* @__PURE__ */ s(f, {
81
+ className: d("transition-[border-color,box-shadow,border-radius] duration-200 hover:border-primary/20 hover:shadow-md", j && I && "!rounded-b-none border-primary/20 !border-b-white shadow-lg")
82
+ }), /* @__PURE__ */ c(p, {
90
83
  initial: !1,
91
- children: j && I ? /* @__PURE__ */ s(p.div, {
84
+ children: j && I ? /* @__PURE__ */ c(m.div, {
92
85
  initial: {
93
86
  opacity: 0,
94
87
  y: -8,
@@ -114,61 +107,61 @@ function x({ bike: _, detailsPath: v, productDetailsLinkState: y, actionDisabled
114
107
  ]
115
108
  },
116
109
  className: "absolute left-0 right-0 top-full z-30 origin-top rounded-b-lg border border-t-0 border-primary/20 bg-white px-3 py-2 shadow-xl",
117
- "data-testid": `storefront-booking-bike-quick-selector-${_.id}`.toLowerCase(),
110
+ "data-testid": `storefront-booking-bike-quick-selector-${v.id}`.toLowerCase(),
118
111
  onClick: (e) => e.stopPropagation(),
119
112
  onKeyDown: (e) => e.stopPropagation(),
120
- children: /* @__PURE__ */ s("div", { children: F.map((r) => {
121
- let { label: i } = e(r), a = b(r), o = `storefront-booking-bike-quick-quantity-${_.id}-${r.id}`.toLowerCase();
122
- return /* @__PURE__ */ c("div", {
113
+ children: /* @__PURE__ */ c("div", { children: F.map((i) => {
114
+ let { label: a } = e(i), o = t(i), s = `storefront-booking-bike-quick-quantity-${v.id}-${i.id}`.toLowerCase();
115
+ return /* @__PURE__ */ l("div", {
123
116
  className: "flex items-center justify-between gap-3 border-b border-slate-100 py-1.5 last:border-b-0",
124
117
  children: [
125
- /* @__PURE__ */ c("div", {
118
+ /* @__PURE__ */ l("div", {
126
119
  className: "flex min-w-0 flex-1 items-baseline gap-2",
127
- children: [/* @__PURE__ */ s("span", {
120
+ children: [/* @__PURE__ */ c("span", {
128
121
  className: "min-w-0 truncate text-sm font-semibold text-slate-950",
129
- title: i,
130
- children: i
131
- }), a ? /* @__PURE__ */ s("span", {
132
- className: "truncate text-xs text-slate-500",
122
+ title: a,
133
123
  children: a
124
+ }), o ? /* @__PURE__ */ c("span", {
125
+ className: "truncate text-xs text-slate-500",
126
+ children: o
134
127
  }) : null]
135
128
  }),
136
- /* @__PURE__ */ s("label", {
129
+ /* @__PURE__ */ c("label", {
137
130
  className: "sr-only",
138
- htmlFor: o,
139
- children: /* @__PURE__ */ s("span", { children: k("quantity_label") })
131
+ htmlFor: s,
132
+ children: /* @__PURE__ */ c("span", { children: k("quantity_label") })
140
133
  }),
141
- /* @__PURE__ */ c("div", {
134
+ /* @__PURE__ */ l("div", {
142
135
  className: "flex shrink-0 items-center",
143
- children: [/* @__PURE__ */ s(n, {
144
- id: o,
136
+ children: [/* @__PURE__ */ c(r, {
137
+ id: s,
145
138
  type: "text",
146
139
  inputMode: "numeric",
147
140
  pattern: "[0-9]*",
148
- value: H(r.id),
149
- onChange: (e) => W(r.id, e),
150
- onBlur: () => G(r.id),
141
+ value: H(i.id),
142
+ onChange: (e) => W(i.id, e),
143
+ onBlur: () => G(i.id),
151
144
  className: "h-8 w-9 rounded-r-none border-r-0 px-1 text-center text-sm focus-visible:z-10",
152
145
  "aria-label": k("quantity_label"),
153
- "data-testid": o
154
- }), /* @__PURE__ */ c(t, {
146
+ "data-testid": s
147
+ }), /* @__PURE__ */ l(n, {
155
148
  type: "button",
156
149
  size: "sm",
157
150
  className: "h-8 gap-1 rounded-l-none px-2 text-xs",
158
- onClick: () => K(r.id),
159
- "data-testid": `storefront-booking-bike-quick-add-${_.id}-${r.id}`.toLowerCase(),
160
- children: [/* @__PURE__ */ s("span", { children: k("add_short") }), /* @__PURE__ */ s(d, {
151
+ onClick: () => K(i.id),
152
+ "data-testid": `storefront-booking-bike-quick-add-${v.id}-${i.id}`.toLowerCase(),
153
+ children: [/* @__PURE__ */ c("span", { children: k("add_short") }), /* @__PURE__ */ c(f, {
161
154
  className: "h-3.5 w-3.5",
162
155
  "aria-hidden": "true"
163
156
  })]
164
157
  })]
165
158
  })
166
159
  ]
167
- }, r.id);
160
+ }, i.id);
168
161
  }) })
169
162
  }, "quick-selector") : null
170
163
  })]
171
164
  });
172
165
  }
173
166
  //#endregion
174
- export { x as BookingBikeQuickAddCard };
167
+ export { v as BookingBikeQuickAddCard };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeVariantDialog/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAa3D,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,kBAAkB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAA;CAChE,CAAA;AAWD,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,iCAAiC,GAAG,IAAI,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