@masaraxui/react 1.0.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 (398) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -0
  3. package/dist/components/accordion/accordion.d.ts +30 -0
  4. package/dist/components/accordion/accordion.js +191 -0
  5. package/dist/components/accordion/index.d.ts +25 -0
  6. package/dist/components/accordion/index.js +18 -0
  7. package/dist/components/alert/alert.d.ts +15 -0
  8. package/dist/components/alert/alert.js +152 -0
  9. package/dist/components/alert/index.d.ts +21 -0
  10. package/dist/components/alert/index.js +16 -0
  11. package/dist/components/alert-dialog/alert-dialog.d.ts +65 -0
  12. package/dist/components/alert-dialog/alert-dialog.js +309 -0
  13. package/dist/components/alert-dialog/index.d.ts +33 -0
  14. package/dist/components/alert-dialog/index.js +22 -0
  15. package/dist/components/autocomplete/autocomplete.d.ts +31 -0
  16. package/dist/components/autocomplete/autocomplete.js +241 -0
  17. package/dist/components/autocomplete/index.d.ts +25 -0
  18. package/dist/components/autocomplete/index.js +18 -0
  19. package/dist/components/avatar/avatar.d.ts +15 -0
  20. package/dist/components/avatar/avatar.js +93 -0
  21. package/dist/components/avatar/index.d.ts +17 -0
  22. package/dist/components/avatar/index.js +14 -0
  23. package/dist/components/badge/badge.d.ts +19 -0
  24. package/dist/components/badge/badge.js +87 -0
  25. package/dist/components/badge/index.d.ts +17 -0
  26. package/dist/components/badge/index.js +14 -0
  27. package/dist/components/breadcrumbs/breadcrumbs.d.ts +14 -0
  28. package/dist/components/breadcrumbs/breadcrumbs.js +84 -0
  29. package/dist/components/breadcrumbs/index.d.ts +15 -0
  30. package/dist/components/breadcrumbs/index.js +13 -0
  31. package/dist/components/button/button.d.ts +10 -0
  32. package/dist/components/button/button.js +49 -0
  33. package/dist/components/button/index.d.ts +15 -0
  34. package/dist/components/button/index.js +13 -0
  35. package/dist/components/button-group/button-group.d.ts +26 -0
  36. package/dist/components/button-group/button-group.js +82 -0
  37. package/dist/components/button-group/index.d.ts +16 -0
  38. package/dist/components/button-group/index.js +14 -0
  39. package/dist/components/calendar/calendar.d.ts +71 -0
  40. package/dist/components/calendar/calendar.js +283 -0
  41. package/dist/components/calendar/index.d.ts +91 -0
  42. package/dist/components/calendar/index.js +29 -0
  43. package/dist/components/calendar-year-picker/calendar-year-picker.d.ts +61 -0
  44. package/dist/components/calendar-year-picker/calendar-year-picker.js +411 -0
  45. package/dist/components/calendar-year-picker/index.d.ts +43 -0
  46. package/dist/components/calendar-year-picker/index.js +18 -0
  47. package/dist/components/calendar-year-picker/year-picker-context.d.ts +28 -0
  48. package/dist/components/calendar-year-picker/year-picker-context.js +39 -0
  49. package/dist/components/card/card.d.ts +22 -0
  50. package/dist/components/card/card.js +141 -0
  51. package/dist/components/card/index.d.ts +23 -0
  52. package/dist/components/card/index.js +17 -0
  53. package/dist/components/checkbox/checkbox.d.ts +22 -0
  54. package/dist/components/checkbox/checkbox.js +124 -0
  55. package/dist/components/checkbox/index.d.ts +19 -0
  56. package/dist/components/checkbox/index.js +15 -0
  57. package/dist/components/checkbox-group/checkbox-group.d.ts +14 -0
  58. package/dist/components/checkbox-group/checkbox-group.js +33 -0
  59. package/dist/components/checkbox-group/index.d.ts +3 -0
  60. package/dist/components/checkbox-group/index.js +3 -0
  61. package/dist/components/chip/chip.d.ts +14 -0
  62. package/dist/components/chip/chip.js +67 -0
  63. package/dist/components/chip/index.d.ts +15 -0
  64. package/dist/components/chip/index.js +13 -0
  65. package/dist/components/close-button/close-button.d.ts +8 -0
  66. package/dist/components/close-button/close-button.js +33 -0
  67. package/dist/components/close-button/index.d.ts +13 -0
  68. package/dist/components/close-button/index.js +12 -0
  69. package/dist/components/color-area/color-area.d.ts +11 -0
  70. package/dist/components/color-area/color-area.js +70 -0
  71. package/dist/components/color-area/index.d.ts +15 -0
  72. package/dist/components/color-area/index.js +13 -0
  73. package/dist/components/color-field/color-field.d.ts +9 -0
  74. package/dist/components/color-field/color-field.js +29 -0
  75. package/dist/components/color-field/index.d.ts +22 -0
  76. package/dist/components/color-field/index.js +18 -0
  77. package/dist/components/color-input-group/color-input-group.d.ts +19 -0
  78. package/dist/components/color-input-group/color-input-group.js +98 -0
  79. package/dist/components/color-input-group/index.d.ts +19 -0
  80. package/dist/components/color-input-group/index.js +15 -0
  81. package/dist/components/color-picker/color-picker.d.ts +21 -0
  82. package/dist/components/color-picker/color-picker.js +86 -0
  83. package/dist/components/color-picker/index.d.ts +17 -0
  84. package/dist/components/color-picker/index.js +14 -0
  85. package/dist/components/color-slider/color-slider.d.ts +50 -0
  86. package/dist/components/color-slider/color-slider.js +205 -0
  87. package/dist/components/color-slider/index.d.ts +19 -0
  88. package/dist/components/color-slider/index.js +15 -0
  89. package/dist/components/color-swatch/color-swatch.d.ts +8 -0
  90. package/dist/components/color-swatch/color-swatch.js +31 -0
  91. package/dist/components/color-swatch/index.d.ts +13 -0
  92. package/dist/components/color-swatch/index.js +12 -0
  93. package/dist/components/color-swatch-picker/color-swatch-picker.d.ts +20 -0
  94. package/dist/components/color-swatch-picker/color-swatch-picker.js +149 -0
  95. package/dist/components/color-swatch-picker/index.d.ts +19 -0
  96. package/dist/components/color-swatch-picker/index.js +15 -0
  97. package/dist/components/combo-box/combo-box.d.ts +34 -0
  98. package/dist/components/combo-box/combo-box.js +116 -0
  99. package/dist/components/combo-box/index.d.ts +20 -0
  100. package/dist/components/combo-box/index.js +16 -0
  101. package/dist/components/date-field/date-field.d.ts +9 -0
  102. package/dist/components/date-field/date-field.js +29 -0
  103. package/dist/components/date-field/index.d.ts +26 -0
  104. package/dist/components/date-field/index.js +20 -0
  105. package/dist/components/date-input-group/date-input-group.d.ts +25 -0
  106. package/dist/components/date-input-group/date-input-group.js +146 -0
  107. package/dist/components/date-input-group/index.d.ts +23 -0
  108. package/dist/components/date-input-group/index.js +17 -0
  109. package/dist/components/date-picker/date-picker.d.ts +30 -0
  110. package/dist/components/date-picker/date-picker.js +151 -0
  111. package/dist/components/date-picker/index.d.ts +31 -0
  112. package/dist/components/date-picker/index.js +15 -0
  113. package/dist/components/date-range-picker/date-range-picker.d.ts +36 -0
  114. package/dist/components/date-range-picker/date-range-picker.js +173 -0
  115. package/dist/components/date-range-picker/index.d.ts +36 -0
  116. package/dist/components/date-range-picker/index.js +16 -0
  117. package/dist/components/description/description.d.ts +9 -0
  118. package/dist/components/description/description.js +22 -0
  119. package/dist/components/description/index.d.ts +13 -0
  120. package/dist/components/description/index.js +12 -0
  121. package/dist/components/disclosure/disclosure.d.ts +27 -0
  122. package/dist/components/disclosure/disclosure.js +157 -0
  123. package/dist/components/disclosure/index.d.ts +23 -0
  124. package/dist/components/disclosure/index.js +17 -0
  125. package/dist/components/disclosure-group/disclosure-group.d.ts +8 -0
  126. package/dist/components/disclosure-group/disclosure-group.js +35 -0
  127. package/dist/components/disclosure-group/index.d.ts +15 -0
  128. package/dist/components/disclosure-group/index.js +13 -0
  129. package/dist/components/disclosure-group/use-disclosure-group-navigation.d.ts +14 -0
  130. package/dist/components/disclosure-group/use-disclosure-group-navigation.js +51 -0
  131. package/dist/components/drawer/drawer.d.ts +84 -0
  132. package/dist/components/drawer/drawer.js +439 -0
  133. package/dist/components/drawer/index.d.ts +69 -0
  134. package/dist/components/drawer/index.js +22 -0
  135. package/dist/components/dropdown/dropdown.d.ts +38 -0
  136. package/dist/components/dropdown/dropdown.js +156 -0
  137. package/dist/components/dropdown/index.d.ts +29 -0
  138. package/dist/components/dropdown/index.js +20 -0
  139. package/dist/components/empty-state/empty-state.d.ts +7 -0
  140. package/dist/components/empty-state/empty-state.js +20 -0
  141. package/dist/components/empty-state/index.d.ts +13 -0
  142. package/dist/components/empty-state/index.js +12 -0
  143. package/dist/components/error-message/error-message.d.ts +9 -0
  144. package/dist/components/error-message/error-message.js +22 -0
  145. package/dist/components/error-message/index.d.ts +13 -0
  146. package/dist/components/error-message/index.js +12 -0
  147. package/dist/components/field-error/field-error.d.ts +8 -0
  148. package/dist/components/field-error/field-error.js +21 -0
  149. package/dist/components/field-error/index.d.ts +13 -0
  150. package/dist/components/field-error/index.js +12 -0
  151. package/dist/components/fieldset/fieldset.d.ts +16 -0
  152. package/dist/components/fieldset/fieldset.js +88 -0
  153. package/dist/components/fieldset/index.d.ts +19 -0
  154. package/dist/components/fieldset/index.js +15 -0
  155. package/dist/components/form/form.d.ts +7 -0
  156. package/dist/components/form/form.js +13 -0
  157. package/dist/components/form/index.d.ts +11 -0
  158. package/dist/components/form/index.js +11 -0
  159. package/dist/components/header/header.d.ts +7 -0
  160. package/dist/components/header/header.js +21 -0
  161. package/dist/components/header/index.d.ts +9 -0
  162. package/dist/components/header/index.js +10 -0
  163. package/dist/components/icons.d.ts +18 -0
  164. package/dist/components/icons.js +243 -0
  165. package/dist/components/index.d.ts +84 -0
  166. package/dist/components/input/index.d.ts +13 -0
  167. package/dist/components/input/index.js +12 -0
  168. package/dist/components/input/input.d.ts +8 -0
  169. package/dist/components/input/input.js +31 -0
  170. package/dist/components/input-group/index.d.ts +21 -0
  171. package/dist/components/input-group/index.js +16 -0
  172. package/dist/components/input-group/input-group.d.ts +20 -0
  173. package/dist/components/input-group/input-group.js +129 -0
  174. package/dist/components/input-otp/index.d.ts +22 -0
  175. package/dist/components/input-otp/index.js +21 -0
  176. package/dist/components/input-otp/input-otp.d.ts +26 -0
  177. package/dist/components/input-otp/input-otp.js +139 -0
  178. package/dist/components/kbd/index.d.ts +19 -0
  179. package/dist/components/kbd/index.js +15 -0
  180. package/dist/components/kbd/kbd.constants.d.ts +3 -0
  181. package/dist/components/kbd/kbd.constants.js +51 -0
  182. package/dist/components/kbd/kbd.d.ts +24 -0
  183. package/dist/components/kbd/kbd.js +76 -0
  184. package/dist/components/label/index.d.ts +13 -0
  185. package/dist/components/label/index.js +12 -0
  186. package/dist/components/label/label.d.ts +8 -0
  187. package/dist/components/label/label.js +27 -0
  188. package/dist/components/link/index.d.ts +15 -0
  189. package/dist/components/link/index.js +13 -0
  190. package/dist/components/link/link.d.ts +10 -0
  191. package/dist/components/link/link.js +59 -0
  192. package/dist/components/list-box/index.d.ts +23 -0
  193. package/dist/components/list-box/index.js +18 -0
  194. package/dist/components/list-box/list-box.d.ts +9 -0
  195. package/dist/components/list-box/list-box.js +23 -0
  196. package/dist/components/list-box-item/index.d.ts +15 -0
  197. package/dist/components/list-box-item/index.js +13 -0
  198. package/dist/components/list-box-item/list-box-item.d.ts +15 -0
  199. package/dist/components/list-box-item/list-box-item.js +77 -0
  200. package/dist/components/list-box-section/index.d.ts +10 -0
  201. package/dist/components/list-box-section/index.js +10 -0
  202. package/dist/components/list-box-section/list-box-section.d.ts +8 -0
  203. package/dist/components/list-box-section/list-box-section.js +22 -0
  204. package/dist/components/menu/index.d.ts +24 -0
  205. package/dist/components/menu/index.js +18 -0
  206. package/dist/components/menu/menu.d.ts +9 -0
  207. package/dist/components/menu/menu.js +20 -0
  208. package/dist/components/menu-item/index.d.ts +17 -0
  209. package/dist/components/menu-item/index.js +14 -0
  210. package/dist/components/menu-item/menu-item.d.ts +20 -0
  211. package/dist/components/menu-item/menu-item.js +123 -0
  212. package/dist/components/menu-section/index.d.ts +10 -0
  213. package/dist/components/menu-section/index.js +10 -0
  214. package/dist/components/menu-section/menu-section.d.ts +8 -0
  215. package/dist/components/menu-section/menu-section.js +22 -0
  216. package/dist/components/meter/index.d.ts +34 -0
  217. package/dist/components/meter/index.js +15 -0
  218. package/dist/components/meter/meter.d.ts +29 -0
  219. package/dist/components/meter/meter.js +108 -0
  220. package/dist/components/modal/index.d.ts +33 -0
  221. package/dist/components/modal/index.js +22 -0
  222. package/dist/components/modal/modal.d.ts +53 -0
  223. package/dist/components/modal/modal.js +288 -0
  224. package/dist/components/number-field/index.d.ts +21 -0
  225. package/dist/components/number-field/index.js +16 -0
  226. package/dist/components/number-field/number-field.d.ts +20 -0
  227. package/dist/components/number-field/number-field.js +127 -0
  228. package/dist/components/pagination/index.d.ts +64 -0
  229. package/dist/components/pagination/index.js +21 -0
  230. package/dist/components/pagination/pagination.d.ts +84 -0
  231. package/dist/components/pagination/pagination.js +230 -0
  232. package/dist/components/popover/index.d.ts +23 -0
  233. package/dist/components/popover/index.js +17 -0
  234. package/dist/components/popover/popover.d.ts +24 -0
  235. package/dist/components/popover/popover.js +153 -0
  236. package/dist/components/progress-bar/index.d.ts +34 -0
  237. package/dist/components/progress-bar/index.js +15 -0
  238. package/dist/components/progress-bar/progress-bar.d.ts +29 -0
  239. package/dist/components/progress-bar/progress-bar.js +108 -0
  240. package/dist/components/progress-circle/index.d.ts +34 -0
  241. package/dist/components/progress-circle/index.js +15 -0
  242. package/dist/components/progress-circle/progress-circle.d.ts +29 -0
  243. package/dist/components/progress-circle/progress-circle.js +126 -0
  244. package/dist/components/rac/components.d.ts +1 -0
  245. package/dist/components/rac/index.d.ts +5 -0
  246. package/dist/components/rac/index.js +3 -0
  247. package/dist/components/rac/types.d.ts +3 -0
  248. package/dist/components/rac/utils.d.ts +1 -0
  249. package/dist/components/radio/index.d.ts +19 -0
  250. package/dist/components/radio/index.js +15 -0
  251. package/dist/components/radio/radio.d.ts +21 -0
  252. package/dist/components/radio/radio.js +97 -0
  253. package/dist/components/radio-group/index.d.ts +13 -0
  254. package/dist/components/radio-group/index.js +12 -0
  255. package/dist/components/radio-group/radio-group.d.ts +8 -0
  256. package/dist/components/radio-group/radio-group.js +27 -0
  257. package/dist/components/range-calendar/index.d.ts +91 -0
  258. package/dist/components/range-calendar/index.js +29 -0
  259. package/dist/components/range-calendar/range-calendar.d.ts +71 -0
  260. package/dist/components/range-calendar/range-calendar.js +298 -0
  261. package/dist/components/scroll-shadow/index.d.ts +21 -0
  262. package/dist/components/scroll-shadow/index.js +13 -0
  263. package/dist/components/scroll-shadow/scroll-shadow.d.ts +32 -0
  264. package/dist/components/scroll-shadow/scroll-shadow.js +76 -0
  265. package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +11 -0
  266. package/dist/components/scroll-shadow/use-scroll-shadow.js +121 -0
  267. package/dist/components/search-field/index.d.ts +21 -0
  268. package/dist/components/search-field/index.js +16 -0
  269. package/dist/components/search-field/search-field.d.ts +23 -0
  270. package/dist/components/search-field/search-field.js +127 -0
  271. package/dist/components/select/index.d.ts +21 -0
  272. package/dist/components/select/index.js +16 -0
  273. package/dist/components/select/select.d.ts +24 -0
  274. package/dist/components/select/select.js +140 -0
  275. package/dist/components/separator/index.d.ts +13 -0
  276. package/dist/components/separator/index.js +12 -0
  277. package/dist/components/separator/separator.d.ts +8 -0
  278. package/dist/components/separator/separator.js +27 -0
  279. package/dist/components/skeleton/index.d.ts +13 -0
  280. package/dist/components/skeleton/index.js +12 -0
  281. package/dist/components/skeleton/skeleton.d.ts +7 -0
  282. package/dist/components/skeleton/skeleton.js +25 -0
  283. package/dist/components/slider/index.d.ts +23 -0
  284. package/dist/components/slider/index.js +17 -0
  285. package/dist/components/slider/slider.d.ts +23 -0
  286. package/dist/components/slider/slider.js +177 -0
  287. package/dist/components/spinner/index.d.ts +13 -0
  288. package/dist/components/spinner/index.js +12 -0
  289. package/dist/components/spinner/spinner.d.ts +7 -0
  290. package/dist/components/spinner/spinner.js +88 -0
  291. package/dist/components/surface/index.d.ts +14 -0
  292. package/dist/components/surface/index.js +13 -0
  293. package/dist/components/surface/surface.d.ts +12 -0
  294. package/dist/components/surface/surface.js +34 -0
  295. package/dist/components/switch/index.d.ts +21 -0
  296. package/dist/components/switch/index.js +16 -0
  297. package/dist/components/switch/switch.d.ts +20 -0
  298. package/dist/components/switch/switch.js +118 -0
  299. package/dist/components/switch-group/index.d.ts +13 -0
  300. package/dist/components/switch-group/index.js +12 -0
  301. package/dist/components/switch-group/switch-group.d.ts +7 -0
  302. package/dist/components/switch-group/switch-group.js +25 -0
  303. package/dist/components/table/index.d.ts +38 -0
  304. package/dist/components/table/index.js +25 -0
  305. package/dist/components/table/table.d.ts +50 -0
  306. package/dist/components/table/table.js +283 -0
  307. package/dist/components/tabs/index.d.ts +25 -0
  308. package/dist/components/tabs/index.js +18 -0
  309. package/dist/components/tabs/tabs.d.ts +37 -0
  310. package/dist/components/tabs/tabs.js +156 -0
  311. package/dist/components/tag/index.d.ts +15 -0
  312. package/dist/components/tag/index.js +13 -0
  313. package/dist/components/tag/tag.d.ts +14 -0
  314. package/dist/components/tag/tag.js +85 -0
  315. package/dist/components/tag-group/index.d.ts +15 -0
  316. package/dist/components/tag-group/index.js +14 -0
  317. package/dist/components/tag-group/tag-group.d.ts +20 -0
  318. package/dist/components/tag-group/tag-group.js +59 -0
  319. package/dist/components/text/index.d.ts +13 -0
  320. package/dist/components/text/index.js +12 -0
  321. package/dist/components/text/text.d.ts +8 -0
  322. package/dist/components/text/text.js +25 -0
  323. package/dist/components/textarea/index.d.ts +13 -0
  324. package/dist/components/textarea/index.js +12 -0
  325. package/dist/components/textarea/textarea.d.ts +8 -0
  326. package/dist/components/textarea/textarea.js +27 -0
  327. package/dist/components/textfield/index.d.ts +14 -0
  328. package/dist/components/textfield/index.js +13 -0
  329. package/dist/components/textfield/textfield.d.ts +18 -0
  330. package/dist/components/textfield/textfield.js +39 -0
  331. package/dist/components/time-field/index.d.ts +26 -0
  332. package/dist/components/time-field/index.js +20 -0
  333. package/dist/components/time-field/time-field.d.ts +9 -0
  334. package/dist/components/time-field/time-field.js +29 -0
  335. package/dist/components/toast/constants.d.ts +6 -0
  336. package/dist/components/toast/constants.js +15 -0
  337. package/dist/components/toast/index.d.ts +75 -0
  338. package/dist/components/toast/index.js +23 -0
  339. package/dist/components/toast/toast-queue.d.ts +70 -0
  340. package/dist/components/toast/toast-queue.js +147 -0
  341. package/dist/components/toast/toast.d.ts +69 -0
  342. package/dist/components/toast/toast.js +365 -0
  343. package/dist/components/toggle-button/index.d.ts +13 -0
  344. package/dist/components/toggle-button/index.js +12 -0
  345. package/dist/components/toggle-button/toggle-button.d.ts +8 -0
  346. package/dist/components/toggle-button/toggle-button.js +36 -0
  347. package/dist/components/toggle-button-group/index.d.ts +16 -0
  348. package/dist/components/toggle-button-group/index.js +14 -0
  349. package/dist/components/toggle-button-group/toggle-button-group.d.ts +25 -0
  350. package/dist/components/toggle-button-group/toggle-button-group.js +70 -0
  351. package/dist/components/toolbar/index.d.ts +19 -0
  352. package/dist/components/toolbar/index.js +12 -0
  353. package/dist/components/toolbar/toolbar.d.ts +11 -0
  354. package/dist/components/toolbar/toolbar.js +39 -0
  355. package/dist/components/tooltip/index.d.ts +19 -0
  356. package/dist/components/tooltip/index.js +15 -0
  357. package/dist/components/tooltip/tooltip.d.ts +20 -0
  358. package/dist/components/tooltip/tooltip.js +106 -0
  359. package/dist/hooks/index.d.ts +9 -0
  360. package/dist/hooks/use-css-variable.d.ts +36 -0
  361. package/dist/hooks/use-css-variable.js +72 -0
  362. package/dist/hooks/use-is-hydrated.d.ts +19 -0
  363. package/dist/hooks/use-is-hydrated.js +28 -0
  364. package/dist/hooks/use-isomorphic-layout-effect.d.ts +2 -0
  365. package/dist/hooks/use-isomorphic-layout-effect.js +6 -0
  366. package/dist/hooks/use-list-data.d.ts +111 -0
  367. package/dist/hooks/use-list-data.js +296 -0
  368. package/dist/hooks/use-measured-height.d.ts +4 -0
  369. package/dist/hooks/use-measured-height.js +47 -0
  370. package/dist/hooks/use-media-query.d.ts +6 -0
  371. package/dist/hooks/use-media-query.js +50 -0
  372. package/dist/hooks/use-mounted.d.ts +1 -0
  373. package/dist/hooks/use-mounted.js +15 -0
  374. package/dist/hooks/use-overlay-state.d.ts +52 -0
  375. package/dist/hooks/use-overlay-state.js +70 -0
  376. package/dist/hooks/use-safe-layout-effect.d.ts +2 -0
  377. package/dist/hooks/use-safe-layout-effect.js +6 -0
  378. package/dist/index.d.ts +3 -0
  379. package/dist/index.js +190 -0
  380. package/dist/prerelease.d.ts +4 -0
  381. package/dist/prerelease.js +50 -0
  382. package/dist/styles.css +2 -0
  383. package/dist/utils/assertion.d.ts +9 -0
  384. package/dist/utils/assertion.js +3 -0
  385. package/dist/utils/calendar.d.ts +12 -0
  386. package/dist/utils/calendar.js +52 -0
  387. package/dist/utils/children.d.ts +9 -0
  388. package/dist/utils/children.js +17 -0
  389. package/dist/utils/compose.d.ts +7 -0
  390. package/dist/utils/compose.js +18 -0
  391. package/dist/utils/index.d.ts +6 -0
  392. package/dist/utils/logger.d.ts +23 -0
  393. package/dist/utils/logger.js +78 -0
  394. package/dist/utils/tv.d.ts +3 -0
  395. package/dist/utils/variants.d.ts +73 -0
  396. package/dist/version.d.ts +1 -0
  397. package/dist/version.js +5 -0
  398. package/package.json +406 -0
