@instockng/storefront-ui 1.0.75 → 1.0.77

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 (255) 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/contexts/CartContext.d.ts.map +1 -1
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.mjs +104 -102
  10. package/dist/index10.mjs +162 -121
  11. package/dist/index100.mjs +20 -69
  12. package/dist/index101.mjs +55 -34
  13. package/dist/index102.mjs +32 -42
  14. package/dist/index103.mjs +2 -2
  15. package/dist/index104.mjs +2 -28
  16. package/dist/index105.mjs +2 -18
  17. package/dist/index106.mjs +26 -213
  18. package/dist/index107.mjs +13 -175
  19. package/dist/index108.mjs +210 -17
  20. package/dist/index109.mjs +174 -17
  21. package/dist/index11.mjs +116 -88
  22. package/dist/index110.mjs +14 -25
  23. package/dist/index111.mjs +17 -150
  24. package/dist/index112.mjs +26 -13
  25. package/dist/index113.mjs +149 -24
  26. package/dist/index114.mjs +13 -77
  27. package/dist/index115.mjs +20 -27
  28. package/dist/index116.mjs +76 -137
  29. package/dist/index117.mjs +33 -50
  30. package/dist/index118.mjs +141 -19
  31. package/dist/index119.mjs +50 -22
  32. package/dist/index12.mjs +86 -90
  33. package/dist/index120.mjs +14 -14
  34. package/dist/index121.mjs +20 -18
  35. package/dist/index122.mjs +16 -14
  36. package/dist/index123.mjs +17 -14
  37. package/dist/index124.mjs +12 -12
  38. package/dist/index125.mjs +15 -58
  39. package/dist/index126.mjs +14 -11
  40. package/dist/index127.mjs +56 -30
  41. package/dist/index128.mjs +9 -15
  42. package/dist/index129.mjs +31 -26
  43. package/dist/index13.mjs +83 -185
  44. package/dist/index130.mjs +13 -16
  45. package/dist/index131.mjs +26 -11
  46. package/dist/index132.mjs +18 -12
  47. package/dist/index133.mjs +12 -40
  48. package/dist/index134.mjs +14 -16
  49. package/dist/index135.mjs +42 -263
  50. package/dist/index136.mjs +15 -62
  51. package/dist/index137.mjs +267 -7
  52. package/dist/index138.mjs +70 -2
  53. package/dist/index139.mjs +8 -2
  54. package/dist/index14.mjs +196 -94
  55. package/dist/index140.mjs +2 -33
  56. package/dist/index141.mjs +2 -2
  57. package/dist/index142.mjs +33 -2
  58. package/dist/index143.mjs +2 -21
  59. package/dist/index144.mjs +19 -54
  60. package/dist/index145.mjs +55 -28
  61. package/dist/index146.mjs +27 -5
  62. package/dist/index147.mjs +6 -51
  63. package/dist/index148.mjs +51 -5
  64. package/dist/index149.mjs +6 -12
  65. package/dist/index15.mjs +82 -713
  66. package/dist/index150.mjs +12 -7
  67. package/dist/index151.mjs +6 -27
  68. package/dist/index152.mjs +28 -2
  69. package/dist/index153.mjs +2 -70
  70. package/dist/index154.mjs +67 -164
  71. package/dist/index155.mjs +167 -2
  72. package/dist/index159.mjs +1 -1
  73. package/dist/index16.mjs +722 -53
  74. package/dist/index160.mjs +1 -1
  75. package/dist/index161.mjs +1 -1
  76. package/dist/index162.mjs +1 -1
  77. package/dist/index163.mjs +1 -1
  78. package/dist/index165.mjs +3 -3
  79. package/dist/index166.mjs +1 -1
  80. package/dist/index168.mjs +3 -3
  81. package/dist/index169.mjs +1 -1
  82. package/dist/index17.mjs +58 -60
  83. package/dist/index174.mjs +2 -2
  84. package/dist/index176.mjs +1 -1
  85. package/dist/index178.mjs +2 -2
  86. package/dist/index179.mjs +5 -5
  87. package/dist/index18.mjs +60 -22
  88. package/dist/index182.mjs +1 -1
  89. package/dist/index185.mjs +1 -1
  90. package/dist/index188.mjs +3 -3
  91. package/dist/index189.mjs +1 -1
  92. package/dist/index19.mjs +22 -107
  93. package/dist/index193.mjs +2 -2
  94. package/dist/index195.mjs +2 -2
  95. package/dist/index199.mjs +1 -1
  96. package/dist/index2.mjs +2 -2
  97. package/dist/index20.mjs +105 -38
  98. package/dist/index201.mjs +1 -1
  99. package/dist/index21.mjs +37 -37
  100. package/dist/index210.mjs +2 -2
  101. package/dist/index212.mjs +1 -1
  102. package/dist/index213.mjs +1 -1
  103. package/dist/index214.mjs +2 -31
  104. package/dist/index215.mjs +30 -10
  105. package/dist/index216.mjs +10 -3
  106. package/dist/index217.mjs +3 -3
  107. package/dist/index218.mjs +4 -13
  108. package/dist/index219.mjs +13 -7
  109. package/dist/index22.mjs +42 -71
  110. package/dist/index220.mjs +7 -12
  111. package/dist/index221.mjs +11 -4
  112. package/dist/index222.mjs +5 -33
  113. package/dist/index223.mjs +33 -31
  114. package/dist/index224.mjs +29 -26
  115. package/dist/index225.mjs +26 -59
  116. package/dist/index226.mjs +61 -2
  117. package/dist/index227.mjs +2 -108
  118. package/dist/index228.mjs +2 -2
  119. package/dist/index229.mjs +2 -2
  120. package/dist/index23.mjs +67 -28
  121. package/dist/index230.mjs +2 -37
  122. package/dist/index231.mjs +108 -2
  123. package/dist/index232.mjs +2 -2
  124. package/dist/index233.mjs +2 -2
  125. package/dist/index234.mjs +2 -2
  126. package/dist/index236.mjs +2 -2
  127. package/dist/index237.mjs +2 -244
  128. package/dist/index238.mjs +37 -2
  129. package/dist/index239.mjs +2 -33
  130. package/dist/index24.mjs +29 -6
  131. package/dist/index240.mjs +2 -65
  132. package/dist/index241.mjs +243 -24
  133. package/dist/index242.mjs +2 -2
  134. package/dist/index243.mjs +33 -2
  135. package/dist/index244.mjs +65 -2
  136. package/dist/index245.mjs +25 -2
  137. package/dist/index246.mjs +2 -2
  138. package/dist/index247.mjs +2 -2
  139. package/dist/index248.mjs +2 -2
  140. package/dist/index249.mjs +2 -2
  141. package/dist/index25.mjs +8 -21
  142. package/dist/index250.mjs +2 -2
  143. package/dist/index251.mjs +2 -2
  144. package/dist/index253.mjs +2 -2
  145. package/dist/index254.mjs +2 -2
  146. package/dist/index255.mjs +4 -2
  147. package/dist/index256.mjs +2 -4
  148. package/dist/index258.mjs +3 -2
  149. package/dist/index259.mjs +2 -18
  150. package/dist/index26.mjs +19 -34
  151. package/dist/index260.mjs +2 -47
  152. package/dist/index261.mjs +17 -2
  153. package/dist/index262.mjs +13 -2
  154. package/dist/index263.mjs +6 -2
  155. package/dist/index264.mjs +30 -2
  156. package/dist/index265.mjs +2 -91
  157. package/dist/index266.mjs +2 -3
  158. package/dist/index267.mjs +18 -2
  159. package/dist/index268.mjs +47 -2
  160. package/dist/index269.mjs +2 -17
  161. package/dist/index27.mjs +34 -37
  162. package/dist/index270.mjs +2 -13
  163. package/dist/index271.mjs +2 -6
  164. package/dist/index272.mjs +2 -30
  165. package/dist/index273.mjs +91 -2
  166. package/dist/index274.mjs +2 -2
  167. package/dist/index276.mjs +2 -2
  168. package/dist/index277.mjs +5 -0
  169. package/dist/index28.mjs +28 -103
  170. package/dist/index29.mjs +104 -20
  171. package/dist/index3.mjs +90 -90
  172. package/dist/index30.mjs +29 -9
  173. package/dist/index31.mjs +9 -9
  174. package/dist/index32.mjs +11 -116
  175. package/dist/index33.mjs +116 -25
  176. package/dist/index34.mjs +25 -81
  177. package/dist/index35.mjs +81 -112
  178. package/dist/index36.mjs +109 -8
  179. package/dist/index37.mjs +9 -33
  180. package/dist/index38.mjs +27 -20
  181. package/dist/index39.mjs +26 -9
  182. package/dist/index4.mjs +1 -1
  183. package/dist/index40.mjs +10 -122
  184. package/dist/index41.mjs +114 -380
  185. package/dist/index42.mjs +384 -20
  186. package/dist/index43.mjs +24 -31
  187. package/dist/index44.mjs +32 -7
  188. package/dist/index45.mjs +6 -1432
  189. package/dist/index46.mjs +1432 -69
  190. package/dist/index47.mjs +70 -2
  191. package/dist/index48.mjs +2 -60
  192. package/dist/index49.mjs +57 -48
  193. package/dist/index5.mjs +1 -1
  194. package/dist/index50.mjs +51 -33
  195. package/dist/index51.mjs +33 -15
  196. package/dist/index52.mjs +12 -2260
  197. package/dist/index53.mjs +2263 -36
  198. package/dist/index54.mjs +36 -44
  199. package/dist/index55.mjs +44 -99
  200. package/dist/index56.mjs +99 -81
  201. package/dist/index57.mjs +75 -13
  202. package/dist/index58.mjs +15 -125
  203. package/dist/index59.mjs +93 -89
  204. package/dist/index6.mjs +1 -1
  205. package/dist/index60.mjs +102 -56
  206. package/dist/index61.mjs +55 -89
  207. package/dist/index62.mjs +82 -76
  208. package/dist/index63.mjs +100 -13
  209. package/dist/index64.mjs +17 -92
  210. package/dist/index65.mjs +70 -56
  211. package/dist/index66.mjs +62 -44
  212. package/dist/index67.mjs +47 -46
  213. package/dist/index68.mjs +48 -121
  214. package/dist/index69.mjs +133 -22
  215. package/dist/index7.mjs +6 -6
  216. package/dist/index70.mjs +4 -152
  217. package/dist/index71.mjs +21 -20
  218. package/dist/index72.mjs +2 -5
  219. package/dist/index73.mjs +23 -2
  220. package/dist/index74.mjs +149 -71
  221. package/dist/index75.mjs +74 -14
  222. package/dist/index76.mjs +14 -62
  223. package/dist/index77.mjs +63 -2
  224. package/dist/index78.mjs +234 -5
  225. package/dist/index79.mjs +5 -1133
  226. package/dist/index8.mjs +4 -4
  227. package/dist/index80.mjs +131 -17
  228. package/dist/index81.mjs +67 -54
  229. package/dist/index82.mjs +84 -30
  230. package/dist/index83.mjs +29 -2
  231. package/dist/index84.mjs +9 -235
  232. package/dist/index85.mjs +74 -5
  233. package/dist/index86.mjs +3 -133
  234. package/dist/index87.mjs +2 -68
  235. package/dist/index88.mjs +79 -83
  236. package/dist/index89.mjs +52 -27
  237. package/dist/index9.mjs +3 -3
  238. package/dist/index90.mjs +5 -8
  239. package/dist/index91.mjs +4 -74
  240. package/dist/index92.mjs +178 -3
  241. package/dist/index93.mjs +53 -2
  242. package/dist/index94.mjs +68 -82
  243. package/dist/index95.mjs +33 -53
  244. package/dist/index96.mjs +42 -5
  245. package/dist/index97.mjs +2 -5
  246. package/dist/index98.mjs +5 -178
  247. package/dist/index99.mjs +1134 -53
  248. package/dist/styles.css +1 -1
  249. package/package.json +1 -1
  250. package/src/components/ProductAddOns.stories.tsx +10 -3
  251. package/src/components/ProductAddOns.tsx +167 -112
  252. package/src/components/RecommendedProducts.tsx +130 -88
  253. package/src/components/VariantPickerModal.tsx +154 -0
  254. package/src/contexts/CartContext.tsx +8 -1
  255. 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
