@loczer/storefront-sdk 0.153.0 → 0.155.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 (50) hide show
  1. package/dist/components/BookingPeriodSelector/index.d.ts +1 -1
  2. package/dist/components/BookingPeriodSelector/index.d.ts.map +1 -1
  3. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +25 -4
  4. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  5. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +344 -192
  6. package/dist/components/Footer/businessHoursUtils.d.ts.map +1 -1
  7. package/dist/components/Footer/businessHoursUtils.js +16 -16
  8. package/dist/components/StorefrontCartPanel/index.d.ts +2 -1
  9. package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
  10. package/dist/components/StorefrontCartPanel/index.js +68 -63
  11. package/dist/i18n/en.d.ts +1 -0
  12. package/dist/i18n/en.d.ts.map +1 -1
  13. package/dist/i18n/en.js +1 -0
  14. package/dist/i18n/fr.d.ts +1 -0
  15. package/dist/i18n/fr.d.ts.map +1 -1
  16. package/dist/i18n/fr.js +1 -0
  17. package/dist/index.d.ts +78 -35
  18. package/dist/index.js +103 -100
  19. package/dist/lib/checkoutVerifyCoupon.d.ts +1 -0
  20. package/dist/lib/checkoutVerifyCoupon.d.ts.map +1 -1
  21. package/dist/lib/checkoutVerifyCoupon.js +1 -0
  22. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  23. package/dist/pages/CheckoutPage.js +56 -51
  24. package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +2 -2
  25. package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
  26. package/dist/pages/checkout/components/CheckoutSummaryColumn.js +16 -14
  27. package/dist/storefront.css +1 -1
  28. package/dist/ui/button.d.ts +1 -1
  29. package/dist/ui/button.js +17 -17
  30. package/dist/ui/card.d.ts.map +1 -1
  31. package/dist/ui/card.js +8 -11
  32. package/dist/ui/form.d.ts +1 -1
  33. package/dist/ui/form.d.ts.map +1 -1
  34. package/dist/ui/form.js +52 -86
  35. package/dist/ui/radio-group.d.ts +10 -7
  36. package/dist/ui/radio-group.d.ts.map +1 -1
  37. package/dist/ui/radio-group.js +63 -45
  38. package/dist/ui/select.d.ts +29 -15
  39. package/dist/ui/select.d.ts.map +1 -1
  40. package/dist/ui/select.js +158 -232
  41. package/dist/ui/slot.d.ts +3 -7
  42. package/dist/ui/slot.d.ts.map +1 -1
  43. package/dist/ui/slot.js +47 -27
  44. package/dist/ui/theme.d.ts +9 -0
  45. package/dist/ui/theme.d.ts.map +1 -0
  46. package/dist/ui/theme.js +24 -0
  47. package/dist/ui/tooltip.d.ts +30 -13
  48. package/dist/ui/tooltip.d.ts.map +1 -1
  49. package/dist/ui/tooltip.js +89 -60
  50. package/package.json +1 -1
