@okam/stack-ui 1.35.0 → 1.35.1

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 (308) hide show
  1. package/components/fields/Select/Select.d.ts +1 -1
  2. package/index105.js +1 -1
  3. package/index105.mjs +1 -1
  4. package/index106.js +1 -1
  5. package/index106.mjs +3 -3
  6. package/index107.js +1 -1
  7. package/index107.mjs +1 -1
  8. package/index112.js +1 -1
  9. package/index112.mjs +1 -1
  10. package/index114.js +1 -1
  11. package/index114.mjs +3 -3
  12. package/index115.js +1 -1
  13. package/index115.mjs +3 -3
  14. package/index116.js +1 -1
  15. package/index116.mjs +1 -1
  16. package/index117.js +1 -1
  17. package/index117.mjs +1 -1
  18. package/index118.js +1 -1
  19. package/index118.mjs +1 -1
  20. package/index122.js +1 -1
  21. package/index122.mjs +2 -2
  22. package/index123.js +1 -1
  23. package/index123.mjs +5 -5
  24. package/index124.js +1 -1
  25. package/index124.mjs +3 -3
  26. package/index125.js +1 -1
  27. package/index125.mjs +9 -9
  28. package/index131.js +1 -1
  29. package/index131.mjs +1 -1
  30. package/index140.js +1 -1
  31. package/index140.mjs +10 -55
  32. package/index141.js +1 -1
  33. package/index141.mjs +57 -46
  34. package/index142.js +1 -1
  35. package/index142.mjs +46 -241
  36. package/index143.js +1 -2
  37. package/index143.mjs +241 -13
  38. package/index144.js +2 -1
  39. package/index144.mjs +12 -29
  40. package/index145.js +1 -1
  41. package/index145.mjs +30 -12
  42. package/index147.js +1 -1
  43. package/index147.mjs +1 -1
  44. package/index148.js +1 -1
  45. package/index148.mjs +1 -1
  46. package/index150.js +1 -1
  47. package/index150.mjs +68 -22
  48. package/index151.js +1 -1
  49. package/index151.mjs +370 -62
  50. package/index152.js +1 -1
  51. package/index152.mjs +44 -379
  52. package/index153.js +1 -1
  53. package/index153.mjs +4 -47
  54. package/index154.js +1 -1
  55. package/index154.mjs +25 -4
  56. package/index155.js +1 -1
  57. package/index155.mjs +46 -23
  58. package/index156.js +1 -1
  59. package/index156.mjs +4 -46
  60. package/index157.js +1 -1
  61. package/index157.mjs +24 -5
  62. package/index158.js +1 -1
  63. package/index158.mjs +11 -23
  64. package/index159.js +1 -1
  65. package/index159.mjs +4 -12
  66. package/index16.js +1 -1
  67. package/index16.mjs +133 -131
  68. package/index160.js +1 -1
  69. package/index160.mjs +14 -4
  70. package/index161.js +1 -1
  71. package/index161.mjs +21 -14
  72. package/index162.js +1 -1
  73. package/index162.mjs +42 -21
  74. package/index163.js +1 -1
  75. package/index163.mjs +23 -41
  76. package/index164.js +1 -1
  77. package/index164.mjs +42 -24
  78. package/index165.js +1 -1
  79. package/index165.mjs +27 -41
  80. package/index166.js +1 -1
  81. package/index166.mjs +30 -27
  82. package/index167.js +1 -1
  83. package/index167.mjs +13 -30
  84. package/index168.js +1 -1
  85. package/index168.mjs +28 -14
  86. package/index169.js +1 -1
  87. package/index169.mjs +9 -28
  88. package/index170.js +1 -1
  89. package/index170.mjs +6 -9
  90. package/index171.js +1 -1
  91. package/index171.mjs +5 -6
  92. package/index172.js +1 -1
  93. package/index172.mjs +13 -5
  94. package/index173.js +1 -1
  95. package/index173.mjs +8 -13
  96. package/index174.js +1 -1
  97. package/index174.mjs +17 -8
  98. package/index175.js +1 -1
  99. package/index175.mjs +19 -17
  100. package/index176.js +1 -1
  101. package/index176.mjs +54 -19
  102. package/index177.js +1 -1
  103. package/index177.mjs +23 -50
  104. package/index178.js +1 -1
  105. package/index178.mjs +122 -201
  106. package/index179.js +1 -1
  107. package/index179.mjs +130 -60
  108. package/index180.js +1 -1
  109. package/index180.mjs +44 -143
  110. package/index181.js +1 -1
  111. package/index181.mjs +14 -124
  112. package/index182.js +1 -1
  113. package/index182.mjs +87 -216
  114. package/index183.js +1 -1
  115. package/index183.mjs +102 -186
  116. package/index184.js +1 -1
  117. package/index184.mjs +4 -69
  118. package/index185.js +1 -1
  119. package/index185.mjs +3 -279
  120. package/index186.js +1 -1
  121. package/index186.mjs +119 -92
  122. package/index187.js +1 -1
  123. package/index187.mjs +23 -182
  124. package/index188.js +1 -1
  125. package/index188.mjs +51 -84
  126. package/index189.js +1 -1
  127. package/index189.mjs +44 -58
  128. package/index190.js +1 -1
  129. package/index190.mjs +35 -124
  130. package/index191.js +1 -1
  131. package/index191.mjs +110 -113
  132. package/index192.js +1 -1
  133. package/index192.mjs +74 -119
  134. package/index193.js +1 -1
  135. package/index193.mjs +101 -72
  136. package/index194.js +1 -1
  137. package/index194.mjs +98 -111
  138. package/index195.js +1 -1
  139. package/index195.mjs +136 -48
  140. package/index196.js +1 -1
  141. package/index196.mjs +196 -92
  142. package/index197.js +1 -1
  143. package/index197.mjs +22 -70
  144. package/index198.js +1 -1
  145. package/index198.mjs +47 -54
  146. package/index199.js +1 -1
  147. package/index199.mjs +47 -98
  148. package/index200.js +1 -5
  149. package/index200.mjs +96 -79
  150. package/index201.js +1 -1
  151. package/index201.mjs +71 -2025
  152. package/index202.js +1 -1
  153. package/index202.mjs +66 -57
  154. package/index203.js +1 -1
  155. package/index203.mjs +7 -188
  156. package/index204.js +1 -1
  157. package/index204.mjs +10 -123
  158. package/index205.js +1 -1
  159. package/index205.mjs +198 -129
  160. package/index206.js +1 -1
  161. package/index206.mjs +63 -43
  162. package/index207.js +1 -1
  163. package/index207.mjs +143 -14
  164. package/index208.js +1 -1
  165. package/index208.mjs +117 -88
  166. package/index209.js +1 -1
  167. package/index209.mjs +220 -102
  168. package/index210.js +1 -1
  169. package/index210.mjs +190 -4
  170. package/index211.js +1 -1
  171. package/index211.mjs +69 -3
  172. package/index212.js +1 -1
  173. package/index212.mjs +269 -115
  174. package/index213.js +1 -1
  175. package/index213.mjs +93 -24
  176. package/index214.js +1 -1
  177. package/index214.mjs +180 -43
  178. package/index215.js +1 -1
  179. package/index215.mjs +84 -44
  180. package/index216.js +1 -1
  181. package/index216.mjs +57 -36
  182. package/index217.js +1 -1
  183. package/index217.mjs +122 -109
  184. package/index218.js +1 -1
  185. package/index218.mjs +113 -74
  186. package/index219.js +1 -1
  187. package/index219.mjs +122 -101
  188. package/index220.js +1 -1
  189. package/index220.mjs +73 -98
  190. package/index221.js +1 -1
  191. package/index221.mjs +107 -137
  192. package/index222.js +1 -1
  193. package/index222.mjs +52 -197
  194. package/index223.js +1 -1
  195. package/index223.mjs +93 -22
  196. package/index224.js +1 -1
  197. package/index224.mjs +67 -46
  198. package/index225.js +1 -1
  199. package/index225.mjs +55 -47
  200. package/index226.js +1 -1
  201. package/index226.mjs +98 -96
  202. package/index227.js +5 -1
  203. package/index227.mjs +81 -72
  204. package/index228.js +1 -1
  205. package/index228.mjs +2015 -58
  206. package/index229.js +1 -1
  207. package/index229.mjs +59 -7
  208. package/index230.js +1 -1
  209. package/index230.mjs +187 -10
  210. package/index232.js +1 -1
  211. package/index232.mjs +4 -130
  212. package/index233.js +1 -1
  213. package/index233.mjs +5 -191
  214. package/index234.js +1 -1
  215. package/index234.mjs +5 -10
  216. package/index235.js +1 -1
  217. package/index235.mjs +5 -4
  218. package/index236.js +1 -1
  219. package/index236.mjs +5 -37
  220. package/index237.js +1 -1
  221. package/index237.mjs +5 -6
  222. package/index238.js +1 -1
  223. package/index238.mjs +5 -30
  224. package/index239.js +1 -1
  225. package/index239.mjs +5 -7
  226. package/index240.js +1 -1
  227. package/index240.mjs +5 -5
  228. package/index241.js +1 -1
  229. package/index241.mjs +4 -4
  230. package/index242.js +1 -1
  231. package/index242.mjs +4 -4
  232. package/index243.js +1 -1
  233. package/index243.mjs +1 -1
  234. package/index244.js +1 -1
  235. package/index244.mjs +4 -4
  236. package/index245.js +1 -1
  237. package/index245.mjs +4 -4
  238. package/index246.js +1 -1
  239. package/index246.mjs +4 -4
  240. package/index247.js +1 -1
  241. package/index247.mjs +1 -1
  242. package/index248.js +1 -1
  243. package/index248.mjs +4 -4
  244. package/index249.js +1 -1
  245. package/index249.mjs +4 -4
  246. package/index250.js +1 -1
  247. package/index250.mjs +4 -4
  248. package/index251.js +1 -1
  249. package/index251.mjs +1 -1
  250. package/index252.js +1 -1
  251. package/index252.mjs +4 -4
  252. package/index253.js +1 -1
  253. package/index253.mjs +4 -4
  254. package/index254.js +1 -1
  255. package/index254.mjs +4 -4
  256. package/index255.js +1 -1
  257. package/index255.mjs +4 -4
  258. package/index256.js +1 -1
  259. package/index256.mjs +4 -4
  260. package/index257.js +1 -1
  261. package/index257.mjs +4 -4
  262. package/index258.js +1 -1
  263. package/index258.mjs +4 -4
  264. package/index259.js +1 -1
  265. package/index259.mjs +4 -4
  266. package/index260.js +1 -1
  267. package/index260.mjs +1 -1
  268. package/index261.js +1 -1
  269. package/index261.mjs +4 -4
  270. package/index262.js +1 -1
  271. package/index262.mjs +4 -4
  272. package/index263.js +1 -1
  273. package/index263.mjs +1 -1
  274. package/index264.js +1 -1
  275. package/index264.mjs +4 -4
  276. package/index265.js +1 -1
  277. package/index265.mjs +4 -4
  278. package/index266.js +1 -1
  279. package/index266.mjs +4 -4
  280. package/index267.js +1 -1
  281. package/index267.mjs +130 -4
  282. package/index268.js +1 -1
  283. package/index268.mjs +191 -5
  284. package/index269.js +1 -1
  285. package/index269.mjs +10 -5
  286. package/index270.js +1 -1
  287. package/index270.mjs +4 -5
  288. package/index271.js +1 -1
  289. package/index271.mjs +37 -5
  290. package/index272.js +1 -1
  291. package/index272.mjs +6 -5
  292. package/index273.js +1 -1
  293. package/index273.mjs +30 -5
  294. package/index274.js +1 -1
  295. package/index274.mjs +7 -5
  296. package/index275.js +1 -1
  297. package/index275.mjs +3 -3
  298. package/index277.js +1 -1
  299. package/index277.mjs +2 -2
  300. package/index278.js +1 -1
  301. package/index278.mjs +5 -5
  302. package/index281.js +1 -1
  303. package/index281.mjs +3 -3
  304. package/index284.js +1 -1
  305. package/index284.mjs +1 -1
  306. package/index285.js +1 -1
  307. package/index285.mjs +4 -4
  308. package/package.json +1 -1
