blimpui 0.0.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 (331) hide show
  1. package/dist/$/components/primitives/accordion.d.ts +9 -0
  2. package/dist/$/components/primitives/accordion.d.ts.map +1 -0
  3. package/dist/$/components/primitives/accordion.js +64 -0
  4. package/dist/$/components/primitives/alert-dialog.d.ts +31 -0
  5. package/dist/$/components/primitives/alert-dialog.d.ts.map +1 -0
  6. package/dist/$/components/primitives/alert-dialog.js +74 -0
  7. package/dist/$/components/primitives/alert.d.ts +13 -0
  8. package/dist/$/components/primitives/alert.d.ts.map +1 -0
  9. package/dist/$/components/primitives/alert.js +42 -0
  10. package/dist/$/components/primitives/aspect-ratio.d.ts +2 -0
  11. package/dist/$/components/primitives/aspect-ratio.d.ts.map +1 -0
  12. package/dist/$/components/primitives/aspect-ratio.js +1 -0
  13. package/dist/$/components/primitives/avatar.d.ts +6 -0
  14. package/dist/$/components/primitives/avatar.d.ts.map +1 -0
  15. package/dist/$/components/primitives/avatar.js +38 -0
  16. package/dist/$/components/primitives/badge.d.ts +15 -0
  17. package/dist/$/components/primitives/badge.d.ts.map +1 -0
  18. package/dist/$/components/primitives/badge.js +64 -0
  19. package/dist/$/components/primitives/button.d.ts +37 -0
  20. package/dist/$/components/primitives/button.d.ts.map +1 -0
  21. package/dist/$/components/primitives/button.js +100 -0
  22. package/dist/$/components/primitives/calendar/calendar-header.d.ts +13 -0
  23. package/dist/$/components/primitives/calendar/calendar-header.d.ts.map +1 -0
  24. package/dist/$/components/primitives/calendar/calendar-header.js +15 -0
  25. package/dist/$/components/primitives/calendar/calendar-month-grid.d.ts +14 -0
  26. package/dist/$/components/primitives/calendar/calendar-month-grid.d.ts.map +1 -0
  27. package/dist/$/components/primitives/calendar/calendar-month-grid.js +29 -0
  28. package/dist/$/components/primitives/calendar/calendar-weekdays-row.d.ts +8 -0
  29. package/dist/$/components/primitives/calendar/calendar-weekdays-row.d.ts.map +1 -0
  30. package/dist/$/components/primitives/calendar/calendar-weekdays-row.js +36 -0
  31. package/dist/$/components/primitives/calendar/constants.d.ts +3 -0
  32. package/dist/$/components/primitives/calendar/constants.d.ts.map +1 -0
  33. package/dist/$/components/primitives/calendar/constants.js +15 -0
  34. package/dist/$/components/primitives/calendar/date-utils.d.ts +14 -0
  35. package/dist/$/components/primitives/calendar/date-utils.d.ts.map +1 -0
  36. package/dist/$/components/primitives/calendar/date-utils.js +77 -0
  37. package/dist/$/components/primitives/calendar/month-year-overlay.d.ts +14 -0
  38. package/dist/$/components/primitives/calendar/month-year-overlay.d.ts.map +1 -0
  39. package/dist/$/components/primitives/calendar/month-year-overlay.js +11 -0
  40. package/dist/$/components/primitives/calendar/types.d.ts +24 -0
  41. package/dist/$/components/primitives/calendar/types.d.ts.map +1 -0
  42. package/dist/$/components/primitives/calendar/types.js +1 -0
  43. package/dist/$/components/primitives/calendar/use-calendar-shell.d.ts +35 -0
  44. package/dist/$/components/primitives/calendar/use-calendar-shell.d.ts.map +1 -0
  45. package/dist/$/components/primitives/calendar/use-calendar-shell.js +95 -0
  46. package/dist/$/components/primitives/calendar/use-controllable-state.d.ts +8 -0
  47. package/dist/$/components/primitives/calendar/use-controllable-state.d.ts.map +1 -0
  48. package/dist/$/components/primitives/calendar/use-controllable-state.js +13 -0
  49. package/dist/$/components/primitives/calendar.d.ts +5 -0
  50. package/dist/$/components/primitives/calendar.d.ts.map +1 -0
  51. package/dist/$/components/primitives/calendar.js +48 -0
  52. package/dist/$/components/primitives/card.d.ts +10 -0
  53. package/dist/$/components/primitives/card.d.ts.map +1 -0
  54. package/dist/$/components/primitives/card.js +51 -0
  55. package/dist/$/components/primitives/checkbox.d.ts +8 -0
  56. package/dist/$/components/primitives/checkbox.d.ts.map +1 -0
  57. package/dist/$/components/primitives/checkbox.js +37 -0
  58. package/dist/$/components/primitives/collapsible.d.ts +2 -0
  59. package/dist/$/components/primitives/collapsible.d.ts.map +1 -0
  60. package/dist/$/components/primitives/collapsible.js +1 -0
  61. package/dist/$/components/primitives/context-menu.d.ts +61 -0
  62. package/dist/$/components/primitives/context-menu.d.ts.map +1 -0
  63. package/dist/$/components/primitives/context-menu.js +101 -0
  64. package/dist/$/components/primitives/dialog.d.ts +35 -0
  65. package/dist/$/components/primitives/dialog.d.ts.map +1 -0
  66. package/dist/$/components/primitives/dialog.js +68 -0
  67. package/dist/$/components/primitives/dropdown-menu.d.ts +61 -0
  68. package/dist/$/components/primitives/dropdown-menu.d.ts.map +1 -0
  69. package/dist/$/components/primitives/dropdown-menu.js +102 -0
  70. package/dist/$/components/primitives/hover-card.d.ts +18 -0
  71. package/dist/$/components/primitives/hover-card.d.ts.map +1 -0
  72. package/dist/$/components/primitives/hover-card.js +41 -0
  73. package/dist/$/components/primitives/icon.d.ts +27 -0
  74. package/dist/$/components/primitives/icon.d.ts.map +1 -0
  75. package/dist/$/components/primitives/icon.js +64 -0
  76. package/dist/$/components/primitives/input.d.ts +5 -0
  77. package/dist/$/components/primitives/input.d.ts.map +1 -0
  78. package/dist/$/components/primitives/input.js +38 -0
  79. package/dist/$/components/primitives/label.d.ts +4 -0
  80. package/dist/$/components/primitives/label.d.ts.map +1 -0
  81. package/dist/$/components/primitives/label.js +33 -0
  82. package/dist/$/components/primitives/list.d.ts +9 -0
  83. package/dist/$/components/primitives/list.d.ts.map +1 -0
  84. package/dist/$/components/primitives/list.js +155 -0
  85. package/dist/$/components/primitives/menubar.d.ts +57 -0
  86. package/dist/$/components/primitives/menubar.d.ts.map +1 -0
  87. package/dist/$/components/primitives/menubar.js +115 -0
  88. package/dist/$/components/primitives/multi-column-wheelpicker/index.d.ts +2 -0
  89. package/dist/$/components/primitives/multi-column-wheelpicker/index.d.ts.map +1 -0
  90. package/dist/$/components/primitives/multi-column-wheelpicker/index.js +1 -0
  91. package/dist/$/components/primitives/multi-column-wheelpicker/multi-column-wheelpicker.d.ts +35 -0
  92. package/dist/$/components/primitives/multi-column-wheelpicker/multi-column-wheelpicker.d.ts.map +1 -0
  93. package/dist/$/components/primitives/multi-column-wheelpicker/multi-column-wheelpicker.js +62 -0
  94. package/dist/$/components/primitives/native-only-animated-view.d.ts +13 -0
  95. package/dist/$/components/primitives/native-only-animated-view.d.ts.map +1 -0
  96. package/dist/$/components/primitives/native-only-animated-view.js +32 -0
  97. package/dist/$/components/primitives/popover.d.ts +18 -0
  98. package/dist/$/components/primitives/popover.d.ts.map +1 -0
  99. package/dist/$/components/primitives/popover.js +41 -0
  100. package/dist/$/components/primitives/pressable.d.ts +14 -0
  101. package/dist/$/components/primitives/pressable.d.ts.map +1 -0
  102. package/dist/$/components/primitives/pressable.js +39 -0
  103. package/dist/$/components/primitives/progress.d.ts +6 -0
  104. package/dist/$/components/primitives/progress.d.ts.map +1 -0
  105. package/dist/$/components/primitives/progress.js +60 -0
  106. package/dist/$/components/primitives/radio-group.d.ts +5 -0
  107. package/dist/$/components/primitives/radio-group.d.ts.map +1 -0
  108. package/dist/$/components/primitives/radio-group.js +37 -0
  109. package/dist/$/components/primitives/range-calendar/index.d.ts +2 -0
  110. package/dist/$/components/primitives/range-calendar/index.d.ts.map +1 -0
  111. package/dist/$/components/primitives/range-calendar/index.js +1 -0
  112. package/dist/$/components/primitives/range-calendar/range-calendar.d.ts +25 -0
  113. package/dist/$/components/primitives/range-calendar/range-calendar.d.ts.map +1 -0
  114. package/dist/$/components/primitives/range-calendar/range-calendar.js +170 -0
  115. package/dist/$/components/primitives/select.d.ts +59 -0
  116. package/dist/$/components/primitives/select.d.ts.map +1 -0
  117. package/dist/$/components/primitives/select.js +119 -0
  118. package/dist/$/components/primitives/separator.d.ts +4 -0
  119. package/dist/$/components/primitives/separator.d.ts.map +1 -0
  120. package/dist/$/components/primitives/separator.js +30 -0
  121. package/dist/$/components/primitives/skeleton.d.ts +5 -0
  122. package/dist/$/components/primitives/skeleton.d.ts.map +1 -0
  123. package/dist/$/components/primitives/skeleton.js +39 -0
  124. package/dist/$/components/primitives/switch.d.ts +4 -0
  125. package/dist/$/components/primitives/switch.d.ts.map +1 -0
  126. package/dist/$/components/primitives/switch.js +37 -0
  127. package/dist/$/components/primitives/tabs.d.ts +7 -0
  128. package/dist/$/components/primitives/tabs.d.ts.map +1 -0
  129. package/dist/$/components/primitives/tabs.js +48 -0
  130. package/dist/$/components/primitives/text.d.ts +13 -0
  131. package/dist/$/components/primitives/text.d.ts.map +1 -0
  132. package/dist/$/components/primitives/text.js +73 -0
  133. package/dist/$/components/primitives/textarea.d.ts +5 -0
  134. package/dist/$/components/primitives/textarea.d.ts.map +1 -0
  135. package/dist/$/components/primitives/textarea.js +33 -0
  136. package/dist/$/components/primitives/toast/index.d.ts +2 -0
  137. package/dist/$/components/primitives/toast/index.d.ts.map +1 -0
  138. package/dist/$/components/primitives/toast/index.js +1 -0
  139. package/dist/$/components/primitives/toast/index.web.d.ts +2 -0
  140. package/dist/$/components/primitives/toast/index.web.d.ts.map +1 -0
  141. package/dist/$/components/primitives/toast/index.web.js +1 -0
  142. package/dist/$/components/primitives/toggle-group.d.ts +13 -0
  143. package/dist/$/components/primitives/toggle-group.d.ts.map +1 -0
  144. package/dist/$/components/primitives/toggle-group.js +65 -0
  145. package/dist/$/components/primitives/toggle.d.ts +12 -0
  146. package/dist/$/components/primitives/toggle.d.ts.map +1 -0
  147. package/dist/$/components/primitives/toggle.js +63 -0
  148. package/dist/$/components/primitives/tooltip.d.ts +21 -0
  149. package/dist/$/components/primitives/tooltip.d.ts.map +1 -0
  150. package/dist/$/components/primitives/tooltip.js +47 -0
  151. package/dist/$/components/primitives/view.d.ts +15 -0
  152. package/dist/$/components/primitives/view.d.ts.map +1 -0
  153. package/dist/$/components/primitives/view.js +37 -0
  154. package/dist/$/components/primitives/wheelpicker/index.d.ts +4 -0
  155. package/dist/$/components/primitives/wheelpicker/index.d.ts.map +1 -0
  156. package/dist/$/components/primitives/wheelpicker/index.js +3 -0
  157. package/dist/$/components/primitives/wheelpicker/types.d.ts +7 -0
  158. package/dist/$/components/primitives/wheelpicker/types.d.ts.map +1 -0
  159. package/dist/$/components/primitives/wheelpicker/types.js +1 -0
  160. package/dist/$/components/primitives/wheelpicker/use-wheel-picker-value.d.ts +16 -0
  161. package/dist/$/components/primitives/wheelpicker/use-wheel-picker-value.d.ts.map +1 -0
  162. package/dist/$/components/primitives/wheelpicker/use-wheel-picker-value.js +43 -0
  163. package/dist/$/components/primitives/wheelpicker/wheel-picker-item.d.ts +11 -0
  164. package/dist/$/components/primitives/wheelpicker/wheel-picker-item.d.ts.map +1 -0
  165. package/dist/$/components/primitives/wheelpicker/wheel-picker-item.js +8 -0
  166. package/dist/$/components/primitives/wheelpicker/wheel-picker-list.d.ts +18 -0
  167. package/dist/$/components/primitives/wheelpicker/wheel-picker-list.d.ts.map +1 -0
  168. package/dist/$/components/primitives/wheelpicker/wheel-picker-list.js +253 -0
  169. package/dist/$/components/primitives/wheelpicker/wheelpicker.d.ts +17 -0
  170. package/dist/$/components/primitives/wheelpicker/wheelpicker.d.ts.map +1 -0
  171. package/dist/$/components/primitives/wheelpicker/wheelpicker.js +15 -0
  172. package/dist/$/components/ui/accordion.d.ts +17 -0
  173. package/dist/$/components/ui/accordion.d.ts.map +1 -0
  174. package/dist/$/components/ui/accordion.js +39 -0
  175. package/dist/$/components/ui/alert-dialog.d.ts +22 -0
  176. package/dist/$/components/ui/alert-dialog.d.ts.map +1 -0
  177. package/dist/$/components/ui/alert-dialog.js +92 -0
  178. package/dist/$/components/ui/alert.d.ts +14 -0
  179. package/dist/$/components/ui/alert.d.ts.map +1 -0
  180. package/dist/$/components/ui/alert.js +31 -0
  181. package/dist/$/components/ui/aspect-ratio.d.ts +2 -0
  182. package/dist/$/components/ui/aspect-ratio.d.ts.map +1 -0
  183. package/dist/$/components/ui/aspect-ratio.js +1 -0
  184. package/dist/$/components/ui/avatar.d.ts +14 -0
  185. package/dist/$/components/ui/avatar.d.ts.map +1 -0
  186. package/dist/$/components/ui/avatar.js +33 -0
  187. package/dist/$/components/ui/badge.d.ts +2 -0
  188. package/dist/$/components/ui/badge.d.ts.map +1 -0
  189. package/dist/$/components/ui/badge.js +1 -0
  190. package/dist/$/components/ui/button.d.ts +2 -0
  191. package/dist/$/components/ui/button.d.ts.map +1 -0
  192. package/dist/$/components/ui/button.js +1 -0
  193. package/dist/$/components/ui/calendar.d.ts +2 -0
  194. package/dist/$/components/ui/calendar.d.ts.map +1 -0
  195. package/dist/$/components/ui/calendar.js +1 -0
  196. package/dist/$/components/ui/card.d.ts +17 -0
  197. package/dist/$/components/ui/card.d.ts.map +1 -0
  198. package/dist/$/components/ui/card.js +33 -0
  199. package/dist/$/components/ui/checkbox.d.ts +2 -0
  200. package/dist/$/components/ui/checkbox.d.ts.map +1 -0
  201. package/dist/$/components/ui/checkbox.js +1 -0
  202. package/dist/$/components/ui/collapsible.d.ts +12 -0
  203. package/dist/$/components/ui/collapsible.d.ts.map +1 -0
  204. package/dist/$/components/ui/collapsible.js +33 -0
  205. package/dist/$/components/ui/context-menu.d.ts +59 -0
  206. package/dist/$/components/ui/context-menu.d.ts.map +1 -0
  207. package/dist/$/components/ui/context-menu.js +66 -0
  208. package/dist/$/components/ui/date-range-picker.d.ts +26 -0
  209. package/dist/$/components/ui/date-range-picker.d.ts.map +1 -0
  210. package/dist/$/components/ui/date-range-picker.js +89 -0
  211. package/dist/$/components/ui/datepicker.d.ts +26 -0
  212. package/dist/$/components/ui/datepicker.d.ts.map +1 -0
  213. package/dist/$/components/ui/datepicker.js +81 -0
  214. package/dist/$/components/ui/dialog.d.ts +18 -0
  215. package/dist/$/components/ui/dialog.d.ts.map +1 -0
  216. package/dist/$/components/ui/dialog.js +33 -0
  217. package/dist/$/components/ui/dropdown-menu.d.ts +59 -0
  218. package/dist/$/components/ui/dropdown-menu.d.ts.map +1 -0
  219. package/dist/$/components/ui/dropdown-menu.js +79 -0
  220. package/dist/$/components/ui/form-field/form-field-label.d.ts +15 -0
  221. package/dist/$/components/ui/form-field/form-field-label.d.ts.map +1 -0
  222. package/dist/$/components/ui/form-field/form-field-label.js +15 -0
  223. package/dist/$/components/ui/form-field/form-field-message.d.ts +11 -0
  224. package/dist/$/components/ui/form-field/form-field-message.d.ts.map +1 -0
  225. package/dist/$/components/ui/form-field/form-field-message.js +10 -0
  226. package/dist/$/components/ui/form-field/index.d.ts +48 -0
  227. package/dist/$/components/ui/form-field/index.d.ts.map +1 -0
  228. package/dist/$/components/ui/form-field/index.js +80 -0
  229. package/dist/$/components/ui/form-field/use-form-field-animation.d.ts +8 -0
  230. package/dist/$/components/ui/form-field/use-form-field-animation.d.ts.map +1 -0
  231. package/dist/$/components/ui/form-field/use-form-field-animation.js +23 -0
  232. package/dist/$/components/ui/form-field/use-form-field.d.ts +28 -0
  233. package/dist/$/components/ui/form-field/use-form-field.d.ts.map +1 -0
  234. package/dist/$/components/ui/form-field/use-form-field.js +55 -0
  235. package/dist/$/components/ui/hover-card.d.ts +12 -0
  236. package/dist/$/components/ui/hover-card.d.ts.map +1 -0
  237. package/dist/$/components/ui/hover-card.js +33 -0
  238. package/dist/$/components/ui/icon.d.ts +2 -0
  239. package/dist/$/components/ui/icon.d.ts.map +1 -0
  240. package/dist/$/components/ui/icon.js +1 -0
  241. package/dist/$/components/ui/input.d.ts +30 -0
  242. package/dist/$/components/ui/input.d.ts.map +1 -0
  243. package/dist/$/components/ui/input.js +60 -0
  244. package/dist/$/components/ui/label.d.ts +2 -0
  245. package/dist/$/components/ui/label.d.ts.map +1 -0
  246. package/dist/$/components/ui/label.js +1 -0
  247. package/dist/$/components/ui/list.d.ts +2 -0
  248. package/dist/$/components/ui/list.d.ts.map +1 -0
  249. package/dist/$/components/ui/list.js +1 -0
  250. package/dist/$/components/ui/menubar.d.ts +63 -0
  251. package/dist/$/components/ui/menubar.d.ts.map +1 -0
  252. package/dist/$/components/ui/menubar.js +66 -0
  253. package/dist/$/components/ui/multi-column-wheelpicker.d.ts +2 -0
  254. package/dist/$/components/ui/multi-column-wheelpicker.d.ts.map +1 -0
  255. package/dist/$/components/ui/multi-column-wheelpicker.js +1 -0
  256. package/dist/$/components/ui/native-only-animated-view.d.ts +2 -0
  257. package/dist/$/components/ui/native-only-animated-view.d.ts.map +1 -0
  258. package/dist/$/components/ui/native-only-animated-view.js +1 -0
  259. package/dist/$/components/ui/picker.d.ts +25 -0
  260. package/dist/$/components/ui/picker.d.ts.map +1 -0
  261. package/dist/$/components/ui/picker.js +80 -0
  262. package/dist/$/components/ui/popover.d.ts +34 -0
  263. package/dist/$/components/ui/popover.d.ts.map +1 -0
  264. package/dist/$/components/ui/popover.js +63 -0
  265. package/dist/$/components/ui/pressable.d.ts +2 -0
  266. package/dist/$/components/ui/pressable.d.ts.map +1 -0
  267. package/dist/$/components/ui/pressable.js +1 -0
  268. package/dist/$/components/ui/progress.d.ts +2 -0
  269. package/dist/$/components/ui/progress.d.ts.map +1 -0
  270. package/dist/$/components/ui/progress.js +1 -0
  271. package/dist/$/components/ui/radio-group.d.ts +15 -0
  272. package/dist/$/components/ui/radio-group.d.ts.map +1 -0
  273. package/dist/$/components/ui/radio-group.js +41 -0
  274. package/dist/$/components/ui/range-calendar.d.ts +2 -0
  275. package/dist/$/components/ui/range-calendar.d.ts.map +1 -0
  276. package/dist/$/components/ui/range-calendar.js +1 -0
  277. package/dist/$/components/ui/select.d.ts +75 -0
  278. package/dist/$/components/ui/select.d.ts.map +1 -0
  279. package/dist/$/components/ui/select.js +105 -0
  280. package/dist/$/components/ui/separator.d.ts +2 -0
  281. package/dist/$/components/ui/separator.d.ts.map +1 -0
  282. package/dist/$/components/ui/separator.js +1 -0
  283. package/dist/$/components/ui/skeleton.d.ts +2 -0
  284. package/dist/$/components/ui/skeleton.d.ts.map +1 -0
  285. package/dist/$/components/ui/skeleton.js +1 -0
  286. package/dist/$/components/ui/switch.d.ts +2 -0
  287. package/dist/$/components/ui/switch.d.ts.map +1 -0
  288. package/dist/$/components/ui/switch.js +1 -0
  289. package/dist/$/components/ui/tabs.d.ts +17 -0
  290. package/dist/$/components/ui/tabs.d.ts.map +1 -0
  291. package/dist/$/components/ui/tabs.js +48 -0
  292. package/dist/$/components/ui/text.d.ts +2 -0
  293. package/dist/$/components/ui/text.d.ts.map +1 -0
  294. package/dist/$/components/ui/text.js +1 -0
  295. package/dist/$/components/ui/textarea.d.ts +30 -0
  296. package/dist/$/components/ui/textarea.d.ts.map +1 -0
  297. package/dist/$/components/ui/textarea.js +61 -0
  298. package/dist/$/components/ui/timepicker.d.ts +26 -0
  299. package/dist/$/components/ui/timepicker.d.ts.map +1 -0
  300. package/dist/$/components/ui/timepicker.js +90 -0
  301. package/dist/$/components/ui/timewheelpicker.d.ts +22 -0
  302. package/dist/$/components/ui/timewheelpicker.d.ts.map +1 -0
  303. package/dist/$/components/ui/timewheelpicker.js +112 -0
  304. package/dist/$/components/ui/toggle-group.d.ts +14 -0
  305. package/dist/$/components/ui/toggle-group.d.ts.map +1 -0
  306. package/dist/$/components/ui/toggle-group.js +44 -0
  307. package/dist/$/components/ui/toggle.d.ts +2 -0
  308. package/dist/$/components/ui/toggle.d.ts.map +1 -0
  309. package/dist/$/components/ui/toggle.js +1 -0
  310. package/dist/$/components/ui/tooltip.d.ts +12 -0
  311. package/dist/$/components/ui/tooltip.d.ts.map +1 -0
  312. package/dist/$/components/ui/tooltip.js +33 -0
  313. package/dist/$/components/ui/view.d.ts +2 -0
  314. package/dist/$/components/ui/view.d.ts.map +1 -0
  315. package/dist/$/components/ui/view.js +1 -0
  316. package/dist/$/components/ui/wheelpicker.d.ts +2 -0
  317. package/dist/$/components/ui/wheelpicker.d.ts.map +1 -0
  318. package/dist/$/components/ui/wheelpicker.js +1 -0
  319. package/dist/$/lib/hooks/useExtractTextClasses.d.ts +2 -0
  320. package/dist/$/lib/hooks/useExtractTextClasses.d.ts.map +1 -0
  321. package/dist/$/lib/hooks/useExtractTextClasses.js +62 -0
  322. package/dist/$/lib/utils/renderNode.d.ts +3 -0
  323. package/dist/$/lib/utils/renderNode.d.ts.map +1 -0
  324. package/dist/$/lib/utils/renderNode.js +22 -0
  325. package/dist/$/lib/utils.d.ts +5 -0
  326. package/dist/$/lib/utils.d.ts.map +1 -0
  327. package/dist/$/lib/utils.js +32 -0
  328. package/dist/index.d.ts +44 -0
  329. package/dist/index.d.ts.map +1 -0
  330. package/dist/index.js +43 -0
  331. package/package.json +69 -0