@@ -0,0 +1,139 @@
1
+ "use client";
2
+ import { inputOTPVariants } from '@masaraxui/styles';
3
+ import { OTPInput, OTPInputContext } from 'input-otp';
4
+ import React__default, { createContext, useContext } from 'react';
5
+ import { FieldErrorContext } from 'react-aria-components';
6
+ import { dataAttr } from '../../utils/assertion.js';
7
+ import { composeSlotClassName } from '../../utils/compose.js';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ const InputOTPContext = /*#__PURE__*/createContext({
11
+ isDisabled: false,
12
+ isInvalid: false
13
+ });
14
+
15
+ /* -------------------------------------------------------------------------------------------------
16
+ * Input OTP Root
17
+ * -----------------------------------------------------------------------------------------------*/
18
+
19
+ const InputOTPRoot = ({
20
+ className,
21
+ inputClassName,
22
+ isDisabled = false,
23
+ isInvalid = false,
24
+ validationDetails,
25
+ validationErrors = [],
26
+ variant,
27
+ ...props
28
+ }) => {
29
+ const slots = React__default.useMemo(() => inputOTPVariants({
30
+ variant
31
+ }), [variant]);
32
+ const validation = React__default.useMemo(() => ({
33
+ isInvalid,
34
+ validationErrors,
35
+ validationDetails
36
+ }), [isInvalid, validationErrors, validationDetails]);
37
+ return /*#__PURE__*/jsx(InputOTPContext, {
38
+ value: {
39
+ slots,
40
+ isDisabled,
41
+ isInvalid
42
+ },
43
+ children: /*#__PURE__*/jsx(FieldErrorContext, {
44
+ value: validation,
45
+ children: /*#__PURE__*/jsx(OTPInput
46
+ // OTP Input package uses the `className` prop for the actual `input` element which is not visible to the user so no need to pass it to the base container
47
+ , {
48
+ className: slots.input({
49
+ className: inputClassName
50
+ }),
51
+ containerClassName: slots.base({
52
+ className
53
+ }),
54
+ "data-disabled": dataAttr(isDisabled),
55
+ "data-invalid": dataAttr(isInvalid),
56
+ "data-slot": "input-otp",
57
+ disabled: isDisabled,
58
+ ...props
59
+ })
60
+ })
61
+ });
62
+ };
63
+
64
+ /* -------------------------------------------------------------------------------------------------
65
+ * Input OTP Group
66
+ * -----------------------------------------------------------------------------------------------*/
67
+
68
+ const InputOTPGroup = ({
69
+ className,
70
+ ...props
71
+ }) => {
72
+ const {
73
+ slots
74
+ } = useContext(InputOTPContext);
75
+ return /*#__PURE__*/jsx("div", {
76
+ className: composeSlotClassName(slots?.group, className),
77
+ "data-slot": "input-otp-group",
78
+ ...props
79
+ });
80
+ };
81
+
82
+ /* -------------------------------------------------------------------------------------------------
83
+ * Input OTP Slot
84
+ * -----------------------------------------------------------------------------------------------*/
85
+
86
+ const InputOTPSlot = ({
87
+ className,
88
+ index,
89
+ ...props
90
+ }) => {
91
+ const {
92
+ isDisabled,
93
+ isInvalid,
94
+ slots
95
+ } = useContext(InputOTPContext);
96
+ const inputOTPContext = useContext(OTPInputContext);
97
+ const {
98
+ char,
99
+ hasFakeCaret,
100
+ isActive
101
+ } = inputOTPContext?.slots[index] ?? {};
102
+ return /*#__PURE__*/jsxs("div", {
103
+ ...props,
104
+ className: composeSlotClassName(slots?.slot, className),
105
+ "data-active": dataAttr(isActive),
106
+ "data-disabled": dataAttr(isDisabled),
107
+ "data-filled": dataAttr(!!char),
108
+ "data-invalid": dataAttr(isInvalid),
109
+ "data-slot": "input-otp-slot",
110
+ children: [char ? /*#__PURE__*/jsx("div", {
111
+ className: slots?.slotValue(),
112
+ "data-slot": "input-otp-slot-value",
113
+ children: char
114
+ }) : null, hasFakeCaret && isActive ? /*#__PURE__*/jsx("div", {
115
+ className: slots?.caret(),
116
+ "data-slot": "input-otp-caret"
117
+ }) : null]
118
+ });
119
+ };
120
+
121
+ /* -------------------------------------------------------------------------------------------------
122
+ * Input OTP Separator
123
+ * -----------------------------------------------------------------------------------------------*/
124
+
125
+ const InputOTPSeparator = ({
126
+ className,
127
+ ...props
128
+ }) => {
129
+ const {
130
+ slots
131
+ } = useContext(InputOTPContext);
132
+ return /*#__PURE__*/jsx("div", {
133
+ className: composeSlotClassName(slots?.separator, className),
134
+ "data-slot": "input-otp-separator",
135
+ ...props
136
+ });
137
+ };
138
+
139
+ export { InputOTPGroup, InputOTPRoot, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,19 @@
1
+ import type { ComponentProps } from "react";
2
+ import { KbdAbbr, KbdContent, KbdRoot } from "./kbd";
3
+ export declare const Kbd: (({ children, className, variant, ...props }: import("./kbd").KbdRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ children, className, variant, ...props }: import("./kbd").KbdRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ Abbr: ({ className, keyValue, ...props }: import("./kbd").KbdAbbrProps) => import("react/jsx-runtime").JSX.Element;
6
+ Content: ({ children, className, ...props }: import("./kbd").KbdContentProps) => import("react/jsx-runtime").JSX.Element;
7
+ };
8
+ export type Kbd = {
9
+ Props: ComponentProps<typeof KbdRoot>;
10
+ RootProps: ComponentProps<typeof KbdRoot>;
11
+ AbbrProps: ComponentProps<typeof KbdAbbr>;
12
+ ContentProps: ComponentProps<typeof KbdContent>;
13
+ };
14
+ export { KbdRoot, KbdAbbr, KbdContent };
15
+ export type { KbdRootProps, KbdAbbrProps, KbdContentProps, KbdRootProps as KbdProps } from "./kbd";
16
+ export { kbdVariants } from "@masaraxui/styles";
17
+ export type { KbdVariants } from "@masaraxui/styles";
18
+ export { kbdKeysMap, kbdKeysLabelMap } from "./kbd.constants";
19
+ export type { KbdKey } from "./kbd.constants";
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ import { KbdRoot, KbdContent, KbdAbbr } from './kbd.js';
3
+ export { kbdVariants } from '@masaraxui/styles';
4
+ export { kbdKeysLabelMap, kbdKeysMap } from './kbd.constants.js';
5
+
6
+ /* -------------------------------------------------------------------------------------------------
7
+ * Compound Component
8
+ * -----------------------------------------------------------------------------------------------*/
9
+ const Kbd = Object.assign(KbdRoot, {
10
+ Root: KbdRoot,
11
+ Abbr: KbdAbbr,
12
+ Content: KbdContent
13
+ });
14
+
15
+ export { Kbd, KbdAbbr, KbdContent, KbdRoot };
@@ -0,0 +1,3 @@
1
+ export type KbdKey = "command" | "shift" | "ctrl" | "option" | "enter" | "delete" | "escape" | "tab" | "capslock" | "up" | "right" | "down" | "left" | "pageup" | "pagedown" | "home" | "end" | "help" | "space" | "fn" | "win" | "alt";
2
+ export declare const kbdKeysMap: Record<KbdKey, string>;
3
+ export declare const kbdKeysLabelMap: Record<KbdKey, string>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ const kbdKeysMap = {
3
+ command: "⌘",
4
+ shift: "⇧",
5
+ ctrl: "⌃",
6
+ option: "⌥",
7
+ enter: "↵",
8
+ delete: "⌫",
9
+ escape: "⎋",
10
+ tab: "⇥",
11
+ capslock: "⇪",
12
+ up: "↑",
13
+ right: "→",
14
+ down: "↓",
15
+ left: "←",
16
+ pageup: "⇞",
17
+ pagedown: "⇟",
18
+ home: "↖",
19
+ end: "↘",
20
+ help: "?",
21
+ space: "␣",
22
+ fn: "Fn",
23
+ win: "⌘",
24
+ alt: "⌥"
25
+ };
26
+ const kbdKeysLabelMap = {
27
+ command: "Command",
28
+ shift: "Shift",
29
+ ctrl: "Control",
30
+ option: "Option",
31
+ enter: "Enter",
32
+ delete: "Delete",
33
+ escape: "Escape",
34
+ tab: "Tab",
35
+ capslock: "Caps Lock",
36
+ up: "Up",
37
+ right: "Right",
38
+ down: "Down",
39
+ left: "Left",
40
+ pageup: "Page Up",
41
+ pagedown: "Page Down",
42
+ home: "Home",
43
+ end: "End",
44
+ help: "Help",
45
+ space: "Space",
46
+ fn: "Fn",
47
+ win: "Win",
48
+ alt: "Alt"
49
+ };
50
+
51
+ export { kbdKeysLabelMap, kbdKeysMap };
@@ -0,0 +1,24 @@
1
+ import type { KbdKey } from "./kbd.constants";
2
+ import type { KbdVariants } from "@masaraxui/styles";
3
+ import type { ComponentPropsWithRef } from "react";
4
+ import React from "react";
5
+ interface KbdRootProps extends ComponentPropsWithRef<"kbd">, KbdVariants {
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ }
9
+ declare const KbdRoot: ({ children, className, variant, ...props }: KbdRootProps) => import("react/jsx-runtime").JSX.Element;
10
+ interface KbdAbbrProps extends ComponentPropsWithRef<"abbr"> {
11
+ className?: string;
12
+ /**
13
+ * The keyboard key to display
14
+ */
15
+ keyValue: KbdKey;
16
+ }
17
+ declare const KbdAbbr: ({ className, keyValue, ...props }: KbdAbbrProps) => import("react/jsx-runtime").JSX.Element;
18
+ interface KbdContentProps extends ComponentPropsWithRef<"span"> {
19
+ children: React.ReactNode;
20
+ className?: string;
21
+ }
22
+ declare const KbdContent: ({ children, className, ...props }: KbdContentProps) => import("react/jsx-runtime").JSX.Element;
23
+ export { KbdRoot, KbdAbbr, KbdContent };
24
+ export type { KbdRootProps, KbdAbbrProps, KbdContentProps };
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import { kbdVariants } from '@masaraxui/styles';
3
+ import React__default, { createContext, useContext } from 'react';
4
+ import { composeSlotClassName } from '../../utils/compose.js';
5
+ import { kbdKeysMap, kbdKeysLabelMap } from './kbd.constants.js';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ const KbdContext = /*#__PURE__*/createContext({});
9
+
10
+ /* -------------------------------------------------------------------------------------------------
11
+ * Kbd Root
12
+ * -----------------------------------------------------------------------------------------------*/
13
+
14
+ const KbdRoot = ({
15
+ children,
16
+ className,
17
+ variant,
18
+ ...props
19
+ }) => {
20
+ const slots = React__default.useMemo(() => kbdVariants({
21
+ variant
22
+ }), [variant]);
23
+ return /*#__PURE__*/jsx(KbdContext, {
24
+ value: {
25
+ slots
26
+ },
27
+ children: /*#__PURE__*/jsx("kbd", {
28
+ ...props,
29
+ className: slots.base({
30
+ className
31
+ }),
32
+ children: children
33
+ })
34
+ });
35
+ };
36
+
37
+ /* -------------------------------------------------------------------------------------------------
38
+ * Kbd Abbr
39
+ * -----------------------------------------------------------------------------------------------*/
40
+
41
+ const KbdAbbr = ({
42
+ className,
43
+ keyValue,
44
+ ...props
45
+ }) => {
46
+ const {
47
+ slots
48
+ } = useContext(KbdContext);
49
+ return /*#__PURE__*/jsx("abbr", {
50
+ className: composeSlotClassName(slots?.abbr, className),
51
+ title: kbdKeysLabelMap[keyValue],
52
+ ...props,
53
+ children: kbdKeysMap[keyValue]
54
+ });
55
+ };
56
+
57
+ /* -------------------------------------------------------------------------------------------------
58
+ * Kbd Content
59
+ * -----------------------------------------------------------------------------------------------*/
60
+
61
+ const KbdContent = ({
62
+ children,
63
+ className,
64
+ ...props
65
+ }) => {
66
+ const {
67
+ slots
68
+ } = useContext(KbdContext);
69
+ return /*#__PURE__*/jsx("span", {
70
+ className: composeSlotClassName(slots?.content, className),
71
+ ...props,
72
+ children: children
73
+ });
74
+ };
75
+
76
+ export { KbdAbbr, KbdContent, KbdRoot };
@@ -0,0 +1,13 @@
1
+ import type { ComponentProps } from "react";
2
+ import { LabelRoot } from "./label";
3
+ export declare const Label: (({ children, className, isDisabled, isInvalid, isRequired, ...rest }: import("./label").LabelRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ children, className, isDisabled, isInvalid, isRequired, ...rest }: import("./label").LabelRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ export type Label = {
7
+ Props: ComponentProps<typeof LabelRoot>;
8
+ RootProps: ComponentProps<typeof LabelRoot>;
9
+ };
10
+ export { LabelRoot };
11
+ export type { LabelRootProps, LabelRootProps as LabelProps } from "./label";
12
+ export { labelVariants } from "@masaraxui/styles";
13
+ export type { LabelVariants } from "@masaraxui/styles";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ import { LabelRoot } from './label.js';
3
+ export { labelVariants } from '@masaraxui/styles';
4
+
5
+ /* -------------------------------------------------------------------------------------------------
6
+ * Compound Component
7
+ * -----------------------------------------------------------------------------------------------*/
8
+ const Label = Object.assign(LabelRoot, {
9
+ Root: LabelRoot
10
+ });
11
+
12
+ export { Label, LabelRoot };
@@ -0,0 +1,8 @@
1
+ import type { LabelVariants } from "@masaraxui/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ import { Label as LabelPrimitive } from "react-aria-components";
4
+ interface LabelRootProps extends ComponentPropsWithRef<typeof LabelPrimitive>, LabelVariants {
5
+ }
6
+ declare const LabelRoot: ({ children, className, isDisabled, isInvalid, isRequired, ...rest }: LabelRootProps) => import("react/jsx-runtime").JSX.Element;
7
+ export { LabelRoot };
8
+ export type { LabelRootProps };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { labelVariants } from '@masaraxui/styles';
3
+ import { Label } from 'react-aria-components';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ const LabelRoot = ({
7
+ children,
8
+ className,
9
+ isDisabled,
10
+ isInvalid,
11
+ isRequired,
12
+ ...rest
13
+ }) => {
14
+ return /*#__PURE__*/jsx(Label, {
15
+ className: labelVariants({
16
+ isRequired,
17
+ isDisabled,
18
+ isInvalid,
19
+ className
20
+ }),
21
+ "data-slot": "label",
22
+ ...rest,
23
+ children: children
24
+ });
25
+ };
26
+
27
+ export { LabelRoot };
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps } from "react";
2
+ import { LinkIcon, LinkRoot } from "./link";
3
+ export declare const Link: (({ children, className, ...props }: import("./link").LinkRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ children, className, ...props }: import("./link").LinkRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ Icon: ({ children, className, ...rest }: import("./link").LinkIconProps) => import("react/jsx-runtime").JSX.Element;
6
+ };
7
+ export type Link = {
8
+ Props: ComponentProps<typeof LinkRoot>;
9
+ RootProps: ComponentProps<typeof LinkRoot>;
10
+ IconProps: ComponentProps<typeof LinkIcon>;
11
+ };
12
+ export { LinkRoot, LinkIcon };
13
+ export type { LinkRootProps, LinkIconProps, LinkRootProps as LinkProps } from "./link";
14
+ export { linkVariants } from "@masaraxui/styles";
15
+ export type { LinkVariants } from "@masaraxui/styles";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ import { LinkRoot, LinkIcon } from './link.js';
3
+ export { linkVariants } from '@masaraxui/styles';
4
+
5
+ /* -------------------------------------------------------------------------------------------------
6
+ * Compound Component
7
+ * -----------------------------------------------------------------------------------------------*/
8
+ const Link = Object.assign(LinkRoot, {
9
+ Root: LinkRoot,
10
+ Icon: LinkIcon
11
+ });
12
+
13
+ export { Link, LinkIcon, LinkRoot };
@@ -0,0 +1,10 @@
1
+ import type { LinkVariants } from "@masaraxui/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ import { Link as LinkPrimitive } from "react-aria-components";
4
+ interface LinkRootProps extends ComponentPropsWithRef<typeof LinkPrimitive>, LinkVariants {
5
+ }
6
+ declare const LinkRoot: ({ children, className, ...props }: LinkRootProps) => import("react/jsx-runtime").JSX.Element;
7
+ type LinkIconProps = ComponentPropsWithRef<"span">;
8
+ declare const LinkIcon: ({ children, className, ...rest }: LinkIconProps) => import("react/jsx-runtime").JSX.Element;
9
+ export { LinkRoot, LinkIcon };
10
+ export type { LinkRootProps, LinkIconProps };
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { linkVariants } from '@masaraxui/styles';
3
+ import React__default, { createContext, useContext } from 'react';
4
+ import { Link } from 'react-aria-components';
5
+ import { dataAttr } from '../../utils/assertion.js';
6
+ import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
7
+ import { ExternalLinkIcon } from '../icons.js';
8
+ import { jsx, Fragment } from 'react/jsx-runtime';
9
+
10
+ const LinkContext = /*#__PURE__*/createContext({});
11
+
12
+ /* ------------------------------------------------------------------------------------------------
13
+ * Link Root
14
+ * --------------------------------------------------------------------------------------------- */
15
+
16
+ const LinkRoot = ({
17
+ children,
18
+ className,
19
+ ...props
20
+ }) => {
21
+ const slots = React__default.useMemo(() => linkVariants(), []);
22
+ return /*#__PURE__*/jsx(LinkContext, {
23
+ value: {
24
+ slots
25
+ },
26
+ children: /*#__PURE__*/jsx(Link, {
27
+ ...props,
28
+ className: composeTwRenderProps(className, slots?.base()),
29
+ children: values => /*#__PURE__*/jsx(Fragment, {
30
+ children: typeof children === "function" ? children(values) : children
31
+ })
32
+ })
33
+ });
34
+ };
35
+
36
+ /* ------------------------------------------------------------------------------------------------
37
+ * Link Icon
38
+ * --------------------------------------------------------------------------------------------- */
39
+
40
+ const LinkIcon = ({
41
+ children,
42
+ className,
43
+ ...rest
44
+ }) => {
45
+ const {
46
+ slots
47
+ } = useContext(LinkContext);
48
+ return /*#__PURE__*/jsx("span", {
49
+ className: composeSlotClassName(slots?.icon, className),
50
+ "data-default-icon": dataAttr(!children),
51
+ "data-slot": "link-icon",
52
+ ...rest,
53
+ children: children ?? /*#__PURE__*/jsx(ExternalLinkIcon, {
54
+ "data-slot": "link-default-icon"
55
+ })
56
+ });
57
+ };
58
+
59
+ export { LinkIcon, LinkRoot };
@@ -0,0 +1,23 @@
1
+ import type { ComponentProps } from "react";
2
+ import { ListBoxItem } from "../list-box-item";
3
+ import { ListBoxSection } from "../list-box-section";
4
+ import { ListBoxRoot } from "./list-box";
5
+ export declare const ListBox: typeof ListBoxRoot & {
6
+ Root: typeof ListBoxRoot;
7
+ Item: (({ children, className, variant, ...props }: import("..").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element) & {
8
+ Root: ({ children, className, variant, ...props }: import("..").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element;
9
+ Indicator: ({ children, className, ...props }: import("..").ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
10
+ };
11
+ ItemIndicator: ({ children, className, ...props }: import("..").ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
12
+ Section: ({ children, className, ...props }: import("..").ListBoxSectionRootProps) => import("react/jsx-runtime").JSX.Element;
13
+ };
14
+ export type ListBox = {
15
+ Props: ComponentProps<typeof ListBoxRoot>;
16
+ RootProps: ComponentProps<typeof ListBoxRoot>;
17
+ ItemProps: ComponentProps<typeof ListBoxItem>;
18
+ SectionProps: ComponentProps<typeof ListBoxSection>;
19
+ };
20
+ export { ListBoxRoot };
21
+ export type { ListBoxRootProps, ListBoxRootProps as ListBoxProps } from "./list-box";
22
+ export { listboxVariants } from "@masaraxui/styles";
23
+ export type { ListBoxVariants } from "@masaraxui/styles";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ import { ListBoxItem } from '../list-box-item/index.js';
3
+ import { ListBoxSection } from '../list-box-section/index.js';
4
+ import { ListBoxRoot } from './list-box.js';
5
+ export { listboxVariants } from '@masaraxui/styles';
6
+ import { ListBoxItemIndicator } from '../list-box-item/list-box-item.js';
7
+
8
+ /* -------------------------------------------------------------------------------------------------
9
+ * Compound Component
10
+ * -----------------------------------------------------------------------------------------------*/
11
+ const ListBox = Object.assign(ListBoxRoot, {
12
+ Root: ListBoxRoot,
13
+ Item: ListBoxItem,
14
+ ItemIndicator: ListBoxItemIndicator,
15
+ Section: ListBoxSection
16
+ });
17
+
18
+ export { ListBox, ListBoxRoot };
@@ -0,0 +1,9 @@
1
+ import type { ListBoxVariants } from "@masaraxui/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ import { ListBox as ListBoxPrimitive } from "react-aria-components";
4
+ interface ListBoxRootProps<T extends object> extends ComponentPropsWithRef<typeof ListBoxPrimitive<T>>, ListBoxVariants {
5
+ className?: string;
6
+ }
7
+ declare function ListBoxRoot<T extends object>({ className, variant, ...props }: ListBoxRootProps<T>): import("react/jsx-runtime").JSX.Element;
8
+ export { ListBoxRoot };
9
+ export type { ListBoxRootProps };
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { listboxVariants } from '@masaraxui/styles';
3
+ import React__default from 'react';
4
+ import { ListBox } from 'react-aria-components';
5
+ import { jsx } from 'react/jsx-runtime';
6
+ import { composeTwRenderProps } from '../../utils/compose.js';
7
+
8
+ function ListBoxRoot({
9
+ className,
10
+ variant,
11
+ ...props
12
+ }) {
13
+ const styles = React__default.useMemo(() => listboxVariants({
14
+ variant
15
+ }), [variant]);
16
+ return /*#__PURE__*/jsx(ListBox, {
17
+ className: composeTwRenderProps(className, styles),
18
+ "data-slot": "list-box",
19
+ ...props
20
+ });
21
+ }
22
+
23
+ export { ListBoxRoot };
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps } from "react";
2
+ import { ListBoxItemIndicator, ListBoxItemRoot } from "./list-box-item";
3
+ export declare const ListBoxItem: (({ children, className, variant, ...props }: import("./list-box-item").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ children, className, variant, ...props }: import("./list-box-item").ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ Indicator: ({ children, className, ...props }: import("./list-box-item").ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
6
+ };
7
+ export type ListBoxItem = {
8
+ Props: ComponentProps<typeof ListBoxItemRoot>;
9
+ RootProps: ComponentProps<typeof ListBoxItemRoot>;
10
+ IndicatorProps: ComponentProps<typeof ListBoxItemIndicator>;
11
+ };
12
+ export { ListBoxItemRoot, ListBoxItemIndicator };
13
+ export type { ListBoxItemRootProps, ListBoxItemRootProps as ListBoxItemProps, ListBoxItemIndicatorProps, } from "./list-box-item";
14
+ export { listboxItemVariants } from "@masaraxui/styles";
15
+ export type { ListBoxItemVariants } from "@masaraxui/styles";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ import { ListBoxItemRoot, ListBoxItemIndicator } from './list-box-item.js';
3
+ export { listboxItemVariants } from '@masaraxui/styles';
4
+
5
+ /* -------------------------------------------------------------------------------------------------
6
+ * Compound Component
7
+ * -----------------------------------------------------------------------------------------------*/
8
+ const ListBoxItem = Object.assign(ListBoxItemRoot, {
9
+ Root: ListBoxItemRoot,
10
+ Indicator: ListBoxItemIndicator
11
+ });
12
+
13
+ export { ListBoxItem, ListBoxItemIndicator, ListBoxItemRoot };
@@ -0,0 +1,15 @@
1
+ import type { ListBoxItemVariants } from "@masaraxui/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ import type { ListBoxItemRenderProps } from "react-aria-components";
4
+ import React from "react";
5
+ import { ListBoxItem as ListBoxItemPrimitive } from "react-aria-components";
6
+ interface ListBoxItemRootProps extends ComponentPropsWithRef<typeof ListBoxItemPrimitive>, ListBoxItemVariants {
7
+ className?: string;
8
+ }
9
+ declare const ListBoxItemRoot: ({ children, className, variant, ...props }: ListBoxItemRootProps) => import("react/jsx-runtime").JSX.Element;
10
+ interface ListBoxItemIndicatorProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
11
+ children?: React.ReactNode | ((props: ListBoxItemRenderProps) => React.ReactNode);
12
+ }
13
+ declare const ListBoxItemIndicator: ({ children, className, ...props }: ListBoxItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
14
+ export { ListBoxItemRoot, ListBoxItemIndicator };
15
+ export type { ListBoxItemRootProps, ListBoxItemIndicatorProps };