@arobo/react 1.0.1 → 1.1.1

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 (369) hide show
  1. package/dist/components/accordion/accordion.d.ts +30 -0
  2. package/dist/components/accordion/accordion.js +190 -0
  3. package/dist/components/accordion/index.d.ts +23 -0
  4. package/dist/components/accordion/index.js +16 -0
  5. package/dist/components/alert/alert.d.ts +15 -0
  6. package/dist/components/alert/alert.js +151 -0
  7. package/dist/components/alert/index.d.ts +19 -0
  8. package/dist/components/alert/index.js +14 -0
  9. package/dist/components/alert-dialog/alert-dialog.d.ts +65 -0
  10. package/dist/components/alert-dialog/alert-dialog.js +303 -0
  11. package/dist/components/alert-dialog/index.d.ts +31 -0
  12. package/dist/components/alert-dialog/index.js +20 -0
  13. package/dist/components/avatar/avatar.d.ts +15 -0
  14. package/dist/components/avatar/avatar.js +92 -0
  15. package/dist/components/avatar/index.d.ts +15 -0
  16. package/dist/components/avatar/index.js +12 -0
  17. package/dist/components/breadcrumbs/breadcrumbs.d.ts +14 -0
  18. package/dist/components/breadcrumbs/breadcrumbs.js +82 -0
  19. package/dist/components/breadcrumbs/index.d.ts +13 -0
  20. package/dist/components/breadcrumbs/index.js +11 -0
  21. package/dist/components/button/button.js +1 -1
  22. package/dist/components/button/index.js +1 -1
  23. package/dist/components/button-group/button-group.js +3 -3
  24. package/dist/components/button-group/index.js +1 -1
  25. package/dist/components/calendar/calendar.js +1 -1
  26. package/dist/components/calendar/index.js +1 -1
  27. package/dist/components/card/card.js +3 -3
  28. package/dist/components/card/index.js +1 -1
  29. package/dist/components/carousel/carousel.d.ts +26 -0
  30. package/dist/components/carousel/carousel.js +170 -0
  31. package/dist/components/carousel/index.d.ts +17 -0
  32. package/dist/components/carousel/index.js +10 -0
  33. package/dist/components/checkbox/checkbox.d.ts +16 -3
  34. package/dist/components/checkbox/checkbox.js +149 -35
  35. package/dist/components/checkbox/index.d.ts +3 -16
  36. package/dist/components/checkbox/index.js +4 -12
  37. package/dist/components/checkbox-group/checkbox-group.js +3 -3
  38. package/dist/components/checkbox-group/index.js +1 -1
  39. package/dist/components/chip/chip.d.ts +9 -0
  40. package/dist/components/chip/chip.js +24 -0
  41. package/dist/components/chip/index.d.ts +11 -0
  42. package/dist/components/chip/index.js +10 -0
  43. package/dist/components/close-button/close-button.d.ts +1 -1
  44. package/dist/components/close-button/close-button.js +1 -1
  45. package/dist/components/close-button/index.d.ts +1 -3
  46. package/dist/components/close-button/index.js +0 -1
  47. package/dist/components/combobox/combobox.js +3 -3
  48. package/dist/components/combobox/index.js +1 -1
  49. package/dist/components/container/container.d.ts +9 -0
  50. package/dist/components/container/container.js +23 -0
  51. package/dist/components/container/index.d.ts +13 -0
  52. package/dist/components/container/index.js +11 -0
  53. package/dist/components/date-field/date-field.js +3 -3
  54. package/dist/components/date-field/index.js +1 -1
  55. package/dist/components/date-input-group/date-input-group.js +3 -3
  56. package/dist/components/date-input-group/index.js +1 -1
  57. package/dist/components/date-picker/date-picker.js +4 -4
  58. package/dist/components/date-picker/index.d.ts +0 -2
  59. package/dist/components/date-picker/index.js +0 -1
  60. package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
  61. package/dist/components/date-range-picker/date-range-picker.js +4 -4
  62. package/dist/components/date-range-picker/index.js +1 -1
  63. package/dist/components/description/description.js +1 -1
  64. package/dist/components/description/index.d.ts +1 -3
  65. package/dist/components/description/index.js +0 -1
  66. package/dist/components/drawer/drawer.d.ts +33 -0
  67. package/dist/components/drawer/index.d.ts +1 -0
  68. package/dist/components/drawer/index.js +1 -0
  69. package/dist/components/dropdown/dropdown.d.ts +38 -0
  70. package/dist/components/dropdown/dropdown.js +155 -0
  71. package/dist/components/dropdown/index.d.ts +41 -0
  72. package/dist/components/dropdown/index.js +18 -0
  73. package/dist/components/empty/empty.d.ts +34 -0
  74. package/dist/components/empty/empty.js +151 -0
  75. package/dist/components/empty/index.d.ts +2 -0
  76. package/dist/components/empty/index.js +1 -0
  77. package/dist/components/empty-state/empty-state.d.ts +7 -0
  78. package/dist/components/empty-state/empty-state.js +19 -0
  79. package/dist/components/empty-state/index.d.ts +11 -0
  80. package/dist/components/empty-state/index.js +10 -0
  81. package/dist/components/error-message/error-message.js +1 -1
  82. package/dist/components/error-message/index.js +1 -1
  83. package/dist/components/field-error/field-error.js +1 -1
  84. package/dist/components/field-error/index.js +1 -1
  85. package/dist/components/fieldset/fieldset.d.ts +16 -0
  86. package/dist/components/fieldset/fieldset.js +87 -0
  87. package/dist/components/fieldset/index.d.ts +19 -0
  88. package/dist/components/fieldset/index.js +14 -0
  89. package/dist/components/header/header.d.ts +7 -0
  90. package/dist/components/header/header.js +20 -0
  91. package/dist/components/header/index.d.ts +8 -0
  92. package/dist/components/header/index.js +8 -0
  93. package/dist/components/heading/heading.d.ts +12 -0
  94. package/dist/components/heading/heading.js +29 -0
  95. package/dist/components/heading/index.d.ts +13 -0
  96. package/dist/components/heading/index.js +11 -0
  97. package/dist/components/icons.js +169 -1
  98. package/dist/components/index.d.ts +45 -1
  99. package/dist/components/input/index.js +1 -1
  100. package/dist/components/input/input.js +1 -1
  101. package/dist/components/input-group/index.d.ts +21 -0
  102. package/dist/components/input-group/index.js +15 -0
  103. package/dist/components/input-group/input-group.d.ts +20 -0
  104. package/dist/components/input-group/input-group.js +128 -0
  105. package/dist/components/input-otp/index.d.ts +22 -0
  106. package/dist/components/input-otp/index.js +20 -0
  107. package/dist/components/input-otp/input-otp.d.ts +26 -0
  108. package/dist/components/input-otp/input-otp.js +138 -0
  109. package/dist/components/kbd/index.d.ts +17 -0
  110. package/dist/components/kbd/index.js +13 -0
  111. package/dist/components/kbd/kbd.constants.d.ts +3 -0
  112. package/dist/components/kbd/kbd.constants.js +50 -0
  113. package/dist/components/kbd/kbd.d.ts +24 -0
  114. package/dist/components/kbd/kbd.js +75 -0
  115. package/dist/components/label/index.js +1 -1
  116. package/dist/components/label/label.js +1 -1
  117. package/dist/components/link/index.d.ts +13 -0
  118. package/dist/components/link/index.js +11 -0
  119. package/dist/components/link/link.d.ts +10 -0
  120. package/dist/components/link/link.js +58 -0
  121. package/dist/components/listbox/index.d.ts +21 -0
  122. package/dist/components/listbox/index.js +16 -0
  123. package/dist/components/listbox/listbox.d.ts +9 -0
  124. package/dist/components/listbox/listbox.js +22 -0
  125. package/dist/components/listbox/listbox.type.d.ts +34 -0
  126. package/dist/components/listbox-item/index.d.ts +13 -0
  127. package/dist/components/listbox-item/index.js +11 -0
  128. package/dist/components/listbox-item/listbox-item.d.ts +15 -0
  129. package/dist/components/listbox-item/listbox-item.js +76 -0
  130. package/dist/components/listbox-section/index.d.ts +8 -0
  131. package/dist/components/listbox-section/index.js +8 -0
  132. package/dist/components/listbox-section/listbox-section.d.ts +8 -0
  133. package/dist/components/listbox-section/listbox-section.js +21 -0
  134. package/dist/components/menu/index.d.ts +22 -0
  135. package/dist/components/menu/index.js +16 -0
  136. package/dist/components/menu/menu.d.ts +9 -0
  137. package/dist/components/menu/menu.js +19 -0
  138. package/dist/components/menu-item/index.d.ts +15 -0
  139. package/dist/components/menu-item/index.js +12 -0
  140. package/dist/components/menu-item/menu-item.d.ts +20 -0
  141. package/dist/components/menu-item/menu-item.js +122 -0
  142. package/dist/components/menu-section/index.d.ts +8 -0
  143. package/dist/components/menu-section/index.js +8 -0
  144. package/dist/components/menu-section/menu-section.d.ts +8 -0
  145. package/dist/components/menu-section/menu-section.js +21 -0
  146. package/dist/components/modal/index.d.ts +31 -0
  147. package/dist/components/modal/index.js +20 -0
  148. package/dist/components/modal/modal.d.ts +53 -0
  149. package/dist/components/modal/modal.js +283 -0
  150. package/dist/components/number-field/index.d.ts +21 -0
  151. package/dist/components/number-field/index.js +15 -0
  152. package/dist/components/number-field/number-field.d.ts +20 -0
  153. package/dist/components/number-field/number-field.js +126 -0
  154. package/dist/components/pagination/index.d.ts +19 -0
  155. package/dist/components/pagination/index.js +11 -0
  156. package/dist/components/pagination/pagination-ellipsis.d.ts +6 -0
  157. package/dist/components/pagination/pagination-ellipsis.js +11 -0
  158. package/dist/components/pagination/pagination-item.d.ts +15 -0
  159. package/dist/components/pagination/pagination-item.js +34 -0
  160. package/dist/components/pagination/pagination.d.ts +28 -0
  161. package/dist/components/pagination/pagination.js +128 -0
  162. package/dist/components/popover/index.js +1 -1
  163. package/dist/components/popover/popover.js +4 -4
  164. package/dist/components/rac/components.d.ts +1 -0
  165. package/dist/components/rac/index.d.ts +3 -0
  166. package/dist/components/rac/index.js +2 -0
  167. package/dist/components/rac/types.d.ts +2 -0
  168. package/dist/components/radio/index.d.ts +17 -0
  169. package/dist/components/radio/index.js +13 -0
  170. package/dist/components/radio/radio.d.ts +21 -0
  171. package/dist/components/radio/radio.js +96 -0
  172. package/dist/components/radio-group/index.d.ts +11 -0
  173. package/dist/components/radio-group/index.js +10 -0
  174. package/dist/components/radio-group/radio-group.d.ts +8 -0
  175. package/dist/components/radio-group/radio-group.js +26 -0
  176. package/dist/components/range-calendar/index.js +1 -1
  177. package/dist/components/range-calendar/range-calendar.js +1 -1
  178. package/dist/components/scroll-shadow/index.d.ts +19 -0
  179. package/dist/components/scroll-shadow/index.js +11 -0
  180. package/dist/components/scroll-shadow/scroll-shadow.d.ts +32 -0
  181. package/dist/components/scroll-shadow/scroll-shadow.js +75 -0
  182. package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +11 -0
  183. package/dist/components/scroll-shadow/use-scroll-shadow.js +120 -0
  184. package/dist/components/select/index.d.ts +19 -0
  185. package/dist/components/select/index.js +14 -0
  186. package/dist/components/select/select.d.ts +24 -0
  187. package/dist/components/select/select.js +139 -0
  188. package/dist/components/separator/index.d.ts +11 -0
  189. package/dist/components/separator/index.js +10 -0
  190. package/dist/components/separator/separator.d.ts +8 -0
  191. package/dist/components/separator/separator.js +22 -0
  192. package/dist/components/slider/index.d.ts +21 -0
  193. package/dist/components/slider/index.js +15 -0
  194. package/dist/components/slider/slider.d.ts +23 -0
  195. package/dist/components/slider/slider.js +176 -0
  196. package/dist/components/spinner/index.d.ts +11 -0
  197. package/dist/components/spinner/index.js +10 -0
  198. package/dist/components/spinner/spinner.d.ts +7 -0
  199. package/dist/components/spinner/spinner.js +87 -0
  200. package/dist/components/surface/index.js +1 -1
  201. package/dist/components/surface/surface.js +1 -1
  202. package/dist/components/switch/index.d.ts +17 -0
  203. package/dist/components/switch/index.js +13 -0
  204. package/dist/components/switch/switch.d.ts +17 -0
  205. package/dist/components/switch/switch.js +97 -0
  206. package/dist/components/tabs/index.d.ts +21 -0
  207. package/dist/components/tabs/index.js +15 -0
  208. package/dist/components/tabs/tabs.d.ts +34 -0
  209. package/dist/components/tabs/tabs.js +140 -0
  210. package/dist/components/tag/index.d.ts +13 -0
  211. package/dist/components/tag/index.js +11 -0
  212. package/dist/components/tag/tag.d.ts +14 -0
  213. package/dist/components/tag/tag.js +84 -0
  214. package/dist/components/tag-group/index.d.ts +13 -0
  215. package/dist/components/tag-group/index.js +12 -0
  216. package/dist/components/tag-group/tag-group.d.ts +19 -0
  217. package/dist/components/tag-group/tag-group.js +58 -0
  218. package/dist/components/text-field/index.js +1 -1
  219. package/dist/components/text-field/text-field.js +3 -3
  220. package/dist/components/textarea/index.d.ts +11 -0
  221. package/dist/components/textarea/index.js +10 -0
  222. package/dist/components/textarea/textarea.d.ts +8 -0
  223. package/dist/components/textarea/textarea.js +26 -0
  224. package/dist/components/toast/constants.d.ts +3 -0
  225. package/dist/components/toast/constants.js +8 -0
  226. package/dist/components/toast/index.d.ts +73 -0
  227. package/dist/components/toast/index.js +21 -0
  228. package/dist/components/toast/toast-queue.d.ts +67 -0
  229. package/dist/components/toast/toast-queue.js +129 -0
  230. package/dist/components/toast/toast.d.ts +67 -0
  231. package/dist/components/toast/toast.js +295 -0
  232. package/dist/components/toggle-button/index.d.ts +2 -0
  233. package/dist/components/toggle-button/index.js +1 -0
  234. package/dist/components/toggle-button/toggle-button.d.ts +10 -0
  235. package/dist/components/toggle-button/toggle-button.js +26 -0
  236. package/dist/components/toggle-button-group/index.d.ts +2 -0
  237. package/dist/components/toggle-button-group/index.js +1 -0
  238. package/dist/components/toggle-button-group/toggle-button-group.d.ts +15 -0
  239. package/dist/components/toggle-button-group/toggle-button-group.js +61 -0
  240. package/dist/components/tooltip/index.d.ts +17 -0
  241. package/dist/components/tooltip/index.js +13 -0
  242. package/dist/components/tooltip/tooltip.d.ts +20 -0
  243. package/dist/components/tooltip/tooltip.js +105 -0
  244. package/dist/hooks/index.d.ts +6 -0
  245. package/dist/hooks/use-isomorphic-layout-effect.d.ts +2 -0
  246. package/dist/hooks/use-isomorphic-layout-effect.js +5 -0
  247. package/dist/hooks/use-list-data.d.ts +111 -0
  248. package/dist/hooks/use-media-query.d.ts +6 -0
  249. package/dist/hooks/use-media-query.js +49 -0
  250. package/dist/hooks/use-overlay-state.d.ts +52 -0
  251. package/dist/hooks/use-pagination.d.ts +48 -0
  252. package/dist/hooks/use-pagination.js +114 -0
  253. package/dist/hooks/use-safe-layout-effect.d.ts +2 -0
  254. package/dist/hooks/use-safe-layout-effect.js +5 -0
  255. package/dist/index.js +111 -26
  256. package/dist/node_modules/.pnpm/@internationalized_string@3.2.7/node_modules/@internationalized/string/dist/LocalizedStringDictionary.js +74 -0
  257. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ar-AE.js +3 -0
  258. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/bg-BG.js +3 -0
  259. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/cs-CZ.js +3 -0
  260. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/da-DK.js +3 -0
  261. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/de-DE.js +3 -0
  262. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/el-GR.js +3 -0
  263. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/en-US.js +3 -0
  264. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/es-ES.js +3 -0
  265. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/et-EE.js +3 -0
  266. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/fi-FI.js +3 -0
  267. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/fr-FR.js +3 -0
  268. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/he-IL.js +3 -0
  269. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/hr-HR.js +3 -0
  270. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/hu-HU.js +3 -0
  271. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/index.js +80 -0
  272. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/it-IT.js +3 -0
  273. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ja-JP.js +3 -0
  274. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ko-KR.js +3 -0
  275. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/lt-LT.js +3 -0
  276. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/lv-LV.js +3 -0
  277. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/nb-NO.js +3 -0
  278. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/nl-NL.js +3 -0
  279. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pl-PL.js +3 -0
  280. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pt-BR.js +3 -0
  281. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/pt-PT.js +3 -0
  282. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ro-RO.js +3 -0
  283. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/ru-RU.js +3 -0
  284. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sk-SK.js +3 -0
  285. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sl-SI.js +3 -0
  286. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sr-SP.js +3 -0
  287. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/sv-SE.js +3 -0
  288. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/tr-TR.js +3 -0
  289. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/uk-UA.js +3 -0
  290. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/zh-CN.js +3 -0
  291. package/dist/node_modules/.pnpm/react-aria-components@1.14.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/i18n/zh-TW.js +3 -0
  292. package/dist/packages/styles/src/components/accordion/accordion.styles.js +26 -0
  293. package/dist/packages/styles/src/components/alert/alert.styles.js +35 -0
  294. package/dist/packages/styles/src/components/alert-dialog/alert-dialog.styles.js +70 -0
  295. package/dist/packages/styles/src/components/avatar/avatar.styles.js +51 -0
  296. package/dist/packages/styles/src/components/breadcrumbs/breadcrumbs.styles.js +12 -0
  297. package/dist/packages/styles/src/components/chip/chip.styles.js +31 -0
  298. package/dist/packages/styles/src/components/container/container.styles.js +18 -0
  299. package/dist/packages/styles/src/components/dropdown/dropdown.styles.js +12 -0
  300. package/dist/packages/styles/src/components/empty/empty.styles.js +30 -0
  301. package/dist/packages/styles/src/components/empty-state/empty-state.styles.js +7 -0
  302. package/dist/packages/styles/src/components/fieldset/fieldset.styles.js +13 -0
  303. package/dist/packages/styles/src/components/header/header.styles.js +7 -0
  304. package/dist/packages/styles/src/components/heading/heading.styles.js +19 -0
  305. package/dist/packages/styles/src/components/input-group/input-group.styles.js +32 -0
  306. package/dist/packages/styles/src/components/input-otp/input-otp.styles.js +28 -0
  307. package/dist/packages/styles/src/components/kbd/kbd.styles.js +18 -0
  308. package/dist/packages/styles/src/components/link/link.styles.js +12 -0
  309. package/dist/packages/styles/src/components/listbox/listbox.styles.js +16 -0
  310. package/dist/packages/styles/src/components/listbox-item/listbox-item.styles.js +23 -0
  311. package/dist/packages/styles/src/components/listbox-section/listbox-section.styles.js +7 -0
  312. package/dist/packages/styles/src/components/menu/menu.styles.js +7 -0
  313. package/dist/packages/styles/src/components/menu-item/menu-item.styles.js +24 -0
  314. package/dist/packages/styles/src/components/menu-section/menu-section.styles.js +7 -0
  315. package/dist/packages/styles/src/components/modal/modal.styles.js +68 -0
  316. package/dist/packages/styles/src/components/number-field/number-field.styles.js +34 -0
  317. package/dist/packages/styles/src/components/pagination/pagination.styles.js +33 -0
  318. package/dist/packages/styles/src/components/radio/radio.styles.js +12 -0
  319. package/dist/packages/styles/src/components/radio-group/radio-group.styles.js +16 -0
  320. package/dist/packages/styles/src/components/scroll-shadow/scroll-shadow.styles.js +35 -0
  321. package/dist/packages/styles/src/components/select/select.styles.js +34 -0
  322. package/dist/packages/styles/src/components/separator/separator.styles.js +16 -0
  323. package/dist/packages/styles/src/components/slider/slider.styles.js +14 -0
  324. package/dist/packages/styles/src/components/spinner/spinner.styles.js +26 -0
  325. package/dist/packages/styles/src/components/switch/switch.styles.js +28 -0
  326. package/dist/packages/styles/src/components/tabs/tabs.styles.js +27 -0
  327. package/dist/packages/styles/src/components/tag/tag.styles.js +35 -0
  328. package/dist/packages/styles/src/components/tag-group/tag-group.styles.js +10 -0
  329. package/dist/packages/styles/src/components/textarea/textarea.styles.js +21 -0
  330. package/dist/packages/styles/src/components/toast/toast.styles.js +65 -0
  331. package/dist/packages/styles/src/components/toggle-button/toggle-button.styles.js +36 -0
  332. package/dist/packages/styles/src/components/toggle-button-group/toggle-button-group.styles.js +36 -0
  333. package/dist/packages/styles/src/components/tooltip/tooltip.styles.js +10 -0
  334. package/dist/utils/children.d.ts +9 -0
  335. package/dist/utils/children.js +17 -0
  336. package/dist/utils/compose.js +1 -1
  337. package/dist/utils/index.d.ts +4 -0
  338. package/dist/utils/merge-props.d.ts +26 -0
  339. package/dist/utils/merge-props.js +72 -0
  340. package/dist/utils/merge-refs.d.ts +5 -0
  341. package/dist/utils/merge-refs.js +48 -0
  342. package/package.json +13 -7
  343. package/dist/components/field-group/field-group.d.ts +0 -11
  344. package/dist/components/field-group/field-group.js +0 -18
  345. package/dist/components/field-group/index.d.ts +0 -13
  346. package/dist/components/field-group/index.js +0 -11
  347. package/dist/styles/src/components/field-group/field-group.styles.js +0 -25
  348. package/dist/styles/src/utils/state.js +0 -13
  349. /package/dist/{styles → packages/styles}/src/components/button/button.styles.js +0 -0
  350. /package/dist/{styles → packages/styles}/src/components/button-group/button-group.styles.js +0 -0
  351. /package/dist/{styles → packages/styles}/src/components/calendar/calendar.styles.js +0 -0
  352. /package/dist/{styles → packages/styles}/src/components/card/card.styles.js +0 -0
  353. /package/dist/{styles → packages/styles}/src/components/checkbox/checkbox.styles.js +0 -0
  354. /package/dist/{styles → packages/styles}/src/components/checkbox-group/checkbox-group.styles.js +0 -0
  355. /package/dist/{styles → packages/styles}/src/components/close-button/close-button.styles.js +0 -0
  356. /package/dist/{styles → packages/styles}/src/components/combobox/combobox.styles.js +0 -0
  357. /package/dist/{styles → packages/styles}/src/components/date-field/date-field.styles.js +0 -0
  358. /package/dist/{styles → packages/styles}/src/components/date-input-group/date-input-group.styles.js +0 -0
  359. /package/dist/{styles → packages/styles}/src/components/date-picker/date-picker.styles.js +0 -0
  360. /package/dist/{styles → packages/styles}/src/components/date-range-picker/date-range-picker.styles.js +0 -0
  361. /package/dist/{styles → packages/styles}/src/components/description/description.styles.js +0 -0
  362. /package/dist/{styles → packages/styles}/src/components/error-message/error-message.styles.js +0 -0
  363. /package/dist/{styles → packages/styles}/src/components/field-error/field-error.styles.js +0 -0
  364. /package/dist/{styles → packages/styles}/src/components/input/input.styles.js +0 -0
  365. /package/dist/{styles → packages/styles}/src/components/label/label.styles.js +0 -0
  366. /package/dist/{styles → packages/styles}/src/components/popover/popover.styles.js +0 -0
  367. /package/dist/{styles → packages/styles}/src/components/range-calendar/range-calendar.styles.js +0 -0
  368. /package/dist/{styles → packages/styles}/src/components/surface/surface.styles.js +0 -0
  369. /package/dist/{styles → packages/styles}/src/components/text-field/text-field.styles.js +0 -0
