@okam/stack-ui 1.27.0 → 1.27.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 (361) hide show
  1. package/components/Carousel/components/CarouselNavigationButton.d.ts +1 -1
  2. package/index.d.ts +2 -0
  3. package/index.js +1 -1
  4. package/index.mjs +158 -151
  5. package/index10.js +1 -1
  6. package/index10.mjs +2 -2
  7. package/index100.js +1 -2
  8. package/index100.mjs +17 -12
  9. package/index101.js +2 -1
  10. package/index101.mjs +22 -45
  11. package/index102.js +1 -1
  12. package/index102.mjs +1 -1
  13. package/index103.js +1 -1
  14. package/index103.mjs +1 -1
  15. package/index107.js +1 -1
  16. package/index107.mjs +1 -1
  17. package/index108.js +1 -1
  18. package/index108.mjs +1 -1
  19. package/index11.js +1 -1
  20. package/index11.mjs +3 -3
  21. package/index112.js +1 -1
  22. package/index112.mjs +1 -1
  23. package/index113.js +1 -1
  24. package/index113.mjs +1 -1
  25. package/index114.js +1 -1
  26. package/index114.mjs +2 -2
  27. package/index116.js +1 -1
  28. package/index116.mjs +1 -1
  29. package/index118.js +1 -1
  30. package/index118.mjs +1 -1
  31. package/index119.js +1 -1
  32. package/index119.mjs +1 -1
  33. package/index12.js +2 -1
  34. package/index12.mjs +45 -15
  35. package/index121.js +1 -1
  36. package/index121.mjs +1 -1
  37. package/index122.js +1 -1
  38. package/index122.mjs +3 -3
  39. package/index124.js +1 -1
  40. package/index124.mjs +1 -1
  41. package/index125.js +1 -1
  42. package/index125.mjs +2 -2
  43. package/index128.js +1 -1
  44. package/index128.mjs +1 -1
  45. package/index13.js +1 -2
  46. package/index13.mjs +17 -20
  47. package/index131.js +1 -1
  48. package/index131.mjs +1 -1
  49. package/index132.js +1 -1
  50. package/index132.mjs +1 -1
  51. package/index134.js +1 -1
  52. package/index134.mjs +1 -1
  53. package/index135.js +1 -1
  54. package/index135.mjs +1 -1
  55. package/index138.js +1 -1
  56. package/index138.mjs +1 -1
  57. package/index139.js +1 -1
  58. package/index139.mjs +3 -3
  59. package/index14.js +1 -1
  60. package/index14.mjs +18 -17
  61. package/index140.js +1 -1
  62. package/index140.mjs +2 -2
  63. package/index15.js +1 -1
  64. package/index15.mjs +16 -83
  65. package/index16.js +1 -1
  66. package/index16.mjs +81 -28
  67. package/index17.js +1 -1
  68. package/index17.mjs +30 -32
  69. package/index174.js +1 -1
  70. package/index174.mjs +2 -2
  71. package/index175.js +1 -1
  72. package/index175.mjs +2 -2
  73. package/index176.js +1 -1
  74. package/index176.mjs +2 -2
  75. package/index177.js +1 -1
  76. package/index177.mjs +2 -2
  77. package/index178.js +1 -1
  78. package/index178.mjs +3 -3
  79. package/index179.js +1 -1
  80. package/index179.mjs +4 -4
  81. package/index18.js +1 -1
  82. package/index18.mjs +33 -31
  83. package/index180.js +1 -1
  84. package/index180.mjs +1 -1
  85. package/index181.js +1 -1
  86. package/index181.mjs +2 -2
  87. package/index182.js +1 -1
  88. package/index182.mjs +1 -1
  89. package/index183.js +1 -1
  90. package/index183.mjs +2 -2
  91. package/index184.js +1 -1
  92. package/index184.mjs +1 -1
  93. package/index185.js +1 -1
  94. package/index185.mjs +2 -2
  95. package/index186.js +1 -1
  96. package/index186.mjs +1 -1
  97. package/index187.js +1 -1
  98. package/index187.mjs +2 -2
  99. package/index188.js +1 -1
  100. package/index188.mjs +1 -1
  101. package/index19.js +1 -1
  102. package/index19.mjs +30 -33
  103. package/index191.js +1 -1
  104. package/index191.mjs +4 -4
  105. package/index192.js +1 -1
  106. package/index192.mjs +2 -2
  107. package/index193.js +1 -1
  108. package/index193.mjs +5 -5
  109. package/index194.js +1 -1
  110. package/index194.mjs +4 -4
  111. package/index195.js +1 -1
  112. package/index195.mjs +5 -5
  113. package/index196.js +1 -1
  114. package/index196.mjs +5 -5
  115. package/index197.js +1 -1
  116. package/index197.mjs +2 -2
  117. package/index2.js +1 -1
  118. package/index2.mjs +20 -20
  119. package/index20.js +1 -1
  120. package/index20.mjs +32 -67
  121. package/index208.js +1 -1
  122. package/index208.mjs +2 -2
  123. package/index21.js +1 -1
  124. package/index21.mjs +61 -58
  125. package/index210.js +1 -1
  126. package/index210.mjs +1 -1
  127. package/index213.js +1 -1
  128. package/index213.mjs +1 -1
  129. package/index22.js +1 -1
  130. package/index22.mjs +66 -52
  131. package/index224.js +1 -1
  132. package/index224.mjs +123 -306
  133. package/index225.js +1 -1
  134. package/index225.mjs +173 -186
  135. package/index226.js +1 -1
  136. package/index226.mjs +9 -8
  137. package/index227.js +1 -1
  138. package/index227.mjs +3 -26
  139. package/index228.js +1 -1
  140. package/index228.mjs +34 -53
  141. package/index229.js +1 -1
  142. package/index229.mjs +5 -46
  143. package/index23.js +1 -1
  144. package/index23.mjs +37 -41
  145. package/index230.js +1 -1
  146. package/index230.mjs +28 -123
  147. package/index231.js +1 -1
  148. package/index231.mjs +6 -130
  149. package/index232.js +1 -1
  150. package/index232.mjs +293 -159
  151. package/index233.js +1 -1
  152. package/index233.mjs +192 -9
  153. package/index234.js +1 -1
  154. package/index234.mjs +8 -3
  155. package/index235.js +1 -1
  156. package/index235.mjs +25 -35
  157. package/index236.js +1 -1
  158. package/index236.mjs +55 -5
  159. package/index237.js +1 -1
  160. package/index237.mjs +44 -27
  161. package/index238.js +1 -1
  162. package/index238.mjs +124 -6
  163. package/index24.js +1 -1
  164. package/index24.mjs +57 -20
  165. package/index242.js +1 -1
  166. package/index242.mjs +1 -1
  167. package/index243.js +1 -1
  168. package/index243.mjs +1 -1
  169. package/index245.js +1 -1
  170. package/index245.mjs +1 -1
  171. package/index246.js +1 -1
  172. package/index246.mjs +2 -2
  173. package/index248.js +1 -1
  174. package/index248.mjs +1 -1
  175. package/index249.js +1 -1
  176. package/index249.mjs +3 -3
  177. package/index25.js +1 -1
  178. package/index25.mjs +20 -50
  179. package/index250.js +1 -1
  180. package/index250.mjs +2 -2
  181. package/index251.js +1 -1
  182. package/index251.mjs +2 -23
  183. package/index252.js +1 -1
  184. package/index252.mjs +23 -2
  185. package/index26.js +1 -1
  186. package/index26.mjs +50 -17
  187. package/index260.js +1 -1
  188. package/index260.mjs +6 -2
  189. package/index261.mjs +2 -2
  190. package/index262.mjs +2 -2
  191. package/index263.mjs +2 -2
  192. package/index264.js +1 -1
  193. package/index264.mjs +2 -72
  194. package/index265.js +1 -1
  195. package/index265.mjs +72 -2
  196. package/index266.mjs +2 -2
  197. package/index267.js +1 -1
  198. package/index267.mjs +2 -19
  199. package/index268.js +1 -1
  200. package/index268.mjs +19 -2
  201. package/index269.js +1 -1
  202. package/index269.mjs +2 -6
  203. package/index27.js +1 -1
  204. package/index27.mjs +16 -32
  205. package/index28.js +1 -1
  206. package/index28.mjs +32 -23
  207. package/index29.js +1 -1
  208. package/index29.mjs +24 -8
  209. package/index3.js +1 -1
  210. package/index3.mjs +1 -1
  211. package/index30.js +1 -1
  212. package/index30.mjs +8 -32
  213. package/index31.js +1 -1
  214. package/index31.mjs +29 -30
  215. package/index32.js +1 -1
  216. package/index32.mjs +28 -98
  217. package/index33.js +1 -1
  218. package/index33.mjs +102 -8
  219. package/index34.js +1 -1
  220. package/index34.mjs +8 -46
  221. package/index35.js +1 -1
  222. package/index35.mjs +46 -18
  223. package/index36.js +2 -1
  224. package/index36.mjs +19 -6
  225. package/index37.js +1 -1
  226. package/index37.mjs +6 -46
  227. package/index38.js +1 -1
  228. package/index38.mjs +45 -23
  229. package/index39.js +2 -1
  230. package/index39.mjs +26 -5
  231. package/index4.js +1 -1
  232. package/index4.mjs +5 -5
  233. package/index40.js +1 -1
  234. package/index40.mjs +4 -7
  235. package/index41.js +1 -1
  236. package/index41.mjs +5 -5
  237. package/index42.js +1 -1
  238. package/index42.mjs +8 -5
  239. package/index43.js +1 -1
  240. package/index43.mjs +2 -2
  241. package/index44.js +1 -1
  242. package/index44.mjs +1 -1
  243. package/index45.js +1 -1
  244. package/index45.mjs +4 -4
  245. package/index46.js +1 -1
  246. package/index46.mjs +3 -9
  247. package/index47.js +1 -1
  248. package/index47.mjs +7 -9
  249. package/index48.js +1 -1
  250. package/index48.mjs +9 -9
  251. package/index49.js +1 -1
  252. package/index49.mjs +13 -46
  253. package/index50.js +1 -1
  254. package/index50.mjs +46 -8
  255. package/index51.js +1 -1
  256. package/index51.mjs +6 -69
  257. package/index52.js +1 -1
  258. package/index52.mjs +71 -8
  259. package/index53.js +1 -1
  260. package/index53.mjs +7 -12
  261. package/index54.js +1 -1
  262. package/index54.mjs +12 -9
  263. package/index55.js +1 -1
  264. package/index55.mjs +10 -17
  265. package/index56.js +1 -1
  266. package/index56.mjs +17 -13
  267. package/index57.js +1 -1
  268. package/index57.mjs +5 -5
  269. package/index58.js +1 -1
  270. package/index58.mjs +6 -6
  271. package/index59.js +1 -1
  272. package/index59.mjs +10 -8
  273. package/index6.js +1 -1
  274. package/index6.mjs +1 -1
  275. package/index60.js +1 -1
  276. package/index60.mjs +5 -5
  277. package/index61.js +1 -1
  278. package/index61.mjs +6 -8
  279. package/index62.js +1 -1
  280. package/index62.mjs +13 -14
  281. package/index63.js +1 -2
  282. package/index63.mjs +14 -23
  283. package/index64.js +1 -1
  284. package/index64.mjs +21 -15
  285. package/index65.js +1 -1
  286. package/index65.mjs +16 -14
  287. package/index66.js +1 -1
  288. package/index66.mjs +13 -40
  289. package/index67.js +1 -1
  290. package/index67.mjs +39 -36
  291. package/index68.js +1 -1
  292. package/index68.mjs +37 -11
  293. package/index69.js +1 -1
  294. package/index69.mjs +11 -10
  295. package/index7.js +1 -1
  296. package/index7.mjs +2 -2
  297. package/index70.js +1 -1
  298. package/index70.mjs +10 -13
  299. package/index71.js +2 -1
  300. package/index71.mjs +15 -2
  301. package/index72.js +1 -1
  302. package/index72.mjs +11 -8
  303. package/index73.js +1 -2
  304. package/index73.mjs +1 -7
  305. package/index74.js +1 -1
  306. package/index74.mjs +7 -6
  307. package/index75.js +1 -1
  308. package/index75.mjs +6 -6
  309. package/index76.js +2 -1
  310. package/index76.mjs +8 -25
  311. package/index77.js +2 -1
  312. package/index77.mjs +8 -2
  313. package/index78.js +1 -6
  314. package/index78.mjs +25 -94
  315. package/index79.js +1 -1
  316. package/index79.mjs +2 -69
  317. package/index8.js +1 -1
  318. package/index8.mjs +5 -5
  319. package/index80.js +6 -1
  320. package/index80.mjs +82 -29
  321. package/index81.js +1 -42
  322. package/index81.mjs +64 -65
  323. package/index82.js +1 -1
  324. package/index82.mjs +32 -150
  325. package/index83.js +42 -9
  326. package/index83.mjs +65 -52
  327. package/index84.js +1 -1
  328. package/index84.mjs +145 -31
  329. package/index85.js +9 -1
  330. package/index85.mjs +54 -10
  331. package/index86.js +1 -1
  332. package/index86.mjs +38 -28
  333. package/index87.js +1 -1
  334. package/index87.mjs +12 -5
  335. package/index88.js +1 -12
  336. package/index88.mjs +31 -36
  337. package/index89.js +1 -1
  338. package/index89.mjs +6 -29
  339. package/index9.js +1 -1
  340. package/index9.mjs +4 -4
  341. package/index90.js +12 -1
  342. package/index90.mjs +39 -12
  343. package/index91.js +1 -7
  344. package/index91.mjs +23 -13
  345. package/index92.js +1 -15
  346. package/index92.mjs +9 -67
  347. package/index93.js +7 -1
  348. package/index93.mjs +17 -5
  349. package/index94.js +13 -14
  350. package/index94.mjs +63 -17
  351. package/index95.js +1 -1
  352. package/index95.mjs +7 -42
  353. package/index96.js +16 -1
  354. package/index96.mjs +24 -44
  355. package/index97.js +1 -1
  356. package/index97.mjs +42 -48
  357. package/index98.js +1 -1
  358. package/index98.mjs +45 -17
  359. package/index99.js +1 -2
  360. package/index99.mjs +47 -21
  361. package/package.json +1 -1
