@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,243 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ const IconChevronDown = props => /*#__PURE__*/jsx("svg", {
5
+ "aria-hidden": "true",
6
+ "aria-label": "Chevron down icon",
7
+ fill: "none",
8
+ height: 16,
9
+ role: "presentation",
10
+ viewBox: "0 0 16 16",
11
+ width: 16,
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ ...props,
14
+ children: /*#__PURE__*/jsx("path", {
15
+ clipRule: "evenodd",
16
+ d: "M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06",
17
+ fill: "currentColor",
18
+ fillRule: "evenodd"
19
+ })
20
+ });
21
+ const IconChevronLeft = props => /*#__PURE__*/jsx("svg", {
22
+ "aria-hidden": "true",
23
+ "aria-label": "Chevron left icon",
24
+ fill: "none",
25
+ height: 16,
26
+ role: "presentation",
27
+ viewBox: "0 0 16 16",
28
+ width: 16,
29
+ xmlns: "http://www.w3.org/2000/svg",
30
+ ...props,
31
+ children: /*#__PURE__*/jsx("path", {
32
+ clipRule: "evenodd",
33
+ d: "M10.53 2.97a.75.75 0 0 1 0 1.06L6.56 8l3.97 3.97a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0",
34
+ fill: "currentColor",
35
+ fillRule: "evenodd"
36
+ })
37
+ });
38
+ const IconChevronRight = props => /*#__PURE__*/jsx("svg", {
39
+ "aria-hidden": "true",
40
+ "aria-label": "Chevron right icon",
41
+ fill: "none",
42
+ height: 16,
43
+ role: "presentation",
44
+ viewBox: "0 0 16 16",
45
+ width: 16,
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ ...props,
48
+ children: /*#__PURE__*/jsx("path", {
49
+ clipRule: "evenodd",
50
+ d: "M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z",
51
+ fill: "currentColor",
52
+ fillRule: "evenodd"
53
+ })
54
+ });
55
+ const ExternalLinkIcon = ({
56
+ height = 9,
57
+ width = 9,
58
+ ...props
59
+ }) => /*#__PURE__*/jsx("svg", {
60
+ "aria-hidden": "true",
61
+ "aria-label": "External link icon",
62
+ fill: "none",
63
+ height: height,
64
+ role: "presentation",
65
+ viewBox: "0 0 7 7",
66
+ width: width,
67
+ xmlns: "http://www.w3.org/2000/svg",
68
+ ...props,
69
+ children: /*#__PURE__*/jsx("path", {
70
+ d: "M1.20592 6.84333L0.379822 6.01723L4.52594 1.8672H1.37819L1.38601 0.731812H6.48742V5.83714H5.34421L5.35203 2.6933L1.20592 6.84333Z",
71
+ fill: "currentColor"
72
+ })
73
+ });
74
+ const CircleDashedIcon = props => /*#__PURE__*/jsx("svg", {
75
+ "aria-hidden": "true",
76
+ "aria-label": "Circle dashed icon",
77
+ fill: "none",
78
+ height: 16,
79
+ role: "presentation",
80
+ viewBox: "0 0 16 16",
81
+ width: 16,
82
+ xmlns: "http://www.w3.org/2000/svg",
83
+ ...props,
84
+ children: /*#__PURE__*/jsx("path", {
85
+ d: "M6.906 1.085a7.047 7.047 0 0 1 2.188 0 .75.75 0 0 1-.232 1.482 5.546 5.546 0 0 0-1.724 0 .75.75 0 0 1-.232-1.482ZM4.933 2.502a.75.75 0 0 1-.166 1.048c-.466.34-.878.75-1.217 1.217a.75.75 0 0 1-1.213-.882 7.036 7.036 0 0 1 1.548-1.548.75.75 0 0 1 1.048.165Zm6.135 0a.75.75 0 0 1 1.047-.165 7.037 7.037 0 0 1 1.548 1.548.75.75 0 0 1-1.213.882 5.533 5.533 0 0 0-1.217-1.217.75.75 0 0 1-.165-1.048ZM1.943 6.28a.75.75 0 0 1 .624.857 5.546 5.546 0 0 0 0 1.724.75.75 0 0 1-1.482.232 7.047 7.047 0 0 1 0-2.188.75.75 0 0 1 .858-.625Zm12.114 0a.75.75 0 0 1 .858.625 7.048 7.048 0 0 1 0 2.188.75.75 0 1 1-1.482-.232 5.54 5.54 0 0 0 0-1.724.75.75 0 0 1 .624-.857ZM2.502 11.068a.75.75 0 0 1 1.048.165c.34.466.75.878 1.217 1.217a.75.75 0 0 1-.882 1.213 7.037 7.037 0 0 1-1.548-1.548.75.75 0 0 1 .165-1.047Zm10.996 0a.75.75 0 0 1 .165 1.047 7.037 7.037 0 0 1-1.548 1.548.75.75 0 0 1-.883-1.213 5.53 5.53 0 0 0 1.218-1.217.75.75 0 0 1 1.048-.165Zm-7.217 2.99a.75.75 0 0 1 .857-.625 5.54 5.54 0 0 0 1.724 0 .75.75 0 0 1 .232 1.482 7.048 7.048 0 0 1-2.188 0 .75.75 0 0 1-.625-.857Z",
86
+ fill: "currentColor"
87
+ })
88
+ });
89
+ const CloseIcon = props => /*#__PURE__*/jsx("svg", {
90
+ "aria-hidden": "true",
91
+ "aria-label": "Close icon",
92
+ fill: "none",
93
+ height: 16,
94
+ role: "presentation",
95
+ viewBox: "0 0 16 16",
96
+ width: 16,
97
+ xmlns: "http://www.w3.org/2000/svg",
98
+ ...props,
99
+ children: /*#__PURE__*/jsx("path", {
100
+ clipRule: "evenodd",
101
+ d: "M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",
102
+ fill: "currentColor",
103
+ fillRule: "evenodd"
104
+ })
105
+ });
106
+ const InfoIcon = props => /*#__PURE__*/jsx("svg", {
107
+ "aria-hidden": "true",
108
+ "aria-label": "Info icon",
109
+ fill: "none",
110
+ height: 16,
111
+ role: "presentation",
112
+ viewBox: "0 0 16 16",
113
+ width: 16,
114
+ xmlns: "http://www.w3.org/2000/svg",
115
+ ...props,
116
+ children: /*#__PURE__*/jsx("path", {
117
+ clipRule: "evenodd",
118
+ d: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",
119
+ fill: "currentColor",
120
+ fillRule: "evenodd"
121
+ })
122
+ });
123
+ const WarningIcon = props => /*#__PURE__*/jsx("svg", {
124
+ "aria-hidden": "true",
125
+ "aria-label": "Warning icon",
126
+ fill: "none",
127
+ height: 16,
128
+ role: "presentation",
129
+ viewBox: "0 0 16 16",
130
+ width: 16,
131
+ xmlns: "http://www.w3.org/2000/svg",
132
+ ...props,
133
+ children: /*#__PURE__*/jsx("path", {
134
+ clipRule: "evenodd",
135
+ d: "M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0",
136
+ fill: "currentColor",
137
+ fillRule: "evenodd"
138
+ })
139
+ });
140
+ const DangerIcon = props => /*#__PURE__*/jsx("svg", {
141
+ "aria-hidden": "true",
142
+ "aria-label": "Danger icon",
143
+ fill: "none",
144
+ height: 16,
145
+ role: "presentation",
146
+ viewBox: "0 0 16 16",
147
+ width: 16,
148
+ xmlns: "http://www.w3.org/2000/svg",
149
+ ...props,
150
+ children: /*#__PURE__*/jsx("path", {
151
+ clipRule: "evenodd",
152
+ d: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",
153
+ fill: "currentColor",
154
+ fillRule: "evenodd"
155
+ })
156
+ });
157
+ const SuccessIcon = props => /*#__PURE__*/jsx("svg", {
158
+ "aria-hidden": "true",
159
+ "aria-label": "Success icon",
160
+ fill: "none",
161
+ height: 16,
162
+ role: "presentation",
163
+ viewBox: "0 0 16 16",
164
+ width: 16,
165
+ xmlns: "http://www.w3.org/2000/svg",
166
+ ...props,
167
+ children: /*#__PURE__*/jsx("path", {
168
+ clipRule: "evenodd",
169
+ d: "M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",
170
+ fill: "currentColor",
171
+ fillRule: "evenodd"
172
+ })
173
+ });
174
+ const IconMinus = props => /*#__PURE__*/jsx("svg", {
175
+ "aria-hidden": "true",
176
+ "aria-label": "Minus icon",
177
+ fill: "none",
178
+ height: 16,
179
+ role: "presentation",
180
+ viewBox: "0 0 16 16",
181
+ width: 16,
182
+ xmlns: "http://www.w3.org/2000/svg",
183
+ ...props,
184
+ children: /*#__PURE__*/jsx("path", {
185
+ clipRule: "evenodd",
186
+ d: "M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8",
187
+ fill: "currentColor",
188
+ fillRule: "evenodd"
189
+ })
190
+ });
191
+ const IconPlus = props => /*#__PURE__*/jsx("svg", {
192
+ "aria-hidden": "true",
193
+ "aria-label": "Plus icon",
194
+ fill: "none",
195
+ height: 16,
196
+ role: "presentation",
197
+ viewBox: "0 0 16 16",
198
+ width: 16,
199
+ xmlns: "http://www.w3.org/2000/svg",
200
+ ...props,
201
+ children: /*#__PURE__*/jsx("path", {
202
+ clipRule: "evenodd",
203
+ d: "M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75",
204
+ fill: "currentColor",
205
+ fillRule: "evenodd"
206
+ })
207
+ });
208
+ const IconSearch = props => /*#__PURE__*/jsx("svg", {
209
+ "aria-hidden": "true",
210
+ "aria-label": "Search icon",
211
+ fill: "none",
212
+ height: 16,
213
+ role: "presentation",
214
+ viewBox: "0 0 16 16",
215
+ width: 16,
216
+ xmlns: "http://www.w3.org/2000/svg",
217
+ ...props,
218
+ children: /*#__PURE__*/jsx("path", {
219
+ clipRule: "evenodd",
220
+ d: "M11.5 7a4.5 4.5 0 1 1-9 0a4.5 4.5 0 0 1 9 0m-.82 4.74a6 6 0 1 1 1.06-1.06l2.79 2.79a.75.75 0 1 1-1.06 1.06z",
221
+ fill: "currentColor",
222
+ fillRule: "evenodd"
223
+ })
224
+ });
225
+ const IconCalendar = props => /*#__PURE__*/jsx("svg", {
226
+ "aria-hidden": "true",
227
+ "aria-label": "Calendar icon",
228
+ fill: "none",
229
+ height: "1em",
230
+ role: "presentation",
231
+ viewBox: "0 0 13 14",
232
+ width: "1em",
233
+ xmlns: "http://www.w3.org/2000/svg",
234
+ ...props,
235
+ children: /*#__PURE__*/jsx("path", {
236
+ clipRule: "evenodd",
237
+ d: "M3.75 4.5A.75.75 0 0 1 3 3.75v-.748a1.5 1.5 0 0 0-1.5 1.5v1h10v-1a1.5 1.5 0 0 0-1.5-1.5v.75a.75.75 0 1 1-1.5 0v-.75h-4v.747a.75.75 0 0 1-.75.75ZM8.5 1.501h-4V.75a.75.75 0 0 0-1.5 0v.752a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3v-.75a.75.75 0 0 0-1.5 0v.75Zm-7 5.5v3.5a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-3.5h-10Z",
238
+ fill: "currentColor",
239
+ fillRule: "evenodd"
240
+ })
241
+ });
242
+
243
+ export { CircleDashedIcon, CloseIcon, DangerIcon, ExternalLinkIcon, IconCalendar, IconChevronDown, IconChevronLeft, IconChevronRight, IconMinus, IconPlus, IconSearch, InfoIcon, SuccessIcon, WarningIcon };
@@ -0,0 +1,84 @@
1
+ export * from "./accordion";
2
+ export * from "./alert-dialog";
3
+ export * from "./autocomplete";
4
+ export * from "./avatar";
5
+ export * from "./badge";
6
+ export * from "./breadcrumbs";
7
+ export * from "./button";
8
+ export * from "./button-group";
9
+ export * from "./card";
10
+ export * from "./checkbox";
11
+ export * from "./checkbox-group";
12
+ export * from "./chip";
13
+ export * from "./color-area";
14
+ export * from "./color-field";
15
+ export * from "./color-picker";
16
+ export * from "./color-slider";
17
+ export * from "./color-swatch";
18
+ export * from "./color-swatch-picker";
19
+ export * from "./close-button";
20
+ export * from "./combo-box";
21
+ export * from "./date-field";
22
+ export * from "./date-picker";
23
+ export * from "./date-range-picker";
24
+ export * from "./drawer";
25
+ export * from "./progress-bar";
26
+ export * from "./progress-circle";
27
+ export * from "./time-field";
28
+ export * from "./disclosure";
29
+ export * from "./disclosure-group";
30
+ export * from "./error-message";
31
+ export * from "./kbd";
32
+ export * from "./link";
33
+ export * from "./popover";
34
+ export * from "./scroll-shadow";
35
+ export * from "./separator";
36
+ export * from "./skeleton";
37
+ export * from "./spinner";
38
+ export * from "./surface";
39
+ export * from "./toast";
40
+ export * from "./toggle-button";
41
+ export * from "./switch";
42
+ export * from "./switch-group";
43
+ export * from "./tabs";
44
+ export * from "./tag";
45
+ export * from "./tag-group";
46
+ export * from "./toggle-button-group";
47
+ export * from "./toolbar";
48
+ export * from "./tooltip";
49
+ export * from "./input";
50
+ export * from "./input-group";
51
+ export * from "./textarea";
52
+ export * from "./textfield";
53
+ export * from "./search-field";
54
+ export * from "./text";
55
+ export * from "./label";
56
+ export * from "./description";
57
+ export * from "./empty-state";
58
+ export * from "./field-error";
59
+ export * from "./fieldset";
60
+ export * from "./form";
61
+ export * from "./header";
62
+ export * from "./radio";
63
+ export * from "./radio-group";
64
+ export * from "./input-otp";
65
+ export * from "./alert";
66
+ export * from "./list-box";
67
+ export * from "./list-box-item";
68
+ export * from "./list-box-section";
69
+ export * from "./dropdown";
70
+ export * from "./menu";
71
+ export * from "./menu-item";
72
+ export * from "./menu-section";
73
+ export * from "./modal";
74
+ export * from "./number-field";
75
+ export * from "./pagination";
76
+ export * from "./select";
77
+ export * from "./meter";
78
+ export * from "./slider";
79
+ export * from "./table";
80
+ export * from "./calendar";
81
+ export * from "./calendar-year-picker";
82
+ export * from "./range-calendar";
83
+ export * from "./icons";
84
+ export * from "./rac";
@@ -0,0 +1,13 @@
1
+ import type { ComponentProps } from "react";
2
+ import { InputRoot } from "./input";
3
+ export declare const Input: (({ className, fullWidth, variant: variantProp, ...rest }: import("./input").InputRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ className, fullWidth, variant: variantProp, ...rest }: import("./input").InputRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ export type Input = {
7
+ Props: ComponentProps<typeof InputRoot>;
8
+ RootProps: ComponentProps<typeof InputRoot>;
9
+ };
10
+ export { InputRoot };
11
+ export type { InputRootProps, InputRootProps as InputProps } from "./input";
12
+ export { inputVariants } from "@masaraxui/styles";
13
+ export type { InputVariants } from "@masaraxui/styles";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ import { InputRoot } from './input.js';
3
+ export { inputVariants } from '@masaraxui/styles';
4
+
5
+ /* -------------------------------------------------------------------------------------------------
6
+ * Compound Component
7
+ * -----------------------------------------------------------------------------------------------*/
8
+ const Input = Object.assign(InputRoot, {
9
+ Root: InputRoot
10
+ });
11
+
12
+ export { Input, InputRoot };
@@ -0,0 +1,8 @@
1
+ import type { InputVariants } from "@masaraxui/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ import { Input as InputPrimitive } from "react-aria-components";
4
+ interface InputRootProps extends ComponentPropsWithRef<typeof InputPrimitive>, InputVariants {
5
+ }
6
+ declare const InputRoot: ({ className, fullWidth, variant: variantProp, ...rest }: InputRootProps) => import("react/jsx-runtime").JSX.Element;
7
+ export { InputRoot };
8
+ export type { InputRootProps };
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { inputVariants } from '@masaraxui/styles';
3
+ import { useContext } from 'react';
4
+ import { Input } from 'react-aria-components';
5
+ import { jsx } from 'react/jsx-runtime';
6
+ import { TextFieldContext } from '../textfield/textfield.js';
7
+ import { ComboBoxContext } from '../combo-box/combo-box.js';
8
+ import { composeTwRenderProps } from '../../utils/compose.js';
9
+
10
+ const InputRoot = ({
11
+ className,
12
+ fullWidth,
13
+ variant: variantProp,
14
+ ...rest
15
+ }) => {
16
+ const textFieldContext = useContext(TextFieldContext);
17
+ const comboBoxContext = useContext(ComboBoxContext);
18
+
19
+ // Use variant from context if not explicitly provided
20
+ const variant = variantProp ?? textFieldContext.variant ?? comboBoxContext.variant;
21
+ return /*#__PURE__*/jsx(Input, {
22
+ className: composeTwRenderProps(className, inputVariants({
23
+ fullWidth,
24
+ variant
25
+ })),
26
+ "data-slot": "input",
27
+ ...rest
28
+ });
29
+ };
30
+
31
+ export { InputRoot };
@@ -0,0 +1,21 @@
1
+ import type { ComponentProps } from "react";
2
+ import { InputGroupInput, InputGroupPrefix, InputGroupRoot, InputGroupSuffix, InputGroupTextArea } from "./input-group";
3
+ export declare const InputGroup: (({ children, className, fullWidth, onClick, variant, ...props }: import("./input-group").InputGroupRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ children, className, fullWidth, onClick, variant, ...props }: import("./input-group").InputGroupRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ Input: ({ className, ...props }: import("./input-group").InputGroupInputProps) => import("react/jsx-runtime").JSX.Element;
6
+ TextArea: ({ className, ...props }: import("./input-group").InputGroupTextAreaProps) => import("react/jsx-runtime").JSX.Element;
7
+ Prefix: ({ children, className, ...props }: import("./input-group").InputGroupPrefixProps) => import("react/jsx-runtime").JSX.Element;
8
+ Suffix: ({ children, className, ...props }: import("./input-group").InputGroupSuffixProps) => import("react/jsx-runtime").JSX.Element;
9
+ };
10
+ export type InputGroup = {
11
+ Props: ComponentProps<typeof InputGroupRoot>;
12
+ RootProps: ComponentProps<typeof InputGroupRoot>;
13
+ InputProps: ComponentProps<typeof InputGroupInput>;
14
+ TextAreaProps: ComponentProps<typeof InputGroupTextArea>;
15
+ PrefixProps: ComponentProps<typeof InputGroupPrefix>;
16
+ SuffixProps: ComponentProps<typeof InputGroupSuffix>;
17
+ };
18
+ export { InputGroupInput, InputGroupPrefix, InputGroupRoot, InputGroupSuffix, InputGroupTextArea };
19
+ export type { InputGroupRootProps, InputGroupRootProps as InputGroupProps, InputGroupInputProps, InputGroupTextAreaProps, InputGroupPrefixProps, InputGroupSuffixProps, } from "./input-group";
20
+ export { inputGroupVariants } from "@masaraxui/styles";
21
+ export type { InputGroupVariants } from "@masaraxui/styles";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ import { InputGroupRoot, InputGroupSuffix, InputGroupPrefix, InputGroupTextArea, InputGroupInput } from './input-group.js';
3
+ export { inputGroupVariants } from '@masaraxui/styles';
4
+
5
+ /* -------------------------------------------------------------------------------------------------
6
+ * Compound Component
7
+ * -----------------------------------------------------------------------------------------------*/
8
+ const InputGroup = Object.assign(InputGroupRoot, {
9
+ Root: InputGroupRoot,
10
+ Input: InputGroupInput,
11
+ TextArea: InputGroupTextArea,
12
+ Prefix: InputGroupPrefix,
13
+ Suffix: InputGroupSuffix
14
+ });
15
+
16
+ export { InputGroup, InputGroupInput, InputGroupPrefix, InputGroupRoot, InputGroupSuffix, InputGroupTextArea };
@@ -0,0 +1,20 @@
1
+ import type { InputGroupVariants } from "@masaraxui/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ import { Group as GroupPrimitive, Input as InputPrimitive, TextArea as TextAreaPrimitive } from "react-aria-components";
4
+ interface InputGroupRootProps extends ComponentPropsWithRef<typeof GroupPrimitive>, InputGroupVariants {
5
+ }
6
+ declare const InputGroupRoot: ({ children, className, fullWidth, onClick, variant, ...props }: InputGroupRootProps) => import("react/jsx-runtime").JSX.Element;
7
+ interface InputGroupInputProps extends ComponentPropsWithRef<typeof InputPrimitive> {
8
+ }
9
+ declare const InputGroupInput: ({ className, ...props }: InputGroupInputProps) => import("react/jsx-runtime").JSX.Element;
10
+ interface InputGroupPrefixProps extends ComponentPropsWithRef<"div"> {
11
+ }
12
+ declare const InputGroupPrefix: ({ children, className, ...props }: InputGroupPrefixProps) => import("react/jsx-runtime").JSX.Element;
13
+ interface InputGroupTextAreaProps extends ComponentPropsWithRef<typeof TextAreaPrimitive> {
14
+ }
15
+ declare const InputGroupTextArea: ({ className, ...props }: InputGroupTextAreaProps) => import("react/jsx-runtime").JSX.Element;
16
+ interface InputGroupSuffixProps extends ComponentPropsWithRef<"div"> {
17
+ }
18
+ declare const InputGroupSuffix: ({ children, className, ...props }: InputGroupSuffixProps) => import("react/jsx-runtime").JSX.Element;
19
+ export { InputGroupRoot, InputGroupInput, InputGroupTextArea, InputGroupPrefix, InputGroupSuffix };
20
+ export type { InputGroupRootProps, InputGroupInputProps, InputGroupTextAreaProps, InputGroupPrefixProps, InputGroupSuffixProps, };
@@ -0,0 +1,129 @@
1
+ "use client";
2
+ import { inputGroupVariants } from '@masaraxui/styles';
3
+ import React__default, { useContext, createContext } from 'react';
4
+ import { Group, TextArea, Input } from 'react-aria-components';
5
+ import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
6
+ import { jsx } from 'react/jsx-runtime';
7
+ import { TextFieldContext } from '../textfield/textfield.js';
8
+
9
+ const InputGroupContext = /*#__PURE__*/createContext({});
10
+
11
+ /* -------------------------------------------------------------------------------------------------
12
+ * InputGroup Root
13
+ * -----------------------------------------------------------------------------------------------*/
14
+
15
+ const InputGroupRoot = ({
16
+ children,
17
+ className,
18
+ fullWidth,
19
+ onClick,
20
+ variant,
21
+ ...props
22
+ }) => {
23
+ const textFieldContext = useContext(TextFieldContext);
24
+ const resolvedVariant = variant ?? textFieldContext?.variant;
25
+ const groupRef = React__default.useRef(null);
26
+ const slots = React__default.useMemo(() => inputGroupVariants({
27
+ fullWidth,
28
+ variant: resolvedVariant
29
+ }), [fullWidth, resolvedVariant]);
30
+ const handleClick = e => {
31
+ const target = e.target;
32
+ const input = groupRef.current?.querySelector("input");
33
+ if (input && target !== input && !input.contains(target)) {
34
+ input.focus();
35
+ }
36
+ onClick?.(e);
37
+ };
38
+ return /*#__PURE__*/jsx(InputGroupContext, {
39
+ value: {
40
+ slots
41
+ },
42
+ children: /*#__PURE__*/jsx(Group, {
43
+ ...props,
44
+ ref: groupRef,
45
+ className: composeTwRenderProps(className, slots?.base()),
46
+ "data-slot": "input-group",
47
+ onClick: handleClick,
48
+ children: renderProps => typeof children === "function" ? children(renderProps) : children
49
+ })
50
+ });
51
+ };
52
+
53
+ /* -------------------------------------------------------------------------------------------------
54
+ * InputGroup Input
55
+ * -----------------------------------------------------------------------------------------------*/
56
+
57
+ const InputGroupInput = ({
58
+ className,
59
+ ...props
60
+ }) => {
61
+ const {
62
+ slots
63
+ } = useContext(InputGroupContext);
64
+ return /*#__PURE__*/jsx(Input, {
65
+ className: composeTwRenderProps(className, slots?.input()),
66
+ "data-slot": "input-group-input",
67
+ ...props
68
+ });
69
+ };
70
+
71
+ /* -------------------------------------------------------------------------------------------------
72
+ * InputGroup Prefix
73
+ * -----------------------------------------------------------------------------------------------*/
74
+
75
+ const InputGroupPrefix = ({
76
+ children,
77
+ className,
78
+ ...props
79
+ }) => {
80
+ const {
81
+ slots
82
+ } = useContext(InputGroupContext);
83
+ return /*#__PURE__*/jsx("div", {
84
+ className: composeSlotClassName(slots?.prefix, className),
85
+ "data-slot": "input-group-prefix",
86
+ ...props,
87
+ children: children
88
+ });
89
+ };
90
+
91
+ /* -------------------------------------------------------------------------------------------------
92
+ * InputGroup TextArea
93
+ * -----------------------------------------------------------------------------------------------*/
94
+
95
+ const InputGroupTextArea = ({
96
+ className,
97
+ ...props
98
+ }) => {
99
+ const {
100
+ slots
101
+ } = useContext(InputGroupContext);
102
+ return /*#__PURE__*/jsx(TextArea, {
103
+ className: composeTwRenderProps(className, slots?.input()),
104
+ "data-slot": "input-group-textarea",
105
+ ...props
106
+ });
107
+ };
108
+
109
+ /* -------------------------------------------------------------------------------------------------
110
+ * InputGroup Suffix
111
+ * -----------------------------------------------------------------------------------------------*/
112
+
113
+ const InputGroupSuffix = ({
114
+ children,
115
+ className,
116
+ ...props
117
+ }) => {
118
+ const {
119
+ slots
120
+ } = useContext(InputGroupContext);
121
+ return /*#__PURE__*/jsx("div", {
122
+ className: composeSlotClassName(slots?.suffix, className),
123
+ "data-slot": "input-group-suffix",
124
+ ...props,
125
+ children: children
126
+ });
127
+ };
128
+
129
+ export { InputGroupInput, InputGroupPrefix, InputGroupRoot, InputGroupSuffix, InputGroupTextArea };
@@ -0,0 +1,22 @@
1
+ import type { ComponentProps } from "react";
2
+ import { InputOTPGroup, InputOTPRoot, InputOTPSeparator, InputOTPSlot } from "./input-otp";
3
+ export declare const InputOTP: (({ className, inputClassName, isDisabled, isInvalid, validationDetails, validationErrors, variant, ...props }: import("./input-otp").InputOTPRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ className, inputClassName, isDisabled, isInvalid, validationDetails, validationErrors, variant, ...props }: import("./input-otp").InputOTPRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ Group: ({ className, ...props }: import("./input-otp").InputOTPGroupProps) => import("react/jsx-runtime").JSX.Element;
6
+ Slot: ({ className, index, ...props }: import("./input-otp").InputOTPSlotProps) => import("react/jsx-runtime").JSX.Element;
7
+ Separator: ({ className, ...props }: import("./input-otp").InputOTPSeparatorProps) => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ export type InputOTP = {
10
+ Props: ComponentProps<typeof InputOTPRoot>;
11
+ RootProps: ComponentProps<typeof InputOTPRoot>;
12
+ GroupProps: ComponentProps<typeof InputOTPGroup>;
13
+ SlotProps: ComponentProps<typeof InputOTPSlot>;
14
+ SeparatorProps: ComponentProps<typeof InputOTPSeparator>;
15
+ };
16
+ export { InputOTPRoot, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
17
+ export type { InputOTPRootProps, InputOTPRootProps as InputOTPProps, InputOTPGroupProps, InputOTPSlotProps, InputOTPSeparatorProps, } from "./input-otp";
18
+ export { inputOTPVariants } from "@masaraxui/styles";
19
+ export type { InputOTPVariants } from "@masaraxui/styles";
20
+ export declare const REGEXP_ONLY_DIGITS = "^\\d+$";
21
+ export declare const REGEXP_ONLY_CHARS = "^[a-zA-Z]+$";
22
+ export declare const REGEXP_ONLY_DIGITS_AND_CHARS = "^[a-zA-Z0-9]+$";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ import { InputOTPRoot, InputOTPSeparator, InputOTPSlot, InputOTPGroup } from './input-otp.js';
3
+ export { inputOTPVariants } from '@masaraxui/styles';
4
+
5
+ /* -------------------------------------------------------------------------------------------------
6
+ * Compound Component
7
+ * -----------------------------------------------------------------------------------------------*/
8
+ const InputOTP = Object.assign(InputOTPRoot, {
9
+ Root: InputOTPRoot,
10
+ Group: InputOTPGroup,
11
+ Slot: InputOTPSlot,
12
+ Separator: InputOTPSeparator
13
+ });
14
+ // ===================================
15
+ // Regular Expressions
16
+ // ===================================
17
+ const REGEXP_ONLY_DIGITS = "^\\d+$";
18
+ const REGEXP_ONLY_CHARS = "^[a-zA-Z]+$";
19
+ const REGEXP_ONLY_DIGITS_AND_CHARS = "^[a-zA-Z0-9]+$";
20
+
21
+ export { InputOTP, InputOTPGroup, InputOTPRoot, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS };
@@ -0,0 +1,26 @@
1
+ import type { InputOTPVariants } from "@masaraxui/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ import { OTPInput } from "input-otp";
4
+ import React from "react";
5
+ interface InputOTPRootProps extends Omit<ComponentPropsWithRef<typeof OTPInput>, "disabled" | "containerClassName" | "render">, InputOTPVariants {
6
+ isDisabled?: boolean;
7
+ isInvalid?: boolean;
8
+ validationErrors?: string[];
9
+ validationDetails?: ValidityState;
10
+ inputClassName?: string;
11
+ children: React.ReactNode;
12
+ }
13
+ declare const InputOTPRoot: ({ className, inputClassName, isDisabled, isInvalid, validationDetails, validationErrors, variant, ...props }: InputOTPRootProps) => import("react/jsx-runtime").JSX.Element;
14
+ interface InputOTPGroupProps extends ComponentPropsWithRef<"div"> {
15
+ }
16
+ declare const InputOTPGroup: ({ className, ...props }: InputOTPGroupProps) => import("react/jsx-runtime").JSX.Element;
17
+ interface InputOTPSlotProps extends ComponentPropsWithRef<"div"> {
18
+ index: number;
19
+ }
20
+ declare const InputOTPSlot: ({ className, index, ...props }: InputOTPSlotProps) => import("react/jsx-runtime").JSX.Element;
21
+ interface InputOTPSeparatorProps extends ComponentPropsWithRef<"div"> {
22
+ className?: string;
23
+ }
24
+ declare const InputOTPSeparator: ({ className, ...props }: InputOTPSeparatorProps) => import("react/jsx-runtime").JSX.Element;
25
+ export { InputOTPRoot, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
26
+ export type { InputOTPRootProps, InputOTPGroupProps, InputOTPSlotProps, InputOTPSeparatorProps };