@okam/stack-ui 1.44.0 → 1.44.3

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 (347) hide show
  1. package/CHANGELOG.md +82 -4
  2. package/components/Popover/interface.d.ts +3 -3
  3. package/components/TagGroup/interface.d.ts +2 -2
  4. package/index.d.ts +2 -0
  5. package/index149.js +1 -1
  6. package/index149.mjs +4 -4
  7. package/index155.js +1 -1
  8. package/index155.mjs +4 -4
  9. package/index157.js +1 -1
  10. package/index157.mjs +4 -4
  11. package/index158.js +1 -1
  12. package/index158.mjs +2 -2
  13. package/index159.js +1 -1
  14. package/index159.mjs +1 -1
  15. package/index160.js +1 -1
  16. package/index160.mjs +1 -1
  17. package/index161.js +1 -2
  18. package/index161.mjs +39 -12
  19. package/index162.js +1 -1
  20. package/index162.mjs +12 -38
  21. package/index163.js +2 -1
  22. package/index163.mjs +26 -11
  23. package/index164.js +2 -1
  24. package/index164.mjs +38 -13
  25. package/index165.js +1 -1
  26. package/index165.mjs +21 -38
  27. package/index166.js +1 -2
  28. package/index166.mjs +44 -24
  29. package/index167.js +1 -1
  30. package/index167.mjs +25 -22
  31. package/index168.js +1 -1
  32. package/index168.mjs +40 -45
  33. package/index169.js +2 -1
  34. package/index169.mjs +57 -25
  35. package/index170.js +1 -1
  36. package/index170.mjs +39 -41
  37. package/index171.js +1 -2
  38. package/index171.mjs +30 -57
  39. package/index172.js +2 -1
  40. package/index172.mjs +8 -38
  41. package/index173.js +2 -1
  42. package/index173.mjs +9 -30
  43. package/index174.js +1 -2
  44. package/index174.mjs +32 -9
  45. package/index175.js +1 -2
  46. package/index175.mjs +14 -9
  47. package/index176.js +1 -1
  48. package/index176.mjs +16 -31
  49. package/index177.js +1 -1
  50. package/index177.mjs +11 -15
  51. package/index178.js +2 -1
  52. package/index178.mjs +47 -16
  53. package/index179.js +1 -2
  54. package/index179.mjs +36 -46
  55. package/index180.js +1 -1
  56. package/index180.mjs +31 -36
  57. package/index181.js +1 -1
  58. package/index181.mjs +20 -31
  59. package/index182.js +1 -1
  60. package/index182.mjs +32 -18
  61. package/index183.js +1 -1
  62. package/index183.mjs +14 -36
  63. package/index185.js +1 -1
  64. package/index185.mjs +3 -3
  65. package/index186.js +1 -1
  66. package/index186.mjs +23 -23
  67. package/index188.js +1 -1
  68. package/index188.mjs +5 -2025
  69. package/index189.js +2 -1
  70. package/index189.mjs +48 -58
  71. package/index190.js +1 -1
  72. package/index190.mjs +2010 -174
  73. package/index191.js +1 -1
  74. package/index191.mjs +59 -5
  75. package/index192.js +1 -2
  76. package/index192.mjs +186 -47
  77. package/index193.js +1 -1
  78. package/index193.mjs +203 -11
  79. package/index194.js +1 -1
  80. package/index194.mjs +51 -190
  81. package/index195.js +1 -1
  82. package/index195.mjs +130 -51
  83. package/index196.js +1 -1
  84. package/index196.mjs +111 -130
  85. package/index197.js +1 -1
  86. package/index197.mjs +205 -105
  87. package/index198.js +1 -1
  88. package/index198.mjs +169 -203
  89. package/index199.js +1 -1
  90. package/index199.mjs +61 -182
  91. package/index2.mjs +35 -35
  92. package/index200.js +1 -1
  93. package/index200.mjs +270 -60
  94. package/index201.js +1 -1
  95. package/index201.mjs +89 -270
  96. package/index202.js +1 -1
  97. package/index202.mjs +182 -92
  98. package/index203.js +1 -1
  99. package/index203.mjs +78 -182
  100. package/index204.js +1 -1
  101. package/index204.mjs +49 -75
  102. package/index205.js +1 -1
  103. package/index205.mjs +117 -49
  104. package/index206.js +1 -1
  105. package/index206.mjs +108 -118
  106. package/index207.js +1 -1
  107. package/index207.mjs +112 -106
  108. package/index208.js +1 -1
  109. package/index208.mjs +63 -113
  110. package/index209.js +1 -1
  111. package/index209.mjs +108 -70
  112. package/index210.js +1 -1
  113. package/index210.mjs +50 -108
  114. package/index211.js +1 -1
  115. package/index211.mjs +75 -34
  116. package/index212.js +1 -1
  117. package/index212.mjs +48 -71
  118. package/index213.js +1 -1
  119. package/index213.mjs +43 -57
  120. package/index214.js +1 -1
  121. package/index214.mjs +86 -43
  122. package/index215.js +5 -1
  123. package/index215.mjs +62 -81
  124. package/index216.js +1 -5
  125. package/index216.mjs +11 -80
  126. package/index217.js +1 -1
  127. package/index217.mjs +119 -125
  128. package/index218.js +1 -1
  129. package/index218.mjs +129 -185
  130. package/index219.js +1 -1
  131. package/index219.mjs +72 -121
  132. package/index220.js +1 -1
  133. package/index220.mjs +12 -132
  134. package/index221.js +1 -1
  135. package/index221.mjs +89 -69
  136. package/index222.js +1 -1
  137. package/index222.mjs +104 -12
  138. package/index223.js +1 -1
  139. package/index223.mjs +4 -95
  140. package/index224.js +1 -1
  141. package/index224.mjs +3 -106
  142. package/index225.js +1 -1
  143. package/index225.mjs +125 -4
  144. package/index226.js +1 -1
  145. package/index226.mjs +29 -3
  146. package/index227.js +1 -1
  147. package/index227.mjs +39 -113
  148. package/index228.js +1 -1
  149. package/index228.mjs +34 -19
  150. package/index229.js +1 -1
  151. package/index229.mjs +26 -40
  152. package/index230.js +1 -1
  153. package/index230.mjs +98 -29
  154. package/index231.js +1 -1
  155. package/index231.mjs +68 -28
  156. package/index232.js +1 -1
  157. package/index232.mjs +78 -90
  158. package/index233.js +1 -1
  159. package/index233.mjs +98 -78
  160. package/index234.js +1 -1
  161. package/index234.mjs +125 -96
  162. package/index235.js +1 -1
  163. package/index235.mjs +191 -98
  164. package/index236.js +1 -1
  165. package/index236.mjs +4 -126
  166. package/index237.js +1 -1
  167. package/index237.mjs +20 -67
  168. package/index238.js +1 -7
  169. package/index238.mjs +39 -431
  170. package/index239.js +1 -1
  171. package/index239.mjs +4 -57
  172. package/index240.js +1 -1
  173. package/index240.mjs +24 -3
  174. package/index241.js +1 -1
  175. package/index241.mjs +12 -25
  176. package/index242.js +1 -1
  177. package/index242.mjs +4 -47
  178. package/index243.js +1 -1
  179. package/index243.mjs +14 -5
  180. package/index244.js +1 -1
  181. package/index244.mjs +40 -22
  182. package/index245.js +1 -1
  183. package/index245.mjs +57 -11
  184. package/index246.js +1 -1
  185. package/index246.mjs +43 -4
  186. package/index247.js +1 -1
  187. package/index247.mjs +31 -13
  188. package/index248.js +1 -1
  189. package/index248.mjs +31 -42
  190. package/index249.js +1 -1
  191. package/index249.mjs +13 -57
  192. package/index250.js +1 -1
  193. package/index250.mjs +10 -43
  194. package/index251.js +1 -1
  195. package/index251.mjs +28 -31
  196. package/index252.js +1 -1
  197. package/index252.mjs +14 -30
  198. package/index253.js +1 -1
  199. package/index253.mjs +9 -14
  200. package/index254.js +1 -1
  201. package/index254.mjs +6 -10
  202. package/index255.js +1 -1
  203. package/index255.mjs +5 -29
  204. package/index256.js +1 -1
  205. package/index256.mjs +7 -15
  206. package/index257.js +1 -1
  207. package/index257.mjs +29 -9
  208. package/index258.js +1 -1
  209. package/index258.mjs +17 -6
  210. package/index259.js +1 -1
  211. package/index259.mjs +44 -5
  212. package/index260.js +1 -1
  213. package/index260.mjs +8 -7
  214. package/index261.js +1 -1
  215. package/index261.mjs +13 -26
  216. package/index262.js +1 -1
  217. package/index262.mjs +3 -18
  218. package/index263.js +1 -1
  219. package/index263.mjs +18 -43
  220. package/index264.js +1 -1
  221. package/index264.mjs +33 -7
  222. package/index265.js +1 -1
  223. package/index265.mjs +22 -16
  224. package/index266.js +1 -1
  225. package/index266.mjs +10 -3
  226. package/index267.js +1 -1
  227. package/index267.mjs +2 -18
  228. package/index268.js +1 -1
  229. package/index268.mjs +36 -34
  230. package/index269.js +1 -1
  231. package/index269.mjs +5 -22
  232. package/index270.js +1 -1
  233. package/index270.mjs +28 -53
  234. package/index271.js +1 -1
  235. package/index271.mjs +6 -27
  236. package/index272.js +1 -1
  237. package/index272.mjs +9 -144
  238. package/index273.js +1 -1
  239. package/index273.mjs +127 -207
  240. package/index274.js +1 -1
  241. package/index274.mjs +43 -22
  242. package/index275.js +1 -1
  243. package/index275.mjs +226 -44
  244. package/index276.js +1 -1
  245. package/index276.mjs +121 -42
  246. package/index277.js +1 -6
  247. package/index277.mjs +64 -105
  248. package/index278.js +7 -1
  249. package/index278.mjs +440 -72
  250. package/index279.js +1 -1
  251. package/index279.mjs +56 -72
  252. package/index28.js +1 -1
  253. package/index28.mjs +38 -94
  254. package/index280.js +1 -1
  255. package/index280.mjs +54 -7
  256. package/index281.js +1 -1
  257. package/index281.mjs +27 -11
  258. package/index282.js +1 -1
  259. package/index282.mjs +31 -9
  260. package/index283.js +1 -1
  261. package/index283.mjs +136 -125
  262. package/index284.js +1 -1
  263. package/index284.mjs +209 -39
  264. package/index285.js +1 -1
  265. package/index285.mjs +19 -228
  266. package/index286.js +1 -1
  267. package/index286.mjs +46 -28
  268. package/index287.js +1 -1
  269. package/index287.mjs +45 -8
  270. package/index288.js +6 -1
  271. package/index288.mjs +113 -3
  272. package/index289.js +1 -1
  273. package/index289.mjs +72 -37
  274. package/index29.js +1 -1
  275. package/index29.mjs +2 -2
  276. package/index290.js +1 -1
  277. package/index290.mjs +74 -5
  278. package/index291.js +1 -1
  279. package/index291.mjs +7 -29
  280. package/index292.js +1 -1
  281. package/index292.mjs +11 -6
  282. package/index30.js +1 -1
  283. package/index30.mjs +1 -1
  284. package/index329.js +1 -1
  285. package/index329.mjs +17 -59
  286. package/index33.js +1 -1
  287. package/index33.mjs +2 -2
  288. package/index330.js +1 -1
  289. package/index330.mjs +30 -7
  290. package/index331.js +1 -1
  291. package/index331.mjs +63 -27
  292. package/index332.js +1 -1
  293. package/index332.mjs +15 -87
  294. package/index333.js +1 -1
  295. package/index333.mjs +48 -7
  296. package/index334.js +1 -1
  297. package/index334.mjs +7 -26
  298. package/index335.js +1 -1
  299. package/index335.mjs +26 -32
  300. package/index336.js +1 -1
  301. package/index336.mjs +87 -6
  302. package/index337.js +1 -1
  303. package/index337.mjs +9 -6
  304. package/index338.js +1 -1
  305. package/index338.mjs +23 -48
  306. package/index339.js +1 -1
  307. package/index339.mjs +32 -28
  308. package/index34.js +1 -1
  309. package/index34.mjs +3 -3
  310. package/index340.js +1 -1
  311. package/index340.mjs +6 -15
  312. package/index341.js +1 -1
  313. package/index341.mjs +6 -21
  314. package/index342.js +1 -1
  315. package/index342.mjs +28 -28
  316. package/index345.js +1 -1
  317. package/index345.mjs +1 -1
  318. package/index35.js +1 -1
  319. package/index35.mjs +1 -1
  320. package/index36.js +1 -1
  321. package/index36.mjs +2 -2
  322. package/index38.js +1 -1
  323. package/index38.mjs +3 -3
  324. package/index39.js +1 -1
  325. package/index39.mjs +3 -3
  326. package/index40.js +1 -1
  327. package/index40.mjs +3 -3
  328. package/index42.js +1 -1
  329. package/index42.mjs +1 -1
  330. package/index44.js +1 -1
  331. package/index44.mjs +2 -2
  332. package/index45.js +1 -1
  333. package/index45.mjs +1 -1
  334. package/index48.js +1 -1
  335. package/index48.mjs +2 -2
  336. package/index52.js +1 -1
  337. package/index52.mjs +1 -1
  338. package/index54.js +1 -1
  339. package/index54.mjs +3 -3
  340. package/index56.js +1 -1
  341. package/index56.mjs +2 -2
  342. package/index57.js +1 -1
  343. package/index57.mjs +1 -1
  344. package/index59.js +1 -1
  345. package/index59.mjs +2 -2
  346. package/logger.d.ts +2 -2
  347. package/package.json +2 -2