@@ -0,0 +1,80 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
+ import { cn } from "../../../$/lib/utils";
25
+ import { useControllableState } from "../primitives/calendar/use-controllable-state";
26
+ import { WheelPicker, } from "./wheelpicker";
27
+ import { FormField } from "./form-field";
28
+ import { Icon } from "./icon";
29
+ import { Text } from "./text";
30
+ import { Popover } from "./popover";
31
+ import { ChevronDown } from "lucide-react-native";
32
+ import * as React from "react";
33
+ import { Pressable, useWindowDimensions, View } from "react-native";
34
+ function Picker(_a) {
35
+ var _b;
36
+ var options = _a.options, value = _a.value, defaultValue = _a.defaultValue, onValueChange = _a.onValueChange, _c = _a.placeholder, placeholder = _c === void 0 ? "Select an option" : _c, formatOptionLabel = _a.formatOptionLabel, wheelPickerProps = _a.wheelPickerProps, popoverContentProps = _a.popoverContentProps, iconClassName = _a.iconClassName, onOpenChange = _a.onOpenChange, onFieldFocus = _a.onFieldFocus, onFieldBlur = _a.onFieldBlur, className = _a.className, fieldClassName = _a.fieldClassName, formFieldProps = __rest(_a, ["options", "value", "defaultValue", "onValueChange", "placeholder", "formatOptionLabel", "wheelPickerProps", "popoverContentProps", "iconClassName", "onOpenChange", "onFieldFocus", "onFieldBlur", "className", "fieldClassName"]);
37
+ var optionsMap = React.useMemo(function () { return new Map(options.map(function (option) { return [option.value, option]; })); }, [options]);
38
+ var emitValueChange = React.useCallback(function (next) {
39
+ var option = next !== undefined ? optionsMap.get(next) : undefined;
40
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(next, option);
41
+ }, [onValueChange, optionsMap]);
42
+ var _d = useControllableState({
43
+ value: value,
44
+ defaultValue: defaultValue,
45
+ onChange: emitValueChange,
46
+ }), selectedValue = _d[0], setSelectedValue = _d[1];
47
+ var popoverRef = React.useRef(null);
48
+ var dimensions = useWindowDimensions();
49
+ var isSmallerScreen = dimensions.width < 640;
50
+ var selectedOption = selectedValue !== undefined ? optionsMap.get(selectedValue) : undefined;
51
+ var displayLabel = selectedOption
52
+ ? (_b = formatOptionLabel === null || formatOptionLabel === void 0 ? void 0 : formatOptionLabel(selectedOption)) !== null && _b !== void 0 ? _b : selectedOption.label
53
+ : "";
54
+ var textToShow = displayLabel || placeholder;
55
+ return (_jsx(FormField, __assign({}, formFieldProps, { className: className, fieldClassName: cn("h-16", fieldClassName), value: displayLabel, placeholder: placeholder, onFocus: onFieldFocus, onBlur: onFieldBlur, children: function (_a) {
56
+ var _b, _c;
57
+ var inputProps = _a.inputProps, isFocused = _a.isFocused, hasError = _a.hasError, hasSuccess = _a.hasSuccess;
58
+ var handleOpenChange = function (nextOpen) {
59
+ if (formFieldProps.disabled)
60
+ return;
61
+ if (nextOpen) {
62
+ inputProps.onFocus();
63
+ }
64
+ else {
65
+ inputProps.onBlur();
66
+ }
67
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen);
68
+ };
69
+ var handleValueChange = function (next) {
70
+ setSelectedValue(next);
71
+ };
72
+ var resolvedPopoverContentClassName = cn("border-none bg-transparent p-0 shadow-none", popoverContentProps === null || popoverContentProps === void 0 ? void 0 : popoverContentProps.className);
73
+ var overlayBgClassName = (_b = wheelPickerProps === null || wheelPickerProps === void 0 ? void 0 : wheelPickerProps.overlayBgColorClassName) !== null && _b !== void 0 ? _b : "bg-card/70";
74
+ return (_jsxs(_Fragment, { children: [_jsx(Popover, { onOpenChange: handleOpenChange, content: _jsx(View, { className: "p-4 bg-card rounded-2xl border border-border", children: _jsx(WheelPicker, __assign({ items: options, value: selectedValue, onValueChange: handleValueChange }, wheelPickerProps, { overlayBgColorClassName: overlayBgClassName })) }), contentProps: __assign(__assign({}, popoverContentProps), { className: resolvedPopoverContentClassName, sideOffset: (_c = popoverContentProps === null || popoverContentProps === void 0 ? void 0 : popoverContentProps.sideOffset) !== null && _c !== void 0 ? _c : 8 }), triggerRef: popoverRef, type: isSmallerScreen ? "floating-sheet" : "popover" }), _jsxs(Pressable, { className: "flex-row items-center justify-between gap-2 py-1.5", disabled: formFieldProps.disabled, accessibilityState: {
75
+ disabled: formFieldProps.disabled,
76
+ }, onPress: function () { var _a; return (_a = popoverRef.current) === null || _a === void 0 ? void 0 : _a.open(); }, children: [_jsx(View, { className: "flex-1", children: _jsx(Text, { className: cn("text-base", displayLabel ? "text-foreground" : "text-muted-foreground"), numberOfLines: 1, ellipsizeMode: "tail", children: textToShow }) }), _jsx(Icon, { as: ChevronDown, className: cn("size-5 text-muted-foreground", isFocused && !hasError && !hasSuccess && "text-foreground", hasError && "text-destructive", hasSuccess && "text-primary", iconClassName) })] })] }));
77
+ } })));
78
+ }
79
+ Picker.displayName = "Picker";
80
+ export { Picker };
@@ -0,0 +1,34 @@
1
+ import * as React from "react";
2
+ import type { TriggerRef } from "@rn-primitives/popover";
3
+ import { type ActionSheetProps } from "react-native-actions-sheet";
4
+ import { View } from "react-native";
5
+ import { Popover as PopoverRoot, PopoverContent, PopoverTrigger } from "../primitives/popover";
6
+ type UIPopoverContentProps = Omit<React.ComponentPropsWithoutRef<typeof PopoverContent>, "children">;
7
+ type UIPopoverTriggerProps = React.ComponentPropsWithoutRef<typeof PopoverTrigger>;
8
+ type UIPopoverRootProps = React.ComponentPropsWithoutRef<typeof PopoverRoot>;
9
+ type FloatingSheetProps = ActionSheetProps & {
10
+ contentStyle?: React.ComponentProps<typeof View>["style"];
11
+ };
12
+ type FloatingSheetHandle = {
13
+ open: () => void;
14
+ close: () => void;
15
+ };
16
+ type UIPopoverProps = UIPopoverRootProps & {
17
+ /** Floating bottom sheet rendering via react-native-actions-sheet. */
18
+ type: "floating-sheet" | "popover";
19
+ content?: React.ReactNode;
20
+ sheetProps?: FloatingSheetProps;
21
+ contentProps?: UIPopoverContentProps;
22
+ triggerProps?: UIPopoverTriggerProps;
23
+ triggerRef?: React.Ref<TriggerRef>;
24
+ onOpenChange?: (open: boolean) => void;
25
+ } & {
26
+ children?: React.ReactNode;
27
+ };
28
+ declare const Popover: {
29
+ (props: React.PropsWithChildren<UIPopoverProps>): import("react/jsx-runtime").JSX.Element;
30
+ displayName: string;
31
+ };
32
+ export { Popover, PopoverContent, PopoverTrigger };
33
+ export type { FloatingSheetHandle };
34
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAoB,EAEnB,KAAK,gBAAgB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAQ,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EACN,OAAO,IAAI,WAAW,EACtB,cAAc,EACd,cAAc,EACd,MAAM,uBAAuB,CAAC;AAE/B,KAAK,qBAAqB,GAAG,IAAI,CAChC,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,EACrD,UAAU,CACV,CAAC;AAEF,KAAK,qBAAqB,GAAG,KAAK,CAAC,wBAAwB,CAC1D,OAAO,cAAc,CACrB,CAAC;AAEF,KAAK,kBAAkB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,WAAW,CAAC,CAAC;AAE7E,KAAK,kBAAkB,GAAG,gBAAgB,GAAG;IAC5C,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;CAC1D,CAAC;AAEF,KAAK,mBAAmB,GAAG;IAC1B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,KAAK,cAAc,GAAG,kBAAkB,GAAG;IAC1C,sEAAsE;IACtE,IAAI,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC;AA+DnC,QAAA,MAAM,OAAO;YAAW,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC;;CA+B9D,CAAC;AAIF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,63 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import * as React from "react";
25
+ import ActionSheet from "react-native-actions-sheet";
26
+ import { Popover as PopoverRoot, PopoverContent, PopoverTrigger, } from "../primitives/popover";
27
+ var FloatingSheet = function (_a) {
28
+ var content = _a.content, sheetProps = _a.sheetProps, children = _a.children, triggerProps = _a.triggerProps, triggerRef = _a.triggerRef;
29
+ var sheetRef = React.useRef(null);
30
+ React.useImperativeHandle(triggerRef, function () { return ({
31
+ open: function () { var _a; return (_a = sheetRef.current) === null || _a === void 0 ? void 0 : _a.show(); },
32
+ close: function () { var _a; return (_a = sheetRef.current) === null || _a === void 0 ? void 0 : _a.hide(); },
33
+ }); }, []);
34
+ var trigger = React.isValidElement(children)
35
+ ? (function () {
36
+ var child = children;
37
+ return React.cloneElement(child, {
38
+ onPress: function (event) {
39
+ var _a, _b, _c, _d;
40
+ (_b = (_a = child.props) === null || _a === void 0 ? void 0 : _a.onPress) === null || _b === void 0 ? void 0 : _b.call(_a, event);
41
+ (_c = triggerProps === null || triggerProps === void 0 ? void 0 : triggerProps.onPress) === null || _c === void 0 ? void 0 : _c.call(triggerProps, event);
42
+ (_d = sheetRef.current) === null || _d === void 0 ? void 0 : _d.show();
43
+ },
44
+ });
45
+ })()
46
+ : children;
47
+ return (_jsxs(_Fragment, { children: [trigger, _jsx(ActionSheet, __assign({ ref: sheetRef, gestureEnabled: false, indicatorStyle: { display: "none" }, containerStyle: {
48
+ paddingHorizontal: 12,
49
+ height: "40%",
50
+ backgroundColor: "transparent",
51
+ paddingBottom: 30,
52
+ bottom: 20,
53
+ } }, sheetProps, { children: content }))] }));
54
+ };
55
+ var Popover = function (props) {
56
+ if (props.type === "floating-sheet") {
57
+ return (_jsx(FloatingSheet, { content: props.content, sheetProps: props.sheetProps, triggerProps: props.triggerProps, triggerRef: props.triggerRef, children: props.children }));
58
+ }
59
+ var content = props.content, children = props.children, contentProps = props.contentProps, triggerProps = props.triggerProps, triggerRef = props.triggerRef, rootProps = __rest(props, ["content", "children", "contentProps", "triggerProps", "triggerRef"]);
60
+ return (_jsxs(PopoverRoot, __assign({}, rootProps, { children: [_jsx(PopoverTrigger, __assign({}, triggerProps, { ref: triggerRef, children: children })), _jsx(PopoverContent, __assign({}, contentProps, { children: content }))] })));
61
+ };
62
+ Popover.displayName = "Popover";
63
+ export { Popover, PopoverContent, PopoverTrigger };
@@ -0,0 +1,2 @@
1
+ export * from "../primitives/pressable";
2
+ //# sourceMappingURL=pressable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressable.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/pressable.tsx"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../primitives/pressable";
@@ -0,0 +1,2 @@
1
+ export * from "../primitives/progress";
2
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/progress.tsx"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../primitives/progress";
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { RadioGroup as PrimitiveRadioGroup, RadioGroupItem } from "../primitives/radio-group";
3
+ type RadioOption = {
4
+ value: string;
5
+ label: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ itemProps?: React.ComponentProps<typeof RadioGroupItem>;
8
+ };
9
+ type RadioGroupProps = React.ComponentProps<typeof PrimitiveRadioGroup> & {
10
+ options?: RadioOption[];
11
+ };
12
+ declare function RadioGroup({ options, children, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
13
+ export { RadioGroup, RadioGroupItem };
14
+ export * from "../primitives/radio-group";
15
+ //# sourceMappingURL=radio-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACN,UAAU,IAAI,mBAAmB,EACjC,cAAc,EACd,MAAM,2BAA2B,CAAC;AAGnC,KAAK,WAAW,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC;CACxD,CAAC;AAEF,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,GAAG;IACzE,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AASF,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAsBnE;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,41 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { View } from "react-native";
25
+ import { RadioGroup as PrimitiveRadioGroup, RadioGroupItem, } from "../primitives/radio-group";
26
+ import { Text } from "./text";
27
+ var renderText = function (content) {
28
+ if (typeof content === "string" || typeof content === "number") {
29
+ return _jsx(Text, { children: content });
30
+ }
31
+ return content;
32
+ };
33
+ function RadioGroup(_a) {
34
+ var options = _a.options, children = _a.children, props = __rest(_a, ["options", "children"]);
35
+ if (!options || options.length === 0) {
36
+ return _jsx(PrimitiveRadioGroup, __assign({}, props, { children: children }));
37
+ }
38
+ return (_jsx(PrimitiveRadioGroup, __assign({}, props, { children: options.map(function (option) { return (_jsxs(View, { className: "flex-row items-start gap-3", children: [_jsx(RadioGroupItem, __assign({ value: option.value }, option.itemProps)), _jsxs(View, { className: "flex-1 gap-1", children: [renderText(option.label), option.description ? (_jsx(Text, { className: "text-muted-foreground text-sm", children: option.description })) : null] })] }, option.value)); }) })));
39
+ }
40
+ export { RadioGroup, RadioGroupItem };
41
+ export * from "../primitives/radio-group";
@@ -0,0 +1,2 @@
1
+ export * from "../primitives/range-calendar";
2
+ //# sourceMappingURL=range-calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range-calendar.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/range-calendar.tsx"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../primitives/range-calendar";
@@ -0,0 +1,75 @@
1
+ import { NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, type Option as PrimitiveOption, type TriggerRef } from "../primitives/select";
2
+ import { type FormFieldProps } from "./form-field";
3
+ import * as SelectPrimitive from "@rn-primitives/select";
4
+ import * as React from "react";
5
+ import { View } from "react-native";
6
+ type SelectOption = {
7
+ label: string;
8
+ value: string;
9
+ disabled?: boolean;
10
+ renderOption?: (option: SelectOption, state: OptionRenderState) => React.ReactNode;
11
+ };
12
+ type OptionRenderState = {
13
+ isSelected: boolean;
14
+ isDisabled: boolean;
15
+ };
16
+ type SelectClassNames = {
17
+ trigger?: string;
18
+ value?: string;
19
+ content?: string;
20
+ optionList?: string;
21
+ optionItemContainer?: string;
22
+ optionItemLabel?: string;
23
+ optionItemActiveContainer?: string;
24
+ optionItemDisabledContainer?: string;
25
+ optionItemIndicator?: string;
26
+ };
27
+ type SelectProps = Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, "children" | "value" | "defaultValue" | "onValueChange"> & {
28
+ options: SelectOption[];
29
+ value?: string;
30
+ defaultValue?: string;
31
+ placeholder?: string;
32
+ renderOption?: (option: SelectOption, state: OptionRenderState) => React.ReactNode;
33
+ classNames?: SelectClassNames;
34
+ triggerProps?: React.ComponentPropsWithoutRef<typeof SelectTrigger>;
35
+ contentProps?: React.ComponentPropsWithoutRef<typeof SelectContent>;
36
+ valueProps?: Omit<React.ComponentPropsWithoutRef<typeof SelectValue>, "placeholder">;
37
+ scrollViewProps?: React.ComponentProps<typeof NativeSelectScrollView>;
38
+ onValueChange?: (value: string | undefined, option?: SelectOption) => void;
39
+ onOptionChange?: (option: PrimitiveOption) => void;
40
+ };
41
+ type SelectFieldProps = SelectProps & Omit<FormFieldProps, "children" | "value" | "defaultValue" | "onValueChange" | "onFocus" | "onBlur" | "placeholder"> & {
42
+ onFieldFocus?: FormFieldProps["onFocus"];
43
+ onFieldBlur?: FormFieldProps["onBlur"];
44
+ };
45
+ declare const SelectField: React.ForwardRefExoticComponent<Omit<Omit<import("react-native").ViewProps & {
46
+ asChild?: boolean;
47
+ } & {
48
+ value?: import("@rn-primitives/select").Option;
49
+ defaultValue?: import("@rn-primitives/select").Option;
50
+ onValueChange?: (option: import("@rn-primitives/select").Option) => void;
51
+ onOpenChange?: (open: boolean) => void;
52
+ disabled?: boolean;
53
+ dir?: "ltr" | "rtl";
54
+ name?: string;
55
+ required?: boolean;
56
+ } & React.RefAttributes<View>, "ref">, "children" | "value" | "defaultValue" | "onValueChange"> & {
57
+ options: SelectOption[];
58
+ value?: string;
59
+ defaultValue?: string;
60
+ placeholder?: string;
61
+ renderOption?: (option: SelectOption, state: OptionRenderState) => React.ReactNode;
62
+ classNames?: SelectClassNames;
63
+ triggerProps?: React.ComponentPropsWithoutRef<typeof SelectTrigger>;
64
+ contentProps?: React.ComponentPropsWithoutRef<typeof SelectContent>;
65
+ valueProps?: Omit<React.ComponentPropsWithoutRef<typeof SelectValue>, "placeholder">;
66
+ scrollViewProps?: React.ComponentProps<typeof NativeSelectScrollView>;
67
+ onValueChange?: (value: string | undefined, option?: SelectOption) => void;
68
+ onOptionChange?: (option: PrimitiveOption) => void;
69
+ } & Omit<FormFieldProps, "children" | "onBlur" | "onFocus" | "value" | "defaultValue" | "onValueChange" | "placeholder"> & {
70
+ onFieldFocus?: FormFieldProps["onFocus"];
71
+ onFieldBlur?: FormFieldProps["onBlur"];
72
+ } & React.RefAttributes<TriggerRef>>;
73
+ export type { OptionRenderState, SelectClassNames, SelectOption, SelectProps, SelectFieldProps, };
74
+ export { SelectField as Select, NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, };
75
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/select.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,105 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
+ import { Icon } from "../../../$/components/primitives/icon";
25
+ import { NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, } from "../primitives/select";
26
+ import { cn } from "../../../$/lib/utils";
27
+ import { FormField } from "./form-field";
28
+ import * as SelectPrimitive from "@rn-primitives/select";
29
+ import { Check } from "lucide-react-native";
30
+ import * as React from "react";
31
+ import { Platform, View } from "react-native";
32
+ var toPrimitiveOption = function (optionValue, optionsMap) {
33
+ if (!optionValue)
34
+ return undefined;
35
+ var match = optionsMap.get(optionValue);
36
+ if (match)
37
+ return { value: match.value, label: match.label };
38
+ return { value: optionValue, label: optionValue };
39
+ };
40
+ var OptionList = function (_a) {
41
+ var options = _a.options, renderOption = _a.renderOption, classNames = _a.classNames;
42
+ var value = SelectPrimitive.useRootContext().value;
43
+ var selectedValue = value === null || value === void 0 ? void 0 : value.value;
44
+ return (_jsx(_Fragment, { children: options.map(function (option) {
45
+ var _a, _b;
46
+ var isSelected = selectedValue === option.value;
47
+ var isDisabled = !!option.disabled;
48
+ var renderer = (_a = option.renderOption) !== null && _a !== void 0 ? _a : renderOption;
49
+ var content = (_b = renderer === null || renderer === void 0 ? void 0 : renderer(option, { isSelected: isSelected, isDisabled: isDisabled })) !== null && _b !== void 0 ? _b : (_jsx(SelectPrimitive.ItemText, { className: cn("text-foreground text-sm", classNames === null || classNames === void 0 ? void 0 : classNames.optionItemLabel) }));
50
+ return (_jsxs(SelectPrimitive.Item, { value: option.value, label: option.label, disabled: option.disabled, className: cn("group relative flex w-full flex-row items-center gap-2 rounded-sm py-2 pl-3 pr-8 sm:py-1.5", Platform.select({
51
+ web: cn("focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none", "[&_svg]:pointer-events-none"),
52
+ }), classNames === null || classNames === void 0 ? void 0 : classNames.optionItemContainer, isSelected && (classNames === null || classNames === void 0 ? void 0 : classNames.optionItemActiveContainer), isDisabled && (classNames === null || classNames === void 0 ? void 0 : classNames.optionItemDisabledContainer)), children: [_jsx(View, { className: cn("absolute right-2 flex size-3.5 items-center justify-center", classNames === null || classNames === void 0 ? void 0 : classNames.optionItemIndicator), children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Icon, { as: Check, className: "text-muted-foreground size-4 shrink-0" }) }) }), content] }, option.value));
53
+ }) }));
54
+ };
55
+ var Select = React.forwardRef(function (props, ref) {
56
+ var options = props.options, value = props.value, defaultValue = props.defaultValue, _a = props.placeholder, placeholder = _a === void 0 ? "Select an option" : _a, renderOption = props.renderOption, classNames = props.classNames, triggerProps = props.triggerProps, contentProps = props.contentProps, valueProps = props.valueProps, scrollViewProps = props.scrollViewProps, onValueChange = props.onValueChange, onOptionChange = props.onOptionChange, rootProps = __rest(props, ["options", "value", "defaultValue", "placeholder", "renderOption", "classNames", "triggerProps", "contentProps", "valueProps", "scrollViewProps", "onValueChange", "onOptionChange"]);
57
+ var optionsMap = React.useMemo(function () { return new Map(options.map(function (option) { return [option.value, option]; })); }, [options]);
58
+ var resolvedValue = React.useMemo(function () { return toPrimitiveOption(value, optionsMap); }, [value, optionsMap]);
59
+ var resolvedDefaultValue = React.useMemo(function () { return toPrimitiveOption(defaultValue, optionsMap); }, [defaultValue, optionsMap]);
60
+ var handleValueChange = React.useCallback(function (option) {
61
+ var _a, _b;
62
+ onOptionChange === null || onOptionChange === void 0 ? void 0 : onOptionChange(option);
63
+ var matchingOption = (option === null || option === void 0 ? void 0 : option.value)
64
+ ? (_a = optionsMap.get(option.value)) !== null && _a !== void 0 ? _a : (option
65
+ ? { label: (_b = option.label) !== null && _b !== void 0 ? _b : option.value, value: option.value }
66
+ : undefined)
67
+ : undefined;
68
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(option === null || option === void 0 ? void 0 : option.value, matchingOption);
69
+ }, [onOptionChange, onValueChange, optionsMap]);
70
+ return (_jsxs(SelectPrimitive.Root, __assign({ value: resolvedValue, defaultValue: resolvedDefaultValue, onValueChange: handleValueChange }, rootProps, { className: cn("w-full", rootProps.className), children: [_jsx(SelectTrigger, __assign({ ref: ref }, triggerProps, { className: cn("border-none bg-transparent text-foreground placeholder:text-muted-foreground w-full", triggerProps === null || triggerProps === void 0 ? void 0 : triggerProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.trigger), children: _jsx(SelectValue, __assign({ placeholder: placeholder }, valueProps, { className: cn("text-foreground placeholder:text-muted-foreground", valueProps === null || valueProps === void 0 ? void 0 : valueProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.value) })) })), _jsx(SelectContent, __assign({}, contentProps, { className: cn(contentProps === null || contentProps === void 0 ? void 0 : contentProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.content), children: _jsx(NativeSelectScrollView, __assign({}, scrollViewProps, { className: cn(scrollViewProps === null || scrollViewProps === void 0 ? void 0 : scrollViewProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.optionList), children: _jsx(OptionList, { options: options, renderOption: renderOption, classNames: classNames }) })) }))] })));
71
+ });
72
+ Select.displayName = "Select";
73
+ var SelectField = React.forwardRef(function (props, ref) {
74
+ var onFieldFocus = props.onFieldFocus, onFieldBlur = props.onFieldBlur, className = props.className, fieldClassName = props.fieldClassName, labelClassName = props.labelClassName, contentClassName = props.contentClassName, messageClassName = props.messageClassName, errorClassName = props.errorClassName, successClassName = props.successClassName, variant = props.variant, label = props.label, helperText = props.helperText, error = props.error, success = props.success, startContent = props.startContent, endContent = props.endContent, required = props.required, labelPlacement = props.labelPlacement, placeholder = props.placeholder, disabled = props.disabled, classNames = props.classNames, triggerProps = props.triggerProps, selectProps = __rest(props, ["onFieldFocus", "onFieldBlur", "className", "fieldClassName", "labelClassName", "contentClassName", "messageClassName", "errorClassName", "successClassName", "variant", "label", "helperText", "error", "success", "startContent", "endContent", "required", "labelPlacement", "placeholder", "disabled", "classNames", "triggerProps"]);
75
+ var resolvedPlaceholder = placeholder !== null && placeholder !== void 0 ? placeholder : "Select an option";
76
+ return (_jsx(FormField, { className: className, fieldClassName: cn("h-16", fieldClassName), labelClassName: labelClassName, contentClassName: contentClassName, messageClassName: messageClassName, errorClassName: errorClassName, successClassName: successClassName, variant: variant, label: label, required: required, labelPlacement: labelPlacement, placeholder: resolvedPlaceholder, helperText: helperText, error: error, success: success, startContent: startContent, endContent: endContent, value: selectProps.value, defaultValue: selectProps.defaultValue, onFocus: onFieldFocus, onBlur: onFieldBlur, disabled: disabled, children: function (_a) {
77
+ var _b;
78
+ var inputProps = _a.inputProps, isFocused = _a.isFocused, hasError = _a.hasError, hasSuccess = _a.hasSuccess, inputRef = _a.inputRef;
79
+ var statefulTriggerClassName = cn(classNames === null || classNames === void 0 ? void 0 : classNames.trigger, hasError && "border-destructive/70 ring-1 ring-destructive/20", hasSuccess &&
80
+ !hasError &&
81
+ "border-primary/70 ring-1 ring-primary/20", !hasError &&
82
+ !hasSuccess &&
83
+ isFocused &&
84
+ "border-primary/80 ring-1 ring-primary/10", disabled && "opacity-60");
85
+ var mergedTriggerProps = __assign(__assign({}, triggerProps), { "aria-invalid": hasError || undefined, disabled: (_b = triggerProps === null || triggerProps === void 0 ? void 0 : triggerProps.disabled) !== null && _b !== void 0 ? _b : disabled });
86
+ var handleValueChange = function (selectedValue, option) {
87
+ var _a;
88
+ inputProps.onChangeText(selectedValue !== null && selectedValue !== void 0 ? selectedValue : "");
89
+ (_a = selectProps.onValueChange) === null || _a === void 0 ? void 0 : _a.call(selectProps, selectedValue, option);
90
+ };
91
+ var handleOpenChange = function (nextOpen) {
92
+ var _a;
93
+ if (nextOpen) {
94
+ inputProps.onFocus();
95
+ }
96
+ else {
97
+ inputProps.onBlur();
98
+ }
99
+ (_a = selectProps.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(selectProps, nextOpen);
100
+ };
101
+ return (_jsx(Select, __assign({}, selectProps, { placeholder: resolvedPlaceholder, classNames: __assign(__assign({}, classNames), { trigger: statefulTriggerClassName }), triggerProps: mergedTriggerProps, onValueChange: handleValueChange, onOpenChange: handleOpenChange, ref: inputRef })));
102
+ } }));
103
+ });
104
+ SelectField.displayName = "SelectField";
105
+ export { SelectField as Select, NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, };
@@ -0,0 +1,2 @@
1
+ export * from "../primitives/separator";
2
+ //# sourceMappingURL=separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/separator.tsx"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../primitives/separator";
@@ -0,0 +1,2 @@
1
+ export * from "../primitives/skeleton";
2
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/skeleton.tsx"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../primitives/skeleton";
@@ -0,0 +1,2 @@
1
+ export * from "../primitives/switch";
2
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/switch.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../primitives/switch";
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { Tabs as PrimitiveTabs, TabsContent, TabsList, TabsTrigger } from "../primitives/tabs";
3
+ type TabItemData = {
4
+ value?: string;
5
+ label: React.ReactNode;
6
+ content: React.ReactNode;
7
+ listItemProps?: React.ComponentProps<typeof TabsTrigger>;
8
+ contentProps?: React.ComponentProps<typeof TabsContent>;
9
+ };
10
+ type TabsProps = React.ComponentProps<typeof PrimitiveTabs> & {
11
+ items?: TabItemData[];
12
+ listProps?: React.ComponentProps<typeof TabsList>;
13
+ };
14
+ declare function Tabs({ items, children, listProps, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
15
+ export { Tabs, TabsContent, TabsList, TabsTrigger };
16
+ export * from "../primitives/tabs";
17
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACN,IAAI,IAAI,aAAa,EACrB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,MAAM,oBAAoB,CAAC;AAG5B,KAAK,WAAW,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;IACzD,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;CACxD,CAAC;AAEF,KAAK,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,GAAG;IAC7D,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;CAClD,CAAC;AASF,iBAAS,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CA2BhE;AAED,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AACpD,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,48 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { Tabs as PrimitiveTabs, TabsContent, TabsList, TabsTrigger, } from "../primitives/tabs";
25
+ import { Text } from "./text";
26
+ var renderLabel = function (label) {
27
+ if (typeof label === "string" || typeof label === "number") {
28
+ return _jsx(Text, { children: label });
29
+ }
30
+ return label;
31
+ };
32
+ function Tabs(_a) {
33
+ var items = _a.items, children = _a.children, listProps = _a.listProps, props = __rest(_a, ["items", "children", "listProps"]);
34
+ if (!items || items.length === 0) {
35
+ return _jsx(PrimitiveTabs, __assign({}, props, { children: children }));
36
+ }
37
+ return (_jsxs(PrimitiveTabs, __assign({}, props, { children: [_jsx(TabsList, __assign({}, listProps, { children: items.map(function (item, index) {
38
+ var _a;
39
+ var value = (_a = item.value) !== null && _a !== void 0 ? _a : String(index);
40
+ return (_jsx(TabsTrigger, __assign({ value: value }, item.listItemProps, { children: renderLabel(item.label) }), value));
41
+ }) })), items.map(function (item, index) {
42
+ var _a;
43
+ var value = (_a = item.value) !== null && _a !== void 0 ? _a : String(index);
44
+ return (_jsx(TabsContent, __assign({ value: value }, item.contentProps, { children: item.content }), value));
45
+ })] })));
46
+ }
47
+ export { Tabs, TabsContent, TabsList, TabsTrigger };
48
+ export * from "../primitives/tabs";
@@ -0,0 +1,2 @@
1
+ export * from "../primitives/text";
2
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/text.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../primitives/text";