@instockng/storefront-ui 1.0.74 → 1.0.76

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 (254) hide show
  1. package/dist/components/ProductAddOns.d.ts +3 -1
  2. package/dist/components/ProductAddOns.d.ts.map +1 -1
  3. package/dist/components/RecommendedProducts.d.ts.map +1 -1
  4. package/dist/components/VariantPickerModal.d.ts +28 -0
  5. package/dist/components/VariantPickerModal.d.ts.map +1 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.mjs +104 -102
  9. package/dist/index10.mjs +162 -121
  10. package/dist/index100.mjs +20 -69
  11. package/dist/index101.mjs +55 -34
  12. package/dist/index102.mjs +32 -42
  13. package/dist/index103.mjs +2 -2
  14. package/dist/index104.mjs +2 -28
  15. package/dist/index105.mjs +20 -17
  16. package/dist/index106.mjs +54 -213
  17. package/dist/index107.mjs +28 -179
  18. package/dist/index108.mjs +6 -21
  19. package/dist/index109.mjs +50 -21
  20. package/dist/index11.mjs +116 -88
  21. package/dist/index110.mjs +6 -33
  22. package/dist/index111.mjs +11 -155
  23. package/dist/index112.mjs +7 -20
  24. package/dist/index113.mjs +28 -31
  25. package/dist/index114.mjs +2 -84
  26. package/dist/index115.mjs +68 -36
  27. package/dist/index116.mjs +163 -141
  28. package/dist/index117.mjs +2 -55
  29. package/dist/index118.mjs +26 -21
  30. package/dist/index119.mjs +11 -20
  31. package/dist/index12.mjs +86 -90
  32. package/dist/index120.mjs +211 -19
  33. package/dist/index121.mjs +174 -19
  34. package/dist/index122.mjs +15 -14
  35. package/dist/index123.mjs +16 -15
  36. package/dist/index124.mjs +26 -14
  37. package/dist/index125.mjs +147 -56
  38. package/dist/index126.mjs +10 -8
  39. package/dist/index127.mjs +22 -30
  40. package/dist/index128.mjs +77 -17
  41. package/dist/index129.mjs +30 -26
  42. package/dist/index13.mjs +83 -185
  43. package/dist/index130.mjs +140 -22
  44. package/dist/index131.mjs +50 -14
  45. package/dist/index132.mjs +17 -15
  46. package/dist/index133.mjs +18 -38
  47. package/dist/index134.mjs +17 -17
  48. package/dist/index135.mjs +19 -262
  49. package/dist/index136.mjs +13 -62
  50. package/dist/index137.mjs +21 -7
  51. package/dist/index138.mjs +21 -2
  52. package/dist/index139.mjs +65 -2
  53. package/dist/index14.mjs +196 -94
  54. package/dist/index140.mjs +12 -27
  55. package/dist/index141.mjs +39 -2
  56. package/dist/index142.mjs +24 -2
  57. package/dist/index143.mjs +33 -20
  58. package/dist/index144.mjs +25 -54
  59. package/dist/index145.mjs +18 -28
  60. package/dist/index146.mjs +20 -6
  61. package/dist/index147.mjs +44 -49
  62. package/dist/index148.mjs +23 -6
  63. package/dist/index149.mjs +267 -11
  64. package/dist/index15.mjs +82 -713
  65. package/dist/index150.mjs +70 -7
  66. package/dist/index151.mjs +8 -28
  67. package/dist/index152.mjs +2 -2
  68. package/dist/index153.mjs +2 -70
  69. package/dist/index154.mjs +30 -164
  70. package/dist/index155.mjs +2 -2
  71. package/dist/index159.mjs +1 -1
  72. package/dist/index16.mjs +722 -53
  73. package/dist/index160.mjs +1 -1
  74. package/dist/index161.mjs +1 -1
  75. package/dist/index162.mjs +1 -1
  76. package/dist/index163.mjs +1 -1
  77. package/dist/index165.mjs +3 -3
  78. package/dist/index166.mjs +1 -1
  79. package/dist/index168.mjs +3 -3
  80. package/dist/index169.mjs +1 -1
  81. package/dist/index17.mjs +58 -60
  82. package/dist/index174.mjs +2 -2
  83. package/dist/index176.mjs +1 -1
  84. package/dist/index178.mjs +2 -2
  85. package/dist/index179.mjs +5 -5
  86. package/dist/index18.mjs +60 -22
  87. package/dist/index182.mjs +1 -1
  88. package/dist/index185.mjs +1 -1
  89. package/dist/index188.mjs +3 -3
  90. package/dist/index189.mjs +1 -1
  91. package/dist/index19.mjs +22 -107
  92. package/dist/index193.mjs +2 -2
  93. package/dist/index195.mjs +2 -2
  94. package/dist/index199.mjs +1 -1
  95. package/dist/index2.mjs +2 -2
  96. package/dist/index20.mjs +105 -38
  97. package/dist/index201.mjs +2 -2
  98. package/dist/index21.mjs +37 -37
  99. package/dist/index210.mjs +2 -2
  100. package/dist/index212.mjs +1 -1
  101. package/dist/index213.mjs +1 -1
  102. package/dist/index214.mjs +31 -2
  103. package/dist/index215.mjs +11 -2
  104. package/dist/index216.mjs +4 -2
  105. package/dist/index217.mjs +4 -2
  106. package/dist/index218.mjs +13 -108
  107. package/dist/index219.mjs +7 -2
  108. package/dist/index22.mjs +42 -71
  109. package/dist/index220.mjs +12 -2
  110. package/dist/index221.mjs +4 -36
  111. package/dist/index222.mjs +33 -2
  112. package/dist/index223.mjs +31 -2
  113. package/dist/index224.mjs +28 -2
  114. package/dist/index225.mjs +61 -2
  115. package/dist/index226.mjs +2 -2
  116. package/dist/index227.mjs +2 -2
  117. package/dist/index228.mjs +2 -2
  118. package/dist/index229.mjs +2 -244
  119. package/dist/index23.mjs +67 -28
  120. package/dist/index231.mjs +2 -33
  121. package/dist/index232.mjs +2 -65
  122. package/dist/index233.mjs +31 -19
  123. package/dist/index234.mjs +2 -2
  124. package/dist/index235.mjs +2 -2
  125. package/dist/index237.mjs +244 -2
  126. package/dist/index238.mjs +2 -2
  127. package/dist/index239.mjs +33 -2
  128. package/dist/index24.mjs +29 -6
  129. package/dist/index240.mjs +65 -2
  130. package/dist/index241.mjs +25 -2
  131. package/dist/index243.mjs +2 -2
  132. package/dist/index244.mjs +108 -4
  133. package/dist/index245.mjs +2 -31
  134. package/dist/index246.mjs +2 -11
  135. package/dist/index247.mjs +2 -4
  136. package/dist/index248.mjs +2 -4
  137. package/dist/index249.mjs +2 -13
  138. package/dist/index25.mjs +8 -21
  139. package/dist/index250.mjs +2 -7
  140. package/dist/index251.mjs +2 -12
  141. package/dist/index252.mjs +2 -5
  142. package/dist/index253.mjs +2 -33
  143. package/dist/index254.mjs +2 -31
  144. package/dist/index255.mjs +2 -28
  145. package/dist/index256.mjs +2 -61
  146. package/dist/index257.mjs +4 -2
  147. package/dist/index258.mjs +3 -2
  148. package/dist/index259.mjs +2 -18
  149. package/dist/index26.mjs +19 -34
  150. package/dist/index260.mjs +2 -47
  151. package/dist/index261.mjs +17 -2
  152. package/dist/index262.mjs +13 -2
  153. package/dist/index263.mjs +6 -2
  154. package/dist/index264.mjs +30 -2
  155. package/dist/index265.mjs +2 -91
  156. package/dist/index266.mjs +2 -2
  157. package/dist/index267.mjs +18 -3
  158. package/dist/index268.mjs +47 -2
  159. package/dist/index269.mjs +2 -2
  160. package/dist/index27.mjs +34 -37
  161. package/dist/index270.mjs +2 -17
  162. package/dist/index271.mjs +2 -13
  163. package/dist/index272.mjs +91 -6
  164. package/dist/index273.mjs +2 -30
  165. package/dist/index274.mjs +2 -2
  166. package/dist/index276.mjs +2 -2
  167. package/dist/index277.mjs +5 -0
  168. package/dist/index28.mjs +28 -103
  169. package/dist/index29.mjs +104 -20
  170. package/dist/index3.mjs +5 -5
  171. package/dist/index30.mjs +29 -9
  172. package/dist/index31.mjs +9 -9
  173. package/dist/index32.mjs +11 -116
  174. package/dist/index33.mjs +116 -25
  175. package/dist/index34.mjs +25 -81
  176. package/dist/index35.mjs +81 -112
  177. package/dist/index36.mjs +109 -8
  178. package/dist/index37.mjs +9 -33
  179. package/dist/index38.mjs +27 -20
  180. package/dist/index39.mjs +26 -9
  181. package/dist/index4.mjs +1 -1
  182. package/dist/index40.mjs +10 -122
  183. package/dist/index41.mjs +114 -380
  184. package/dist/index42.mjs +384 -20
  185. package/dist/index43.mjs +24 -31
  186. package/dist/index44.mjs +32 -7
  187. package/dist/index45.mjs +6 -1432
  188. package/dist/index46.mjs +1432 -69
  189. package/dist/index47.mjs +70 -2
  190. package/dist/index48.mjs +2 -60
  191. package/dist/index49.mjs +57 -48
  192. package/dist/index5.mjs +1 -1
  193. package/dist/index50.mjs +51 -33
  194. package/dist/index51.mjs +33 -15
  195. package/dist/index52.mjs +12 -2260
  196. package/dist/index53.mjs +2263 -36
  197. package/dist/index54.mjs +36 -44
  198. package/dist/index55.mjs +44 -99
  199. package/dist/index56.mjs +99 -81
  200. package/dist/index57.mjs +75 -13
  201. package/dist/index58.mjs +15 -125
  202. package/dist/index59.mjs +93 -89
  203. package/dist/index6.mjs +1 -1
  204. package/dist/index60.mjs +102 -56
  205. package/dist/index61.mjs +55 -89
  206. package/dist/index62.mjs +82 -76
  207. package/dist/index63.mjs +100 -13
  208. package/dist/index64.mjs +17 -92
  209. package/dist/index65.mjs +70 -56
  210. package/dist/index66.mjs +62 -44
  211. package/dist/index67.mjs +47 -46
  212. package/dist/index68.mjs +48 -121
  213. package/dist/index69.mjs +133 -22
  214. package/dist/index7.mjs +6 -6
  215. package/dist/index70.mjs +24 -2
  216. package/dist/index71.mjs +2 -153
  217. package/dist/index72.mjs +4 -22
  218. package/dist/index73.mjs +22 -4
  219. package/dist/index74.mjs +149 -71
  220. package/dist/index75.mjs +74 -14
  221. package/dist/index76.mjs +14 -62
  222. package/dist/index77.mjs +63 -2
  223. package/dist/index78.mjs +234 -5
  224. package/dist/index79.mjs +5 -1133
  225. package/dist/index8.mjs +4 -4
  226. package/dist/index80.mjs +131 -17
  227. package/dist/index81.mjs +67 -54
  228. package/dist/index82.mjs +84 -30
  229. package/dist/index83.mjs +29 -2
  230. package/dist/index84.mjs +9 -235
  231. package/dist/index85.mjs +74 -5
  232. package/dist/index86.mjs +3 -133
  233. package/dist/index87.mjs +2 -68
  234. package/dist/index88.mjs +79 -83
  235. package/dist/index89.mjs +52 -27
  236. package/dist/index9.mjs +3 -3
  237. package/dist/index90.mjs +5 -8
  238. package/dist/index91.mjs +4 -74
  239. package/dist/index92.mjs +178 -3
  240. package/dist/index93.mjs +53 -2
  241. package/dist/index94.mjs +68 -82
  242. package/dist/index95.mjs +33 -53
  243. package/dist/index96.mjs +42 -5
  244. package/dist/index97.mjs +2 -5
  245. package/dist/index98.mjs +5 -178
  246. package/dist/index99.mjs +1134 -53
  247. package/dist/styles.css +1 -1
  248. package/package.json +1 -1
  249. package/src/components/ProductAddOns.stories.tsx +10 -3
  250. package/src/components/ProductAddOns.tsx +167 -112
  251. package/src/components/RecommendedProducts.tsx +130 -88
  252. package/src/components/ShoppingCart.tsx +1 -1
  253. package/src/components/VariantPickerModal.tsx +154 -0
  254. package/src/index.ts +3 -0