package/index95.js CHANGED
@@ -1 +1 @@
1
- "use strict";const t=require("tailwind-variants"),e=t.tv({variants:{size:{h1:"text-5xl",h2:"text-4xl",h3:"text-3xl",h4:"text-2xl",h5:"text-xl",h6:"text-lg",leading:"text-md font-bold leading-normal",paragraph:"text-md inline",footnotes:"text-sm",xs:"text-xs"},font:{body:"font-body"},weight:{normal:"font-normal",light:"font-light",bold:"font-bold"},color:{gray:"text-gray-500",white:"text-white"},isError:{true:"text-sm text-error py-3"},align:{center:"text-center",left:"text-left",right:"text-right"}},defaultVariants:{size:"paragraph",font:"body"}});module.exports=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("tailwind-variants"),n=e.tv({base:"m-auto fixed right-0 top-0 bottom-0 w-full max-w-[512px] [&>div]:h-full"}),t=e.tv({base:"h-full w-full flex justify-end"}),l=e.tv({base:"bg-black h-full w-full overflow-y-auto"});exports.sidePanelContainer=t;exports.sidePanelInnerContainer=l;exports.sidePanelWrapper=n;
package/index95.mjs CHANGED
@@ -1,44 +1,9 @@
1
- import { tv as t } from "tailwind-variants";
2
- const o = t({
3
- variants: {
4
- size: {
5
- h1: "text-5xl",
6
- h2: "text-4xl",
7
- h3: "text-3xl",
8
- h4: "text-2xl",
9
- h5: "text-xl",
10
- h6: "text-lg",
11
- leading: "text-md font-bold leading-normal",
12
- paragraph: "text-md inline",
13
- footnotes: "text-sm",
14
- xs: "text-xs"
15
- },
16
- font: {
17
- body: "font-body"
18
- },
19
- weight: {
20
- normal: "font-normal",
21
- light: "font-light",
22
- bold: "font-bold"
23
- },
24
- color: {
25
- gray: "text-gray-500",
26
- white: "text-white"
27
- },
28
- isError: {
29
- true: "text-sm text-error py-3"
30
- },
31
- align: {
32
- center: "text-center",
33
- left: "text-left",
34
- right: "text-right"
35
- }
36
- },
37
- defaultVariants: {
38
- size: "paragraph",
39
- font: "body"
40
- }
41
- });
1
+ import { tv as e } from "tailwind-variants";
2
+ const o = e({
3
+ base: "m-auto fixed right-0 top-0 bottom-0 w-full max-w-[512px] [&>div]:h-full"
4
+ }), t = e({ base: "h-full w-full flex justify-end" }), a = e({ base: "bg-black h-full w-full overflow-y-auto" });
42
5
  export {
43
- o as default
6
+ t as sidePanelContainer,
7
+ a as sidePanelInnerContainer,
8
+ o as sidePanelWrapper
44
9
  };