@@ -1,73 +1,102 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { Tooltip as r } from "@base-ui/react/tooltip";
4
- import { cn as n } from "@rpcbase/ui";
5
- function w({
6
- delayDuration: o,
7
- skipDelayDuration: t,
8
- ...e
9
- }) {
10
- return /* @__PURE__ */ i(r.Provider, { delay: o, ...e });
11
- }
12
- function h({
13
- delayDuration: o,
3
+ import { Tooltip as n } from "@base-ui/react/tooltip";
4
+ import { cn as s } from "@rpcbase/ui";
5
+ import { Slot as y } from "./slot.js";
6
+ import { useThemeAppearance as h } from "./theme.js";
7
+ const l = d.createContext({
8
+ delayDuration: 0
9
+ });
10
+ function N({
14
11
  children: t,
15
- ...e
12
+ delayDuration: e = 0,
13
+ delay: r,
14
+ closeDelay: i
16
15
  }) {
17
- const a = /* @__PURE__ */ i(r.Root, { ...e, children: t });
18
- return o === void 0 ? a : /* @__PURE__ */ i(r.Provider, { delay: o, children: a });
16
+ return /* @__PURE__ */ o(n.Provider, { delay: r ?? e, closeDelay: i, children: t });
19
17
  }
20
- const c = r.Portal;
21
- function x({
22
- asChild: o,
23
- children: t,
24
- ...e
18
+ function b({
19
+ delayDuration: t = 0,
20
+ open: e,
21
+ defaultOpen: r = !1,
22
+ onOpenChange: i,
23
+ children: a
25
24
  }) {
26
- return /* @__PURE__ */ i(
27
- r.Trigger,
25
+ return /* @__PURE__ */ o(l.Provider, { value: { delayDuration: t }, children: /* @__PURE__ */ o(
26
+ n.Root,
28
27
  {
29
- render: o && d.isValidElement(t) ? t : void 0,
30
- ...e,
31
- children: o ? void 0 : t
28
+ open: e,
29
+ defaultOpen: r,
30
+ onOpenChange: (p) => i?.(p),
31
+ children: a
32
32
  }
33
- );
33
+ ) });
34
34
  }
35
- const v = d.forwardRef(({ className: o, positionerClassName: t, align: e, alignOffset: a, side: s, sideOffset: l = 4, container: p, disableAnimation: m, ...f }, u) => /* @__PURE__ */ i(c, { container: p, children: /* @__PURE__ */ i(
36
- r.Positioner,
37
- {
38
- align: e,
39
- alignOffset: a,
40
- side: s,
41
- sideOffset: l,
42
- className: n("pointer-events-auto z-50 outline-none", t),
43
- children: /* @__PURE__ */ i(
44
- r.Popup,
35
+ const v = d.forwardRef(
36
+ ({ asChild: t, delay: e, ...r }, i) => {
37
+ const { delayDuration: a } = d.useContext(l);
38
+ return /* @__PURE__ */ o(
39
+ n.Trigger,
40
+ {
41
+ ref: i,
42
+ delay: e ?? a,
43
+ render: t ? /* @__PURE__ */ o(y, {}) : void 0,
44
+ ...r
45
+ }
46
+ );
47
+ }
48
+ );
49
+ v.displayName = "TooltipTrigger";
50
+ const x = d.forwardRef(
51
+ ({
52
+ className: t,
53
+ side: e = "top",
54
+ align: r = "center",
55
+ sideOffset: i = 4,
56
+ disableAnimation: a = !1,
57
+ theme: p,
58
+ container: c,
59
+ positionerClassName: m,
60
+ ...f
61
+ }, g) => {
62
+ const u = h(), T = p ?? u;
63
+ return /* @__PURE__ */ o(n.Portal, { container: c, children: /* @__PURE__ */ o(
64
+ n.Positioner,
45
65
  {
46
- ref: u,
47
- role: "tooltip",
48
- className: n(
49
- "pointer-events-auto z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md",
50
- !m && "animate-in fade-in-0 zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
51
- o
52
- ),
53
- ...f
66
+ side: e,
67
+ align: r,
68
+ sideOffset: i,
69
+ positionMethod: "fixed",
70
+ className: s("z-50", m),
71
+ collisionPadding: 8,
72
+ collisionAvoidance: { side: "flip", align: "shift", fallbackAxisSide: "start" },
73
+ children: /* @__PURE__ */ o(
74
+ n.Popup,
75
+ {
76
+ ref: g,
77
+ role: "tooltip",
78
+ className: s(
79
+ T === "dark" && "dark",
80
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md",
81
+ a ? "transition-none" : "transition-opacity duration-75 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0",
82
+ "data-[instant]:transition-none",
83
+ t
84
+ ),
85
+ ...f
86
+ }
87
+ )
54
88
  }
55
- )
89
+ ) });
56
90
  }
57
- ) }));
58
- v.displayName = "TooltipContent";
59
- const y = r.Arrow;
91
+ );
92
+ x.displayName = "TooltipContent";
60
93
  export {
61
- y as Arrow,
62
- v as Content,
63
- c as Portal,
64
- w as Provider,
65
- h as Root,
66
- h as Tooltip,
67
- y as TooltipArrow,
68
- v as TooltipContent,
69
- c as TooltipPortal,
70
- w as TooltipProvider,
71
- x as TooltipTrigger,
72
- x as Trigger
94
+ x as Content,
95
+ N as Provider,
96
+ b as Root,
97
+ b as Tooltip,
98
+ x as TooltipContent,
99
+ N as TooltipProvider,
100
+ v as TooltipTrigger,
101
+ v as Trigger
73
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loczer/storefront-sdk",
3
- "version": "0.153.0",
3
+ "version": "0.155.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"