package/dist/index20.mjs CHANGED
@@ -1,45 +1,112 @@
1
1
  'use client';
2
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
- import u from "react";
4
- import { cn as a } from "./index22.mjs";
5
- const f = u.forwardRef(
6
- ({
7
- label: o,
8
- error: r,
9
- icon: t,
10
- className: c,
11
- containerClassName: d,
12
- required: m,
13
- disabled: s,
14
- ...n
15
- }, i) => /* @__PURE__ */ l("div", { className: a("w-full", d), children: [
16
- o && /* @__PURE__ */ l("label", { className: "mb-1.5 block text-sm font-medium text-gray-700", children: [
17
- o,
18
- m && /* @__PURE__ */ e("span", { className: "ml-1 text-red-600", children: "*" })
19
- ] }),
20
- /* @__PURE__ */ l("div", { className: "relative", children: [
21
- t && /* @__PURE__ */ e("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-gray-400", children: t }),
22
- /* @__PURE__ */ e(
23
- "input",
2
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
3
+ import { useRef as j, useState as u, useEffect as f } from "react";
4
+ import { createPortal as A } from "react-dom";
5
+ import { X as R } from "lucide-react";
6
+ import { cn as o } from "./index23.mjs";
7
+ import { useHideBodyOverflow as z } from "./index45.mjs";
8
+ function H({
9
+ isOpen: e,
10
+ onClose: a,
11
+ title: l,
12
+ children: x,
13
+ footer: i,
14
+ className: y,
15
+ contentClassName: h,
16
+ size: b = "md",
17
+ closeOnOverlayClick: g = !0,
18
+ showCloseButton: n = !0
19
+ }) {
20
+ const v = j(null), [s, m] = u(!1), [p, d] = u(e);
21
+ if (f(() => {
22
+ if (e)
23
+ d(!0), requestAnimationFrame(() => {
24
+ requestAnimationFrame(() => {
25
+ m(!0);
26
+ });
27
+ });
28
+ else {
29
+ m(!1);
30
+ const t = setTimeout(() => {
31
+ d(!1);
32
+ }, 200);
33
+ return () => clearTimeout(t);
34
+ }
35
+ }, [e]), f(() => {
36
+ const t = (E) => {
37
+ E.key === "Escape" && e && a();
38
+ };
39
+ if (e)
40
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
41
+ }, [e, a]), z(e), !p) return null;
42
+ const w = {
43
+ sm: "max-w-md",
44
+ md: "max-w-lg",
45
+ lg: "max-w-2xl",
46
+ xl: "max-w-4xl",
47
+ full: "max-w-full mx-4"
48
+ }, k = (t) => {
49
+ g && t.target === t.currentTarget && a();
50
+ }, N = /* @__PURE__ */ r(
51
+ "div",
52
+ {
53
+ className: o(
54
+ "fixed inset-0 z-50 flex items-center justify-center sm:p-4 bg-black/50 backdrop-blur-sm transition-opacity duration-200",
55
+ s ? "opacity-100" : "opacity-0"
56
+ ),
57
+ onClick: k,
58
+ children: /* @__PURE__ */ c(
59
+ "div",
24
60
  {
25
- ref: i,
26
- disabled: s,
27
- className: a(
28
- "w-full rounded-lg border px-3 py-2.5 text-sm transition-colors",
29
- "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",
30
- t && "pl-10",
31
- r ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-gray-300 focus:border-blue-500",
32
- s && "bg-gray-50 text-gray-500 cursor-not-allowed",
33
- c
61
+ ref: v,
62
+ className: o(
63
+ "relative w-full bg-white rounded-xl shadow-xl flex flex-col h-[100vh] sm:h-auto sm:max-h-[90vh] transition-all duration-200",
64
+ s ? "opacity-100 scale-100" : "opacity-0 scale-95",
65
+ w[b],
66
+ y
34
67
  ),
35
- ...n
68
+ role: "dialog",
69
+ "aria-modal": "true",
70
+ "aria-labelledby": l ? "modal-title" : void 0,
71
+ children: [
72
+ (l || n) && /* @__PURE__ */ c("div", { className: "flex items-center justify-between p-4 border-b border-gray-200 flex-shrink-0", children: [
73
+ l && /* @__PURE__ */ r(
74
+ "h2",
75
+ {
76
+ id: "modal-title",
77
+ className: "text-md font-semibold text-gray-900",
78
+ children: l
79
+ }
80
+ ),
81
+ n && /* @__PURE__ */ r(
82
+ "button",
83
+ {
84
+ type: "button",
85
+ onClick: a,
86
+ className: "ml-auto p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",
87
+ "aria-label": "Close modal",
88
+ children: /* @__PURE__ */ r(R, { size: 20 })
89
+ }
90
+ )
91
+ ] }),
92
+ /* @__PURE__ */ r(
93
+ "div",
94
+ {
95
+ className: o(
96
+ "flex-1 overflow-y-auto p-4 min-h-0",
97
+ h
98
+ ),
99
+ children: x
100
+ }
101
+ ),
102
+ i && /* @__PURE__ */ r("div", { className: "p-4 border-t border-gray-200 bg-gray-50 flex-shrink-0 rounded-b-xl", children: i })
103
+ ]
36
104
  }
37
105
  )
38
- ] }),
39
- r && /* @__PURE__ */ e("p", { className: "mt-1.5 text-sm text-red-600", role: "alert", children: r })
40
- ] })
41
- );
42
- f.displayName = "FormInput";
106
+ }
107
+ );
108
+ return A(N, document.body);
109
+ }
43
110
  export {
44
- f as FormInput
111
+ H as Modal
45
112
  };
package/dist/index201.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { __exports as r } from "./index239.mjs";
3
- import { __require as s } from "./index119.mjs";
2
+ import { __exports as r } from "./index252.mjs";
3
+ import { __require as s } from "./index133.mjs";
4
4
  var a;
5
5
  function _() {
6
6
  return a ? r : (a = 1, function(t) {
package/dist/index21.mjs CHANGED
@@ -1,45 +1,45 @@
1
1
  'use client';
2
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
3
- import g from "react";
4
- import { cn as l } from "./index22.mjs";
5
- const u = g.forwardRef(
2
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
+ import u from "react";
4
+ import { cn as a } from "./index23.mjs";
5
+ const f = u.forwardRef(
6
6
  ({
7
- label: t,
8
- error: e,
9
- className: a,
10
- containerClassName: c,
7
+ label: o,
8
+ error: r,
9
+ icon: t,
10
+ className: c,
11
+ containerClassName: d,
11
12
  required: m,
12
- disabled: o,
13
- children: n,
14
- ...i
15
- }, d) => /* @__PURE__ */ s("div", { className: l("w-full", c), children: [
16
- t && /* @__PURE__ */ s("label", { className: "mb-1.5 block text-sm font-medium text-gray-700", children: [
17
- t,
18
- m && /* @__PURE__ */ r("span", { className: "ml-1 text-red-600", children: "*" })
13
+ disabled: s,
14
+ ...n
15
+ }, i) => /* @__PURE__ */ l("div", { className: a("w-full", d), children: [
16
+ o && /* @__PURE__ */ l("label", { className: "mb-1.5 block text-sm font-medium text-gray-700", children: [
17
+ o,
18
+ m && /* @__PURE__ */ e("span", { className: "ml-1 text-red-600", children: "*" })
19
19
  ] }),
20
- /* @__PURE__ */ r(
21
- "select",
22
- {
23
- ref: d,
24
- disabled: o,
25
- className: l(
26
- "w-full rounded-lg border px-3 py-2.5 text-sm transition-colors",
27
- "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",
28
- "appearance-none bg-white",
29
- `bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E")] bg-no-repeat bg-[right_0.75rem_center]`,
30
- "pr-10",
31
- e ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-gray-300 focus:border-blue-500",
32
- o && "bg-gray-50 text-gray-500 cursor-not-allowed",
33
- a
34
- ),
35
- ...i,
36
- children: n
37
- }
38
- ),
39
- e && /* @__PURE__ */ r("p", { className: "mt-1.5 text-sm text-red-600", role: "alert", children: e })
20
+ /* @__PURE__ */ l("div", { className: "relative", children: [
21
+ t && /* @__PURE__ */ e("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-gray-400", children: t }),
22
+ /* @__PURE__ */ e(
23
+ "input",
24
+ {
25
+ ref: i,
26
+ disabled: s,
27
+ className: a(
28
+ "w-full rounded-lg border px-3 py-2.5 text-sm transition-colors",
29
+ "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",
30
+ t && "pl-10",
31
+ r ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-gray-300 focus:border-blue-500",
32
+ s && "bg-gray-50 text-gray-500 cursor-not-allowed",
33
+ c
34
+ ),
35
+ ...n
36
+ }
37
+ )
38
+ ] }),
39
+ r && /* @__PURE__ */ e("p", { className: "mt-1.5 text-sm text-red-600", role: "alert", children: r })
40
40
  ] })
41
41
  );
42
- u.displayName = "FormSelect";
42
+ f.displayName = "FormInput";
43
43
  export {
44
- u as FormSelect
44
+ f as FormInput
45
45
  };
package/dist/index210.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import { __module as b } from "./index243.mjs";
3
- import S from "./index244.mjs";
2
+ import { __module as b } from "./index256.mjs";
3
+ import S from "./index257.mjs";
4
4
  var _;
5
5
  function $() {
6
6
  return _ ? b.exports : (_ = 1, (() => {
package/dist/index212.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index241.mjs";
2
+ import { __exports as e } from "./index254.mjs";
3
3
  /**
4
4
  * @license React
5
5
  * react-is.production.js
package/dist/index213.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index242.mjs";
2
+ import { __exports as e } from "./index255.mjs";
3
3
  /**
4
4
  * @license React
5
5
  * react-is.development.js
package/dist/index214.mjs CHANGED
@@ -1,5 +1,34 @@
1
1
  'use client';
2
- var e = {};
2
+ import p from "./index88.mjs";
3
+ function i(n) {
4
+ const t = {
5
+ "!": "%21",
6
+ "'": "%27",
7
+ "(": "%28",
8
+ ")": "%29",
9
+ "~": "%7E",
10
+ "%20": "+",
11
+ "%00": "\0"
12
+ };
13
+ return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
14
+ return t[r];
15
+ });
16
+ }
17
+ function a(n, t) {
18
+ this._pairs = [], n && p(n, this, t);
19
+ }
20
+ const c = a.prototype;
21
+ c.append = function(t, o) {
22
+ this._pairs.push([t, o]);
23
+ };
24
+ c.toString = function(t) {
25
+ const o = t ? function(r) {
26
+ return t.call(this, r, i);
27
+ } : i;
28
+ return this._pairs.map(function(e) {
29
+ return o(e[0]) + "=" + o(e[1]);
30
+ }, "").join("&");
31
+ };
3
32
  export {
4
- e as __exports
33
+ a as default
5
34
  };
package/dist/index215.mjs CHANGED
@@ -1,5 +1,14 @@
1
1
  'use client';
2
- var r = { exports: {} };
2
+ import i from "./index78.mjs";
3
+ import m from "./index82.mjs";
4
+ import s from "./index92.mjs";
5
+ function h(f, t) {
6
+ const o = this || m, r = t || o, n = s.from(r.headers);
7
+ let a = r.data;
8
+ return i.forEach(f, function(e) {
9
+ a = e.call(o, a, n.normalize(), t ? t.status : void 0);
10
+ }), n.normalize(), a;
11
+ }
3
12
  export {
4
- r as __module
13
+ h as default
5
14
  };
package/dist/index216.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  'use client';
2
- var e = { exports: {} };
2
+ function e(t) {
3
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
4
+ }
3
5
  export {
4
- e as __module
6
+ e as default
5
7
  };
package/dist/index217.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  'use client';
2
- var r = {};
2
+ function n(e, c) {
3
+ return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
4
+ }
3
5
  export {
4
- r as __exports
6
+ n as default
5
7
  };
package/dist/index218.mjs CHANGED
@@ -1,111 +1,16 @@
1
1
  'use client';
2
- import { __exports as m } from "./index257.mjs";
3
- var p;
4
- function S() {
5
- return p ? m : (p = 1, function(d) {
6
- Object.defineProperty(d, "__esModule", {
7
- value: !0
8
- });
9
- function g(o, e) {
10
- for (var r in e) Object.defineProperty(o, r, {
11
- enumerable: !0,
12
- get: e[r]
13
- });
14
- }
15
- g(d, {
16
- getSortedRouteObjects: function() {
17
- return w;
18
- },
19
- getSortedRoutes: function() {
20
- return f;
21
- }
22
- });
23
- class h {
24
- insert(e) {
25
- this._insert(e.split("/").filter(Boolean), [], !1);
26
- }
27
- smoosh() {
28
- return this._smoosh();
29
- }
30
- _smoosh(e) {
31
- e === void 0 && (e = "/");
32
- const r = [
33
- ...this.children.keys()
34
- ].sort();
35
- this.slugName !== null && r.splice(r.indexOf("[]"), 1), this.restSlugName !== null && r.splice(r.indexOf("[...]"), 1), this.optionalRestSlugName !== null && r.splice(r.indexOf("[[...]]"), 1);
36
- const n = r.map((s) => this.children.get(s)._smoosh("" + e + s + "/")).reduce((s, t) => [
37
- ...s,
38
- ...t
39
- ], []);
40
- if (this.slugName !== null && n.push(...this.children.get("[]")._smoosh(e + "[" + this.slugName + "]/")), !this.placeholder) {
41
- const s = e === "/" ? "/" : e.slice(0, -1);
42
- if (this.optionalRestSlugName != null)
43
- throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + s + '" and "' + s + "[[..." + this.optionalRestSlugName + ']]").');
44
- n.unshift(s);
45
- }
46
- return this.restSlugName !== null && n.push(...this.children.get("[...]")._smoosh(e + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && n.push(...this.children.get("[[...]]")._smoosh(e + "[[..." + this.optionalRestSlugName + "]]/")), n;
47
- }
48
- _insert(e, r, n) {
49
- if (e.length === 0) {
50
- this.placeholder = !1;
51
- return;
52
- }
53
- if (n)
54
- throw new Error("Catch-all must be the last part of the URL.");
55
- let s = e[0];
56
- if (s.startsWith("[") && s.endsWith("]")) {
57
- let l = function(u, a) {
58
- if (u !== null && u !== a)
59
- throw new Error("You cannot use different slug names for the same dynamic path ('" + u + "' !== '" + a + "').");
60
- r.forEach((c) => {
61
- if (c === a)
62
- throw new Error('You cannot have the same slug name "' + a + '" repeat within a single dynamic path');
63
- if (c.replace(/\W/g, "") === s.replace(/\W/g, ""))
64
- throw new Error('You cannot have the slug names "' + c + '" and "' + a + '" differ only by non-word symbols within a single dynamic path');
65
- }), r.push(a);
66
- }, t = s.slice(1, -1), i = !1;
67
- if (t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1), i = !0), t.startsWith("…"))
68
- throw new Error("Detected a three-dot character ('…') at ('" + t + "'). Did you mean ('...')?");
69
- if (t.startsWith("...") && (t = t.substring(3), n = !0), t.startsWith("[") || t.endsWith("]"))
70
- throw new Error("Segment names may not start or end with extra brackets ('" + t + "').");
71
- if (t.startsWith("."))
72
- throw new Error("Segment names may not start with erroneous periods ('" + t + "').");
73
- if (n)
74
- if (i) {
75
- if (this.restSlugName != null)
76
- throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + e[0] + '" ).');
77
- l(this.optionalRestSlugName, t), this.optionalRestSlugName = t, s = "[[...]]";
78
- } else {
79
- if (this.optionalRestSlugName != null)
80
- throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + e[0] + '").');
81
- l(this.restSlugName, t), this.restSlugName = t, s = "[...]";
82
- }
83
- else {
84
- if (i)
85
- throw new Error('Optional route parameters are not yet supported ("' + e[0] + '").');
86
- l(this.slugName, t), this.slugName = t, s = "[]";
87
- }
88
- }
89
- this.children.has(s) || this.children.set(s, new h()), this.children.get(s)._insert(e.slice(1), r, n);
90
- }
91
- constructor() {
92
- this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
93
- }
94
- }
95
- function f(o) {
96
- const e = new h();
97
- return o.forEach((r) => e.insert(r)), e.smoosh();
98
- }
99
- function w(o, e) {
100
- const r = {}, n = [];
101
- for (let t = 0; t < o.length; t++) {
102
- const i = e(o[t]);
103
- r[i] = t, n[t] = i;
104
- }
105
- return f(n).map((t) => o[r[t]]);
106
- }
107
- }(m), m);
108
- }
2
+ import o from "./index258.mjs";
3
+ import r from "./index259.mjs";
4
+ import t from "./index260.mjs";
5
+ const l = {
6
+ isBrowser: !0,
7
+ classes: {
8
+ URLSearchParams: o,
9
+ FormData: r,
10
+ Blob: t
11
+ },
12
+ protocols: ["http", "https", "file", "blob", "url", "data"]
13
+ };
109
14
  export {
110
- S as __require
15
+ l as default
111
16
  };
package/dist/index219.mjs CHANGED
@@ -1,5 +1,10 @@
1
1
  'use client';
2
- var a = {};
2
+ const e = typeof window < "u" && typeof document < "u", o = typeof navigator == "object" && navigator || void 0, n = e && (!o || ["ReactNative", "NativeScript", "NS"].indexOf(o.product) < 0), t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
3
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", r = e && window.location.href || "http://localhost";
3
4
  export {
4
- a as __exports
5
+ e as hasBrowserEnv,
6
+ n as hasStandardBrowserEnv,
7
+ t as hasStandardBrowserWebWorkerEnv,
8
+ o as navigator,
9
+ r as origin
5
10
  };
package/dist/index22.mjs CHANGED
@@ -1,74 +1,45 @@
1
1
  'use client';
2
- import { clsx as i } from "./index51.mjs";
3
- import { twMerge as u } from "./index52.mjs";
4
- function l(...t) {
5
- return u(i(t));
6
- }
7
- function f(t) {
8
- return new Intl.NumberFormat("en-NG", {
9
- style: "currency",
10
- currency: "NGN",
11
- minimumFractionDigits: 0,
12
- maximumFractionDigits: 0
13
- }).format(t);
14
- }
15
- function m(t) {
16
- return (typeof t == "string" ? new Date(t) : t).toLocaleDateString("en-US", {
17
- year: "numeric",
18
- month: "long",
19
- day: "numeric"
20
- });
21
- }
22
- function d(t) {
23
- return (typeof t == "string" ? new Date(t) : t).toLocaleString("en-US", {
24
- year: "numeric",
25
- month: "long",
26
- day: "numeric",
27
- hour: "2-digit",
28
- minute: "2-digit"
29
- });
30
- }
31
- function s(t) {
32
- return {
33
- pending: "bg-yellow-100 text-yellow-800",
34
- shipped: "bg-blue-100 text-blue-800",
35
- delivered: "bg-green-100 text-green-800",
36
- cancelled: "bg-red-100 text-red-800",
37
- refunded: "bg-purple-100 text-purple-800",
38
- prospect: "bg-orange-100 text-orange-800"
39
- }[t] || "bg-gray-100 text-gray-800";
40
- }
41
- function r(t) {
42
- var o;
43
- if (typeof document > "u") return;
44
- const n = `; ${document.cookie}`.split(`; ${t}=`);
45
- if (n.length === 2) return (o = n.pop()) == null ? void 0 : o.split(";").shift();
46
- }
47
- function c(t) {
48
- return typeof window > "u" ? void 0 : new URLSearchParams(window.location.search).get(t) || void 0;
49
- }
50
- function p() {
51
- return {
52
- fbc: r("_fbc"),
53
- fbp: r("_fbp")
54
- };
55
- }
56
- function y() {
57
- return {
58
- ttp: r("_ttp"),
59
- ttclid: c("ttclid")
60
- };
61
- }
62
- function b(t, e, n) {
63
- return `${t}_${e}_${n}`;
64
- }
2
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
3
+ import g from "react";
4
+ import { cn as l } from "./index23.mjs";
5
+ const u = g.forwardRef(
6
+ ({
7
+ label: t,
8
+ error: e,
9
+ className: a,
10
+ containerClassName: c,
11
+ required: m,
12
+ disabled: o,
13
+ children: n,
14
+ ...i
15
+ }, d) => /* @__PURE__ */ s("div", { className: l("w-full", c), children: [
16
+ t && /* @__PURE__ */ s("label", { className: "mb-1.5 block text-sm font-medium text-gray-700", children: [
17
+ t,
18
+ m && /* @__PURE__ */ r("span", { className: "ml-1 text-red-600", children: "*" })
19
+ ] }),
20
+ /* @__PURE__ */ r(
21
+ "select",
22
+ {
23
+ ref: d,
24
+ disabled: o,
25
+ className: l(
26
+ "w-full rounded-lg border px-3 py-2.5 text-sm transition-colors",
27
+ "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",
28
+ "appearance-none bg-white",
29
+ `bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E")] bg-no-repeat bg-[right_0.75rem_center]`,
30
+ "pr-10",
31
+ e ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-gray-300 focus:border-blue-500",
32
+ o && "bg-gray-50 text-gray-500 cursor-not-allowed",
33
+ a
34
+ ),
35
+ ...i,
36
+ children: n
37
+ }
38
+ ),
39
+ e && /* @__PURE__ */ r("p", { className: "mt-1.5 text-sm text-red-600", role: "alert", children: e })
40
+ ] })
41
+ );
42
+ u.displayName = "FormSelect";
65
43
  export {
66
- l as cn,
67
- f as formatCurrency,
68
- m as formatDate,
69
- d as formatDateTime,
70
- b as generateClientEventId,
71
- p as getFbCookies,
72
- s as getStatusColor,
73
- y as getTikTokCookies
44
+ u as FormSelect
74
45
  };
package/dist/index220.mjs CHANGED
@@ -1,5 +1,15 @@
1
1
  'use client';
2
- var e = {};
2
+ import a from "./index89.mjs";
3
+ function E(i, f, t) {
4
+ const u = t.config.validateStatus;
5
+ !t.status || !u || u(t.status) ? i(t) : f(new a(
6
+ "Request failed with status code " + t.status,
7
+ [a.ERR_BAD_REQUEST, a.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
8
+ t.config,
9
+ t.request,
10
+ t
11
+ ));
12
+ }
3
13
  export {
4
- e as __exports
14
+ E as default
5
15
  };