2
  import { __exports as r } from "./index252.mjs";
3
- import { __require as s } from "./index119.mjs";
3
+ import { __require as s } from "./index121.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 "./index255.mjs";
3
- import S from "./index256.mjs";
2
+ import { __module as b } from "./index254.mjs";
3
+ import S from "./index255.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 "./index253.mjs";
2
+ import { __exports as e } from "./index256.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 "./index254.mjs";
2
+ import { __exports as e } from "./index257.mjs";
3
3
  /**
4
4
  * @license React
5
5
  * react-is.development.js
package/dist/index214.mjs CHANGED
@@ -1,34 +1,5 @@
1
1
  'use client';
2
- import p from "./index94.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
- };
2
+ var a = {};
32
3
  export {
33
- a as default
4
+ a as __exports
34
5
  };
package/dist/index215.mjs CHANGED
@@ -1,14 +1,34 @@
1
1
  'use client';
2
- import i from "./index84.mjs";
3
- import m from "./index88.mjs";
4
- import s from "./index98.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;
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
+ });
11
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
+ };
12
32
  export {
13
- h as default
33
+ a as default
14
34
  };
package/dist/index216.mjs CHANGED
@@ -1,7 +1,14 @@
1
1
  'use client';
2
- function e(t) {
3
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
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;
4
11
  }
5
12
  export {
6
- e as default
13
+ h as default
7
14
  };
package/dist/index217.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- function n(e, c) {
3
- return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
2
+ function e(t) {
3
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
4
4
  }
5
5
  export {
6
- n as default
6
+ e as default
7
7
  };
package/dist/index218.mjs CHANGED
@@ -1,16 +1,7 @@
1
1
  'use client';
2
- import o from "./index266.mjs";
3
- import r from "./index267.mjs";
4
- import t from "./index268.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
- };
2
+ function n(e, c) {
3
+ return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
4
+ }
14
5
  export {
15
- l as default
6
+ n as default
16
7
  };
package/dist/index219.mjs CHANGED
@@ -1,10 +1,16 @@
1
1
  'use client';
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";
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
+ };
4
14
  export {
5
- e as hasBrowserEnv,
6
- n as hasStandardBrowserEnv,
7
- t as hasStandardBrowserWebWorkerEnv,
8
- o as navigator,
9
- r as origin
15
+ l as default
10
16
  };
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,15 +1,10 @@
1
1
  'use client';
2
- import a from "./index95.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
- }
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";
13
4
  export {
14
- E as default
5
+ e as hasBrowserEnv,
6
+ n as hasStandardBrowserEnv,
7
+ t as hasStandardBrowserWebWorkerEnv,
8
+ o as navigator,
9
+ r as origin
15
10
  };
package/dist/index221.mjs CHANGED
@@ -1,8 +1,15 @@
1
1
  'use client';
2
- function o(e) {
3
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
4
- return t && t[1] || "";
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
+ ));
5
12
  }
6
13
  export {
7
- o as default
14
+ E as default
8
15
  };
package/dist/index222.mjs CHANGED
@@ -1,36 +1,8 @@
1
1
  'use client';
2
- import i from "./index269.mjs";
3
- import m from "./index270.mjs";
4
- import f from "./index84.mjs";
5
- const h = (t, o, a = 3) => {
6
- let r = 0;
7
- const c = i(50, 250);
8
- return m((s) => {
9
- const n = s.loaded, e = s.lengthComputable ? s.total : void 0, l = n - r, d = c(l), p = n <= e;
10
- r = n;
11
- const u = {
12
- loaded: n,
13
- total: e,
14
- progress: e ? n / e : void 0,
15
- bytes: l,
16
- rate: d || void 0,
17
- estimated: d && e && p ? (e - n) / d : void 0,
18
- event: s,
19
- lengthComputable: e != null,
20
- [o ? "download" : "upload"]: !0
21
- };
22
- t(u);
23
- }, a);
24
- }, v = (t, o) => {
25
- const a = t != null;
26
- return [(r) => o[0]({
27
- lengthComputable: a,
28
- total: t,
29
- loaded: r
30
- }), o[1]];
31
- }, C = (t) => (...o) => f.asap(() => t(...o));
2
+ function o(e) {
3
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
4
+ return t && t[1] || "";
5
+ }
32
6
  export {
33
- C as asyncDecorator,
34
- v as progressEventDecorator,
35
- h as progressEventReducer
7
+ o as default
36
8
  };