package/index28.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const e=require("react/jsx-runtime");require("./index2.js");const R=require("./index3.js");require("@react-aria/accordion");const b=require("react");require("./index94.js");const q=require("./index37.js"),x=require("react-aria");require("react-use");require("@react-spring/web");const v=require("./index89.js"),w=require("./index6.js");require("./index152.js");const F=require("react-stately");require("./index5.js");require("./index8.js");require("react-div-100vh");require("./index91.js");require("@react-aria/focus");require("./index96.js");require("./index16.js");require("radashi");require("./index149.js");require("sanitize-html");require("@react-aria/i18n");require("react-hook-form");require("./index97.js");const B=require("./index95.js"),I=require("./index69.js"),M=require("./index153.js");require("./index161.js");require("./index162.js");require("./index93.js");require("./index92.js");require("./index163.js");require("./index53.js");require("./index55.js");require("./index58.js");require("./index63.js");require("./index164.js");require("./index62.js");require("./index64.js");require("./index65.js");require("./index66.js");require("./index67.js");require("./index68.js");require("./index70.js");require("./index71.js");require("./index72.js");require("./index73.js");require("./index74.js");require("./index75.js");require("./index76.js");require("./index77.js");require("./index78.js");require("./index79.js");require("./index80.js");require("./index81.js");require("./index82.js");require("./index83.js");require("./index84.js");require("./index85.js");require("./index86.js");require("./index87.js");require("./index88.js");require("./index90.js");require("./index117.js");const T=({value:n})=>n===""?e.jsx(M,{width:"16",height:"16"}):e.jsx(I,{width:"16",height:"16"}),Q=n=>{const{setUserSearchQuery:o}=B.useUserQueryValHook(),{label:c,themeName:r="search",tokens:f,customTheme:g,disabled:j,errorMessage:a,placeholder:k,icon:l,isDisabled:$}=n,i=$||j,h={...n,isDisabled:i},t=F.useSearchFieldState(h),d=b.useRef(null),{labelProps:S,inputProps:s,errorMessageProps:p,clearButtonProps:N}=x.useSearchField(h,t,d),C=b.useCallback(P=>{var m;o(t.value),(m=s.onChange)==null||m.call(s,P)},[o,t.value,s]),D=a!=null,u={...f,isError:D,isDisabled:i??!1},y=v(`${r}.input`,u,g);return e.jsxs(q.default,{themeName:`${r}.wrapper`,tokens:u,"aria-disabled":i??!1,children:[c&&e.jsx(q.default,{...S,as:"label",themeName:`${r}.label`,tokens:u,children:c}),e.jsxs(q.default,{themeName:`${r}.container`,tokens:u,children:[e.jsx("input",{ref:d,...s,onChange:C,placeholder:k,className:y,disabled:i}),e.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsxs(w.default,{isDisabled:i,handlePress:N.onPress,tokens:{isIconOnly:!0,buttonStyle:"hollow",isDisabled:i??!1},themeName:`${r}.icon`,"aria-label":"clear",children:[l==null&&e.jsx(T,{value:t.value}),l!=null&&l]})})]}),a&&e.jsx(R.default,{themeName:`${r}.errorMessage`,tokens:u,...p,children:a})]})};module.exports=Q;
2
+ "use strict";const e=require("react/jsx-runtime"),x=require("react"),f=require("react-aria"),R=require("react-stately"),v=require("./index89.js"),w=require("./index95.js"),c=require("./index37.js"),F=require("./index6.js"),B=require("./index69.js"),I=require("./index153.js"),M=require("./index3.js"),T=({value:a})=>a===""?e.jsx(I,{width:"16",height:"16"}):e.jsx(B,{width:"16",height:"16"}),Q=a=>{const{setUserSearchQuery:u}=w.useUserQueryValHook(),{label:h,themeName:s="search",tokens:g,customTheme:j,disabled:q,errorMessage:i,placeholder:k,icon:o,isDisabled:$}=a,r=$||q,d={...a,isDisabled:r},l=R.useSearchFieldState(d),m=x.useRef(null),{labelProps:S,inputProps:n,errorMessageProps:p,clearButtonProps:N}=f.useSearchField(d,l,m),C=x.useCallback(P=>{var b;u(l.value),(b=n.onChange)==null||b.call(n,P)},[u,l.value,n]),D=i!=null,t={...g,isError:D,isDisabled:r??!1},y=v(`${s}.input`,t,j);return e.jsxs(c.default,{themeName:`${s}.wrapper`,tokens:t,"aria-disabled":r??!1,children:[h&&e.jsx(c.default,{...S,as:"label",themeName:`${s}.label`,tokens:t,children:h}),e.jsxs(c.default,{themeName:`${s}.container`,tokens:t,children:[e.jsx("input",{ref:m,...n,onChange:C,placeholder:k,className:y,disabled:r}),e.jsx(f.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsxs(F.default,{isDisabled:r,handlePress:N.onPress,tokens:{isIconOnly:!0,buttonStyle:"hollow",isDisabled:r??!1},themeName:`${s}.icon`,"aria-label":"clear",children:[o==null&&e.jsx(T,{value:l.value}),o!=null&&o]})})]}),i&&e.jsx(M.default,{themeName:`${s}.errorMessage`,tokens:t,...p,children:i})]})};module.exports=Q;
package/index28.mjs CHANGED
@@ -1,122 +1,66 @@
1
1
  "use client";