package/index96.js CHANGED
@@ -1 +1,16 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@react-aria/utils"),b=require("./index138.js"),c=require("./index139.js"),p=require("./index140.js");function y(r,e,o){let{item:t}=r,i=s.useId(),n=s.useId(),d=e.disabledKeys.has(t.key),{itemProps:a}=c.useSelectableItem({selectionManager:e.selectionManager,key:t.key,ref:o}),{buttonProps:u}=b.useButton(s.mergeProps(a,{id:i,elementType:"button",isDisabled:d,onPress:()=>e.toggleKey(t.key)}),o),l=e.expandedKeys.has(t.key);return{buttonProps:{...u,"aria-expanded":l,"aria-controls":l?n:void 0},regionProps:{id:n,role:"region","aria-labelledby":i}}}function f(r,e,o){let{listProps:t}=p.useSelectableList({...r,...e,allowsTabNavigation:!0,disallowTypeAhead:!0,ref:o});return{accordionProps:{...t,tabIndex:void 0}}}exports.useAccordion=f;exports.useAccordionItem=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("tailwind-variants"),e=r.tv({base:`
2
+ w-full
3
+ min-h-32
4
+ rounded-2xl
5
+ px-6
6
+ h-12
7
+ border-2
8
+ border-solid
9
+ transition
10
+ duration-300
11
+ ease-in-out
12
+ text-gray-2
13
+ placeholder:text-gray-2
14
+ focus-ring-black
15
+
16
+ `,variants:{isError:{true:"border-red-500"}}});exports.textArea=e;
package/index96.mjs CHANGED
@@ -1,47 +1,27 @@
1
- import { useId as i, mergeProps as b } from "@react-aria/utils";
2
- import { useButton as u } from "./index138.mjs";
3
- import { useSelectableItem as c } from "./index139.mjs";
4
- import { useSelectableList as f } from "./index140.mjs";
5
- function x(r, e, t) {
6
- let { item: o } = r, a = i(), d = i(), n = e.disabledKeys.has(o.key), { itemProps: l } = c({
7
- selectionManager: e.selectionManager,
8
- key: o.key,
9
- ref: t
10
- }), { buttonProps: p } = u(b(l, {
11
- id: a,
12
- elementType: "button",
13
- isDisabled: n,
14
- onPress: () => e.toggleKey(o.key)
15
- }), t), s = e.expandedKeys.has(o.key);
16
- return {
17
- buttonProps: {
18
- ...p,
19
- "aria-expanded": s,
20
- "aria-controls": s ? d : void 0
21
- },
22
- regionProps: {
23
- id: d,
24
- role: "region",
25
- "aria-labelledby": a
1
+ import { tv as r } from "tailwind-variants";
2
+ const t = r({
3
+ base: `
4
+ w-full
5
+ min-h-32
6
+ rounded-2xl
7
+ px-6
8
+ h-12
9
+ border-2
10
+ border-solid
11
+ transition
12
+ duration-300
13
+ ease-in-out
14
+ text-gray-2
15
+ placeholder:text-gray-2
16
+ focus-ring-black
17
+
18
+ `,
19
+ variants: {
20
+ isError: {
21
+ true: "border-red-500"
26
22
  }
27
- };
28
- }
29
- function g(r, e, t) {
30
- let { listProps: o } = f({
31
- ...r,
32
- ...e,
33
- allowsTabNavigation: !0,
34
- disallowTypeAhead: !0,
35
- ref: t
36
- });
37
- return {
38
- accordionProps: {
39
- ...o,
40
- tabIndex: void 0
41
- }
42
- };
43
- }
23
+ }
24
+ });
44
25
  export {
45
- g as useAccordion,
46
- x as useAccordionItem
26
+ t as textArea
47
27
  };
package/index97.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),y=require("./index96.js"),T=require("react"),m=require("react-aria"),R=require("react-use"),b=require("./index69.js"),F=require("./index128.js"),i=require("./index24.js"),w=require("./index6.js"),C=require("./index13.js"),I=r=>{const{item:c,tokens:l,customTheme:h}=r,{props:x,rendered:k,key:f}=c,{icon:u,title:q,onOpenChange:a,tokens:$,themeName:g}=x??{},{themeName:t=g}=r,d=T.useRef(null),{state:s,TransitionAnimation:j=F}=b.useAccordionCtx(),{buttonProps:{onClick:K,onKeyDown:B,onPointerDown:D,...N},regionProps:A}=y.useAccordionItem(r,s,d),o=s.selectionManager.selectedKeys.has(f),n={...l,isOpen:o,...$},p=P=>{P.continuePropagation(),s.selectionManager.select(c.key),s.toggleKey(c.key)};return R.useUpdateEffect(()=>{a==null||a(o)},[o]),e.jsxs(i.default,{themeName:`${t}.container`,tokens:n,customTheme:h,children:[e.jsx(m.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsxs(w.ButtonWithForwardRef,{...N,"aria-expanded":o,handlePress:p,ref:d,themeName:`${t}.button`,tokens:n,children:[e.jsx(i.default,{themeName:`${t}.title`,tokens:n,children:q}),u&&e.jsx(i.default,{themeName:`${t}.icon`,tokens:n,children:e.jsx(C,{icon:u})})]})}),e.jsx(j,{isVisible:o,themeName:`${t}.region`,...A,tokens:n,children:e.jsx(i.default,{themeName:`${t}.content`,tokens:n,children:e.jsx(m.FocusScope,{autoFocus:!0,children:k})})})]})};module.exports=I;
1
+ "use strict";const t=require("tailwind-variants"),e=t.tv({variants:{size:{h1:"text-5xl",h2:"text-4xl",h3:"text-3xl",h4:"text-2xl",h5:"text-xl",h6:"text-lg",leading:"text-md font-bold leading-normal",paragraph:"text-md inline",footnotes:"text-sm",xs:"text-xs"},font:{body:"font-body"},weight:{normal:"font-normal",light:"font-light",bold:"font-bold"},color:{gray:"text-gray-500",white:"text-white"},isError:{true:"text-sm text-error py-3"},align:{center:"text-center",left:"text-left",right:"text-right"}},defaultVariants:{size:"paragraph",font:"body"}});module.exports=e;
package/index97.mjs CHANGED
@@ -1,50 +1,44 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { useAccordionItem as T } from "./index96.mjs";
3
- import { useRef as F } from "react";
4
- import { FocusRing as I, FocusScope as R } from "react-aria";
5
- import { useUpdateEffect as w } from "react-use";
6
- import { useAccordionCtx as B } from "./index69.mjs";
7
- import C from "./index128.mjs";
8
- import i from "./index24.mjs";
9
- import { ButtonWithForwardRef as D } from "./index6.mjs";
10
- import K from "./index13.mjs";
11
- const L = (s) => {
12
- const { item: c, tokens: h, customTheme: f } = s, { props: u, rendered: p, key: k } = c, { icon: a, title: g, onOpenChange: m, tokens: N, themeName: $ } = u ?? {}, { themeName: o = $ } = s, d = F(null), { state: r, TransitionAnimation: x = C } = B(), {
13
- buttonProps: { onClick: j, onKeyDown: M, onPointerDown: E, ...P },
14
- regionProps: b
15
- } = T(s, r, d), n = r.selectionManager.selectedKeys.has(k), t = { ...h, isOpen: n, ...N }, y = (A) => {
16
- A.continuePropagation(), r.selectionManager.select(c.key), r.toggleKey(c.key);
17
- };
18
- return w(() => {
19
- m == null || m(n);
20
- }, [n]), /* @__PURE__ */ l(i, { themeName: `${o}.container`, tokens: t, customTheme: f, children: [
21
- /* @__PURE__ */ e(I, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ l(
22
- D,
23
- {
24
- ...P,
25
- "aria-expanded": n,
26
- handlePress: y,
27
- ref: d,
28
- themeName: `${o}.button`,
29
- tokens: t,
30
- children: [
31
- /* @__PURE__ */ e(i, { themeName: `${o}.title`, tokens: t, children: g }),
32
- a && /* @__PURE__ */ e(i, { themeName: `${o}.icon`, tokens: t, children: /* @__PURE__ */ e(K, { icon: a }) })
33
- ]
34
- }
35
- ) }),
36
- /* @__PURE__ */ e(
37
- x,
38
- {
39
- isVisible: n,
40
- themeName: `${o}.region`,
41
- ...b,
42
- tokens: t,
43
- children: /* @__PURE__ */ e(i, { themeName: `${o}.content`, tokens: t, children: /* @__PURE__ */ e(R, { autoFocus: !0, children: p }) })
44
- }
45
- )
46
- ] });
47
- };
1
+ import { tv as t } from "tailwind-variants";
2
+ const o = t({
3
+ variants: {
4
+ size: {
5
+ h1: "text-5xl",
6
+ h2: "text-4xl",
7
+ h3: "text-3xl",
8
+ h4: "text-2xl",
9
+ h5: "text-xl",
10
+ h6: "text-lg",
11
+ leading: "text-md font-bold leading-normal",
12
+ paragraph: "text-md inline",
13
+ footnotes: "text-sm",
14
+ xs: "text-xs"
15
+ },
16
+ font: {
17
+ body: "font-body"
18
+ },
19
+ weight: {
20
+ normal: "font-normal",
21
+ light: "font-light",
22
+ bold: "font-bold"
23
+ },
24
+ color: {
25
+ gray: "text-gray-500",
26
+ white: "text-white"
27
+ },
28
+ isError: {
29
+ true: "text-sm text-error py-3"
30
+ },
31
+ align: {
32
+ center: "text-center",
33
+ left: "text-left",
34
+ right: "text-right"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ size: "paragraph",
39
+ font: "body"
40
+ }
41
+ });
48
42
  export {
49
- L as default
43
+ o as default
50
44
  };
package/index98.js CHANGED
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),t=require("react-spring"),s="fixed",a=({isVisible:i,children:e})=>t.useTransition(i,{from:{opacity:0,position:s,left:0,top:0,zIndex:1e3,bottom:0,height:"100%"},enter:{opacity:1},leave:{opacity:0},config:t.config.stiff})((n,o)=>o&&r.jsx(t.animated.div,{style:n,children:e}));module.exports=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@react-aria/utils"),b=require("./index138.js"),c=require("./index139.js"),p=require("./index140.js");function y(r,e,o){let{item:t}=r,i=s.useId(),n=s.useId(),d=e.disabledKeys.has(t.key),{itemProps:a}=c.useSelectableItem({selectionManager:e.selectionManager,key:t.key,ref:o}),{buttonProps:u}=b.useButton(s.mergeProps(a,{id:i,elementType:"button",isDisabled:d,onPress:()=>e.toggleKey(t.key)}),o),l=e.expandedKeys.has(t.key);return{buttonProps:{...u,"aria-expanded":l,"aria-controls":l?n:void 0},regionProps:{id:n,role:"region","aria-labelledby":i}}}function f(r,e,o){let{listProps:t}=p.useSelectableList({...r,...e,allowsTabNavigation:!0,disallowTypeAhead:!0,ref:o});return{accordionProps:{...t,tabIndex:void 0}}}exports.useAccordion=f;exports.useAccordionItem=y;
package/index98.mjs CHANGED
@@ -1,19 +1,47 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { useTransition as a, config as r, animated as s } from "react-spring";
3
- const f = "fixed", m = ({ isVisible: t, children: i }) => a(t, {
4
- from: {
5
- opacity: 0,
6
- position: f,
7
- left: 0,
8
- top: 0,
9
- zIndex: 1e3,
10
- bottom: 0,
11
- height: "100%"
12
- },
13
- enter: { opacity: 1 },
14
- leave: { opacity: 0 },
15
- config: r.stiff
16
- })((o, n) => n && /* @__PURE__ */ e(s.div, { style: o, children: i }));
1
+ import { useId as i, mergeProps as b } from "@react-aria/utils";
2
+ import { useButton as u } from "./index138.mjs";
3
+ import { useSelectableItem as c } from "./index139.mjs";
4
+ import { useSelectableList as f } from "./index140.mjs";
5
+ function x(r, e, t) {
6
+ let { item: o } = r, a = i(), d = i(), n = e.disabledKeys.has(o.key), { itemProps: l } = c({
7
+ selectionManager: e.selectionManager,
8
+ key: o.key,
9
+ ref: t
10
+ }), { buttonProps: p } = u(b(l, {
11
+ id: a,
12
+ elementType: "button",
13
+ isDisabled: n,
14
+ onPress: () => e.toggleKey(o.key)
15
+ }), t), s = e.expandedKeys.has(o.key);
16
+ return {
17
+ buttonProps: {
18
+ ...p,
19
+ "aria-expanded": s,
20
+ "aria-controls": s ? d : void 0
21
+ },
22
+ regionProps: {
23
+ id: d,
24
+ role: "region",
25
+ "aria-labelledby": a
26
+ }
27
+ };
28
+ }
29
+ function g(r, e, t) {
30
+ let { listProps: o } = f({
31
+ ...r,
32
+ ...e,
33
+ allowsTabNavigation: !0,
34
+ disallowTypeAhead: !0,
35
+ ref: t
36
+ });
37
+ return {
38
+ accordionProps: {
39
+ ...o,
40
+ tabIndex: void 0
41
+ }
42
+ };
43
+ }
17
44
  export {
18
- m as default
45
+ g as useAccordion,
46
+ x as useAccordionItem
19
47
  };
package/index99.js CHANGED
@@ -1,2 +1 @@
1
- "use client";
2
- "use strict";const n=require("@react-aria/utils"),p=require("react-aria");function P(o,s,t){const{type:l="dialog"}=o,{triggerProps:{onPress:a,...i},overlayProps:g}=p.useOverlayTrigger({type:l},s,t),e={handlePress:a,...i},r=n.useSlotId();return{openTriggerProps:{"aria-labelledby":r,...e},triggerProps:e,labelProps:{id:r},overlayProps:{...g,"aria-labelledby":r}}}module.exports=P;
1
+ "use strict";const e=require("react/jsx-runtime"),y=require("./index98.js"),T=require("react"),m=require("react-aria"),R=require("react-use"),b=require("./index70.js"),F=require("./index128.js"),i=require("./index25.js"),w=require("./index6.js"),C=require("./index14.js"),I=r=>{const{item:c,tokens:l,customTheme:h}=r,{props:x,rendered:k,key:f}=c,{icon:u,title:q,onOpenChange:a,tokens:$,themeName:g}=x??{},{themeName:t=g}=r,d=T.useRef(null),{state:s,TransitionAnimation:j=F}=b.useAccordionCtx(),{buttonProps:{onClick:K,onKeyDown:B,onPointerDown:D,...N},regionProps:A}=y.useAccordionItem(r,s,d),o=s.selectionManager.selectedKeys.has(f),n={...l,isOpen:o,...$},p=P=>{P.continuePropagation(),s.selectionManager.select(c.key),s.toggleKey(c.key)};return R.useUpdateEffect(()=>{a==null||a(o)},[o]),e.jsxs(i.default,{themeName:`${t}.container`,tokens:n,customTheme:h,children:[e.jsx(m.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsxs(w.ButtonWithForwardRef,{...N,"aria-expanded":o,handlePress:p,ref:d,themeName:`${t}.button`,tokens:n,children:[e.jsx(i.default,{themeName:`${t}.title`,tokens:n,children:q}),u&&e.jsx(i.default,{themeName:`${t}.icon`,tokens:n,children:e.jsx(C,{icon:u})})]})}),e.jsx(j,{isVisible:o,themeName:`${t}.region`,...A,tokens:n,children:e.jsx(i.default,{themeName:`${t}.content`,tokens:n,children:e.jsx(m.FocusScope,{autoFocus:!0,children:k})})})]})};module.exports=I;
package/index99.mjs CHANGED
@@ -1,24 +1,50 @@
1
- "use client";
2
- import { useSlotId as i } from "@react-aria/utils";
3
- import { useOverlayTrigger as n } from "react-aria";
4
- function y(o, s, l) {
5
- const { type: a = "dialog" } = o, {
6
- triggerProps: { onPress: t, ...p },
7
- overlayProps: g
8
- } = n({ type: a }, s, l), e = {
9
- handlePress: t,
10
- ...p
11
- }, r = i();
12
- return {
13
- openTriggerProps: {
14
- "aria-labelledby": r,
15
- ...e
16
- },
17
- triggerProps: e,
18
- labelProps: { id: r },
19
- overlayProps: { ...g, "aria-labelledby": r }
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { useAccordionItem as T } from "./index98.mjs";
3
+ import { useRef as F } from "react";
4
+ import { FocusRing as I, FocusScope as R } from "react-aria";
5
+ import { useUpdateEffect as w } from "react-use";
6
+ import { useAccordionCtx as B } from "./index70.mjs";
7
+ import C from "./index128.mjs";
8
+ import i from "./index25.mjs";
9
+ import { ButtonWithForwardRef as D } from "./index6.mjs";
10
+ import K from "./index14.mjs";
11
+ const L = (s) => {
12
+ const { item: c, tokens: h, customTheme: f } = s, { props: u, rendered: p, key: k } = c, { icon: a, title: g, onOpenChange: m, tokens: N, themeName: $ } = u ?? {}, { themeName: o = $ } = s, d = F(null), { state: r, TransitionAnimation: x = C } = B(), {
13
+ buttonProps: { onClick: j, onKeyDown: M, onPointerDown: E, ...P },
14
+ regionProps: b
15
+ } = T(s, r, d), n = r.selectionManager.selectedKeys.has(k), t = { ...h, isOpen: n, ...N }, y = (A) => {
16
+ A.continuePropagation(), r.selectionManager.select(c.key), r.toggleKey(c.key);
20
17
  };
21
- }
18
+ return w(() => {
19
+ m == null || m(n);
20
+ }, [n]), /* @__PURE__ */ l(i, { themeName: `${o}.container`, tokens: t, customTheme: f, children: [
21
+ /* @__PURE__ */ e(I, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ l(
22
+ D,
23
+ {
24
+ ...P,
25
+ "aria-expanded": n,
26
+ handlePress: y,
27
+ ref: d,
28
+ themeName: `${o}.button`,
29
+ tokens: t,
30
+ children: [
31
+ /* @__PURE__ */ e(i, { themeName: `${o}.title`, tokens: t, children: g }),
32
+ a && /* @__PURE__ */ e(i, { themeName: `${o}.icon`, tokens: t, children: /* @__PURE__ */ e(K, { icon: a }) })
33
+ ]
34
+ }
35
+ ) }),
36
+ /* @__PURE__ */ e(
37
+ x,
38
+ {
39
+ isVisible: n,
40
+ themeName: `${o}.region`,
41
+ ...b,
42
+ tokens: t,
43
+ children: /* @__PURE__ */ e(i, { themeName: `${o}.content`, tokens: t, children: /* @__PURE__ */ e(R, { autoFocus: !0, children: p }) })
44
+ }
45
+ )
46
+ ] });
47
+ };
22
48
  export {
23
- y as default
49
+ L as default
24
50
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@okam/stack-ui",
3
3
  "main": "./index.js",
4
- "version": "1.27.0",
4
+ "version": "1.27.3",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
7
7
  ".": {