@@ -0,0 +1,176 @@
1
+ import React__default, { createContext, useContext } from 'react';
2
+ import { Slider, SliderThumb as SliderThumb$1, SliderTrack as SliderTrack$1, SliderOutput as SliderOutput$1 } from 'react-aria-components';
3
+ import { dataAttr } from '../../utils/assertion.js';
4
+ import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
5
+ import { jsx, Fragment } from 'react/jsx-runtime';
6
+ import { sliderVariants } from '../../packages/styles/src/components/slider/slider.styles.js';
7
+
8
+ const SliderContext = /*#__PURE__*/createContext({});
9
+
10
+ /* -------------------------------------------------------------------------------------------------
11
+ * Slider Root
12
+ * -----------------------------------------------------------------------------------------------*/
13
+
14
+ const SliderRoot = ({
15
+ children,
16
+ className,
17
+ orientation = "horizontal",
18
+ ...props
19
+ }) => {
20
+ const slots = React__default.useMemo(() => sliderVariants({}), []);
21
+ return /*#__PURE__*/jsx(Slider, {
22
+ "data-slot": "slider",
23
+ orientation: orientation,
24
+ ...props,
25
+ className: composeTwRenderProps(className, slots.base()),
26
+ children: values => /*#__PURE__*/jsx(SliderContext, {
27
+ value: {
28
+ slots,
29
+ state: values
30
+ },
31
+ children: typeof children === "function" ? children(values) : children
32
+ })
33
+ });
34
+ };
35
+
36
+ /* -------------------------------------------------------------------------------------------------
37
+ * Slider Output
38
+ * -----------------------------------------------------------------------------------------------*/
39
+
40
+ const SliderOutput = ({
41
+ children,
42
+ className,
43
+ ...props
44
+ }) => {
45
+ const {
46
+ slots
47
+ } = useContext(SliderContext);
48
+ return /*#__PURE__*/jsx(SliderOutput$1, {
49
+ className: composeTwRenderProps(className, slots?.output()),
50
+ "data-slot": "slider-output",
51
+ ...props,
52
+ children: children ? values => /*#__PURE__*/jsx(Fragment, {
53
+ children: typeof children === "function" ? children(values) : children
54
+ }) : ({
55
+ state
56
+ }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" – ")
57
+ });
58
+ };
59
+
60
+ /* -------------------------------------------------------------------------------------------------
61
+ * Slider Track
62
+ * -----------------------------------------------------------------------------------------------*/
63
+
64
+ const SliderTrack = ({
65
+ children,
66
+ className,
67
+ ...props
68
+ }) => {
69
+ const {
70
+ slots,
71
+ state
72
+ } = useContext(SliderContext);
73
+ const {
74
+ getThumbPercent,
75
+ values
76
+ } = state?.state || {};
77
+ const singleThumb = values?.length && values.length === 1;
78
+ const [startOffset, endOffset] = [values?.length && values.length > 1 ? getThumbPercent?.(0) : 0, getThumbPercent?.(values?.length ? values.length - 1 : 0)].sort();
79
+ const fillWidth = (endOffset - startOffset) * 100;
80
+ return /*#__PURE__*/jsx(SliderTrack$1, {
81
+ className: composeTwRenderProps(className, slots?.track()),
82
+ "data-disabled": dataAttr(state?.isDisabled),
83
+ "data-slot": "slider-track",
84
+ ...(singleThumb ? {
85
+ "data-fill-start": dataAttr(fillWidth > 0),
86
+ "data-fill-end": dataAttr(fillWidth == 100)
87
+ } : {
88
+ "data-fill-start": dataAttr(startOffset == 0),
89
+ "data-fill-end": dataAttr(startOffset * 100 + fillWidth == 100)
90
+ }),
91
+ ...props,
92
+ children: values => /*#__PURE__*/jsx(Fragment, {
93
+ children: typeof children === "function" ? children(values) : children
94
+ })
95
+ });
96
+ };
97
+
98
+ /* -------------------------------------------------------------------------------------------------
99
+ * Slider Fill
100
+ * -----------------------------------------------------------------------------------------------*/
101
+
102
+ const SliderFill = ({
103
+ className,
104
+ style,
105
+ ...props
106
+ }) => {
107
+ const {
108
+ slots,
109
+ state
110
+ } = useContext(SliderContext);
111
+ const {
112
+ getThumbPercent,
113
+ orientation,
114
+ values
115
+ } = state?.state || {};
116
+ const [startOffset, endOffset] = [values?.length && values.length > 1 ? getThumbPercent?.(0) : 0, getThumbPercent?.(values?.length ? values.length - 1 : 0)].sort();
117
+ const isVertical = orientation === "vertical";
118
+ return /*#__PURE__*/jsx("div", {
119
+ className: composeSlotClassName(slots?.fill, className),
120
+ "data-disabled": dataAttr(state?.isDisabled),
121
+ "data-slot": "slider-fill",
122
+ style: {
123
+ ...style,
124
+ // TODO: rtl support
125
+ [isVertical ? "bottom" : "left"]: `${startOffset * 100}%`,
126
+ ...(isVertical ? {
127
+ height: `${(endOffset - startOffset) * 100}%`
128
+ } : {
129
+ width: `${(endOffset - startOffset) * 100}%`
130
+ })
131
+ },
132
+ ...props
133
+ });
134
+ };
135
+
136
+ /* -------------------------------------------------------------------------------------------------
137
+ * Slider Thumb
138
+ * -----------------------------------------------------------------------------------------------*/
139
+
140
+ const SliderThumb = ({
141
+ children,
142
+ className,
143
+ ...props
144
+ }) => {
145
+ const {
146
+ slots
147
+ } = useContext(SliderContext);
148
+ return /*#__PURE__*/jsx(SliderThumb$1, {
149
+ className: composeTwRenderProps(className, slots?.thumb()),
150
+ "data-slot": "slider-thumb",
151
+ ...props,
152
+ children: values => /*#__PURE__*/jsx(Fragment, {
153
+ children: typeof children === "function" ? children(values) : children
154
+ })
155
+ });
156
+ };
157
+
158
+ /* -------------------------------------------------------------------------------------------------
159
+ * TODO: Slider Marks
160
+ * -----------------------------------------------------------------------------------------------*/
161
+
162
+ const SliderMarks = ({
163
+ className,
164
+ ...props
165
+ }) => {
166
+ const {
167
+ slots
168
+ } = useContext(SliderContext);
169
+ return /*#__PURE__*/jsx("div", {
170
+ className: composeSlotClassName(slots?.marks, className),
171
+ "data-slot": "slider-marks",
172
+ ...props
173
+ });
174
+ };
175
+
176
+ export { SliderFill, SliderMarks, SliderOutput, SliderRoot, SliderThumb, SliderTrack };
@@ -0,0 +1,11 @@
1
+ import type { ComponentProps } from "react";
2
+ import { SpinnerRoot } from "./spinner";
3
+ export declare const Spinner: (({ className, color, size, ...props }: import("./spinner").SpinnerRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ className, color, size, ...props }: import("./spinner").SpinnerRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ export type Spinner = {
7
+ Props: ComponentProps<typeof SpinnerRoot>;
8
+ RootProps: ComponentProps<typeof SpinnerRoot>;
9
+ };
10
+ export { SpinnerRoot };
11
+ export type { SpinnerRootProps, SpinnerRootProps as SpinnerProps } from "./spinner";
@@ -0,0 +1,10 @@
1
+ import { SpinnerRoot } from './spinner.js';
2
+
3
+ /* -------------------------------------------------------------------------------------------------
4
+ * Compound Component
5
+ * -----------------------------------------------------------------------------------------------*/
6
+ const Spinner = Object.assign(SpinnerRoot, {
7
+ Root: SpinnerRoot
8
+ });
9
+
10
+ export { Spinner, SpinnerRoot };
@@ -0,0 +1,7 @@
1
+ import type { SpinnerVariants } from "@arobo/styles";
2
+ import type { ComponentPropsWithRef } from "react";
3
+ interface SpinnerRootProps extends Omit<ComponentPropsWithRef<"svg">, "display" | "opacity" | "color">, SpinnerVariants {
4
+ }
5
+ declare const SpinnerRoot: ({ className, color, size, ...props }: SpinnerRootProps) => import("react/jsx-runtime").JSX.Element;
6
+ export { SpinnerRoot };
7
+ export type { SpinnerRootProps };
@@ -0,0 +1,87 @@
1
+ import { useId } from 'react';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { spinnerVariants } from '../../packages/styles/src/components/spinner/spinner.styles.js';
4
+
5
+ const SpinnerPrimitive = ({
6
+ ...props
7
+ }) => {
8
+ const id = useId();
9
+ return /*#__PURE__*/jsxs("svg", {
10
+ "data-slot": "spinner-icon",
11
+ viewBox: "0 0 24 24",
12
+ ...props,
13
+ children: [/*#__PURE__*/jsxs("defs", {
14
+ children: [/*#__PURE__*/jsxs("linearGradient", {
15
+ id: `«data-slot-icon-def-1»-${id}`,
16
+ x1: "50%",
17
+ x2: "50%",
18
+ y1: "5.271%",
19
+ y2: "91.793%",
20
+ children: [/*#__PURE__*/jsx("stop", {
21
+ offset: "0%",
22
+ stopColor: "currentColor"
23
+ }), /*#__PURE__*/jsx("stop", {
24
+ offset: "100%",
25
+ stopColor: "currentColor",
26
+ stopOpacity: 0.55
27
+ })]
28
+ }), /*#__PURE__*/jsxs("linearGradient", {
29
+ id: `«data-slot-icon-def-2»-${id}`,
30
+ x1: "50%",
31
+ x2: "50%",
32
+ y1: "15.24%",
33
+ y2: "87.15%",
34
+ children: [/*#__PURE__*/jsx("stop", {
35
+ offset: "0%",
36
+ stopColor: "currentColor",
37
+ stopOpacity: 0
38
+ }), /*#__PURE__*/jsx("stop", {
39
+ offset: "100%",
40
+ stopColor: "currentColor",
41
+ stopOpacity: 0.55
42
+ })]
43
+ })]
44
+ }), /*#__PURE__*/jsxs("g", {
45
+ fill: "none",
46
+ children: [/*#__PURE__*/jsx("path", {
47
+ d: "m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"
48
+ }), /*#__PURE__*/jsx("path", {
49
+ d: "M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021",
50
+ fill: `url(#«data-slot-icon-def-1»-${id})`,
51
+ transform: "translate(1.5 1.625)"
52
+ }), /*#__PURE__*/jsx("path", {
53
+ d: "M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118",
54
+ fill: `url(#«data-slot-icon-def-2»-${id})`,
55
+ transform: "translate(1.5 1.625)"
56
+ })]
57
+ })]
58
+ });
59
+ };
60
+
61
+ /* -------------------------------------------------------------------------------------------------
62
+ * Spinner Root
63
+ * -----------------------------------------------------------------------------------------------*/
64
+
65
+ const SpinnerRoot = ({
66
+ className,
67
+ color,
68
+ size,
69
+ ...props
70
+ }) => {
71
+ return /*#__PURE__*/jsx("span", {
72
+ "data-slot": "spinner",
73
+ className: spinnerVariants({
74
+ className,
75
+ color,
76
+ size
77
+ }),
78
+ children: /*#__PURE__*/jsx(SpinnerPrimitive, {
79
+ "aria-hidden": true,
80
+ "aria-label": "Loading",
81
+ role: "presentation",
82
+ ...props
83
+ })
84
+ });
85
+ };
86
+
87
+ export { SpinnerRoot };
@@ -1,6 +1,6 @@
1
1
  import { SurfaceRoot } from './surface.js';
2
2
  export { SurfaceContext } from './surface.js';
3
- export { surfaceVariants } from '../../styles/src/components/surface/surface.styles.js';
3
+ export { surfaceVariants } from '../../packages/styles/src/components/surface/surface.styles.js';
4
4
 
5
5
  /* -------------------------------------------------------------------------------------------------
6
6
  * Compound Component
@@ -1,6 +1,6 @@
1
1
  import { createContext } from 'react';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { surfaceVariants } from '../../styles/src/components/surface/surface.styles.js';
3
+ import { surfaceVariants } from '../../packages/styles/src/components/surface/surface.styles.js';
4
4
 
5
5
  const SurfaceContext = /*#__PURE__*/createContext({});
6
6
 
@@ -0,0 +1,17 @@
1
+ import type { ComponentProps } from "react";
2
+ import { SwitchControl, SwitchIcon, SwitchRoot, SwitchThumb } from "./switch";
3
+ export declare const Switch: (({ children, className, size, ...props }: import("./switch").SwitchRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ children, className, size, ...props }: import("./switch").SwitchRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ Control: ({ children, className, ...props }: import("./switch").SwitchControlProps) => import("react/jsx-runtime").JSX.Element;
6
+ Thumb: ({ children, className, ...props }: import("./switch").SwitchThumbProps) => import("react/jsx-runtime").JSX.Element;
7
+ Icon: ({ children, className, ...props }: import("./switch").SwitchIconProps) => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ export type Switch = {
10
+ Props: ComponentProps<typeof SwitchRoot>;
11
+ RootProps: ComponentProps<typeof SwitchRoot>;
12
+ ControlProps: ComponentProps<typeof SwitchControl>;
13
+ ThumbProps: ComponentProps<typeof SwitchThumb>;
14
+ IconProps: ComponentProps<typeof SwitchIcon>;
15
+ };
16
+ export { SwitchRoot, SwitchControl, SwitchIcon, SwitchThumb };
17
+ export type { SwitchRootProps, SwitchRootProps as SwitchProps, SwitchControlProps, SwitchThumbProps, SwitchIconProps, } from "./switch";
@@ -0,0 +1,13 @@
1
+ import { SwitchRoot, SwitchIcon, SwitchThumb, SwitchControl } from './switch.js';
2
+
3
+ /* -------------------------------------------------------------------------------------------------
4
+ * Compound Component
5
+ * -----------------------------------------------------------------------------------------------*/
6
+ const Switch = Object.assign(SwitchRoot, {
7
+ Root: SwitchRoot,
8
+ Control: SwitchControl,
9
+ Thumb: SwitchThumb,
10
+ Icon: SwitchIcon
11
+ });
12
+
13
+ export { Switch, SwitchControl, SwitchIcon, SwitchRoot, SwitchThumb };
@@ -0,0 +1,17 @@
1
+ import type { ComponentPropsWithRef } from "react";
2
+ import { Switch as SwitchPrimitive } from "react-aria-components";
3
+ import { type SwitchVariants } from "@arobo/styles";
4
+ interface SwitchRootProps extends ComponentPropsWithRef<typeof SwitchPrimitive>, SwitchVariants {
5
+ }
6
+ declare const SwitchRoot: ({ children, className, size, ...props }: SwitchRootProps) => import("react/jsx-runtime").JSX.Element;
7
+ interface SwitchControlProps extends ComponentPropsWithRef<"span"> {
8
+ }
9
+ declare const SwitchControl: ({ children, className, ...props }: SwitchControlProps) => import("react/jsx-runtime").JSX.Element;
10
+ interface SwitchThumbProps extends ComponentPropsWithRef<"span"> {
11
+ }
12
+ declare const SwitchThumb: ({ children, className, ...props }: SwitchThumbProps) => import("react/jsx-runtime").JSX.Element;
13
+ interface SwitchIconProps extends ComponentPropsWithRef<"span"> {
14
+ }
15
+ declare const SwitchIcon: ({ children, className, ...props }: SwitchIconProps) => import("react/jsx-runtime").JSX.Element;
16
+ export { SwitchRoot, SwitchControl, SwitchThumb, SwitchIcon };
17
+ export type { SwitchRootProps, SwitchControlProps, SwitchThumbProps, SwitchIconProps };
@@ -0,0 +1,97 @@
1
+ import React__default, { createContext, useContext } from 'react';
2
+ import { Switch } from 'react-aria-components';
3
+ import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
4
+ import { jsx, Fragment } from 'react/jsx-runtime';
5
+ import { switchVariants } from '../../packages/styles/src/components/switch/switch.styles.js';
6
+
7
+ const SwitchContext = /*#__PURE__*/createContext({});
8
+
9
+ /* -------------------------------------------------------------------------------------------------
10
+ * Switch Root
11
+ * -----------------------------------------------------------------------------------------------*/
12
+
13
+ const SwitchRoot = ({
14
+ children,
15
+ className,
16
+ size,
17
+ ...props
18
+ }) => {
19
+ const slots = React__default.useMemo(() => switchVariants({
20
+ size
21
+ }), [size]);
22
+ return /*#__PURE__*/jsx(SwitchContext, {
23
+ value: {
24
+ slots
25
+ },
26
+ children: /*#__PURE__*/jsx(Switch, {
27
+ "data-slot": "switch",
28
+ ...props,
29
+ className: composeTwRenderProps(className, slots.base()),
30
+ children: values => /*#__PURE__*/jsx(Fragment, {
31
+ children: typeof children === "function" ? children(values) : children
32
+ })
33
+ })
34
+ });
35
+ };
36
+
37
+ /* -------------------------------------------------------------------------------------------------
38
+ * Switch Control
39
+ * -----------------------------------------------------------------------------------------------*/
40
+
41
+ const SwitchControl = ({
42
+ children,
43
+ className,
44
+ ...props
45
+ }) => {
46
+ const {
47
+ slots
48
+ } = useContext(SwitchContext);
49
+ return /*#__PURE__*/jsx("span", {
50
+ className: composeSlotClassName(slots?.control, className),
51
+ "data-slot": "switch-control",
52
+ ...props,
53
+ children: children
54
+ });
55
+ };
56
+
57
+ /* -------------------------------------------------------------------------------------------------
58
+ * Switch Thumb
59
+ * -----------------------------------------------------------------------------------------------*/
60
+
61
+ const SwitchThumb = ({
62
+ children,
63
+ className,
64
+ ...props
65
+ }) => {
66
+ const {
67
+ slots
68
+ } = useContext(SwitchContext);
69
+ return /*#__PURE__*/jsx("span", {
70
+ className: composeSlotClassName(slots?.thumb, className),
71
+ "data-slot": "switch-thumb",
72
+ ...props,
73
+ children: children
74
+ });
75
+ };
76
+
77
+ /* -------------------------------------------------------------------------------------------------
78
+ * Switch Icon
79
+ * -----------------------------------------------------------------------------------------------*/
80
+
81
+ const SwitchIcon = ({
82
+ children,
83
+ className,
84
+ ...props
85
+ }) => {
86
+ const {
87
+ slots
88
+ } = useContext(SwitchContext);
89
+ return /*#__PURE__*/jsx("span", {
90
+ className: composeSlotClassName(slots?.icon, className),
91
+ "data-slot": "switch-icon",
92
+ ...props,
93
+ children: children
94
+ });
95
+ };
96
+
97
+ export { SwitchControl, SwitchIcon, SwitchRoot, SwitchThumb };
@@ -0,0 +1,21 @@
1
+ import type { ComponentProps } from "react";
2
+ import { Tab, TabIndicator, TabList, TabListContainer, TabPanel, TabsRoot } from "./tabs";
3
+ export declare const Tabs: (({ children, className, hideSeparator, orientation, variant, ...props }: import("./tabs").TabsRootProps) => import("react/jsx-runtime").JSX.Element) & {
4
+ Root: ({ children, className, hideSeparator, orientation, variant, ...props }: import("./tabs").TabsRootProps) => import("react/jsx-runtime").JSX.Element;
5
+ ListContainer: ({ children, className, ...props }: import("./tabs").TabListContainerProps) => import("react/jsx-runtime").JSX.Element;
6
+ List: ({ children, className, ...props }: import("./tabs").TabListProps) => import("react/jsx-runtime").JSX.Element;
7
+ Tab: ({ children, className, ...props }: import("./tabs").TabProps) => import("react/jsx-runtime").JSX.Element;
8
+ Indicator: ({ className, ...props }: import("./tabs").TabIndicatorProps) => import("react/jsx-runtime").JSX.Element;
9
+ Panel: ({ children, className, ...props }: import("./tabs").TabPanelProps) => import("react/jsx-runtime").JSX.Element;
10
+ };
11
+ export type Tabs = {
12
+ Props: ComponentProps<typeof TabsRoot>;
13
+ RootProps: ComponentProps<typeof TabsRoot>;
14
+ ListContainer: ComponentProps<typeof TabListContainer>;
15
+ ListProps: ComponentProps<typeof TabList>;
16
+ TabProps: ComponentProps<typeof Tab>;
17
+ IndicatorProps: ComponentProps<typeof TabIndicator>;
18
+ PanelProps: ComponentProps<typeof TabPanel>;
19
+ };
20
+ export { TabsRoot, TabListContainer, TabList, Tab, TabIndicator, TabPanel };
21
+ export type { TabsRootProps, TabsRootProps as TabsProps, TabListContainerProps, TabListProps, TabProps, TabIndicatorProps, TabPanelProps, } from "./tabs";
@@ -0,0 +1,15 @@
1
+ import { TabsRoot, TabPanel, TabIndicator, Tab, TabList, TabListContainer } from './tabs.js';
2
+
3
+ /* -------------------------------------------------------------------------------------------------
4
+ * Compound Component
5
+ * -----------------------------------------------------------------------------------------------*/
6
+ const Tabs = Object.assign(TabsRoot, {
7
+ Root: TabsRoot,
8
+ ListContainer: TabListContainer,
9
+ List: TabList,
10
+ Tab,
11
+ Indicator: TabIndicator,
12
+ Panel: TabPanel
13
+ });
14
+
15
+ export { Tab, TabIndicator, TabList, TabListContainer, TabPanel, Tabs, TabsRoot };
@@ -0,0 +1,34 @@
1
+ import type { ComponentPropsWithRef } from "react";
2
+ import React from "react";
3
+ import { SelectionIndicator as SelectionIndicatorPrimitive, TabList as TabListPrimitive, TabPanel as TabPanelPrimitive, Tab as TabPrimitive, Tabs as TabsPrimitive } from "react-aria-components";
4
+ import { type TabsVariants } from "@arobo/styles";
5
+ interface TabsRootProps extends ComponentPropsWithRef<typeof TabsPrimitive>, TabsVariants {
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ hideSeparator?: boolean;
9
+ }
10
+ declare const TabsRoot: ({ children, className, hideSeparator, orientation, variant, ...props }: TabsRootProps) => import("react/jsx-runtime").JSX.Element;
11
+ interface TabListContainerProps extends ComponentPropsWithRef<"div"> {
12
+ className?: string;
13
+ }
14
+ declare const TabListContainer: ({ children, className, ...props }: TabListContainerProps) => import("react/jsx-runtime").JSX.Element;
15
+ interface TabListProps extends ComponentPropsWithRef<typeof TabListPrimitive<object>> {
16
+ children: React.ReactNode;
17
+ className?: string;
18
+ }
19
+ declare const TabList: ({ children, className, ...props }: TabListProps) => import("react/jsx-runtime").JSX.Element;
20
+ interface TabProps extends ComponentPropsWithRef<typeof TabPrimitive> {
21
+ className?: string;
22
+ }
23
+ declare const Tab: ({ children, className, ...props }: TabProps) => import("react/jsx-runtime").JSX.Element;
24
+ interface TabIndicatorProps extends ComponentPropsWithRef<typeof SelectionIndicatorPrimitive> {
25
+ className?: string;
26
+ }
27
+ declare const TabIndicator: ({ className, ...props }: TabIndicatorProps) => import("react/jsx-runtime").JSX.Element;
28
+ interface TabPanelProps extends Omit<ComponentPropsWithRef<typeof TabPanelPrimitive>, "children"> {
29
+ children: React.ReactNode;
30
+ className?: string;
31
+ }
32
+ declare const TabPanel: ({ children, className, ...props }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
33
+ export { TabsRoot, TabListContainer, TabList, Tab, TabIndicator, TabPanel };
34
+ export type { TabsRootProps, TabListContainerProps, TabListProps, TabProps, TabIndicatorProps, TabPanelProps, };
@@ -0,0 +1,140 @@
1
+ import React__default, { createContext, useContext } from 'react';
2
+ import { Tabs, TabPanel as TabPanel$1, SelectionIndicator, Tab as Tab$1, TabList as TabList$1 } from 'react-aria-components';
3
+ import { composeTwRenderProps, composeSlotClassName } from '../../utils/compose.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
+ import { tabsVariants } from '../../packages/styles/src/components/tabs/tabs.styles.js';
6
+
7
+ const TabsContext = /*#__PURE__*/createContext({});
8
+
9
+ /* -------------------------------------------------------------------------------------------------
10
+ * Tabs Root
11
+ * -----------------------------------------------------------------------------------------------*/
12
+
13
+ const TabsRoot = ({
14
+ children,
15
+ className,
16
+ hideSeparator = false,
17
+ orientation = "horizontal",
18
+ variant,
19
+ ...props
20
+ }) => {
21
+ const slots = React__default.useMemo(() => tabsVariants({
22
+ variant
23
+ }), [variant]);
24
+ return /*#__PURE__*/jsx(TabsContext, {
25
+ value: {
26
+ hideSeparator,
27
+ orientation,
28
+ slots
29
+ },
30
+ children: /*#__PURE__*/jsx(Tabs, {
31
+ ...props,
32
+ className: composeTwRenderProps(className, slots.base()),
33
+ "data-slot": "tabs",
34
+ orientation: orientation,
35
+ children: children
36
+ })
37
+ });
38
+ };
39
+
40
+ /* -------------------------------------------------------------------------------------------------
41
+ * Tabs List Container
42
+ * -----------------------------------------------------------------------------------------------*/
43
+
44
+ const TabListContainer = ({
45
+ children,
46
+ className,
47
+ ...props
48
+ }) => {
49
+ const {
50
+ slots
51
+ } = useContext(TabsContext);
52
+ return /*#__PURE__*/jsx("div", {
53
+ className: composeSlotClassName(slots?.tabListContainer, className),
54
+ "data-slot": "tabs-list-container",
55
+ ...props,
56
+ children: children
57
+ });
58
+ };
59
+
60
+ /* -------------------------------------------------------------------------------------------------
61
+ * Tabs List
62
+ * -----------------------------------------------------------------------------------------------*/
63
+
64
+ const TabList = ({
65
+ children,
66
+ className,
67
+ ...props
68
+ }) => {
69
+ const {
70
+ hideSeparator,
71
+ slots
72
+ } = useContext(TabsContext);
73
+ return /*#__PURE__*/jsx(TabList$1, {
74
+ ...props,
75
+ className: composeTwRenderProps(className, slots?.tabList()),
76
+ "data-hide-separator": hideSeparator ? "true" : undefined,
77
+ "data-slot": "tabs-list",
78
+ children: children
79
+ });
80
+ };
81
+
82
+ /* -------------------------------------------------------------------------------------------------
83
+ * Tab
84
+ * -----------------------------------------------------------------------------------------------*/
85
+
86
+ const Tab = ({
87
+ children,
88
+ className,
89
+ ...props
90
+ }) => {
91
+ const {
92
+ slots
93
+ } = useContext(TabsContext);
94
+ return /*#__PURE__*/jsx(Tab$1, {
95
+ ...props,
96
+ className: composeTwRenderProps(className, slots?.tab()),
97
+ "data-slot": "tabs-tab",
98
+ children: children
99
+ });
100
+ };
101
+
102
+ /* -------------------------------------------------------------------------------------------------
103
+ * Tab Indicator
104
+ * -----------------------------------------------------------------------------------------------*/
105
+
106
+ const TabIndicator = ({
107
+ className,
108
+ ...props
109
+ }) => {
110
+ const {
111
+ slots
112
+ } = useContext(TabsContext);
113
+ return /*#__PURE__*/jsx(SelectionIndicator, {
114
+ className: composeSlotClassName(slots?.tabIndicator, className),
115
+ "data-slot": "tabs-indicator",
116
+ ...props
117
+ });
118
+ };
119
+
120
+ /* -------------------------------------------------------------------------------------------------
121
+ * Tab Panel
122
+ * -----------------------------------------------------------------------------------------------*/
123
+
124
+ const TabPanel = ({
125
+ children,
126
+ className,
127
+ ...props
128
+ }) => {
129
+ const {
130
+ slots
131
+ } = useContext(TabsContext);
132
+ return /*#__PURE__*/jsx(TabPanel$1, {
133
+ ...props,
134
+ className: composeTwRenderProps(className, slots?.tabPanel()),
135
+ "data-slot": "tabs-panel",
136
+ children: children
137
+ });
138
+ };
139
+
140
+ export { Tab, TabIndicator, TabList, TabListContainer, TabPanel, TabsRoot };