2
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
3
- import "./index2.mjs";
4
- import T from "./index3.mjs";
5
- import "@react-aria/accordion";
6
- import v, { useCallback as w } from "react";
7
- import "./index94.mjs";
8
- import l from "./index37.mjs";
9
- import { useSearchField as F, FocusRing as R } from "react-aria";
10
- import "react-use";
11
- import "@react-spring/web";
2
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
+ import T, { useCallback as v } from "react";
4
+ import { useSearchField as w, FocusRing as F } from "react-aria";
5
+ import { useSearchFieldState as R } from "react-stately";
12
6
  import I from "./index89.mjs";
13
- import M from "./index6.mjs";
14
- import "./index152.mjs";
15
- import { useSearchFieldState as j } from "react-stately";
16
- import "./index5.mjs";
17
- import "./index8.mjs";
18
- import "react-div-100vh";
19
- import "./index91.mjs";
20
- import "@react-aria/focus";
21
- import "./index96.mjs";
22
- import "./index16.mjs";
23
- import "radashi";
24
- import "./index149.mjs";
25
- import "sanitize-html";
26
- import "@react-aria/i18n";
27
- import "react-hook-form";
28
- import "./index97.mjs";
29
- import { useUserQueryValHook as Q } from "./index95.mjs";
30
- import U from "./index69.mjs";
31
- import _ from "./index153.mjs";
32
- import "./index161.mjs";
33
- import "./index162.mjs";
34
- import "./index93.mjs";
35
- import "./index92.mjs";
36
- import "./index163.mjs";
37
- import "./index53.mjs";
38
- import "./index55.mjs";
39
- import "./index58.mjs";
40
- import "./index63.mjs";
41
- import "./index164.mjs";
42
- import "./index62.mjs";
43
- import "./index64.mjs";
44
- import "./index65.mjs";
45
- import "./index66.mjs";
46
- import "./index67.mjs";
47
- import "./index68.mjs";
48
- import "./index70.mjs";
49
- import "./index71.mjs";
50
- import "./index72.mjs";
51
- import "./index73.mjs";
52
- import "./index74.mjs";
53
- import "./index75.mjs";
54
- import "./index76.mjs";
55
- import "./index77.mjs";
56
- import "./index78.mjs";
57
- import "./index79.mjs";
58
- import "./index80.mjs";
59
- import "./index81.mjs";
60
- import "./index82.mjs";
61
- import "./index83.mjs";
62
- import "./index84.mjs";
63
- import "./index85.mjs";
64
- import "./index86.mjs";
65
- import "./index87.mjs";
66
- import "./index88.mjs";
67
- import "./index90.mjs";
68
- import "./index117.mjs";
69
- const E = ({ value: m }) => m === "" ? /* @__PURE__ */ r(_, { width: "16", height: "16" }) : /* @__PURE__ */ r(U, { width: "16", height: "16" }), Zr = (m) => {
70
- const { setUserSearchQuery: c } = Q(), {
71
- label: h,
72
- themeName: o = "search",
7
+ import { useUserQueryValHook as M } from "./index95.mjs";
8
+ import m from "./index37.mjs";
9
+ import j from "./index6.mjs";
10
+ import Q from "./index69.mjs";
11
+ import U from "./index153.mjs";
12
+ import _ from "./index3.mjs";
13
+ const E = ({ value: a }) => a === "" ? /* @__PURE__ */ e(U, { width: "16", height: "16" }) : /* @__PURE__ */ e(Q, { width: "16", height: "16" }), X = (a) => {
14
+ const { setUserSearchQuery: h } = M(), {
15
+ label: u,
16
+ themeName: s = "search",
73
17
  tokens: b,
74
18
  customTheme: g,
75
19
  disabled: k,
76
- errorMessage: p,
20
+ errorMessage: l,
77
21
  placeholder: C,
78
- icon: a,
22
+ icon: i,
79
23
  isDisabled: N
80
- } = m, t = N || k, u = { ...m, isDisabled: t }, s = j(u), d = v.useRef(null), { labelProps: S, inputProps: e, errorMessageProps: y, clearButtonProps: D } = F(u, s, d), $ = w(
24
+ } = a, r = N || k, d = { ...a, isDisabled: r }, n = R(d), f = T.useRef(null), { labelProps: S, inputProps: o, errorMessageProps: y, clearButtonProps: D } = w(d, n, f), $ = v(
81
25
  (P) => {
82
- var f;
83
- c(s.value), (f = e.onChange) == null || f.call(e, P);
26
+ var p;
27
+ h(n.value), (p = o.onChange) == null || p.call(o, P);
84
28
  },
85
- [c, s.value, e]
86
- ), x = p != null, i = { ...b, isError: x, isDisabled: t ?? !1 }, B = I(`${o}.input`, i, g);
87
- return /* @__PURE__ */ n(l, { themeName: `${o}.wrapper`, tokens: i, "aria-disabled": t ?? !1, children: [
88
- h && // eslint-disable-next-line jsx-a11y/label-has-associated-control
89
- /* @__PURE__ */ r(l, { ...S, as: "label", themeName: `${o}.label`, tokens: i, children: h }),
90
- /* @__PURE__ */ n(l, { themeName: `${o}.container`, tokens: i, children: [
91
- /* @__PURE__ */ r(
29
+ [h, n.value, o]
30
+ ), x = l != null, t = { ...b, isError: x, isDisabled: r ?? !1 }, B = I(`${s}.input`, t, g);
31
+ return /* @__PURE__ */ c(m, { themeName: `${s}.wrapper`, tokens: t, "aria-disabled": r ?? !1, children: [
32
+ u && // eslint-disable-next-line jsx-a11y/label-has-associated-control
33
+ /* @__PURE__ */ e(m, { ...S, as: "label", themeName: `${s}.label`, tokens: t, children: u }),
34
+ /* @__PURE__ */ c(m, { themeName: `${s}.container`, tokens: t, children: [
35
+ /* @__PURE__ */ e(
92
36
  "input",
93
37
  {
94
- ref: d,
95
- ...e,
38
+ ref: f,
39
+ ...o,
96
40
  onChange: $,
97
41
  placeholder: C,
98
42
  className: B,
99
- disabled: t
43
+ disabled: r
100
44
  }
101
45
  ),
102
- /* @__PURE__ */ r(R, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ n(
103
- M,
46
+ /* @__PURE__ */ e(F, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ c(
47
+ j,
104
48
  {
105
- isDisabled: t,
49
+ isDisabled: r,
106
50
  handlePress: D.onPress,
107
- tokens: { isIconOnly: !0, buttonStyle: "hollow", isDisabled: t ?? !1 },
108
- themeName: `${o}.icon`,
51
+ tokens: { isIconOnly: !0, buttonStyle: "hollow", isDisabled: r ?? !1 },
52
+ themeName: `${s}.icon`,
109
53
  "aria-label": "clear",
110
54
  children: [
111
- a == null && /* @__PURE__ */ r(E, { value: s.value }),
112
- a != null && a
55
+ i == null && /* @__PURE__ */ e(E, { value: n.value }),
56
+ i != null && i
113
57
  ]
114
58
  }
115
59
  ) })
116
60
  ] }),
117
- p && /* @__PURE__ */ r(T, { themeName: `${o}.errorMessage`, tokens: i, ...y, children: p })
61
+ l && /* @__PURE__ */ e(_, { themeName: `${s}.errorMessage`, tokens: t, ...y, children: l })
118
62
  ] });
119
63
  };
120
64
  export {
121
- Zr as default
65
+ X as default
122
66
  };
package/index280.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=e.createContext({});function r(){var t;return(t=e.useContext(o))!==null&&t!==void 0?t:{}}exports.PortalContext=o;exports.useUNSAFE_PortalContext=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index336.js"),c=require("react"),l=require("./index240.js"),m=require("./index241.js"),p=require("./index248.js");function B(b){let{isDisabled:v,onBlurWithin:i,onFocusWithin:s,onFocusWithinChange:t}=b,n=c.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:f}=p.useGlobalListeners(),r=c.useCallback(e=>{e.currentTarget.contains(e.target)&&n.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(n.current.isFocusWithin=!1,f(),i&&i(e),t&&t(!1))},[i,t,n,f]),g=o.useSyntheticBlurEvent(r),W=c.useCallback(e=>{if(!e.currentTarget.contains(e.target))return;const u=m.getOwnerDocument(e.target),T=l.getActiveElement(u);if(!n.current.isFocusWithin&&T===l.getEventTarget(e.nativeEvent)){s&&s(e),t&&t(!0),n.current.isFocusWithin=!0,g(e);let h=e.currentTarget;a(u,"focus",d=>{if(n.current.isFocusWithin&&!l.nodeContains(h,d.target)){let F=new u.defaultView.FocusEvent("blur",{relatedTarget:d.target});o.setEventTarget(F,h);let E=o.createSyntheticEvent(F);r(E)}},{capture:!0})}},[s,t,g,a,r]);return v?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:W,onBlur:r}}}exports.useFocusWithin=B;
package/index280.mjs CHANGED
@@ -1,10 +1,57 @@
1
- import { useContext as e, createContext as o } from "react";
2
- const r = /* @__PURE__ */ o({});
3
- function a() {
4
- var t;
5
- return (t = e(r)) !== null && t !== void 0 ? t : {};
1
+ import { useSyntheticBlurEvent as F, setEventTarget as W, createSyntheticEvent as v } from "./index336.mjs";
2
+ import { useRef as x, useCallback as $ } from "react";
3
+ import { getActiveElement as E, getEventTarget as T, nodeContains as B } from "./index240.mjs";
4
+ import { getOwnerDocument as G } from "./index241.mjs";
5
+ import { useGlobalListeners as L } from "./index248.mjs";
6
+ function S(b) {
7
+ let { isDisabled: h, onBlurWithin: i, onFocusWithin: o, onFocusWithinChange: t } = b, r = x({
8
+ isFocusWithin: !1
9
+ }), { addGlobalListener: c, removeAllGlobalListeners: s } = L(), n = $((e) => {
10
+ e.currentTarget.contains(e.target) && r.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget) && (r.current.isFocusWithin = !1, s(), i && i(e), t && t(!1));
11
+ }, [
12
+ i,
13
+ t,
14
+ r,
15
+ s
16
+ ]), u = F(n), g = $((e) => {
17
+ if (!e.currentTarget.contains(e.target)) return;
18
+ const a = G(e.target), p = E(a);
19
+ if (!r.current.isFocusWithin && p === T(e.nativeEvent)) {
20
+ o && o(e), t && t(!0), r.current.isFocusWithin = !0, u(e);
21
+ let f = e.currentTarget;
22
+ c(a, "focus", (l) => {
23
+ if (r.current.isFocusWithin && !B(f, l.target)) {
24
+ let d = new a.defaultView.FocusEvent("blur", {
25
+ relatedTarget: l.target
26
+ });
27
+ W(d, f);
28
+ let m = v(d);
29
+ n(m);
30
+ }
31
+ }, {
32
+ capture: !0
33
+ });
34
+ }
35
+ }, [
36
+ o,
37
+ t,
38
+ u,
39
+ c,
40
+ n
41
+ ]);
42
+ return h ? {
43
+ focusWithinProps: {
44
+ // These cannot be null, that would conflict in mergeProps
45
+ onFocus: void 0,
46
+ onBlur: void 0
47
+ }
48
+ } : {
49
+ focusWithinProps: {
50
+ onFocus: g,
51
+ onBlur: n
52
+ }
53
+ };
6
54
  }
7
55
  export {
8
- r as PortalContext,
9
- a as useUNSAFE_PortalContext
56
+ S as useFocusWithin
10
57
  };
package/index281.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index330.js"),e=require("react");function n({children:r}){let t=e.useMemo(()=>({register:()=>{}}),[]);return e.createElement(o.PressResponderContext.Provider,{value:t},r)}exports.ClearPressResponder=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");var u;const E=typeof document<"u"?(u=e.useInsertionEffect)!==null&&u!==void 0?u:e.useLayoutEffect:()=>{};function R(c,d,n){let[f,i]=e.useState(c||d),o=e.useRef(f),s=e.useRef(c!==void 0),r=c!==void 0;e.useEffect(()=>{let t=s.current;t!==r&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${t?"controlled":"uncontrolled"} to ${r?"controlled":"uncontrolled"}.`),s.current=r},[r]);let a=r?c:f;E(()=>{o.current=a});let[,$]=e.useReducer(()=>({}),{}),b=e.useCallback((t,...p)=>{let l=typeof t=="function"?t(o.current):t;Object.is(o.current,l)||(o.current=l,i(l),$(),n==null||n(l,...p))},[n]);return[a,b]}exports.useControlledState=R;
package/index281.mjs CHANGED
@@ -1,14 +1,30 @@
1
- import { PressResponderContext as t } from "./index330.mjs";
2
- import a, { useMemo as o } from "react";
3
- function n({ children: e }) {
4
- let r = o(() => ({
5
- register: () => {
6
- }
7
- }), []);
8
- return /* @__PURE__ */ a.createElement(t.Provider, {
9
- value: r
10
- }, e);
1
+ import s, { useState as R, useRef as d, useEffect as V, useReducer as m, useCallback as _ } from "react";
2
+ var l;
3
+ const y = typeof document < "u" ? (l = s.useInsertionEffect) !== null && l !== void 0 ? l : s.useLayoutEffect : () => {
4
+ };
5
+ function w(r, i, o) {
6
+ let [u, $] = R(r || i), c = d(u), f = d(r !== void 0), t = r !== void 0;
7
+ V(() => {
8
+ let e = f.current;
9
+ e !== t && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${e ? "controlled" : "uncontrolled"} to ${t ? "controlled" : "uncontrolled"}.`), f.current = t;
10
+ }, [
11
+ t
12
+ ]);
13
+ let a = t ? r : u;
14
+ y(() => {
15
+ c.current = a;
16
+ });
17
+ let [, p] = m(() => ({}), {}), E = _((e, ...b) => {
18
+ let n = typeof e == "function" ? e(c.current) : e;
19
+ Object.is(c.current, n) || (c.current = n, $(n), p(), o == null || o(n, ...b));
20
+ }, [
21
+ o
22
+ ]);
23
+ return [
24
+ a,
25
+ E
26
+ ];
11
27
  }
12
28
  export {
13
- n as ClearPressResponder
29
+ w as useControlledState
14
30
  };
package/index282.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=new WeakMap;function a(t,e,n){if(!t)return"";typeof e=="string"&&(e=e.replace(/\s+/g,""));let r=o.get(t);return process.env.NODE_ENV!=="production"&&!r&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${r}-${n}-${e}`}exports.generateId=a;exports.tabsIds=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index343.js"),y=require("./index281.js"),g=require("react");function K(t){var l;let[e,s]=y.useControlledState(t.selectedKey,(l=t.defaultSelectedKey)!==null&&l!==void 0?l:null,t.onSelectionChange),i=g.useMemo(()=>e!=null?[e]:[],[e]),{collection:a,disabledKeys:u,selectionManager:d}=S.useListState({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:o=>{if(o==="all")return;var n;let c=(n=o.values().next().value)!==null&&n!==void 0?n:null;c===e&&t.onSelectionChange&&t.onSelectionChange(c),s(c)}}),r=e!=null?a.getItem(e):null;return{collection:a,disabledKeys:u,selectionManager:d,selectedKey:e,setSelectedKey:s,selectedItem:r}}exports.useSingleSelectListState=K;
package/index282.mjs CHANGED
@@ -1,12 +1,34 @@
1
- const o = /* @__PURE__ */ new WeakMap();
2
- function n(r, e, a) {
3
- if (!r)
4
- return "";
5
- typeof e == "string" && (e = e.replace(/\s+/g, ""));
6
- let t = o.get(r);
7
- return process.env.NODE_ENV !== "production" && !t && console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."), `${t}-${a}-${e}`;
1
+ import { useListState as f } from "./index343.mjs";
2
+ import { useControlledState as S } from "./index281.mjs";
3
+ import { useMemo as y } from "react";
4
+ function g(l) {
5
+ var t;
6
+ let [e, c] = S(l.selectedKey, (t = l.defaultSelectedKey) !== null && t !== void 0 ? t : null, l.onSelectionChange), i = y(() => e != null ? [
7
+ e
8
+ ] : [], [
9
+ e
10
+ ]), { collection: o, disabledKeys: d, selectionManager: u } = f({
11
+ ...l,
12
+ selectionMode: "single",
13
+ disallowEmptySelection: !0,
14
+ allowDuplicateSelectionEvents: !0,
15
+ selectedKeys: i,
16
+ onSelectionChange: (s) => {
17
+ if (s === "all") return;
18
+ var n;
19
+ let a = (n = s.values().next().value) !== null && n !== void 0 ? n : null;
20
+ a === e && l.onSelectionChange && l.onSelectionChange(a), c(a);
21
+ }
22
+ }), r = e != null ? o.getItem(e) : null;
23
+ return {
24
+ collection: o,
25
+ disabledKeys: d,
26
+ selectionManager: u,
27
+ selectedKey: e,
28
+ setSelectedKey: c,
29
+ selectedItem: r
30
+ };
8
31
  }
9
32
  export {
10
- n as generateId,
11
- o as tabsIds
33
+ g as useSingleSelectListState
12
34
  };
package/index283.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index341.js"),z=require("./index185.js"),G=require("./index243.js"),C=require("./index158.js"),L=require("./index249.js"),H=require("./index267.js"),J=require("./index238.js"),Q=require("./index338.js"),W=require("./index340.js"),X=require("@react-aria/focus"),m=require("react");function Y(s){let{id:h,selectionManager:t,key:o,ref:r,shouldSelectOnPressUp:$,shouldUseVirtualFocus:c,focus:F,isDisabled:l,onAction:v,allowsDifferentPressOrigin:I,linkBehavior:u="action"}=s,w=L.useRouter();h=z.useId(h);let a=e=>{if(e.pointerType==="keyboard"&&O.isNonContiguousSelectionModifier(e))t.toggleSelection(o);else{if(t.selectionMode==="none")return;if(t.isLink(o)){if(u==="selection"&&r.current){let d=t.getItemProps(o);w.open(r.current,e,d.href,d.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(u==="override"||u==="none")return}t.selectionMode==="single"?t.isSelected(o)&&!t.disallowEmptySelection?t.toggleSelection(o):t.replaceSelection(o):e&&e.shiftKey?t.extendSelection(o):t.selectionBehavior==="toggle"||e&&(H.isCtrlKeyPressed(e)||e.pointerType==="touch"||e.pointerType==="virtual")?t.toggleSelection(o):t.replaceSelection(o)}};m.useEffect(()=>{o===t.focusedKey&&t.isFocused&&(c?X.moveVirtualFocus(r.current):F?F():document.activeElement!==r.current&&r.current&&W.focusSafely(r.current))},[r,o,t.focusedKey,t.childFocusStrategy,t.isFocused,c]),l=l||t.isDisabled(o);let f={};!c&&!l?f={tabIndex:o===t.focusedKey?0:-1,onFocus(e){e.target===r.current&&t.setFocusedKey(o)}}:l&&(f.onMouseDown=e=>{e.preventDefault()});let B=t.isLink(o)&&u==="override",M=v&&s.UNSTABLE_itemBehavior==="action",A=t.isLink(o)&&u!=="selection"&&u!=="none",n=!l&&t.canSelectItem(o)&&!B&&!M,k=(v||A)&&!l,p=k&&(t.selectionBehavior==="replace"?!n:!n||t.isEmpty),T=k&&n&&t.selectionBehavior==="replace",y=p||T,g=m.useRef(null),S=y&&n,D=m.useRef(!1),K=m.useRef(!1),P=t.getItemProps(o),b=e=>{if(v){var d;v(),(d=r.current)===null||d===void 0||d.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))}A&&r.current&&w.open(r.current,e,P.href,P.routerOptions)},i={ref:r};if($?(i.onPressStart=e=>{g.current=e.pointerType,D.current=S,e.pointerType==="keyboard"&&(!y||E())&&a(e)},I?(i.onPressUp=p?void 0:e=>{e.pointerType==="mouse"&&n&&a(e)},i.onPress=p?b:e=>{e.pointerType!=="keyboard"&&e.pointerType!=="mouse"&&n&&a(e)}):i.onPress=e=>{if(p||T&&e.pointerType!=="mouse"){if(e.pointerType==="keyboard"&&!q())return;b(e)}else e.pointerType!=="keyboard"&&n&&a(e)}):(i.onPressStart=e=>{g.current=e.pointerType,D.current=S,K.current=p,n&&(e.pointerType==="mouse"&&!p||e.pointerType==="keyboard"&&(!k||E()))&&a(e)},i.onPress=e=>{(e.pointerType==="touch"||e.pointerType==="pen"||e.pointerType==="virtual"||e.pointerType==="keyboard"&&y&&q()||e.pointerType==="mouse"&&K.current)&&(y?b(e):n&&a(e))}),f["data-collection"]=O.getCollectionId(t.collection),f["data-key"]=o,i.preventFocusOnPress=c,c&&(i=C.mergeProps(i,{onPressStart(e){e.pointerType!=="touch"&&(t.setFocused(!0),t.setFocusedKey(o))},onPress(e){e.pointerType==="touch"&&(t.setFocused(!0),t.setFocusedKey(o))}})),P)for(let e of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])P[e]&&(i[e]=G.chain(i[e],P[e]));let{pressProps:U,isPressed:R}=J.usePress(i),x=T?e=>{g.current==="mouse"&&(e.stopPropagation(),e.preventDefault(),b(e))}:void 0,{longPressProps:V}=Q.useLongPress({isDisabled:!S,onLongPress(e){e.pointerType==="touch"&&(a(e),t.setSelectionBehavior("toggle"))}}),N=e=>{g.current==="touch"&&D.current&&e.preventDefault()},j=u!=="none"&&t.isLink(o)?e=>{L.openLink.isOpening||e.preventDefault()}:void 0;return{itemProps:C.mergeProps(f,n||p||c&&!l?U:{},S?V:{},{onDoubleClick:x,onDragStartCapture:N,onClick:j,id:h},c?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:R,isSelected:t.isSelected(o),isFocused:t.isFocused&&t.focusedKey===o,isDisabled:l,allowsSelection:n,hasAction:y}}function q(){let s=window.event;return(s==null?void 0:s.key)==="Enter"}function E(){let s=window.event;return(s==null?void 0:s.key)===" "||(s==null?void 0:s.code)==="Space"}exports.useSelectableItem=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index284.js"),G=require("./index285.js"),v=require("react"),C=require("./index236.js"),U=require("./index251.js"),J=require("@react-aria/i18n");let t=typeof document<"u"?window.visualViewport:null;function K(l){let{direction:R}=J.useLocale(),{arrowSize:O,targetRef:p,overlayRef:i,arrowRef:s,scrollRef:u=i,placement:H="bottom",containerPadding:S=12,shouldFlip:B=!0,boundaryElement:b=typeof document<"u"?document.body:null,offset:q=0,crossOffset:T=0,shouldUpdatePosition:A=!0,isOpen:g=!0,onClose:m,maxHeight:x,arrowBoundaryOffset:F=0}=l,[e,I]=v.useState(null),N=[A,H,i.current,p.current,s==null?void 0:s.current,u.current,S,B,b,q,T,g,R,x,F,O],j=v.useRef(t==null?void 0:t.scale);v.useEffect(()=>{g&&(j.current=t==null?void 0:t.scale)},[g]);let d=v.useCallback(()=>{if(A===!1||!g||!i.current||!p.current||!b||(t==null?void 0:t.scale)!==j.current)return;let o=null;if(u.current&&u.current.contains(document.activeElement)){var a;let r=(a=document.activeElement)===null||a===void 0?void 0:a.getBoundingClientRect(),h=u.current.getBoundingClientRect();var c;if(o={type:"top",offset:((c=r==null?void 0:r.top)!==null&&c!==void 0?c:0)-h.top},o.offset>h.height/2){o.type="bottom";var z;o.offset=((z=r==null?void 0:r.bottom)!==null&&z!==void 0?z:0)-h.bottom}}let n=i.current;if(!x&&i.current){var L;n.style.top="0px",n.style.bottom="";var $;n.style.maxHeight=(($=(L=window.visualViewport)===null||L===void 0?void 0:L.height)!==null&&$!==void 0?$:window.innerHeight)+"px"}let f=k.calculatePosition({placement:W(H,R),overlayNode:i.current,targetNode:p.current,scrollNode:u.current||i.current,padding:S,shouldFlip:B,boundaryElement:b,offset:q,crossOffset:T,maxHeight:x,arrowSize:O??(s!=null&&s.current?k.getRect(s.current,!0).width:0),arrowBoundaryOffset:F});if(f.position){if(n.style.top="",n.style.bottom="",n.style.left="",n.style.right="",Object.keys(f.position).forEach(r=>n.style[r]=f.position[r]+"px"),n.style.maxHeight=f.maxHeight!=null?f.maxHeight+"px":"",o&&document.activeElement&&u.current){let r=document.activeElement.getBoundingClientRect(),h=u.current.getBoundingClientRect(),D=r[o.type]-h[o.type];u.current.scrollTop+=D-o.offset}I(f)}},N);C.useLayoutEffect(d,N),Q(d),U.useResizeObserver({ref:i,onResize:d}),U.useResizeObserver({ref:p,onResize:d});let y=v.useRef(!1);C.useLayoutEffect(()=>{let o,a=()=>{y.current=!0,clearTimeout(o),o=setTimeout(()=>{y.current=!1},500),d()},c=()=>{y.current&&a()};return t==null||t.addEventListener("resize",a),t==null||t.addEventListener("scroll",c),()=>{t==null||t.removeEventListener("resize",a),t==null||t.removeEventListener("scroll",c)}},[d]);let M=v.useCallback(()=>{y.current||m==null||m()},[m,y]);G.useCloseOnScroll({triggerRef:p,isOpen:g,onClose:m&&M});var E,P,w;return{overlayProps:{style:{position:e?"absolute":"fixed",top:e?void 0:0,left:e?void 0:0,zIndex:1e5,...e==null?void 0:e.position,maxHeight:(E=e==null?void 0:e.maxHeight)!==null&&E!==void 0?E:"100vh"}},placement:(P=e==null?void 0:e.placement)!==null&&P!==void 0?P:null,triggerAnchorPoint:(w=e==null?void 0:e.triggerAnchorPoint)!==null&&w!==void 0?w:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:e==null?void 0:e.arrowOffsetLeft,top:e==null?void 0:e.arrowOffsetTop}},updatePosition:d}}function Q(l){C.useLayoutEffect(()=>(window.addEventListener("resize",l,!1),()=>{window.removeEventListener("resize",l,!1)}),[l])}function W(l,R){return R==="rtl"?l.replace("start","right").replace("end","left"):l.replace("start","left").replace("end","right")}exports.useOverlayPosition=K;