@saas-ui/react 3.0.0-next.9 → 3.0.0-rc.0

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 (636) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -39
  3. package/dist/components/error-boundary/error-boundary.d.ts +28 -0
  4. package/dist/components/error-boundary/error-boundary.js +32 -0
  5. package/dist/components/error-boundary/error-provider.d.ts +11 -0
  6. package/dist/components/error-boundary/error-provider.js +9 -0
  7. package/dist/components/error-boundary/index.d.ts +4 -0
  8. package/dist/components/error-boundary/index.js +2 -0
  9. package/dist/components/grid-list/grid-list.context.d.ts +40 -0
  10. package/dist/components/grid-list/grid-list.context.js +82 -0
  11. package/dist/components/grid-list/grid-list.d.ts +18 -0
  12. package/dist/components/grid-list/grid-list.js +32 -0
  13. package/dist/components/grid-list/index.d.ts +1 -1
  14. package/dist/components/grid-list/index.js +1 -8
  15. package/dist/components/grid-list/namespace.d.ts +2 -0
  16. package/dist/components/grid-list/namespace.js +1 -0
  17. package/dist/components/navbar/index.d.ts +1 -1
  18. package/dist/components/navbar/index.js +1 -9
  19. package/dist/components/navbar/namespace.d.ts +2 -0
  20. package/dist/components/navbar/namespace.js +1 -0
  21. package/dist/components/navbar/navbar.d.ts +43 -0
  22. package/dist/components/navbar/navbar.js +35 -0
  23. package/dist/components/navbar/use-navbar.d.ts +49 -0
  24. package/dist/components/navbar/use-navbar.js +70 -0
  25. package/dist/components/sidebar/index.d.ts +4 -4
  26. package/dist/components/sidebar/index.js +2 -14
  27. package/dist/components/sidebar/namespace.d.ts +5 -0
  28. package/dist/components/sidebar/namespace.js +2 -0
  29. package/dist/components/sidebar/sidebar.context.d.ts +34 -0
  30. package/dist/components/sidebar/sidebar.context.js +75 -0
  31. package/dist/components/sidebar/sidebar.d.ts +47 -0
  32. package/dist/components/sidebar/sidebar.js +106 -0
  33. package/dist/components/sidebar/sidebar.types.d.ts +29 -0
  34. package/dist/components/sidebar/sidebar.types.js +1 -0
  35. package/dist/components/steps/index.d.ts +2 -1
  36. package/dist/components/steps/index.js +1 -10
  37. package/dist/components/steps/use-stepper.d.ts +79 -0
  38. package/dist/components/steps/use-stepper.js +110 -0
  39. package/dist/index.d.ts +9 -253
  40. package/dist/index.js +6 -561
  41. package/dist/system/compose-refs.d.ts +3 -0
  42. package/dist/system/compose-refs.js +13 -0
  43. package/dist/system/index.d.ts +183 -0
  44. package/dist/system/index.js +3 -0
  45. package/dist/utils/assign.d.ts +1 -0
  46. package/dist/utils/assign.js +1 -0
  47. package/dist/utils/call-all.d.ts +1 -0
  48. package/dist/utils/call-all.js +5 -0
  49. package/dist/utils/create-context.d.ts +14 -0
  50. package/dist/utils/create-context.js +21 -0
  51. package/dist/utils/create-props.d.ts +3 -0
  52. package/dist/utils/create-props.js +1 -0
  53. package/dist/utils/cx.d.ts +1 -0
  54. package/dist/utils/cx.js +4 -0
  55. package/dist/utils/data-attr.d.ts +3 -0
  56. package/dist/utils/data-attr.js +1 -0
  57. package/dist/utils/entries.d.ts +5 -0
  58. package/dist/utils/entries.js +8 -0
  59. package/dist/utils/get-child-of-type.d.ts +7 -0
  60. package/dist/utils/get-child-of-type.js +9 -0
  61. package/dist/utils/get-children-of-type.d.ts +7 -0
  62. package/dist/utils/get-children-of-type.js +11 -0
  63. package/dist/utils/get.d.ts +11 -0
  64. package/dist/utils/get.js +36 -0
  65. package/dist/utils/index.d.ts +15 -0
  66. package/dist/utils/index.js +12 -0
  67. package/dist/utils/merge-refs.d.ts +3 -0
  68. package/dist/utils/merge-refs.js +21 -0
  69. package/dist/utils/run-if-fn.d.ts +2 -0
  70. package/dist/utils/run-if-fn.js +5 -0
  71. package/dist/utils/split-props.d.ts +9 -0
  72. package/dist/utils/split-props.js +25 -0
  73. package/package.json +47 -49
  74. package/CHANGELOG.md +0 -4033
  75. package/dist/.tsbuildinfo.json +0 -1
  76. package/dist/_tsup-dts-rollup.d.cts +0 -15192
  77. package/dist/_tsup-dts-rollup.d.ts +0 -15192
  78. package/dist/chunk-27OMFCPD.js +0 -8
  79. package/dist/chunk-2UMNJBGS.js +0 -101
  80. package/dist/chunk-3CKGT42F.js +0 -10
  81. package/dist/chunk-3E6URZ5P.js +0 -23
  82. package/dist/chunk-3EWOE56X.js +0 -46
  83. package/dist/chunk-3RHNNKPC.js +0 -51
  84. package/dist/chunk-46OCNELO.js +0 -10
  85. package/dist/chunk-4N4SHDPB.js +0 -10
  86. package/dist/chunk-52XM5VXJ.js +0 -9
  87. package/dist/chunk-5HVAMQYO.js +0 -8
  88. package/dist/chunk-5YNHX4C7.js +0 -16
  89. package/dist/chunk-5ZKEXMBN.js +0 -36
  90. package/dist/chunk-6WZK2RBQ.js +0 -12
  91. package/dist/chunk-6XSCENTR.js +0 -97
  92. package/dist/chunk-6YZ76Q2W.js +0 -8
  93. package/dist/chunk-7DF4NQNZ.js +0 -8
  94. package/dist/chunk-7HAGRXKM.js +0 -8
  95. package/dist/chunk-7MCVXFWM.js +0 -33
  96. package/dist/chunk-7PWVK3NL.js +0 -8
  97. package/dist/chunk-AA5L5WPD.js +0 -9
  98. package/dist/chunk-BDS3APRG.js +0 -56
  99. package/dist/chunk-BLSGOJQ7.js +0 -18
  100. package/dist/chunk-BSE7ZUP5.js +0 -10
  101. package/dist/chunk-C5KFNMWU.js +0 -8
  102. package/dist/chunk-C5YLE76Q.js +0 -118
  103. package/dist/chunk-CQD32UVJ.js +0 -8
  104. package/dist/chunk-CRFTMIQA.js +0 -36
  105. package/dist/chunk-D72A4SU3.js +0 -24
  106. package/dist/chunk-DEP2DH7P.js +0 -100
  107. package/dist/chunk-DHFAFRZ4.js +0 -8
  108. package/dist/chunk-DJNPK2LM.js +0 -60
  109. package/dist/chunk-EWATHRZA.js +0 -8
  110. package/dist/chunk-EWCBYJA7.js +0 -8
  111. package/dist/chunk-EZZW6JOU.js +0 -10
  112. package/dist/chunk-FD2V4Y66.js +0 -8
  113. package/dist/chunk-FN7TU5F5.js +0 -44
  114. package/dist/chunk-FPRTN3I7.js +0 -9
  115. package/dist/chunk-FVUEAELO.js +0 -64
  116. package/dist/chunk-GDDJYUWM.js +0 -12
  117. package/dist/chunk-GSWLAOIM.js +0 -24
  118. package/dist/chunk-GXOQVOKP.js +0 -67
  119. package/dist/chunk-HHKMVSL4.js +0 -54
  120. package/dist/chunk-HHTTORZ6.js +0 -8
  121. package/dist/chunk-HQVBJT5Y.js +0 -8
  122. package/dist/chunk-HREBIPVW.js +0 -36
  123. package/dist/chunk-HXNGSQQG.js +0 -62
  124. package/dist/chunk-HZX4AGO5.js +0 -8
  125. package/dist/chunk-J5UCKCIO.js +0 -16
  126. package/dist/chunk-JMYI6YXR.js +0 -1
  127. package/dist/chunk-JR5RLXCK.js +0 -8
  128. package/dist/chunk-K3MFCSAW.js +0 -8
  129. package/dist/chunk-KFDVVTMT.js +0 -36
  130. package/dist/chunk-KHCQMSP7.js +0 -36
  131. package/dist/chunk-KRJG7H4W.js +0 -53
  132. package/dist/chunk-KTLWEUNW.js +0 -1
  133. package/dist/chunk-LFOA3DZO.js +0 -12
  134. package/dist/chunk-LGLJ2QUW.js +0 -8
  135. package/dist/chunk-LIOV5MU4.js +0 -20
  136. package/dist/chunk-LU2H6GWC.js +0 -10
  137. package/dist/chunk-M3DJWM6D.js +0 -8
  138. package/dist/chunk-MK3OG2I4.js +0 -19
  139. package/dist/chunk-MZ2RY4NU.js +0 -34
  140. package/dist/chunk-NCNHDETB.js +0 -8
  141. package/dist/chunk-NGGISORT.js +0 -29
  142. package/dist/chunk-NKUBVRXY.js +0 -8896
  143. package/dist/chunk-NLMFEUVO.js +0 -41
  144. package/dist/chunk-NSFGACD7.js +0 -38
  145. package/dist/chunk-OJZPPAT6.js +0 -26
  146. package/dist/chunk-OQU4LWZW.js +0 -8
  147. package/dist/chunk-OWFY465Z.js +0 -45
  148. package/dist/chunk-P3IIT34M.js +0 -60
  149. package/dist/chunk-PEJYADAS.js +0 -8
  150. package/dist/chunk-PEVIP5UT.js +0 -8
  151. package/dist/chunk-PIQURQGB.js +0 -8
  152. package/dist/chunk-PONMXNY4.js +0 -8
  153. package/dist/chunk-PZWP36YA.js +0 -21
  154. package/dist/chunk-QAAKAKP7.js +0 -326
  155. package/dist/chunk-QKDPNO27.js +0 -44
  156. package/dist/chunk-QLN2CBY6.js +0 -8
  157. package/dist/chunk-QNKQFCKJ.js +0 -16
  158. package/dist/chunk-R2J5USV6.js +0 -12
  159. package/dist/chunk-RFBD2ZNL.js +0 -40
  160. package/dist/chunk-RTMS5TJN.js +0 -10
  161. package/dist/chunk-RYKJOZ3B.js +0 -27
  162. package/dist/chunk-SHCKFHIN.js +0 -39
  163. package/dist/chunk-TEQVVR3W.js +0 -8
  164. package/dist/chunk-TGEP2YAT.js +0 -10
  165. package/dist/chunk-TH6YCBEG.js +0 -8
  166. package/dist/chunk-TKJXJEXT.js +0 -22
  167. package/dist/chunk-TXIFPX2A.js +0 -230
  168. package/dist/chunk-TYGGMKHU.js +0 -177
  169. package/dist/chunk-TYMVLD3B.js +0 -14
  170. package/dist/chunk-U23VDAWJ.js +0 -143
  171. package/dist/chunk-U2CWQDXE.js +0 -20
  172. package/dist/chunk-U3EPRSD3.js +0 -20
  173. package/dist/chunk-UAX5344Y.js +0 -10
  174. package/dist/chunk-UEXUCHDD.js +0 -34
  175. package/dist/chunk-UIP2CHMU.js +0 -8
  176. package/dist/chunk-UZUMIWPJ.js +0 -10
  177. package/dist/chunk-VVTDE7NH.js +0 -115
  178. package/dist/chunk-WJZED26X.js +0 -28
  179. package/dist/chunk-XD7U6L2E.js +0 -10
  180. package/dist/chunk-XQTIY2ND.js +0 -71
  181. package/dist/chunk-XRQQE2AC.js +0 -152
  182. package/dist/chunk-XX2OY7LK.js +0 -10
  183. package/dist/chunk-Y2S4O4UY.js +0 -10
  184. package/dist/chunk-YHQ5JGCC.js +0 -1
  185. package/dist/chunk-YMCOU2N5.js +0 -8
  186. package/dist/chunk-YTTZX7ZE.js +0 -45
  187. package/dist/chunk-Z3SWPGPQ.js +0 -20
  188. package/dist/chunk-ZJ2VD224.js +0 -113
  189. package/dist/chunk-ZULBHMWG.js +0 -35
  190. package/dist/chunk-ZUT5GZTD.js +0 -46
  191. package/dist/colors.cjs +0 -351
  192. package/dist/colors.d.cts +0 -1
  193. package/dist/colors.d.ts +0 -1
  194. package/dist/colors.js +0 -8
  195. package/dist/components/accordion/index.cjs +0 -204
  196. package/dist/components/accordion/index.d.cts +0 -1
  197. package/dist/components/accordion/index.d.ts +0 -1
  198. package/dist/components/accordion/index.js +0 -9
  199. package/dist/components/action-bar/index.cjs +0 -223
  200. package/dist/components/action-bar/index.d.cts +0 -1
  201. package/dist/components/action-bar/index.d.ts +0 -1
  202. package/dist/components/action-bar/index.js +0 -13
  203. package/dist/components/alert/index.cjs +0 -233
  204. package/dist/components/alert/index.d.cts +0 -2
  205. package/dist/components/alert/index.d.ts +0 -2
  206. package/dist/components/alert/index.js +0 -13
  207. package/dist/components/app-shell/index.cjs +0 -68
  208. package/dist/components/app-shell/index.d.cts +0 -2
  209. package/dist/components/app-shell/index.d.ts +0 -2
  210. package/dist/components/app-shell/index.js +0 -8
  211. package/dist/components/aspect-ratio/index.cjs +0 -31
  212. package/dist/components/aspect-ratio/index.d.cts +0 -2
  213. package/dist/components/aspect-ratio/index.d.ts +0 -2
  214. package/dist/components/aspect-ratio/index.js +0 -8
  215. package/dist/components/avatar/index.cjs +0 -70
  216. package/dist/components/avatar/index.d.cts +0 -3
  217. package/dist/components/avatar/index.d.ts +0 -3
  218. package/dist/components/avatar/index.js +0 -11
  219. package/dist/components/back-button/index.cjs +0 -227
  220. package/dist/components/back-button/index.d.cts +0 -2
  221. package/dist/components/back-button/index.d.ts +0 -2
  222. package/dist/components/back-button/index.js +0 -11
  223. package/dist/components/badge/index.cjs +0 -33
  224. package/dist/components/badge/index.d.cts +0 -3
  225. package/dist/components/badge/index.d.ts +0 -3
  226. package/dist/components/badge/index.js +0 -10
  227. package/dist/components/bleed/index.cjs +0 -31
  228. package/dist/components/bleed/index.d.cts +0 -2
  229. package/dist/components/bleed/index.d.ts +0 -2
  230. package/dist/components/bleed/index.js +0 -8
  231. package/dist/components/blockquote/index.cjs +0 -59
  232. package/dist/components/blockquote/index.d.cts +0 -2
  233. package/dist/components/blockquote/index.d.ts +0 -2
  234. package/dist/components/blockquote/index.js +0 -8
  235. package/dist/components/box/index.cjs +0 -33
  236. package/dist/components/box/index.d.cts +0 -4
  237. package/dist/components/box/index.d.ts +0 -4
  238. package/dist/components/box/index.js +0 -10
  239. package/dist/components/breadcrumb/index.cjs +0 -58
  240. package/dist/components/breadcrumb/index.d.cts +0 -1
  241. package/dist/components/breadcrumb/index.d.ts +0 -1
  242. package/dist/components/breadcrumb/index.js +0 -8
  243. package/dist/components/button/index.cjs +0 -31
  244. package/dist/components/button/index.d.cts +0 -2
  245. package/dist/components/button/index.d.ts +0 -2
  246. package/dist/components/button/index.js +0 -8
  247. package/dist/components/button-group/index.cjs +0 -31
  248. package/dist/components/button-group/index.d.cts +0 -2
  249. package/dist/components/button-group/index.d.ts +0 -2
  250. package/dist/components/button-group/index.js +0 -8
  251. package/dist/components/card/index.cjs +0 -32
  252. package/dist/components/card/index.d.cts +0 -1
  253. package/dist/components/card/index.d.ts +0 -1
  254. package/dist/components/card/index.js +0 -9
  255. package/dist/components/center/index.cjs +0 -31
  256. package/dist/components/center/index.d.cts +0 -2
  257. package/dist/components/center/index.d.ts +0 -2
  258. package/dist/components/center/index.js +0 -8
  259. package/dist/components/checkbox/index.cjs +0 -45
  260. package/dist/components/checkbox/index.d.cts +0 -2
  261. package/dist/components/checkbox/index.d.ts +0 -2
  262. package/dist/components/checkbox/index.js +0 -8
  263. package/dist/components/checkbox-card/index.cjs +0 -66
  264. package/dist/components/checkbox-card/index.d.cts +0 -2
  265. package/dist/components/checkbox-card/index.d.ts +0 -2
  266. package/dist/components/checkbox-card/index.js +0 -8
  267. package/dist/components/checkmark/index.cjs +0 -31
  268. package/dist/components/checkmark/index.d.cts +0 -2
  269. package/dist/components/checkmark/index.d.ts +0 -2
  270. package/dist/components/checkmark/index.js +0 -8
  271. package/dist/components/client-only/index.cjs +0 -31
  272. package/dist/components/client-only/index.d.cts +0 -2
  273. package/dist/components/client-only/index.d.ts +0 -2
  274. package/dist/components/client-only/index.js +0 -8
  275. package/dist/components/clipboard/index.cjs +0 -234
  276. package/dist/components/clipboard/index.d.cts +0 -1
  277. package/dist/components/clipboard/index.d.ts +0 -1
  278. package/dist/components/clipboard/index.js +0 -13
  279. package/dist/components/close-button/index.cjs +0 -193
  280. package/dist/components/close-button/index.d.cts +0 -2
  281. package/dist/components/close-button/index.d.ts +0 -2
  282. package/dist/components/close-button/index.js +0 -12
  283. package/dist/components/code/index.cjs +0 -31
  284. package/dist/components/code/index.d.cts +0 -2
  285. package/dist/components/code/index.d.ts +0 -2
  286. package/dist/components/code/index.js +0 -8
  287. package/dist/components/collapsible/index.cjs +0 -31
  288. package/dist/components/collapsible/index.d.cts +0 -1
  289. package/dist/components/collapsible/index.d.ts +0 -1
  290. package/dist/components/collapsible/index.js +0 -8
  291. package/dist/components/color-picker/index.cjs +0 -31
  292. package/dist/components/color-picker/index.d.cts +0 -1
  293. package/dist/components/color-picker/index.d.ts +0 -1
  294. package/dist/components/color-picker/index.js +0 -8
  295. package/dist/components/color-swatch/index.cjs +0 -35
  296. package/dist/components/color-swatch/index.d.cts +0 -6
  297. package/dist/components/color-swatch/index.d.ts +0 -6
  298. package/dist/components/color-swatch/index.js +0 -12
  299. package/dist/components/command/index.cjs +0 -61
  300. package/dist/components/command/index.d.cts +0 -1
  301. package/dist/components/command/index.d.ts +0 -1
  302. package/dist/components/command/index.js +0 -9
  303. package/dist/components/container/index.cjs +0 -31
  304. package/dist/components/container/index.d.cts +0 -2
  305. package/dist/components/container/index.d.ts +0 -2
  306. package/dist/components/container/index.js +0 -8
  307. package/dist/components/data-list/index.cjs +0 -33
  308. package/dist/components/data-list/index.d.cts +0 -2
  309. package/dist/components/data-list/index.d.ts +0 -2
  310. package/dist/components/data-list/index.js +0 -10
  311. package/dist/components/dialog/index.cjs +0 -246
  312. package/dist/components/dialog/index.d.cts +0 -1
  313. package/dist/components/dialog/index.d.ts +0 -1
  314. package/dist/components/dialog/index.js +0 -13
  315. package/dist/components/drawer/index.cjs +0 -238
  316. package/dist/components/drawer/index.d.cts +0 -1
  317. package/dist/components/drawer/index.d.ts +0 -1
  318. package/dist/components/drawer/index.js +0 -13
  319. package/dist/components/editable/index.cjs +0 -31
  320. package/dist/components/editable/index.d.cts +0 -1
  321. package/dist/components/editable/index.d.ts +0 -1
  322. package/dist/components/editable/index.js +0 -8
  323. package/dist/components/empty-state/index.cjs +0 -50
  324. package/dist/components/empty-state/index.d.cts +0 -2
  325. package/dist/components/empty-state/index.d.ts +0 -2
  326. package/dist/components/empty-state/index.js +0 -8
  327. package/dist/components/env/index.cjs +0 -33
  328. package/dist/components/env/index.d.cts +0 -5
  329. package/dist/components/env/index.d.ts +0 -5
  330. package/dist/components/env/index.js +0 -10
  331. package/dist/components/field/index.cjs +0 -35
  332. package/dist/components/field/index.d.cts +0 -3
  333. package/dist/components/field/index.d.ts +0 -3
  334. package/dist/components/field/index.js +0 -12
  335. package/dist/components/fieldset/index.cjs +0 -33
  336. package/dist/components/fieldset/index.d.cts +0 -2
  337. package/dist/components/fieldset/index.d.ts +0 -2
  338. package/dist/components/fieldset/index.js +0 -10
  339. package/dist/components/file-upload/index.cjs +0 -302
  340. package/dist/components/file-upload/index.d.cts +0 -2
  341. package/dist/components/file-upload/index.d.ts +0 -2
  342. package/dist/components/file-upload/index.js +0 -14
  343. package/dist/components/flex/index.cjs +0 -31
  344. package/dist/components/flex/index.d.cts +0 -2
  345. package/dist/components/flex/index.d.ts +0 -2
  346. package/dist/components/flex/index.js +0 -10
  347. package/dist/components/float/index.cjs +0 -31
  348. package/dist/components/float/index.d.cts +0 -2
  349. package/dist/components/float/index.d.ts +0 -2
  350. package/dist/components/float/index.js +0 -8
  351. package/dist/components/focus-trap/index.cjs +0 -31
  352. package/dist/components/focus-trap/index.d.cts +0 -2
  353. package/dist/components/focus-trap/index.d.ts +0 -2
  354. package/dist/components/focus-trap/index.js +0 -8
  355. package/dist/components/for/index.cjs +0 -31
  356. package/dist/components/for/index.d.cts +0 -2
  357. package/dist/components/for/index.d.ts +0 -2
  358. package/dist/components/for/index.js +0 -10
  359. package/dist/components/format/index.cjs +0 -33
  360. package/dist/components/format/index.d.cts +0 -4
  361. package/dist/components/format/index.d.ts +0 -4
  362. package/dist/components/format/index.js +0 -10
  363. package/dist/components/grid/index.cjs +0 -31
  364. package/dist/components/grid/index.d.cts +0 -2
  365. package/dist/components/grid/index.d.ts +0 -2
  366. package/dist/components/grid/index.js +0 -8
  367. package/dist/components/grid-list/index.cjs +0 -68
  368. package/dist/components/grid-list/index.d.cts +0 -1
  369. package/dist/components/group/index.cjs +0 -31
  370. package/dist/components/group/index.d.cts +0 -2
  371. package/dist/components/group/index.d.ts +0 -2
  372. package/dist/components/group/index.js +0 -8
  373. package/dist/components/heading/index.cjs +0 -31
  374. package/dist/components/heading/index.d.cts +0 -2
  375. package/dist/components/heading/index.d.ts +0 -2
  376. package/dist/components/heading/index.js +0 -8
  377. package/dist/components/highlight/index.cjs +0 -31
  378. package/dist/components/highlight/index.d.cts +0 -2
  379. package/dist/components/highlight/index.d.ts +0 -2
  380. package/dist/components/highlight/index.js +0 -8
  381. package/dist/components/hover-card/index.cjs +0 -66
  382. package/dist/components/hover-card/index.d.cts +0 -1
  383. package/dist/components/hover-card/index.d.ts +0 -1
  384. package/dist/components/hover-card/index.js +0 -8
  385. package/dist/components/icon/index.cjs +0 -31
  386. package/dist/components/icon/index.d.cts +0 -2
  387. package/dist/components/icon/index.d.ts +0 -2
  388. package/dist/components/icon/index.js +0 -8
  389. package/dist/components/icon-badge/index.cjs +0 -70
  390. package/dist/components/icon-badge/index.d.cts +0 -2
  391. package/dist/components/icon-badge/index.d.ts +0 -2
  392. package/dist/components/icon-badge/index.js +0 -8
  393. package/dist/components/icon-button/index.cjs +0 -53
  394. package/dist/components/icon-button/index.d.cts +0 -2
  395. package/dist/components/icon-button/index.d.ts +0 -2
  396. package/dist/components/icon-button/index.js +0 -9
  397. package/dist/components/icons/index.cjs +0 -193
  398. package/dist/components/icons/index.d.cts +0 -18
  399. package/dist/components/icons/index.d.ts +0 -18
  400. package/dist/components/icons/index.js +0 -43
  401. package/dist/components/image/index.cjs +0 -31
  402. package/dist/components/image/index.d.cts +0 -2
  403. package/dist/components/image/index.d.ts +0 -2
  404. package/dist/components/image/index.js +0 -8
  405. package/dist/components/info-tip/index.cjs +0 -307
  406. package/dist/components/info-tip/index.d.cts +0 -2
  407. package/dist/components/info-tip/index.d.ts +0 -2
  408. package/dist/components/info-tip/index.js +0 -17
  409. package/dist/components/input/index.cjs +0 -39
  410. package/dist/components/input/index.d.cts +0 -9
  411. package/dist/components/input/index.d.ts +0 -9
  412. package/dist/components/input/index.js +0 -16
  413. package/dist/components/kbd/index.cjs +0 -31
  414. package/dist/components/kbd/index.d.cts +0 -2
  415. package/dist/components/kbd/index.d.ts +0 -2
  416. package/dist/components/kbd/index.js +0 -8
  417. package/dist/components/link/index.cjs +0 -71
  418. package/dist/components/link/index.d.cts +0 -2
  419. package/dist/components/link/index.d.ts +0 -2
  420. package/dist/components/link/index.js +0 -9
  421. package/dist/components/list/index.cjs +0 -31
  422. package/dist/components/list/index.d.cts +0 -1
  423. package/dist/components/list/index.d.ts +0 -1
  424. package/dist/components/list/index.js +0 -8
  425. package/dist/components/loader/index.cjs +0 -31
  426. package/dist/components/loader/index.d.cts +0 -1
  427. package/dist/components/loader/index.d.ts +0 -1
  428. package/dist/components/loader/index.js +0 -8
  429. package/dist/components/loading-overlay/index.cjs +0 -87
  430. package/dist/components/loading-overlay/index.d.cts +0 -2
  431. package/dist/components/loading-overlay/index.d.ts +0 -2
  432. package/dist/components/loading-overlay/index.js +0 -11
  433. package/dist/components/locale/index.cjs +0 -33
  434. package/dist/components/locale/index.d.cts +0 -3
  435. package/dist/components/locale/index.d.ts +0 -3
  436. package/dist/components/locale/index.js +0 -12
  437. package/dist/components/mark/index.cjs +0 -31
  438. package/dist/components/mark/index.d.cts +0 -1
  439. package/dist/components/mark/index.d.ts +0 -1
  440. package/dist/components/mark/index.js +0 -8
  441. package/dist/components/menu/index.cjs +0 -249
  442. package/dist/components/menu/index.d.cts +0 -1
  443. package/dist/components/menu/index.d.ts +0 -1
  444. package/dist/components/menu/index.js +0 -11
  445. package/dist/components/native-select/index.cjs +0 -185
  446. package/dist/components/native-select/index.d.cts +0 -2
  447. package/dist/components/native-select/index.d.ts +0 -2
  448. package/dist/components/native-select/index.js +0 -10
  449. package/dist/components/navbar/index.cjs +0 -108
  450. package/dist/components/navbar/index.d.cts +0 -1
  451. package/dist/components/number-input/index.cjs +0 -67
  452. package/dist/components/number-input/index.d.cts +0 -2
  453. package/dist/components/number-input/index.d.ts +0 -2
  454. package/dist/components/number-input/index.js +0 -9
  455. package/dist/components/page/index.cjs +0 -196
  456. package/dist/components/page/index.d.cts +0 -2
  457. package/dist/components/page/index.d.ts +0 -2
  458. package/dist/components/page/index.js +0 -12
  459. package/dist/components/pagination/index.cjs +0 -257
  460. package/dist/components/pagination/index.d.cts +0 -1
  461. package/dist/components/pagination/index.d.ts +0 -1
  462. package/dist/components/pagination/index.js +0 -11
  463. package/dist/components/password-input/index.cjs +0 -284
  464. package/dist/components/password-input/index.d.cts +0 -2
  465. package/dist/components/password-input/index.d.ts +0 -2
  466. package/dist/components/password-input/index.js +0 -11
  467. package/dist/components/persona/index.cjs +0 -247
  468. package/dist/components/persona/index.d.cts +0 -7
  469. package/dist/components/persona/index.d.ts +0 -7
  470. package/dist/components/persona/index.js +0 -13
  471. package/dist/components/pin-input/index.cjs +0 -52
  472. package/dist/components/pin-input/index.d.cts +0 -2
  473. package/dist/components/pin-input/index.d.ts +0 -2
  474. package/dist/components/pin-input/index.js +0 -8
  475. package/dist/components/popover/index.cjs +0 -248
  476. package/dist/components/popover/index.d.cts +0 -1
  477. package/dist/components/popover/index.d.ts +0 -1
  478. package/dist/components/popover/index.js +0 -13
  479. package/dist/components/portal/index.cjs +0 -31
  480. package/dist/components/portal/index.d.cts +0 -2
  481. package/dist/components/portal/index.d.ts +0 -2
  482. package/dist/components/portal/index.js +0 -8
  483. package/dist/components/presence/index.cjs +0 -31
  484. package/dist/components/presence/index.d.cts +0 -2
  485. package/dist/components/presence/index.d.ts +0 -2
  486. package/dist/components/presence/index.js +0 -8
  487. package/dist/components/progress/index.cjs +0 -31
  488. package/dist/components/progress/index.d.cts +0 -1
  489. package/dist/components/progress/index.d.ts +0 -1
  490. package/dist/components/progress/index.js +0 -8
  491. package/dist/components/progress-circle/index.cjs +0 -31
  492. package/dist/components/progress-circle/index.d.cts +0 -1
  493. package/dist/components/progress-circle/index.d.ts +0 -1
  494. package/dist/components/progress-circle/index.js +0 -8
  495. package/dist/components/qr-code/index.cjs +0 -31
  496. package/dist/components/qr-code/index.d.cts +0 -1
  497. package/dist/components/qr-code/index.d.ts +0 -1
  498. package/dist/components/qr-code/index.js +0 -8
  499. package/dist/components/radio/index.cjs +0 -46
  500. package/dist/components/radio/index.d.cts +0 -2
  501. package/dist/components/radio/index.d.ts +0 -2
  502. package/dist/components/radio/index.js +0 -8
  503. package/dist/components/radio-card/index.cjs +0 -75
  504. package/dist/components/radio-card/index.d.cts +0 -1
  505. package/dist/components/radio-card/index.d.ts +0 -1
  506. package/dist/components/radio-card/index.js +0 -8
  507. package/dist/components/radio-group/index.cjs +0 -31
  508. package/dist/components/radio-group/index.d.cts +0 -1
  509. package/dist/components/radio-group/index.d.ts +0 -1
  510. package/dist/components/radio-group/index.js +0 -8
  511. package/dist/components/radiomark/index.cjs +0 -31
  512. package/dist/components/radiomark/index.d.cts +0 -2
  513. package/dist/components/radiomark/index.d.ts +0 -2
  514. package/dist/components/radiomark/index.js +0 -10
  515. package/dist/components/rating-group/index.cjs +0 -31
  516. package/dist/components/rating-group/index.d.cts +0 -1
  517. package/dist/components/rating-group/index.d.ts +0 -1
  518. package/dist/components/rating-group/index.js +0 -8
  519. package/dist/components/search-input/index.cjs +0 -273
  520. package/dist/components/search-input/index.d.cts +0 -2
  521. package/dist/components/search-input/index.d.ts +0 -2
  522. package/dist/components/search-input/index.js +0 -10
  523. package/dist/components/segmented-control/index.cjs +0 -61
  524. package/dist/components/segmented-control/index.d.cts +0 -2
  525. package/dist/components/segmented-control/index.d.ts +0 -2
  526. package/dist/components/segmented-control/index.js +0 -8
  527. package/dist/components/select/index.cjs +0 -285
  528. package/dist/components/select/index.d.cts +0 -1
  529. package/dist/components/select/index.d.ts +0 -1
  530. package/dist/components/select/index.js +0 -13
  531. package/dist/components/separator/index.cjs +0 -31
  532. package/dist/components/separator/index.d.cts +0 -2
  533. package/dist/components/separator/index.d.ts +0 -2
  534. package/dist/components/separator/index.js +0 -8
  535. package/dist/components/show/index.cjs +0 -31
  536. package/dist/components/show/index.d.cts +0 -2
  537. package/dist/components/show/index.d.ts +0 -2
  538. package/dist/components/show/index.js +0 -8
  539. package/dist/components/sidebar/index.cjs +0 -168
  540. package/dist/components/sidebar/index.d.cts +0 -4
  541. package/dist/components/skeleton/index.cjs +0 -61
  542. package/dist/components/skeleton/index.d.cts +0 -6
  543. package/dist/components/skeleton/index.d.ts +0 -6
  544. package/dist/components/skeleton/index.js +0 -12
  545. package/dist/components/skip-nav/index.cjs +0 -33
  546. package/dist/components/skip-nav/index.d.cts +0 -4
  547. package/dist/components/skip-nav/index.d.ts +0 -4
  548. package/dist/components/skip-nav/index.js +0 -10
  549. package/dist/components/skip-nav-link/index.cjs +0 -33
  550. package/dist/components/skip-nav-link/index.d.cts +0 -4
  551. package/dist/components/skip-nav-link/index.d.ts +0 -4
  552. package/dist/components/skip-nav-link/index.js +0 -12
  553. package/dist/components/slider/index.cjs +0 -61
  554. package/dist/components/slider/index.d.cts +0 -2
  555. package/dist/components/slider/index.d.ts +0 -2
  556. package/dist/components/slider/index.js +0 -8
  557. package/dist/components/spacer/index.cjs +0 -31
  558. package/dist/components/spacer/index.d.cts +0 -2
  559. package/dist/components/spacer/index.d.ts +0 -2
  560. package/dist/components/spacer/index.js +0 -8
  561. package/dist/components/spinner/index.cjs +0 -44
  562. package/dist/components/spinner/index.d.cts +0 -2
  563. package/dist/components/spinner/index.d.ts +0 -2
  564. package/dist/components/spinner/index.js +0 -8
  565. package/dist/components/stack/index.cjs +0 -37
  566. package/dist/components/stack/index.d.cts +0 -6
  567. package/dist/components/stack/index.d.ts +0 -6
  568. package/dist/components/stack/index.js +0 -14
  569. package/dist/components/stat/index.cjs +0 -83
  570. package/dist/components/stat/index.d.cts +0 -1
  571. package/dist/components/stat/index.d.ts +0 -1
  572. package/dist/components/stat/index.js +0 -8
  573. package/dist/components/status/index.cjs +0 -45
  574. package/dist/components/status/index.d.cts +0 -2
  575. package/dist/components/status/index.d.ts +0 -2
  576. package/dist/components/status/index.js +0 -8
  577. package/dist/components/steps/index.cjs +0 -221
  578. package/dist/components/steps/index.d.cts +0 -1
  579. package/dist/components/switch/index.cjs +0 -48
  580. package/dist/components/switch/index.d.cts +0 -2
  581. package/dist/components/switch/index.d.ts +0 -2
  582. package/dist/components/switch/index.js +0 -8
  583. package/dist/components/table/index.cjs +0 -31
  584. package/dist/components/table/index.d.cts +0 -1
  585. package/dist/components/table/index.d.ts +0 -1
  586. package/dist/components/table/index.js +0 -8
  587. package/dist/components/tabs/index.cjs +0 -37
  588. package/dist/components/tabs/index.d.cts +0 -4
  589. package/dist/components/tabs/index.d.ts +0 -4
  590. package/dist/components/tabs/index.js +0 -14
  591. package/dist/components/tag/index.cjs +0 -53
  592. package/dist/components/tag/index.d.cts +0 -2
  593. package/dist/components/tag/index.d.ts +0 -2
  594. package/dist/components/tag/index.js +0 -8
  595. package/dist/components/textarea/index.cjs +0 -31
  596. package/dist/components/textarea/index.d.cts +0 -2
  597. package/dist/components/textarea/index.d.ts +0 -2
  598. package/dist/components/textarea/index.js +0 -8
  599. package/dist/components/timeline/index.cjs +0 -31
  600. package/dist/components/timeline/index.d.cts +0 -1
  601. package/dist/components/timeline/index.d.ts +0 -1
  602. package/dist/components/timeline/index.js +0 -8
  603. package/dist/components/toaster/index.cjs +0 -262
  604. package/dist/components/toaster/index.d.cts +0 -3
  605. package/dist/components/toaster/index.d.ts +0 -3
  606. package/dist/components/toaster/index.js +0 -16
  607. package/dist/components/toggle/index.cjs +0 -31
  608. package/dist/components/toggle/index.d.cts +0 -1
  609. package/dist/components/toggle/index.d.ts +0 -1
  610. package/dist/components/toggle/index.js +0 -8
  611. package/dist/components/toggle-tip/index.cjs +0 -297
  612. package/dist/components/toggle-tip/index.d.cts +0 -2
  613. package/dist/components/toggle-tip/index.d.ts +0 -2
  614. package/dist/components/toggle-tip/index.js +0 -15
  615. package/dist/components/tooltip/index.cjs +0 -58
  616. package/dist/components/tooltip/index.d.cts +0 -2
  617. package/dist/components/tooltip/index.d.ts +0 -2
  618. package/dist/components/tooltip/index.js +0 -8
  619. package/dist/components/typography/index.cjs +0 -37
  620. package/dist/components/typography/index.d.cts +0 -8
  621. package/dist/components/typography/index.d.ts +0 -8
  622. package/dist/components/typography/index.js +0 -14
  623. package/dist/components/visually-hidden/index.cjs +0 -31
  624. package/dist/components/visually-hidden/index.d.cts +0 -1
  625. package/dist/components/visually-hidden/index.d.ts +0 -1
  626. package/dist/components/visually-hidden/index.js +0 -8
  627. package/dist/components/wrap/index.cjs +0 -31
  628. package/dist/components/wrap/index.d.cts +0 -2
  629. package/dist/components/wrap/index.d.ts +0 -2
  630. package/dist/components/wrap/index.js +0 -8
  631. package/dist/index.cjs +0 -12240
  632. package/dist/index.d.cts +0 -253
  633. package/dist/preset.cjs +0 -9233
  634. package/dist/preset.d.cts +0 -3
  635. package/dist/preset.d.ts +0 -3
  636. package/dist/preset.js +0 -12
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Eelco Wiersma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,46 +1,23 @@
1
- <p align='center'>
2
- <img src="./apps/website/public/saasui.svg#gh-light-mode-only" alt="Saas UI logo" height="60px" />
3
- <img src="./apps/website/public/saasui-dark.svg#gh-dark-mode-only" alt="Saas UI logo" height="60px" />
4
- </p>
1
+ # `@saas-ui/react`
5
2
 