package/index156.mjs CHANGED
@@ -1,50 +1,8 @@
1
- import a, { useContext as d, useState as f, useRef as l } from "react";
2
- const c = {
3
- prefix: String(Math.round(Math.random() * 1e10)),
4
- current: 0
5
- }, $ = /* @__PURE__ */ a.createContext(c), p = /* @__PURE__ */ a.createContext(!1);
6
- let v = !!(typeof window < "u" && window.document && window.document.createElement), s = /* @__PURE__ */ new WeakMap();
7
- function S(t = !1) {
8
- let e = d($), r = l(null);
9
- if (r.current === null && !t) {
10
- var n, u;
11
- let o = (u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || u === void 0 || (n = u.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
12
- if (o) {
13
- let i = s.get(o);
14
- i == null ? s.set(o, {
15
- id: e.current,
16
- state: o.memoizedState
17
- }) : o.memoizedState !== i.state && (e.current = i.id, s.delete(o));
18
- }
19
- r.current = ++e.current;
20
- }
21
- return r.current;
22
- }
23
- function b(t) {
24
- let e = d($);
25
- e === c && !v && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
26
- let r = S(!!t), n = e === c && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
27
- return t || `${n}-${r}`;
28
- }
29
- function x(t) {
30
- let e = a.useId(), [r] = f(y()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${c.prefix}`;
31
- return t || `${n}-${e}`;
32
- }
33
- const C = typeof a.useId == "function" ? x : b;
34
- function m() {
35
- return !1;
36
- }
37
- function w() {
38
- return !0;
39
- }
40
- function g(t) {
41
- return () => {
1
+ function o(...f) {
2
+ return (...c) => {
3
+ for (let e of f) typeof e == "function" && e(...c);
42
4
  };
43
5
  }
44
- function y() {
45
- return typeof a.useSyncExternalStore == "function" ? a.useSyncExternalStore(g, m, w) : d(p);
46
- }
47
6
  export {
48
- y as useIsSSR,
49
- C as useSSRSafeId
7
+ o as chain
50
8
  };
package/index157.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(...t){return(...f)=>{for(let e of t)typeof e=="function"&&e(...f)}}exports.chain=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index158.js"),r=require("./index159.js");function i(t,o){if(!r.shadowDOM())return o&&t?t.contains(o):!1;if(!t||!o)return!1;let e=o;for(;e!==null;){if(e===t)return!0;e.tagName==="SLOT"&&e.assignedSlot?e=e.assignedSlot.parentNode:a.isShadowRoot(e)?e=e.host:e=e.parentNode}return!1}const n=(t=document)=>{var o;if(!r.shadowDOM())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&(!((o=e.shadowRoot)===null||o===void 0)&&o.activeElement);)e=e.shadowRoot.activeElement;return e};function s(t){return r.shadowDOM()&&t.target.shadowRoot&&t.composedPath?t.composedPath()[0]:t.target}exports.getActiveElement=n;exports.getEventTarget=s;exports.nodeContains=i;
package/index157.mjs CHANGED
@@ -1,8 +1,27 @@
1
- function o(...f) {
2
- return (...c) => {
3
- for (let e of f) typeof e == "function" && e(...c);
4
- };
1
+ import { isShadowRoot as f } from "./index158.mjs";
2
+ import { shadowDOM as o } from "./index159.mjs";
3
+ function n(t, a) {
4
+ if (!o()) return a && t ? t.contains(a) : !1;
5
+ if (!t || !a) return !1;
6
+ let e = a;
7
+ for (; e !== null; ) {
8
+ if (e === t) return !0;
9
+ e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : f(e) ? e = e.host : e = e.parentNode;
10
+ }
11
+ return !1;
12
+ }
13
+ const s = (t = document) => {
14
+ var a;
15
+ if (!o()) return t.activeElement;
16
+ let e = t.activeElement;
17
+ for (; e && "shadowRoot" in e && (!((a = e.shadowRoot) === null || a === void 0) && a.activeElement); ) e = e.shadowRoot.activeElement;
18
+ return e;
19
+ };
20
+ function d(t) {
21
+ return o() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
5
22
  }
6
23
  export {
7
- o as chain
24
+ s as getActiveElement,
25
+ d as getEventTarget,
26
+ n as nodeContains
8
27
  };
package/index158.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index159.js"),r=require("./index160.js");function i(t,o){if(!r.shadowDOM())return o&&t?t.contains(o):!1;if(!t||!o)return!1;let e=o;for(;e!==null;){if(e===t)return!0;e.tagName==="SLOT"&&e.assignedSlot?e=e.assignedSlot.parentNode:a.isShadowRoot(e)?e=e.host:e=e.parentNode}return!1}const n=(t=document)=>{var o;if(!r.shadowDOM())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&(!((o=e.shadowRoot)===null||o===void 0)&&o.activeElement);)e=e.shadowRoot.activeElement;return e};function s(t){return r.shadowDOM()&&t.target.shadowRoot&&t.composedPath?t.composedPath()[0]:t.target}exports.getActiveElement=n;exports.getEventTarget=s;exports.nodeContains=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=o=>{var n;return(n=o==null?void 0:o.ownerDocument)!==null&&n!==void 0?n:document},e=o=>o&&"window"in o&&o.window===o?o:t(o).defaultView||window;function d(o){return o!==null&&typeof o=="object"&&"nodeType"in o&&typeof o.nodeType=="number"}function c(o){return d(o)&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in o}exports.getOwnerDocument=t;exports.getOwnerWindow=e;exports.isShadowRoot=c;
package/index158.mjs CHANGED
@@ -1,27 +1,15 @@
1
- import { isShadowRoot as f } from "./index159.mjs";
2
- import { shadowDOM as o } from "./index160.mjs";
3
- function n(t, a) {
4
- if (!o()) return a && t ? t.contains(a) : !1;
5
- if (!t || !a) return !1;
6
- let e = a;
7
- for (; e !== null; ) {
8
- if (e === t) return !0;
9
- e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : f(e) ? e = e.host : e = e.parentNode;
10
- }
11
- return !1;
1
+ const t = (o) => {
2
+ var n;
3
+ return (n = o == null ? void 0 : o.ownerDocument) !== null && n !== void 0 ? n : document;
4
+ }, e = (o) => o && "window" in o && o.window === o ? o : t(o).defaultView || window;
5
+ function d(o) {
6
+ return o !== null && typeof o == "object" && "nodeType" in o && typeof o.nodeType == "number";
12
7
  }
13
- const s = (t = document) => {
14
- var a;
15
- if (!o()) return t.activeElement;
16
- let e = t.activeElement;
17
- for (; e && "shadowRoot" in e && (!((a = e.shadowRoot) === null || a === void 0) && a.activeElement); ) e = e.shadowRoot.activeElement;
18
- return e;
19
- };
20
- function d(t) {
21
- return o() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
8
+ function c(o) {
9
+ return d(o) && o.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in o;
22
10
  }
23
11
  export {
24
- s as getActiveElement,
25
- d as getEventTarget,
26
- n as nodeContains
12
+ t as getOwnerDocument,
13
+ e as getOwnerWindow,
14
+ c as isShadowRoot
27
15
  };
package/index159.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=o=>{var n;return(n=o==null?void 0:o.ownerDocument)!==null&&n!==void 0?n:document},e=o=>o&&"window"in o&&o.window===o?o:t(o).defaultView||window;function d(o){return o!==null&&typeof o=="object"&&"nodeType"in o&&typeof o.nodeType=="number"}function c(o){return d(o)&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in o}exports.getOwnerDocument=t;exports.getOwnerWindow=e;exports.isShadowRoot=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=!1;function t(){return e}exports.shadowDOM=t;
package/index159.mjs CHANGED
@@ -1,15 +1,7 @@
1
- const t = (o) => {
2
- var n;
3
- return (n = o == null ? void 0 : o.ownerDocument) !== null && n !== void 0 ? n : document;
4
- }, e = (o) => o && "window" in o && o.window === o ? o : t(o).defaultView || window;
5
- function d(o) {
6
- return o !== null && typeof o == "object" && "nodeType" in o && typeof o.nodeType == "number";
7
- }
8
- function c(o) {
9
- return d(o) && o.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in o;
1
+ let e = !1;
2
+ function f() {
3
+ return e;
10
4
  }
11
5
  export {
12
- t as getOwnerDocument,
13
- e as getOwnerWindow,
14
- c as isShadowRoot
6
+ f as shadowDOM
15
7
  };
package/index16.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),W=require("radashi"),A=require("react"),O=require("react-aria"),D=require("react-hook-form"),L=require("react-stately"),_=require("./index75.js"),P=require("./index27.js"),B=require("./index6.js"),K=require("./index14.js"),w=require("./index3.js"),C=require("./index40.js"),Q=require("./index112.js"),U=require("./index113.js"),H=R=>{var I;const{name:m,placeholderLabel:p,disabled:e,required:h,isInvalid:q,hookFormRef:M,isError:c=!1,errorMessage:g,themeName:t="select",tokens:l,customTheme:y,label:u,onSelectionChange:j,defaultValue:v,value:$,icon:F,popoverMatchesWidth:E,options:n,...s}=R,r=A.useRef(null),f=n==null?void 0:n.filter(x=>{var N;return!((N=x.key)!=null&&N.includes("header-"))}),o=L.useSelectState({...s,children:C,selectedKey:$,defaultSelectedKey:v,items:f,onSelectionChange:j,isDisabled:e,isRequired:h,isInvalid:q}),{triggerProps:k,menuProps:b,labelProps:S}=O.useSelect({...s,label:u,isDisabled:e,isRequired:h,isInvalid:q},o,r),{onPress:a,onPressStart:d,...T}=k;return i.jsxs(P.default,{themeName:`${t}.wrapper`,children:[u&&i.jsx(w.default,{...S,as:"label",themeName:`${t}.label`,children:u}),i.jsx(O.HiddenSelect,{...M,state:o,triggerRef:r,name:m,isDisabled:!0}),i.jsxs(P.default,{themeName:`${t}.container`,children:[i.jsxs(B.ButtonWithForwardRef,{...T,handlePress:x=>{a==null||a(x),d==null||d(x)},ref:r,disabled:e,themeName:`${t}.button`,tokens:{...l,intent:c?"error":"default"},children:[o.selectedItem?o.selectedItem.rendered:p,i.jsx(K,{icon:F??"ArrowDown"})]}),o.isOpen&&r.current&&i.jsx(U,{tokens:l,state:o,triggerRef:r,placement:"bottom",themeName:`${t}.popover`,style:{[`--${t}-container-width`]:`${(I=r.current)==null?void 0:I.offsetWidth}px`},children:i.jsx(Q.ListBox,{...b,themeName:t,state:o,optionsWithHeaders:n??[]})}),c&&i.jsx(w.default,{tokens:{...l,isError:c},themeName:`${t}.errorMessage`,children:g})]})]})},V=({id:R,name:m,label:p,rules:e,tokens:h,defaultValue:q,value:M,themeName:c="select",required:g,onChange:t,options:l,placeholderLabel:y,icon:u,popoverMatchesWidth:j,...v})=>{const{control:$}=D.useFormContext(),{t:F}=_.useTranslation(),E=()=>{const s=Object.entries(v).filter(([r,f])=>r.startsWith("aria-"));return Object.fromEntries(s)},n={required:g?F("FORM.ERROR.REQUIRED")??"required":!1,...e};return i.jsx(D.Controller,{name:m,control:$,rules:n,disabled:e==null?void 0:e.disabled,defaultValue:q,render:({field:s,fieldState:r})=>{var a;const{ref:f,...o}=s,k=!W.isEmpty(r.error),b={isDisabled:s.disabled??!1,isRequired:(e==null?void 0:e.required)===!0||(e==null?void 0:e.required)==="required",isInvalid:r.invalid,isError:k},S={...h,...b};return i.jsx(H,{...o,...b,...E(),id:R,hookFormRef:f,name:m,themeName:c,label:p,tokens:S,disabled:s.disabled,required:(e==null?void 0:e.required)===!0||(e==null?void 0:e.required)==="required",isInvalid:r.invalid,errorMessage:(a=r.error)==null?void 0:a.message,value:s.value,options:l,placeholderLabel:y,icon:u,popoverMatchesWidth:j,onSelectionChange:d=>{s.onChange(d),t==null||t(d)}})}})};exports.ReactHookFormSelect=V;exports.default=H;
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),B=require("radashi"),D=require("react"),w=require("react-aria"),H=require("react-hook-form"),K=require("react-stately"),V=require("./index75.js"),T=require("./index27.js"),C=require("./index6.js"),Q=require("./index14.js"),W=require("./index3.js"),U=require("./index40.js"),z=require("./index112.js"),G=require("./index113.js"),A=R=>{var O;const{name:h,placeholderLabel:g,disabled:e,required:b,isInvalid:f,hookFormRef:d,isError:l=!1,errorMessage:u,themeName:r="select",tokens:m,customTheme:I,label:q,onSelectionChange:j,defaultValue:v,value:$,icon:S,popoverMatchesWidth:N,options:c,...i}=R,o=D.useRef(),n=D.useRef(null),F=a=>{a&&(d==null||d(a),o.current=a)},k=c==null?void 0:c.filter(a=>{var P;return!((P=a.key)!=null&&P.includes("header-"))}),s=K.useSelectState({...i,children:U,selectedKey:$,defaultSelectedKey:v,items:k,onSelectionChange:j,isDisabled:e,isRequired:b,isInvalid:f}),{triggerProps:M,menuProps:p,labelProps:x,valueProps:L}=w.useSelect({...i,label:q,isDisabled:e,isRequired:b,isInvalid:f},s,F),{onPress:y,onPressStart:E,..._}=M;return t.jsxs(T.default,{themeName:`${r}.wrapper`,children:[q&&t.jsx(W.default,{...x,as:"label",themeName:`${r}.label`,children:q}),t.jsx(w.HiddenSelect,{state:s,triggerRef:n,name:h,isDisabled:!0}),t.jsxs(T.default,{themeName:`${r}.container`,children:[t.jsxs(C.ButtonWithForwardRef,{..._,handlePress:a=>{y==null||y(a),E==null||E(a)},ref:n,disabled:e,themeName:`${r}.button`,tokens:{...m,intent:l?"error":"default"},children:[t.jsx("span",{...L,children:s.selectedItem?s.selectedItem.rendered:g}),t.jsx(Q,{icon:S??"ArrowDown"})]}),s.isOpen&&n.current&&t.jsx(G,{tokens:m,state:s,triggerRef:n,placement:"bottom",themeName:`${r}.popover`,style:{[`--${r}-container-width`]:`${(O=n.current)==null?void 0:O.offsetWidth}px`},children:t.jsx(z.ListBox,{...p,themeName:r,state:s,optionsWithHeaders:c??[]})}),l&&t.jsx(W.default,{tokens:{...m,isError:l},themeName:`${r}.errorMessage`,children:u})]})]})},J=({id:R,name:h,label:g,rules:e,tokens:b,defaultValue:f,themeName:d="select",required:l,onChange:u,options:r,placeholderLabel:m,icon:I,popoverMatchesWidth:q,value:j,...v})=>{const{control:$}=H.useFormContext(),{t:S}=V.useTranslation(),N=()=>{const i=Object.entries(v).filter(([o,n])=>o.startsWith("aria-"));return Object.fromEntries(i)},c={required:l?S("FORM.ERROR.REQUIRED")??"required":!1,...e};return t.jsx(H.Controller,{name:h,control:$,rules:c,disabled:e==null?void 0:e.disabled,defaultValue:f??j,render:({field:i,fieldState:o})=>{var p;const{ref:n,...F}=i,k=!B.isEmpty(o.error),s={isDisabled:i.disabled??!1,isRequired:(e==null?void 0:e.required)===!0||(e==null?void 0:e.required)==="required",isInvalid:o.invalid,isError:k},M={...b,...s};return t.jsx(A,{...F,...s,...N(),id:R,hookFormRef:n,name:h,themeName:d,label:g,tokens:M,disabled:i.disabled,required:(e==null?void 0:e.required)===!0||(e==null?void 0:e.required)==="required",isInvalid:o.invalid,errorMessage:(p=o.error)==null?void 0:p.message,value:i.value,options:r,placeholderLabel:m,icon:I,popoverMatchesWidth:q,onSelectionChange:x=>{i.onChange(x),u==null||u(x)}})}})};exports.ReactHookFormSelect=J;exports.default=A;
package/index16.mjs CHANGED
@@ -1,160 +1,162 @@
1
1
  "use client";
2
- import { jsxs as D, jsx as s } from "react/jsx-runtime";
3
- import { isEmpty as W } from "radashi";
4
- import { useRef as j } from "react";
5
- import { useSelect as B, HiddenSelect as H } from "react-aria";
6
- import { useFormContext as A, Controller as K } from "react-hook-form";
7
- import { useSelectState as L } from "react-stately";
8
- import { useTranslation as C } from "./index75.mjs";
9
- import w from "./index27.mjs";
10
- import { ButtonWithForwardRef as Q } from "./index6.mjs";
11
- import U from "./index14.mjs";
12
- import P from "./index3.mjs";
13
- import V from "./index40.mjs";
14
- import { ListBox as _ } from "./index112.mjs";
15
- import z from "./index113.mjs";
16
- const G = (g) => {
17
- var O;
2
+ import { jsxs as M, jsx as i } from "react/jsx-runtime";
3
+ import { isEmpty as A } from "radashi";
4
+ import { useRef as T } from "react";
5
+ import { useSelect as K, HiddenSelect as L } from "react-aria";
6
+ import { useFormContext as V, Controller as C } from "react-hook-form";
7
+ import { useSelectState as Q } from "react-stately";
8
+ import { useTranslation as U } from "./index75.mjs";
9
+ import W from "./index27.mjs";
10
+ import { ButtonWithForwardRef as _ } from "./index6.mjs";
11
+ import z from "./index14.mjs";
12
+ import j from "./index3.mjs";
13
+ import G from "./index40.mjs";
14
+ import { ListBox as J } from "./index112.mjs";
15
+ import X from "./index113.mjs";
16
+ const Y = (q) => {
17
+ var S;
18
18
  const {
19
- name: p,
20
- placeholderLabel: q,
19
+ name: h,
20
+ placeholderLabel: v,
21
21
  disabled: e,
22
- required: f,
23
- isInvalid: h,
24
- hookFormRef: E,
22
+ required: u,
23
+ isInvalid: b,
24
+ hookFormRef: c,
25
25
  isError: m = !1,
26
- errorMessage: v,
27
- themeName: t = "select",
28
- tokens: c,
29
- customTheme: N,
30
- label: l,
31
- onSelectionChange: F,
32
- defaultValue: k,
33
- value: I,
34
- icon: $,
35
- popoverMatchesWidth: M,
36
- options: n,
37
- ...o
38
- } = g, r = j(null), u = n == null ? void 0 : n.filter((R) => {
39
- var S;
40
- return !((S = R.key) != null && S.includes("header-"));
41
- }), i = L({
42
- ...o,
43
- children: V,
44
- selectedKey: I,
45
- defaultSelectedKey: k,
46
- items: u,
47
- onSelectionChange: F,
26
+ errorMessage: l,
27
+ themeName: r = "select",
28
+ tokens: p,
29
+ customTheme: O,
30
+ label: f,
31
+ onSelectionChange: I,
32
+ defaultValue: $,
33
+ value: x,
34
+ icon: y,
35
+ popoverMatchesWidth: P,
36
+ options: d,
37
+ ...t
38
+ } = q, s = T(), n = T(null), D = (a) => {
39
+ a && (c == null || c(a), s.current = a);
40
+ }, E = d == null ? void 0 : d.filter((a) => {
41
+ var w;
42
+ return !((w = a.key) != null && w.includes("header-"));
43
+ }), o = Q({
44
+ ...t,
45
+ children: G,
46
+ selectedKey: x,
47
+ defaultSelectedKey: $,
48
+ items: E,
49
+ onSelectionChange: I,
48
50
  isDisabled: e,
49
- isRequired: f,
50
- isInvalid: h
51
- }), { triggerProps: x, menuProps: b, labelProps: y } = B(
52
- { ...o, label: l, isDisabled: e, isRequired: f, isInvalid: h },
53
- i,
54
- r
55
- ), { onPress: a, onPressStart: d, ...T } = x;
56
- return /* @__PURE__ */ D(w, { themeName: `${t}.wrapper`, children: [
57
- l && /* @__PURE__ */ s(P, { ...y, as: "label", themeName: `${t}.label`, children: l }),
58
- /* @__PURE__ */ s(H, { ...E, state: i, triggerRef: r, name: p, isDisabled: !0 }),
59
- /* @__PURE__ */ D(w, { themeName: `${t}.container`, children: [
60
- /* @__PURE__ */ D(
61
- Q,
51
+ isRequired: u,
52
+ isInvalid: b
53
+ }), { triggerProps: F, menuProps: R, labelProps: g, valueProps: B } = K(
54
+ { ...t, label: f, isDisabled: e, isRequired: u, isInvalid: b },
55
+ o,
56
+ D
57
+ ), { onPress: N, onPressStart: k, ...H } = F;
58
+ return /* @__PURE__ */ M(W, { themeName: `${r}.wrapper`, children: [
59
+ f && /* @__PURE__ */ i(j, { ...g, as: "label", themeName: `${r}.label`, children: f }),
60
+ /* @__PURE__ */ i(L, { state: o, triggerRef: n, name: h, isDisabled: !0 }),
61
+ /* @__PURE__ */ M(W, { themeName: `${r}.container`, children: [
62
+ /* @__PURE__ */ M(
63
+ _,
62
64
  {
63
- ...T,
64
- handlePress: (R) => {
65
- a == null || a(R), d == null || d(R);
65
+ ...H,
66
+ handlePress: (a) => {
67
+ N == null || N(a), k == null || k(a);
66
68
  },
67
- ref: r,
69
+ ref: n,
68
70
  disabled: e,
69
- themeName: `${t}.button`,
70
- tokens: { ...c, intent: m ? "error" : "default" },
71
+ themeName: `${r}.button`,
72
+ tokens: { ...p, intent: m ? "error" : "default" },
71
73
  children: [
72
- i.selectedItem ? i.selectedItem.rendered : q,
73
- /* @__PURE__ */ s(U, { icon: $ ?? "ArrowDown" })
74
+ /* @__PURE__ */ i("span", { ...B, children: o.selectedItem ? o.selectedItem.rendered : v }),
75
+ /* @__PURE__ */ i(z, { icon: y ?? "ArrowDown" })
74
76
  ]
75
77
  }
76
78
  ),
77
- i.isOpen && r.current && /* @__PURE__ */ s(
78
- z,
79
+ o.isOpen && n.current && /* @__PURE__ */ i(
80
+ X,
79
81
  {
80
- tokens: c,
81
- state: i,
82
- triggerRef: r,
82
+ tokens: p,
83
+ state: o,
84
+ triggerRef: n,
83
85
  placement: "bottom",
84
- themeName: `${t}.popover`,
85
- style: { [`--${t}-container-width`]: `${(O = r.current) == null ? void 0 : O.offsetWidth}px` },
86
- children: /* @__PURE__ */ s(_, { ...b, themeName: t, state: i, optionsWithHeaders: n ?? [] })
86
+ themeName: `${r}.popover`,
87
+ style: { [`--${r}-container-width`]: `${(S = n.current) == null ? void 0 : S.offsetWidth}px` },
88
+ children: /* @__PURE__ */ i(J, { ...R, themeName: r, state: o, optionsWithHeaders: d ?? [] })
87
89
  }
88
90
  ),
89
- m && /* @__PURE__ */ s(P, { tokens: { ...c, isError: m }, themeName: `${t}.errorMessage`, children: v })
91
+ m && /* @__PURE__ */ i(j, { tokens: { ...p, isError: m }, themeName: `${r}.errorMessage`, children: l })
90
92
  ] })
91
93
  ] });
92
- }, ce = ({
93
- id: g,
94
- name: p,
95
- label: q,
94
+ }, fe = ({
95
+ id: q,
96
+ name: h,
97
+ label: v,
96
98
  rules: e,
97
- tokens: f,
98
- defaultValue: h,
99
- value: E,
100
- themeName: m = "select",
101
- required: v,
102
- onChange: t,
103
- options: c,
104
- placeholderLabel: N,
105
- icon: l,
106
- popoverMatchesWidth: F,
107
- ...k
99
+ tokens: u,
100
+ defaultValue: b,
101
+ themeName: c = "select",
102
+ required: m,
103
+ onChange: l,
104
+ options: r,
105
+ placeholderLabel: p,
106
+ icon: O,
107
+ popoverMatchesWidth: f,
108
+ value: I,
109
+ ...$
108
110
  }) => {
109
- const { control: I } = A(), { t: $ } = C(), M = () => {
110
- const o = Object.entries(k).filter(([r, u]) => r.startsWith("aria-"));
111
- return Object.fromEntries(o);
112
- }, n = {
113
- required: v ? $("FORM.ERROR.REQUIRED") ?? "required" : !1,
111
+ const { control: x } = V(), { t: y } = U(), P = () => {
112
+ const t = Object.entries($).filter(([s, n]) => s.startsWith("aria-"));
113
+ return Object.fromEntries(t);
114
+ }, d = {
115
+ required: m ? y("FORM.ERROR.REQUIRED") ?? "required" : !1,
114
116
  ...e
115
117
  };
116
- return /* @__PURE__ */ s(
117
- K,
118
+ return /* @__PURE__ */ i(
119
+ C,
118
120
  {
119
- name: p,
120
- control: I,
121
- rules: n,
121
+ name: h,
122
+ control: x,
123
+ rules: d,
122
124
  disabled: e == null ? void 0 : e.disabled,
123
- defaultValue: h,
124
- render: ({ field: o, fieldState: r }) => {
125
- var a;
126
- const { ref: u, ...i } = o, x = !W(r.error), b = {
127
- isDisabled: o.disabled ?? !1,
125
+ defaultValue: b ?? I,
126
+ render: ({ field: t, fieldState: s }) => {
127
+ var R;
128
+ const { ref: n, ...D } = t, E = !A(s.error), o = {
129
+ isDisabled: t.disabled ?? !1,
128
130
  isRequired: (e == null ? void 0 : e.required) === !0 || (e == null ? void 0 : e.required) === "required",
129
- isInvalid: r.invalid,
130
- isError: x
131
- }, y = {
132
- ...f,
133
- ...b
131
+ isInvalid: s.invalid,
132
+ isError: E
133
+ }, F = {
134
+ ...u,
135
+ ...o
134
136
  };
135
- return /* @__PURE__ */ s(
136
- G,
137
+ return /* @__PURE__ */ i(
138
+ Y,
137
139
  {
138
- ...i,
139
- ...b,
140
- ...M(),
141
- id: g,
142
- hookFormRef: u,
143
- name: p,
144
- themeName: m,
145
- label: q,
146
- tokens: y,
147
- disabled: o.disabled,
140
+ ...D,
141
+ ...o,
142
+ ...P(),
143
+ id: q,
144
+ hookFormRef: n,
145
+ name: h,
146
+ themeName: c,
147
+ label: v,
148
+ tokens: F,
149
+ disabled: t.disabled,
148
150
  required: (e == null ? void 0 : e.required) === !0 || (e == null ? void 0 : e.required) === "required",
149
- isInvalid: r.invalid,
150
- errorMessage: (a = r.error) == null ? void 0 : a.message,
151
- value: o.value,
152
- options: c,
153
- placeholderLabel: N,
154
- icon: l,
155
- popoverMatchesWidth: F,
156
- onSelectionChange: (d) => {
157
- o.onChange(d), t == null || t(d);
151
+ isInvalid: s.invalid,
152
+ errorMessage: (R = s.error) == null ? void 0 : R.message,
153
+ value: t.value,
154
+ options: r,
155
+ placeholderLabel: p,
156
+ icon: O,
157
+ popoverMatchesWidth: f,
158
+ onSelectionChange: (g) => {
159
+ t.onChange(g), l == null || l(g);
158
160
  }
159
161
  }
160
162
  );
@@ -163,6 +165,6 @@ const G = (g) => {
163
165
  );
164
166
  };
165
167
  export {
166
- ce as ReactHookFormSelect,
167
- G as default
168
+ fe as ReactHookFormSelect,
169
+ Y as default
168
170
  };
package/index160.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=!1;function t(){return e}exports.shadowDOM=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function n(r){var o,e,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var u=r.length;for(o=0;o<u;o++)r[o]&&(e=n(r[o]))&&(t&&(t+=" "),t+=e)}else for(e in r)r[e]&&(t&&(t+=" "),t+=e);return t}function f(){for(var r,o,e=0,t="",u=arguments.length;e<u;e++)(r=arguments[e])&&(o=n(r))&&(t&&(t+=" "),t+=o);return t}exports.clsx=f;exports.default=f;
package/index160.mjs CHANGED
@@ -1,7 +1,17 @@
1
- let e = !1;
2
- function f() {
3
- return e;
1
+ function a(r) {
2
+ var n, f, t = "";
3
+ if (typeof r == "string" || typeof r == "number") t += r;
4
+ else if (typeof r == "object") if (Array.isArray(r)) {
5
+ var o = r.length;
6
+ for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
7
+ } else for (f in r) r[f] && (t && (t += " "), t += f);
8
+ return t;
9
+ }
10
+ function i() {
11
+ for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
12
+ return t;
4
13
  }
5
14
  export {
6
- f as shadowDOM
15
+ i as clsx,
16
+ i as default
7
17
  };
package/index161.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function n(r){var o,e,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var u=r.length;for(o=0;o<u;o++)r[o]&&(e=n(r[o]))&&(t&&(t+=" "),t+=e)}else for(e in r)r[e]&&(t&&(t+=" "),t+=e);return t}function f(){for(var r,o,e=0,t="",u=arguments.length;e<u;e++)(r=arguments[e])&&(o=n(r))&&(t&&(t+=" "),t+=o);return t}exports.clsx=f;exports.default=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=new Set(["id"]),i=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),n=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),s=/^(data-.*)$/;function c(a,l={}){let{labelable:o,isLink:d,propNames:r}=l,t={};for(const e in a)Object.prototype.hasOwnProperty.call(a,e)&&(b.has(e)||o&&i.has(e)||d&&n.has(e)||r!=null&&r.has(e)||s.test(e))&&(t[e]=a[e]);return t}exports.filterDOMProps=c;
package/index161.mjs CHANGED
@@ -1,17 +1,24 @@
1
- function a(r) {
2
- var n, f, t = "";
3
- if (typeof r == "string" || typeof r == "number") t += r;
4
- else if (typeof r == "object") if (Array.isArray(r)) {
5
- var o = r.length;
6
- for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
7
- } else for (f in r) r[f] && (t && (t += " "), t += f);
8
- return t;
9
- }
10
- function i() {
11
- for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
12
- return t;
1
+ const b = /* @__PURE__ */ new Set([
2
+ "id"
3
+ ]), i = /* @__PURE__ */ new Set([
4
+ "aria-label",
5
+ "aria-labelledby",
6
+ "aria-describedby",
7
+ "aria-details"
8
+ ]), s = /* @__PURE__ */ new Set([
9
+ "href",
10
+ "hrefLang",
11
+ "target",
12
+ "rel",
13
+ "download",
14
+ "ping",
15
+ "referrerPolicy"
16
+ ]), n = /^(data-.*)$/;
17
+ function c(a, t = {}) {
18
+ let { labelable: d, isLink: o, propNames: r } = t, l = {};
19
+ for (const e in a) Object.prototype.hasOwnProperty.call(a, e) && (b.has(e) || d && i.has(e) || o && s.has(e) || r != null && r.has(e) || n.test(e)) && (l[e] = a[e]);
20
+ return l;
13
21
  }
14
22
  export {
15
- i as clsx,
16
- i as default
23
+ c as filterDOMProps
17
24
  };
package/index162.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=new Set(["id"]),i=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),n=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),s=/^(data-.*)$/;function c(a,l={}){let{labelable:o,isLink:d,propNames:r}=l,t={};for(const e in a)Object.prototype.hasOwnProperty.call(a,e)&&(b.has(e)||o&&i.has(e)||d&&n.has(e)||r!=null&&r.has(e)||s.test(e))&&(t[e]=a[e]);return t}exports.filterDOMProps=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(l){if(n())l.focus({preventScroll:!0});else{let e=s(l);l.focus(),f(e)}}let r=null;function n(){if(r==null){r=!1;try{document.createElement("div").focus({get preventScroll(){return r=!0,!0}})}catch{}}return r}function s(l){let e=l.parentNode,o=[],t=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==t;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&o.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return t instanceof HTMLElement&&o.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),o}function f(l){for(let{element:e,scrollTop:o,scrollLeft:t}of l)e.scrollTop=o,e.scrollLeft=t}exports.focusWithoutScrolling=c;