6
- <p align='center'>The React component library for Startups</p>
3
+ Unstyled React primitives for Saas UI. Styled Chakra compositions are installed
4
+ from the registry with `@saas-ui/cli`.
7
5
 
8
- <p align="center">
9
- <a href="https://www.npmjs.com/package/@saas-ui/react">
10
- <img src="https://img.shields.io/npm/v/@saas-ui/react" alt="NPM">
11
- </a>
12
- <a href="https://www.npmjs.com/package/@saas-ui/react">
13
- <img src="https://img.shields.io/npm/dm/@saas-ui/react.svg" alt="npm downloads">
14
- </a>
15
- <img alt="MIT License" src="https://img.shields.io/github/license/saas-js/saas-ui"/>
16
- <a href="https://twitter.com/intent/follow?screen_name=saas_js">
17
- <img src="https://img.shields.io/twitter/follow/saas_js" alt="follow on Twitter">
18
- </a>
19
- </p>
6
+ ```sh
7
+ npm i @saas-ui/react
8
+ ```
20
9
 
21
- <hr />
10
+ ```tsx
11
+ import { Sidebar, useSidebar } from '@saas-ui/react/sidebar'
12
+ import { Navbar } from '@saas-ui/react/navbar'
13
+ import { GridList } from '@saas-ui/react/grid-list'
14
+ ```
22
15
 
23
- Saas UI is an advanced component library designed to build beautiful B2B and dashboard style apps with speed.
24
- It's built on top of Chakra UI and fully written in Typescript.
16
+ The package also exports `ErrorBoundary`, stepper hooks, and shared utilities.
25
17
 
26
- ## Links
18
+ Existing projects that used the previous Chakra re-export bundle should follow
19
+ the [migration guide](https://github.com/saas-js/saas-ui/blob/v3/MIGRATION.md).
27
20
 
28
- 💡 [Documentation](https://saas-ui.dev/docs)
21
+ ## License
29
22
 
30
- 🧭 [Roadmap](https://roadmap.saas-ui.dev)
31
-
32
- 🖼 [Storybooks](https://storybook.saas-ui.pro)
33
-
34
- 🌟 [Saas UI Pro](https://saas-ui.dev/#pro-features)
35
-
36
- ## Sponsors ❤️
37
-
38
- Saas UI is sponsored by these amazing companies and people.
39
-
40
- - [LocalXPose](https://localxpose.io/)
41
-
42
- ## Contributing & Support
43
-
44
- Want to help? Great! Check out the [contributing guidelines](CONTRIBUTING.md) and feel free to open a PR or [discussion](https://github.com/saas-js/saas-ui/discussions/new) for feature requests and feedback.
45
-
46
- If you'd like to support the project financially, you can [become a sponsor](https://github.com/sponsors/saas-js) of Saas UI or consider ordering [Saas UI Pro Beta](https://saas-ui.lemonsqueezy.com/checkout/buy/5c76854f-738a-46b8-b32d-932a97d477f5). All funds will go toward the further development of Saas UI. This will give you access to the private Git repository with the beta and our private Discord server for support.
23
+ MIT
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import { ErrorContext } from './error-provider.tsx';
3
+ export interface ErrorBoundaryProps {
4
+ fallback?: React.ReactNode;
5
+ children: React.ReactNode;
6
+ onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
7
+ }
8
+ export interface ErrorBoundaryState {
9
+ error?: Error | null;
10
+ errorInfo?: any;
11
+ }
12
+ /**
13
+ * A container component that catches errors and displays a fallback UI.
14
+ *
15
+ * @see Docs https://saas-ui.dev/docs/components/utils/error-boundary
16
+ */
17
+ export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps> {
18
+ state: ErrorBoundaryState;
19
+ static contextType: React.Context<import("./error-provider.tsx").ErrorContextValue>;
20
+ context: React.ContextType<typeof ErrorContext>;
21
+ constructor(props: ErrorBoundaryProps);
22
+ static getDerivedStateFromError(error: Error): {
23
+ error: Error;
24
+ };
25
+ onError: (error: Error, errorInfo: any) => void;
26
+ componentDidCatch(error: Error, errorInfo: any): void;
27
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
28
+ }
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { ErrorContext } from "./error-provider.js";
4
+ /**
5
+ * A container component that catches errors and displays a fallback UI.
6
+ *
7
+ * @see Docs https://saas-ui.dev/docs/components/utils/error-boundary
8
+ */
9
+ export class ErrorBoundary extends React.Component {
10
+ state;
11
+ static contextType = ErrorContext;
12
+ constructor(props) {
13
+ super(props);
14
+ this.state = { error: null };
15
+ }
16
+ static getDerivedStateFromError(error) {
17
+ return { error };
18
+ }
19
+ onError = (error, errorInfo) => {
20
+ this.props.onError?.(error, errorInfo);
21
+ this.context.onError?.(error, errorInfo);
22
+ };
23
+ componentDidCatch(error, errorInfo) {
24
+ this.onError(error, errorInfo);
25
+ }
26
+ render() {
27
+ if (this.state.error) {
28
+ return this.props.fallback || _jsx("h1", { children: "Something went wrong." });
29
+ }
30
+ return this.props.children;
31
+ }
32
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface ErrorProviderProps {
3
+ children: React.ReactNode;
4
+ onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
5
+ }
6
+ export interface ErrorContextValue {
7
+ onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
8
+ }
9
+ export declare const ErrorContext: React.Context<ErrorContextValue>;
10
+ export declare const ErrorProvider: (props: ErrorProviderProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const useErrorContext: () => ErrorContextValue;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ export const ErrorContext = React.createContext({});
4
+ export const ErrorProvider = (props) => {
5
+ const { children, onError } = props;
6
+ const value = React.useMemo(() => ({ onError }), [onError]);
7
+ return _jsx(ErrorContext.Provider, { value: value, children: children });
8
+ };
9
+ export const useErrorContext = () => React.useContext(ErrorContext);
@@ -0,0 +1,4 @@
1
+ export { ErrorProvider, ErrorContext, useErrorContext, } from './error-provider.tsx';
2
+ export type { ErrorProviderProps, ErrorContextValue, } from './error-provider.tsx';
3
+ export { ErrorBoundary } from './error-boundary.tsx';
4
+ export type { ErrorBoundaryProps, ErrorBoundaryState, } from './error-boundary.tsx';
@@ -0,0 +1,2 @@
1
+ export { ErrorProvider, ErrorContext, useErrorContext, } from "./error-provider.js";
2
+ export { ErrorBoundary } from "./error-boundary.js";
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+ interface GridListContext {
3
+ id: string;
4
+ containerRef: React.RefObject<HTMLDivElement | null>;
5
+ focusId: string | null;
6
+ setFocusId: React.Dispatch<React.SetStateAction<string | null>>;
7
+ }
8
+ export declare const GridListProvider: React.Provider<GridListContext>, useGridListContext: () => GridListContext;
9
+ export interface UseGridListProps {
10
+ id?: string;
11
+ onBlur?: React.FocusEventHandler<HTMLDivElement>;
12
+ }
13
+ export declare const useGridList: (props: UseGridListProps) => {
14
+ id: string;
15
+ containerRef: React.RefObject<HTMLDivElement | null>;
16
+ focusId: string | null;
17
+ setFocusId: React.Dispatch<React.SetStateAction<string | null>>;
18
+ listProps: {
19
+ onBlur: (e: React.FocusEvent<HTMLDivElement, Element>) => void;
20
+ };
21
+ };
22
+ export interface GridListItemOptions {
23
+ id?: string;
24
+ disabled?: boolean;
25
+ onFocus?: React.FocusEventHandler<HTMLDivElement>;
26
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
27
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
28
+ }
29
+ export declare const useGridListItem: (props: GridListItemOptions) => {
30
+ itemProps: {
31
+ id: string;
32
+ "data-focus": boolean | "true" | "false";
33
+ "aria-disabled": boolean | undefined;
34
+ tabIndex: number;
35
+ onFocus: (event: React.FocusEvent<HTMLDivElement, Element>) => void;
36
+ onKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;
37
+ onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
38
+ };
39
+ };
40
+ export {};
@@ -0,0 +1,82 @@
1
+ import * as React from 'react';
2
+ import { nextById, prevById, queryAll } from '@zag-js/dom-utils';
3
+ import { callAll, createContext, dataAttr } from "../../utils/index.js";
4
+ export const [GridListProvider, useGridListContext] = createContext({
5
+ name: 'GridListContext',
6
+ errorMessage: 'useGridListContext: `context` is undefined. Seems you forgot to wrap the components in `<GridList />`',
7
+ });
8
+ function queryAllItems(root) {
9
+ return queryAll(root, `[role='row'][tabindex]:not([aria-disabled='true'])`);
10
+ }
11
+ export const useGridList = (props) => {
12
+ const id = React.useId();
13
+ const ref = React.useRef(null);
14
+ const [focusId, setFocusId] = React.useState(null);
15
+ const listProps = {
16
+ onBlur: callAll(props.onBlur, (e) => {
17
+ if (e.relatedTarget) {
18
+ const items = queryAllItems(ref.current);
19
+ if (!items.includes(e.relatedTarget)) {
20
+ setFocusId(null);
21
+ }
22
+ }
23
+ }),
24
+ };
25
+ return {
26
+ id: props.id ?? id,
27
+ containerRef: ref,
28
+ focusId,
29
+ setFocusId,
30
+ listProps,
31
+ };
32
+ };
33
+ export const useGridListItem = (props) => {
34
+ const { id: containerId, containerRef, focusId, setFocusId, } = useGridListContext();
35
+ const id = `${containerId}-${React.useId()}`;
36
+ const buttonId = props.id ?? id;
37
+ const isFocused = focusId === buttonId;
38
+ function getItems() {
39
+ return queryAllItems(containerRef.current);
40
+ }
41
+ const itemProps = {
42
+ id: buttonId,
43
+ ['data-focus']: dataAttr(isFocused),
44
+ ['aria-disabled']: props.disabled ? true : undefined,
45
+ tabIndex: props.disabled ? -1 : 0,
46
+ onFocus: callAll(props.onFocus, () => {
47
+ setFocusId(buttonId);
48
+ }),
49
+ onKeyDown: callAll(props.onKeyDown, React.useCallback((e) => {
50
+ const items = getItems();
51
+ const keyMap = {
52
+ ArrowUp: () => {
53
+ prevById(items, buttonId)?.focus();
54
+ },
55
+ ArrowDown: () => {
56
+ nextById(items, buttonId)?.focus();
57
+ },
58
+ Home: () => {
59
+ items[0]?.focus();
60
+ },
61
+ End: () => {
62
+ items[items.length - 1]?.focus();
63
+ },
64
+ };
65
+ if (keyMap[e.key]) {
66
+ e.preventDefault();
67
+ keyMap[e.key](e);
68
+ }
69
+ }, [buttonId])),
70
+ onClick: (e) => {
71
+ if (props.disabled) {
72
+ e.preventDefault();
73
+ e.stopPropagation();
74
+ return;
75
+ }
76
+ props.onClick?.(e);
77
+ },
78
+ };
79
+ return {
80
+ itemProps,
81
+ };
82
+ };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { type HTMLSystemProps } from '../../system/index.ts';
3
+ import { type GridListItemOptions } from './grid-list.context.ts';
4
+ export interface GridListRootProps extends HTMLSystemProps<'div'> {
5
+ }
6
+ /**
7
+ * React component to render lists of data
8
+ */
9
+ export declare const GridListRoot: React.ForwardRefExoticComponent<GridListRootProps & React.RefAttributes<HTMLDivElement>>;
10
+ export interface GridListHeaderProps extends HTMLSystemProps<'div'> {
11
+ }
12
+ export declare const GridListHeader: React.ForwardRefExoticComponent<GridListHeaderProps & React.RefAttributes<HTMLDivElement>>;
13
+ export interface GridListItemProps extends GridListItemOptions, HTMLSystemProps<'div'> {
14
+ }
15
+ export declare const GridListItem: React.ForwardRefExoticComponent<GridListItemProps & React.RefAttributes<HTMLDivElement>>;
16
+ export interface GridListCellProps extends HTMLSystemProps<'div'> {
17
+ }
18
+ export declare const GridListCell: React.ForwardRefExoticComponent<GridListCellProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { sui } from "../../system/index.js";
4
+ import { mergeRefs } from "../../utils/index.js";
5
+ import { GridListProvider, useGridList, useGridListItem, } from "./grid-list.context.js";
6
+ /**
7
+ * React component to render lists of data
8
+ */
9
+ export const GridListRoot = React.forwardRef((props, ref) => {
10
+ const { children, ...rest } = props;
11
+ const { listProps, ...context } = useGridList(props);
12
+ return (_jsx(GridListProvider, { value: context, children: _jsx(sui.div, { ref: mergeRefs(ref, context.containerRef), role: "grid", "aria-readonly": true, ...rest, ...listProps, children: children }) }));
13
+ });
14
+ export const GridListHeader = React.forwardRef((props, ref) => {
15
+ const { children, ...rest } = props;
16
+ return (_jsx(sui.div, { ref: ref, role: "columnheader", ...rest, children: children }));
17
+ });
18
+ export const GridListItem = React.forwardRef((props, ref) => {
19
+ const { children, disabled, id, onClick, onFocus, onKeyDown, ...rest } = props;
20
+ const { itemProps } = useGridListItem({
21
+ disabled,
22
+ id,
23
+ onClick,
24
+ onFocus,
25
+ onKeyDown,
26
+ });
27
+ return (_jsx(sui.div, { ref: ref, role: "row", ...rest, ...itemProps, children: children }));
28
+ });
29
+ export const GridListCell = React.forwardRef((props, ref) => {
30
+ const { children, ...rest } = props;
31
+ return (_jsx(sui.div, { ref: ref, role: "gridcell", ...rest, children: children }));
32
+ });
@@ -1 +1 @@
1
- export { GridList_alias_1 as GridList } from '../../_tsup-dts-rollup.js';
1
+ export * as GridList from './namespace.ts';
@@ -1,8 +1 @@
1
- 'use client'
2
- import {
3
- grid_list_exports
4
- } from "../../chunk-ZUT5GZTD.js";
5
- import "../../chunk-RTMS5TJN.js";
6
- export {
7
- grid_list_exports as GridList
8
- };
1
+ export * as GridList from "./namespace.js";
@@ -0,0 +1,2 @@
1
+ export { GridListRoot as Root, GridListHeader as Header, GridListItem as Item, GridListCell as Cell, } from './grid-list.tsx';
2
+ export type { GridListRootProps as RootProps, GridListHeaderProps as HeaderProps, GridListItemProps as ItemProps, GridListCellProps as CellProps, } from './grid-list.tsx';
@@ -0,0 +1 @@
1
+ export { GridListRoot as Root, GridListHeader as Header, GridListItem as Item, GridListCell as Cell, } from "./grid-list.js";
@@ -1 +1 @@
1
- export { Navbar_alias_1 as Navbar } from '../../_tsup-dts-rollup.js';
1
+ export * as Navbar from './namespace.ts';
@@ -1,9 +1 @@
1
- 'use client'
2
- import {
3
- navbar_exports
4
- } from "../../chunk-DJNPK2LM.js";
5
- import "../../chunk-ZULBHMWG.js";
6
- import "../../chunk-RTMS5TJN.js";
7
- export {
8
- navbar_exports as Navbar
9
- };
1
+ export * as Navbar from "./namespace.js";
@@ -0,0 +1,2 @@
1
+ export { NavbarRoot as Root, NavbarContent as Content, NavbarBrand as Brand, NavbarItemGroup as ItemGroup, NavbarItem as Item, NavbarLink as Link, } from './navbar.tsx';
2
+ export type { NavbarRootProps as RootProps, NavbarItemProps as ItemProps, NavbarLinkProps as LinkProps, } from './navbar.tsx';
@@ -0,0 +1 @@
1
+ export { NavbarRoot as Root, NavbarContent as Content, NavbarBrand as Brand, NavbarItemGroup as ItemGroup, NavbarItem as Item, NavbarLink as Link, } from "./navbar.js";
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { type HTMLSystemProps } from '../../system/index.ts';
3
+ import { UseNavbarProps } from './use-navbar.ts';
4
+ export declare const NavbarProvider: React.Provider<{
5
+ rootRef: React.RefObject<HTMLDivElement | null>;
6
+ height: string | number;
7
+ hidden: boolean;
8
+ shouldHideOnScroll: boolean;
9
+ rootProps: {
10
+ ref: React.RefObject<HTMLDivElement | null>;
11
+ 'data-hidden': boolean | "true" | "false";
12
+ 'data-at-top': boolean | "true" | "false";
13
+ style: {
14
+ '--navbar-height': string | number;
15
+ };
16
+ };
17
+ }>, useNavbarContext: () => {
18
+ rootRef: React.RefObject<HTMLDivElement | null>;
19
+ height: string | number;
20
+ hidden: boolean;
21
+ shouldHideOnScroll: boolean;
22
+ rootProps: {
23
+ ref: React.RefObject<HTMLDivElement | null>;
24
+ 'data-hidden': boolean | "true" | "false";
25
+ 'data-at-top': boolean | "true" | "false";
26
+ style: {
27
+ '--navbar-height': string | number;
28
+ };
29
+ };
30
+ };
31
+ export interface NavbarRootProps extends UseNavbarProps, Omit<HTMLSystemProps<'div'>, 'height'> {
32
+ children?: React.ReactNode | React.ReactNode[];
33
+ }
34
+ export declare const NavbarRoot: React.ForwardRefExoticComponent<Omit<NavbarRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
+ export declare const NavbarContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & React.RefAttributes<HTMLDivElement>>;
36
+ export declare const NavbarBrand: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & React.RefAttributes<HTMLDivElement>>;
37
+ export declare const NavbarItemGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & React.RefAttributes<HTMLUListElement>>;
38
+ export interface NavbarItemProps extends HTMLSystemProps<'li'> {
39
+ }
40
+ export declare const NavbarItem: React.ForwardRefExoticComponent<NavbarItemProps & React.RefAttributes<HTMLLIElement>>;
41
+ export interface NavbarLinkProps extends HTMLSystemProps<'a'> {
42
+ }
43
+ export declare const NavbarLink: React.ForwardRefExoticComponent<NavbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,35 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from 'react';
4
+ import { sui } from "../../system/index.js";
5
+ import { createContext } from "../../utils/index.js";
6
+ import { splitNavbarProps, useNavbar } from "./use-navbar.js";
7
+ export const [NavbarProvider, useNavbarContext] = createContext({
8
+ name: 'NavbarContext',
9
+ strict: true,
10
+ errorMessage: 'useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />',
11
+ });
12
+ export const NavbarRoot = forwardRef((props, ref) => {
13
+ const { children, ...rest } = props;
14
+ const [navbarProps, rootProps] = splitNavbarProps(rest);
15
+ const context = useNavbar({ ...navbarProps, ref });
16
+ return (_jsx(NavbarProvider, { value: context, children: _jsx(sui.div, { ...rootProps, ...context.rootProps, style: {
17
+ '--navbar-height': context.height,
18
+ ...props.style,
19
+ }, children: children }) }));
20
+ });
21
+ export const NavbarContent = forwardRef((props, ref) => {
22
+ return _jsx(sui.div, { ...props, ref: ref });
23
+ });
24
+ export const NavbarBrand = forwardRef((props, ref) => {
25
+ return _jsx(sui.div, { ...props, ref: ref });
26
+ });
27
+ export const NavbarItemGroup = forwardRef((props, ref) => {
28
+ return _jsx(sui.ul, { ...props, ref: ref });
29
+ });
30
+ export const NavbarItem = forwardRef((props, ref) => {
31
+ return _jsx(sui.li, { ...props, ref: ref });
32
+ });
33
+ export const NavbarLink = forwardRef((props, ref) => {
34
+ return _jsx(sui.a, { ...props, ref: ref });
35
+ });
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ export declare const splitNavbarProps: <T extends Record<string, any>>(props: T) => [Pick<T, "parentRef" | "height" | "shouldHideOnScroll" | "disableScrollHandler" | "onScrollPositionChange">, Omit<T, "parentRef" | "height" | "shouldHideOnScroll" | "disableScrollHandler" | "onScrollPositionChange">];
3
+ export interface UseNavbarProps {
4
+ /**
5
+ * Ref to the DOM node.
6
+ */
7
+ ref: React.ForwardedRef<HTMLDivElement>;
8
+ /**
9
+ * The parent element where the navbar is placed within.
10
+ * This is used to determine the scroll position and whether the navbar should be hidden or not.
11
+ * @default `window`
12
+ */
13
+ parentRef?: React.RefObject<HTMLElement>;
14
+ /**
15
+ * The height of the navbar.
16
+ * @default "3.5rem" (56px)
17
+ */
18
+ height?: number | string;
19
+ /**
20
+ * Whether the navbar should hide on scroll or not.
21
+ * @default false
22
+ */
23
+ shouldHideOnScroll?: boolean;
24
+ /**
25
+ * Whether the navbar parent scroll event should be listened to or not.
26
+ * @default false
27
+ */
28
+ disableScrollHandler?: boolean;
29
+ /**
30
+ * The scroll event handler for the navbar. The event fires when the navbar parent element is scrolled.
31
+ * it only works if `disableScrollHandler` is set to `false` or `shouldHideOnScroll` is set to `true`.
32
+ */
33
+ onScrollPositionChange?: (scrollPosition: number) => void;
34
+ }
35
+ export declare function useNavbar(props: UseNavbarProps): {
36
+ rootRef: React.RefObject<HTMLDivElement | null>;
37
+ height: string | number;
38
+ hidden: boolean;
39
+ shouldHideOnScroll: boolean;
40
+ rootProps: {
41
+ ref: React.RefObject<HTMLDivElement | null>;
42
+ 'data-hidden': boolean | "true" | "false";
43
+ 'data-at-top': boolean | "true" | "false";
44
+ style: {
45
+ '--navbar-height': string | number;
46
+ };
47
+ };
48
+ };
49
+ export type UseNavbarReturn = ReturnType<typeof useNavbar>;
@@ -0,0 +1,70 @@
1
+ import { useEffect, useImperativeHandle, useRef, useState } from 'react';
2
+ import { useResizeObserver } from '@react-aria/utils';
3
+ import { useScrollPosition } from '@saas-ui/hooks';
4
+ import { dataAttr, splitProps } from "../../utils/index.js";
5
+ export const splitNavbarProps = (props) => splitProps(props, [
6
+ 'parentRef',
7
+ 'height',
8
+ 'shouldHideOnScroll',
9
+ 'disableScrollHandler',
10
+ 'onScrollPositionChange',
11
+ ]);
12
+ export function useNavbar(props) {
13
+ const { ref, parentRef, height = '3.5rem', shouldHideOnScroll = false, disableScrollHandler = false, onScrollPositionChange, } = props;
14
+ const rootRef = useRef(null);
15
+ useImperativeHandle(ref, () => rootRef.current);
16
+ const prevWidth = useRef(0);
17
+ const navHeight = useRef(0);
18
+ const [hidden, setHidden] = useState(false);
19
+ const [atTop, setAtTop] = useState(true);
20
+ const updateWidth = () => {
21
+ if (rootRef.current) {
22
+ const width = rootRef.current.offsetWidth;
23
+ if (width !== prevWidth.current) {
24
+ prevWidth.current = width;
25
+ }
26
+ }
27
+ };
28
+ useResizeObserver({
29
+ ref: rootRef,
30
+ onResize: () => {
31
+ const currentWidth = rootRef.current?.offsetWidth;
32
+ if (currentWidth !== prevWidth.current) {
33
+ updateWidth();
34
+ }
35
+ },
36
+ });
37
+ useEffect(() => {
38
+ updateWidth();
39
+ navHeight.current = rootRef.current?.offsetHeight || 0;
40
+ }, []);
41
+ useScrollPosition({
42
+ elementRef: parentRef,
43
+ isEnabled: shouldHideOnScroll || !disableScrollHandler,
44
+ callback: ({ prevPos, currPos }) => {
45
+ onScrollPositionChange?.(currPos.y);
46
+ setAtTop(currPos.y === 0);
47
+ if (shouldHideOnScroll) {
48
+ setHidden((prev) => {
49
+ const next = currPos.y > prevPos.y && currPos.y > navHeight.current;
50
+ return next !== prev ? next : prev;
51
+ });
52
+ }
53
+ },
54
+ });
55
+ const rootProps = {
56
+ ref: rootRef,
57
+ 'data-hidden': dataAttr(hidden),
58
+ 'data-at-top': dataAttr(atTop),
59
+ style: {
60
+ '--navbar-height': height,
61
+ },
62
+ };
63
+ return {
64
+ rootRef,
65
+ height,
66
+ hidden,
67
+ shouldHideOnScroll,
68
+ rootProps,
69
+ };
70
+ }
@@ -1,4 +1,4 @@
1
- export { Sidebar_alias_1 as Sidebar } from '../../_tsup-dts-rollup.js';
2
- export { useSidebarStyles_alias_1 as useSidebarStyles } from '../../_tsup-dts-rollup.js';
3
- export { useSidebarItemStyles_alias_1 as useSidebarItemStyles } from '../../_tsup-dts-rollup.js';
4
- export { useSidebar_alias_1 as useSidebar } from '../../_tsup-dts-rollup.js';
1
+ export * as Sidebar from './namespace.ts';
2
+ export { useSidebar, useSidebarTrigger, type SidebarProviderProps, } from './sidebar.context.tsx';
3
+ export type { UseSidebarReturn } from './sidebar.context.tsx';
4
+ export type { SidebarMode, SidebarOptions, SidebarOptions as RootBaseProps, } from './sidebar.types.ts';
@@ -1,14 +1,2 @@
1
- 'use client'
2
- import {
3
- sidebar_exports,
4
- useSidebar,
5
- useSidebarItemStyles,
6
- useSidebarStyles
7
- } from "../../chunk-U23VDAWJ.js";
8
- import "../../chunk-RTMS5TJN.js";
9
- export {
10
- sidebar_exports as Sidebar,
11
- useSidebar,
12
- useSidebarItemStyles,
13
- useSidebarStyles
14
- };
1
+ export * as Sidebar from "./namespace.js";
2
+ export { useSidebar, useSidebarTrigger, } from "./sidebar.context.js";
@@ -0,0 +1,5 @@
1
+ export { SidebarRoot as Root, SidebarContext as Context, SidebarTrigger as Trigger, SidebarFlyoutTrigger as FlyoutTrigger, SidebarBackdrop as Backdrop, SidebarHeader as Header, SidebarBody as Body, SidebarFooter as Footer, SidebarTrack as Track, SidebarGroup as Group, SidebarGroupHeader as GroupHeader, SidebarGroupTitle as GroupTitle, SidebarGroupEndElement as GroupEndElement, SidebarGroupContent as GroupContent, SidebarNavItem as NavItem, SidebarNavButton as NavButton, SidebarNavItemEndElement as NavItemEndElement, } from './sidebar.tsx';
2
+ export type { SidebarNavButtonProps as NavButtonProps, SidebarFlyoutTriggerProps as FlyoutTriggerProps, SidebarTriggerProps as TriggerProps, } from './sidebar.tsx';
3
+ export type { SidebarOptions as RootBaseProps, SidebarMode as Mode, } from './sidebar.types.ts';
4
+ export { SidebarProvider as Provider } from './sidebar.context.tsx';
5
+ export type { SidebarProviderProps as ProviderProps } from './sidebar.context.tsx';
@@ -0,0 +1,2 @@
1
+ export { SidebarRoot as Root, SidebarContext as Context, SidebarTrigger as Trigger, SidebarFlyoutTrigger as FlyoutTrigger, SidebarBackdrop as Backdrop, SidebarHeader as Header, SidebarBody as Body, SidebarFooter as Footer, SidebarTrack as Track, SidebarGroup as Group, SidebarGroupHeader as GroupHeader, SidebarGroupTitle as GroupTitle, SidebarGroupEndElement as GroupEndElement, SidebarGroupContent as GroupContent, SidebarNavItem as NavItem, SidebarNavButton as NavButton, SidebarNavItemEndElement as NavItemEndElement, } from "./sidebar.js";
2
+ export { SidebarProvider as Provider } from "./sidebar.context.js";