@contractspec/lib.ui-kit 1.57.0 → 1.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (480) hide show
  1. package/dist/browser/index.js +5 -0
  2. package/dist/browser/ui/accordion.js +160 -0
  3. package/dist/browser/ui/alert-dialog.js +205 -0
  4. package/dist/browser/ui/alert.js +85 -0
  5. package/dist/browser/ui/aspect-ratio.js +6 -0
  6. package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +527 -0
  7. package/dist/browser/ui/atoms/FilterSelect/index.js +527 -0
  8. package/dist/browser/ui/atoms/FilterSelect/types.js +0 -0
  9. package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +193 -0
  10. package/dist/browser/ui/atoms/LoadingSpinner/index.js +193 -0
  11. package/dist/browser/ui/atoms/Pagination/Pagination.js +442 -0
  12. package/dist/browser/ui/atoms/Pagination/index.js +442 -0
  13. package/dist/browser/ui/atoms/Pagination/types.js +0 -0
  14. package/dist/browser/ui/atoms/SearchInput/SearchInput.js +155 -0
  15. package/dist/browser/ui/atoms/SearchInput/index.js +155 -0
  16. package/dist/browser/ui/atoms/SearchInput/types.js +0 -0
  17. package/dist/browser/ui/avatar.js +37 -0
  18. package/dist/browser/ui/badge.js +28 -0
  19. package/dist/browser/ui/breadcrumb.js +102 -0
  20. package/dist/browser/ui/button.js +88 -0
  21. package/dist/browser/ui/card.js +90 -0
  22. package/dist/browser/ui/carousel.js +5 -0
  23. package/dist/browser/ui/checkbox.js +21 -0
  24. package/dist/browser/ui/collapsible.js +10 -0
  25. package/dist/browser/ui/command.js +5 -0
  26. package/dist/browser/ui/context-menu.js +214 -0
  27. package/dist/browser/ui/date-picker.js +85 -0
  28. package/dist/browser/ui/date-range-picker.js +348 -0
  29. package/dist/browser/ui/datetime-picker.js +439 -0
  30. package/dist/browser/ui/dialog.js +126 -0
  31. package/dist/browser/ui/dropdown-menu.js +218 -0
  32. package/dist/browser/ui/empty-state.js +411 -0
  33. package/dist/browser/ui/empty.js +71 -0
  34. package/dist/browser/ui/fab.js +141 -0
  35. package/dist/browser/ui/field.js +559 -0
  36. package/dist/browser/ui/form.js +150 -0
  37. package/dist/browser/ui/hover-card.js +57 -0
  38. package/dist/browser/ui/icons/Check.js +20 -0
  39. package/dist/browser/ui/icons/ChevronDown.js +20 -0
  40. package/dist/browser/ui/icons/ChevronRight.js +20 -0
  41. package/dist/browser/ui/icons/ChevronUp.js +20 -0
  42. package/dist/browser/ui/icons/CircleUser.js +20 -0
  43. package/dist/browser/ui/icons/Info.js +20 -0
  44. package/dist/browser/ui/icons/Key.js +20 -0
  45. package/dist/browser/ui/icons/MoonStar.js +20 -0
  46. package/dist/browser/ui/icons/Sun.js +20 -0
  47. package/dist/browser/ui/icons/X.js +20 -0
  48. package/dist/browser/ui/icons/iconWithClassName.js +16 -0
  49. package/dist/browser/ui/input.js +18 -0
  50. package/dist/browser/ui/label.js +32 -0
  51. package/dist/browser/ui/link.js +16 -0
  52. package/dist/browser/ui/loading-button.js +350 -0
  53. package/dist/browser/ui/loading-overlay.js +398 -0
  54. package/dist/browser/ui/loading-screen.js +537 -0
  55. package/dist/browser/ui/marketing/FeatureGrid.js +42 -0
  56. package/dist/browser/ui/marketing/Hero.js +146 -0
  57. package/dist/browser/ui/marketing/PricingTable.js +158 -0
  58. package/dist/browser/ui/marketing/index.js +247 -0
  59. package/dist/browser/ui/menubar.js +225 -0
  60. package/dist/browser/ui/molecules/Autocomplete/index.js +5 -0
  61. package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +784 -0
  62. package/dist/browser/ui/molecules/SearchAndFilter/index.js +784 -0
  63. package/dist/browser/ui/molecules/SearchAndFilter/types.js +0 -0
  64. package/dist/browser/ui/molecules/SkeletonList.js +46 -0
  65. package/dist/browser/ui/nativewind-env.d.js +0 -0
  66. package/dist/browser/ui/navigation-menu.js +147 -0
  67. package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +222 -0
  68. package/dist/browser/ui/organisms/ErrorBoundary/index.js +222 -0
  69. package/dist/browser/ui/organisms/ListPage/ListPage.js +1375 -0
  70. package/dist/browser/ui/organisms/ListPage/index.js +1375 -0
  71. package/dist/browser/ui/organisms/ListPage/types.js +0 -0
  72. package/dist/browser/ui/page-header.js +405 -0
  73. package/dist/browser/ui/password-strength.js +400 -0
  74. package/dist/browser/ui/popover.js +59 -0
  75. package/dist/browser/ui/progress.js +57 -0
  76. package/dist/browser/ui/radio-group.js +32 -0
  77. package/dist/browser/ui/select.js +172 -0
  78. package/dist/browser/ui/separator.js +20 -0
  79. package/dist/browser/ui/sheet.js +5 -0
  80. package/dist/browser/ui/sidebar.js +5 -0
  81. package/dist/browser/ui/skeleton.js +32 -0
  82. package/dist/browser/ui/stack.js +243 -0
  83. package/dist/browser/ui/stepper.js +274 -0
  84. package/dist/browser/ui/switch.js +84 -0
  85. package/dist/browser/ui/table.js +100 -0
  86. package/dist/browser/ui/tabs.js +30 -0
  87. package/dist/browser/ui/text.js +23 -0
  88. package/dist/browser/ui/textarea.js +18 -0
  89. package/dist/browser/ui/time-picker.js +83 -0
  90. package/dist/browser/ui/toggle-group.js +150 -0
  91. package/dist/browser/ui/toggle.js +90 -0
  92. package/dist/browser/ui/tooltip.js +57 -0
  93. package/dist/browser/ui/typography.js +124 -0
  94. package/dist/browser/ui/useColorScheme.js +15 -0
  95. package/dist/browser/ui/useListState.js +68 -0
  96. package/dist/browser/ui/usecases/UseCaseCard.js +359 -0
  97. package/dist/browser/ui/usecases/UserStoryCard.js +274 -0
  98. package/dist/browser/ui/usecases/index.js +394 -0
  99. package/dist/browser/ui/utils.js +9 -0
  100. package/dist/index.d.ts +1 -3
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +5 -5
  103. package/dist/ui/accordion.d.ts +15 -34
  104. package/dist/ui/accordion.d.ts.map +1 -1
  105. package/dist/ui/accordion.js +154 -86
  106. package/dist/ui/alert-dialog.d.ts +36 -67
  107. package/dist/ui/alert-dialog.d.ts.map +1 -1
  108. package/dist/ui/alert-dialog.js +192 -84
  109. package/dist/ui/alert.d.ts +15 -34
  110. package/dist/ui/alert.d.ts.map +1 -1
  111. package/dist/ui/alert.js +80 -44
  112. package/dist/ui/aspect-ratio.d.ts +4 -10
  113. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  114. package/dist/ui/aspect-ratio.js +6 -7
  115. package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +3 -7
  116. package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +1 -1
  117. package/dist/ui/atoms/FilterSelect/FilterSelect.js +526 -56
  118. package/dist/ui/atoms/FilterSelect/index.d.ts +3 -3
  119. package/dist/ui/atoms/FilterSelect/index.d.ts.map +1 -0
  120. package/dist/ui/atoms/FilterSelect/index.js +527 -2
  121. package/dist/ui/atoms/FilterSelect/types.d.ts +13 -16
  122. package/dist/ui/atoms/FilterSelect/types.d.ts.map +1 -1
  123. package/dist/ui/atoms/FilterSelect/types.js +1 -0
  124. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +14 -17
  125. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
  126. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +191 -45
  127. package/dist/ui/atoms/LoadingSpinner/index.d.ts +2 -2
  128. package/dist/ui/atoms/LoadingSpinner/index.d.ts.map +1 -0
  129. package/dist/ui/atoms/LoadingSpinner/index.js +193 -2
  130. package/dist/ui/atoms/Pagination/Pagination.d.ts +3 -7
  131. package/dist/ui/atoms/Pagination/Pagination.d.ts.map +1 -1
  132. package/dist/ui/atoms/Pagination/Pagination.js +441 -161
  133. package/dist/ui/atoms/Pagination/index.d.ts +3 -3
  134. package/dist/ui/atoms/Pagination/index.d.ts.map +1 -0
  135. package/dist/ui/atoms/Pagination/index.js +442 -2
  136. package/dist/ui/atoms/Pagination/types.d.ts +11 -14
  137. package/dist/ui/atoms/Pagination/types.d.ts.map +1 -1
  138. package/dist/ui/atoms/Pagination/types.js +1 -0
  139. package/dist/ui/atoms/SearchInput/SearchInput.d.ts +3 -7
  140. package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +1 -1
  141. package/dist/ui/atoms/SearchInput/SearchInput.js +154 -47
  142. package/dist/ui/atoms/SearchInput/index.d.ts +3 -3
  143. package/dist/ui/atoms/SearchInput/index.d.ts.map +1 -0
  144. package/dist/ui/atoms/SearchInput/index.js +156 -3
  145. package/dist/ui/atoms/SearchInput/types.d.ts +8 -11
  146. package/dist/ui/atoms/SearchInput/types.d.ts.map +1 -1
  147. package/dist/ui/atoms/SearchInput/types.js +1 -0
  148. package/dist/ui/avatar.d.ts +12 -26
  149. package/dist/ui/avatar.d.ts.map +1 -1
  150. package/dist/ui/avatar.js +34 -24
  151. package/dist/ui/badge.d.ts +8 -18
  152. package/dist/ui/badge.d.ts.map +1 -1
  153. package/dist/ui/badge.js +24 -21
  154. package/dist/ui/breadcrumb.d.ts +12 -38
  155. package/dist/ui/breadcrumb.d.ts.map +1 -1
  156. package/dist/ui/breadcrumb.js +93 -62
  157. package/dist/ui/button.d.ts +13 -23
  158. package/dist/ui/button.d.ts.map +1 -1
  159. package/dist/ui/button.js +83 -69
  160. package/dist/ui/card.d.ts +22 -43
  161. package/dist/ui/card.d.ts.map +1 -1
  162. package/dist/ui/card.js +84 -45
  163. package/dist/ui/carousel.d.ts +1 -4
  164. package/dist/ui/carousel.d.ts.map +1 -1
  165. package/dist/ui/carousel.js +6 -6
  166. package/dist/ui/checkbox.d.ts +9 -13
  167. package/dist/ui/checkbox.d.ts.map +1 -1
  168. package/dist/ui/checkbox.js +20 -19
  169. package/dist/ui/collapsible.d.ts +16 -22
  170. package/dist/ui/collapsible.d.ts.map +1 -1
  171. package/dist/ui/collapsible.js +10 -9
  172. package/dist/ui/command.d.ts +1 -4
  173. package/dist/ui/command.d.ts.map +1 -1
  174. package/dist/ui/command.js +6 -6
  175. package/dist/ui/context-menu.d.ts +64 -105
  176. package/dist/ui/context-menu.d.ts.map +1 -1
  177. package/dist/ui/context-menu.js +203 -96
  178. package/dist/ui/date-picker.d.ts +9 -22
  179. package/dist/ui/date-picker.d.ts.map +1 -1
  180. package/dist/ui/date-picker.js +81 -49
  181. package/dist/ui/date-range-picker.d.ts +15 -28
  182. package/dist/ui/date-range-picker.d.ts.map +1 -1
  183. package/dist/ui/date-range-picker.js +344 -81
  184. package/dist/ui/datetime-picker.d.ts +11 -26
  185. package/dist/ui/datetime-picker.d.ts.map +1 -1
  186. package/dist/ui/datetime-picker.js +437 -42
  187. package/dist/ui/dialog.d.ts +37 -63
  188. package/dist/ui/dialog.d.ts.map +1 -1
  189. package/dist/ui/dialog.js +114 -68
  190. package/dist/ui/dropdown-menu.d.ts +65 -107
  191. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  192. package/dist/ui/dropdown-menu.js +207 -98
  193. package/dist/ui/empty-state.d.ts +13 -26
  194. package/dist/ui/empty-state.d.ts.map +1 -1
  195. package/dist/ui/empty-state.js +409 -43
  196. package/dist/ui/empty.d.ts +11 -35
  197. package/dist/ui/empty.d.ts.map +1 -1
  198. package/dist/ui/empty.js +59 -50
  199. package/dist/ui/fab.d.ts +17 -31
  200. package/dist/ui/fab.d.ts.map +1 -1
  201. package/dist/ui/fab.js +138 -100
  202. package/dist/ui/field.d.ts +25 -65
  203. package/dist/ui/field.d.ts.map +1 -1
  204. package/dist/ui/field.js +548 -111
  205. package/dist/ui/form.d.ts +26 -47
  206. package/dist/ui/form.d.ts.map +1 -1
  207. package/dist/ui/form.js +139 -83
  208. package/dist/ui/hover-card.d.ts +16 -26
  209. package/dist/ui/hover-card.d.ts.map +1 -1
  210. package/dist/ui/hover-card.js +55 -30
  211. package/dist/ui/icons/Check.d.ts +3 -2
  212. package/dist/ui/icons/Check.d.ts.map +1 -0
  213. package/dist/ui/icons/Check.js +19 -7
  214. package/dist/ui/icons/ChevronDown.d.ts +3 -2
  215. package/dist/ui/icons/ChevronDown.d.ts.map +1 -0
  216. package/dist/ui/icons/ChevronDown.js +19 -7
  217. package/dist/ui/icons/ChevronRight.d.ts +3 -2
  218. package/dist/ui/icons/ChevronRight.d.ts.map +1 -0
  219. package/dist/ui/icons/ChevronRight.js +19 -7
  220. package/dist/ui/icons/ChevronUp.d.ts +3 -2
  221. package/dist/ui/icons/ChevronUp.d.ts.map +1 -0
  222. package/dist/ui/icons/ChevronUp.js +19 -7
  223. package/dist/ui/icons/CircleUser.d.ts +3 -2
  224. package/dist/ui/icons/CircleUser.d.ts.map +1 -0
  225. package/dist/ui/icons/CircleUser.js +19 -7
  226. package/dist/ui/icons/Info.d.ts +3 -2
  227. package/dist/ui/icons/Info.d.ts.map +1 -0
  228. package/dist/ui/icons/Info.js +19 -7
  229. package/dist/ui/icons/Key.d.ts +3 -2
  230. package/dist/ui/icons/Key.d.ts.map +1 -0
  231. package/dist/ui/icons/Key.js +19 -7
  232. package/dist/ui/icons/MoonStar.d.ts +3 -2
  233. package/dist/ui/icons/MoonStar.d.ts.map +1 -0
  234. package/dist/ui/icons/MoonStar.js +19 -7
  235. package/dist/ui/icons/Sun.d.ts +3 -2
  236. package/dist/ui/icons/Sun.d.ts.map +1 -0
  237. package/dist/ui/icons/Sun.js +19 -7
  238. package/dist/ui/icons/X.d.ts +3 -2
  239. package/dist/ui/icons/X.d.ts.map +1 -0
  240. package/dist/ui/icons/X.js +19 -7
  241. package/dist/ui/icons/iconWithClassName.d.ts +2 -6
  242. package/dist/ui/icons/iconWithClassName.d.ts.map +1 -1
  243. package/dist/ui/icons/iconWithClassName.js +14 -13
  244. package/dist/ui/input.d.ts +5 -13
  245. package/dist/ui/input.d.ts.map +1 -1
  246. package/dist/ui/input.js +16 -14
  247. package/dist/ui/label.d.ts +2 -14
  248. package/dist/ui/label.d.ts.map +1 -1
  249. package/dist/ui/label.js +30 -21
  250. package/dist/ui/link.d.ts +5 -12
  251. package/dist/ui/link.d.ts.map +1 -1
  252. package/dist/ui/link.js +15 -14
  253. package/dist/ui/loading-button.d.ts +7 -17
  254. package/dist/ui/loading-button.d.ts.map +1 -1
  255. package/dist/ui/loading-button.js +349 -20
  256. package/dist/ui/loading-overlay.d.ts +5 -13
  257. package/dist/ui/loading-overlay.d.ts.map +1 -1
  258. package/dist/ui/loading-overlay.js +399 -44
  259. package/dist/ui/loading-screen.d.ts +4 -11
  260. package/dist/ui/loading-screen.d.ts.map +1 -1
  261. package/dist/ui/loading-screen.js +536 -91
  262. package/dist/ui/marketing/FeatureGrid.d.ts +10 -19
  263. package/dist/ui/marketing/FeatureGrid.d.ts.map +1 -1
  264. package/dist/ui/marketing/FeatureGrid.js +41 -33
  265. package/dist/ui/marketing/Hero.d.ts +16 -27
  266. package/dist/ui/marketing/Hero.d.ts.map +1 -1
  267. package/dist/ui/marketing/Hero.js +145 -50
  268. package/dist/ui/marketing/PricingTable.d.ts +15 -23
  269. package/dist/ui/marketing/PricingTable.d.ts.map +1 -1
  270. package/dist/ui/marketing/PricingTable.js +157 -58
  271. package/dist/ui/marketing/index.d.ts +4 -4
  272. package/dist/ui/marketing/index.d.ts.map +1 -0
  273. package/dist/ui/marketing/index.js +247 -4
  274. package/dist/ui/menubar.d.ts +64 -110
  275. package/dist/ui/menubar.d.ts.map +1 -1
  276. package/dist/ui/menubar.js +212 -106
  277. package/dist/ui/molecules/Autocomplete/index.d.ts +1 -4
  278. package/dist/ui/molecules/Autocomplete/index.d.ts.map +1 -1
  279. package/dist/ui/molecules/Autocomplete/index.js +6 -6
  280. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +3 -7
  281. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +1 -1
  282. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +783 -104
  283. package/dist/ui/molecules/SearchAndFilter/index.d.ts +3 -3
  284. package/dist/ui/molecules/SearchAndFilter/index.d.ts.map +1 -0
  285. package/dist/ui/molecules/SearchAndFilter/index.js +784 -2
  286. package/dist/ui/molecules/SearchAndFilter/types.d.ts +18 -23
  287. package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -1
  288. package/dist/ui/molecules/SearchAndFilter/types.js +1 -0
  289. package/dist/ui/molecules/SkeletonList.d.ts +5 -13
  290. package/dist/ui/molecules/SkeletonList.d.ts.map +1 -1
  291. package/dist/ui/molecules/SkeletonList.js +46 -14
  292. package/dist/ui/nativewind-env.d.js +1 -0
  293. package/dist/ui/navigation-menu.d.ts +35 -64
  294. package/dist/ui/navigation-menu.d.ts.map +1 -1
  295. package/dist/ui/navigation-menu.js +140 -79
  296. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +18 -22
  297. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  298. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +220 -104
  299. package/dist/ui/organisms/ErrorBoundary/index.d.ts +3 -2
  300. package/dist/ui/organisms/ErrorBoundary/index.d.ts.map +1 -0
  301. package/dist/ui/organisms/ErrorBoundary/index.js +222 -2
  302. package/dist/ui/organisms/ListPage/ListPage.d.ts +2 -28
  303. package/dist/ui/organisms/ListPage/ListPage.d.ts.map +1 -1
  304. package/dist/ui/organisms/ListPage/ListPage.js +1374 -196
  305. package/dist/ui/organisms/ListPage/index.d.ts +3 -3
  306. package/dist/ui/organisms/ListPage/index.d.ts.map +1 -0
  307. package/dist/ui/organisms/ListPage/index.js +1375 -2
  308. package/dist/ui/organisms/ListPage/types.d.ts +34 -39
  309. package/dist/ui/organisms/ListPage/types.d.ts.map +1 -1
  310. package/dist/ui/organisms/ListPage/types.js +1 -0
  311. package/dist/ui/page-header.d.ts +12 -24
  312. package/dist/ui/page-header.d.ts.map +1 -1
  313. package/dist/ui/page-header.js +403 -38
  314. package/dist/ui/password-strength.d.ts +10 -17
  315. package/dist/ui/password-strength.d.ts.map +1 -1
  316. package/dist/ui/password-strength.js +396 -94
  317. package/dist/ui/popover.d.ts +14 -26
  318. package/dist/ui/popover.d.ts.map +1 -1
  319. package/dist/ui/popover.js +57 -32
  320. package/dist/ui/progress.d.ts +6 -15
  321. package/dist/ui/progress.d.ts.map +1 -1
  322. package/dist/ui/progress.js +54 -36
  323. package/dist/ui/radio-group.d.ts +3 -13
  324. package/dist/ui/radio-group.d.ts.map +1 -1
  325. package/dist/ui/radio-group.js +29 -19
  326. package/dist/ui/select.d.ts +43 -75
  327. package/dist/ui/select.d.ts.map +1 -1
  328. package/dist/ui/select.js +163 -101
  329. package/dist/ui/separator.d.ts +5 -14
  330. package/dist/ui/separator.d.ts.map +1 -1
  331. package/dist/ui/separator.js +19 -16
  332. package/dist/ui/sheet.d.ts +1 -4
  333. package/dist/ui/sheet.d.ts.map +1 -1
  334. package/dist/ui/sheet.js +6 -6
  335. package/dist/ui/sidebar.d.ts +1 -4
  336. package/dist/ui/sidebar.d.ts.map +1 -1
  337. package/dist/ui/sidebar.js +6 -6
  338. package/dist/ui/skeleton.d.ts +3 -10
  339. package/dist/ui/skeleton.d.ts.map +1 -1
  340. package/dist/ui/skeleton.js +31 -22
  341. package/dist/ui/stack.d.ts +34 -67
  342. package/dist/ui/stack.d.ts.map +1 -1
  343. package/dist/ui/stack.js +235 -229
  344. package/dist/ui/stepper.d.ts +10 -20
  345. package/dist/ui/stepper.d.ts.map +1 -1
  346. package/dist/ui/stepper.js +269 -32
  347. package/dist/ui/switch.d.ts +5 -12
  348. package/dist/ui/switch.d.ts.map +1 -1
  349. package/dist/ui/switch.js +79 -48
  350. package/dist/ui/table.d.ts +24 -50
  351. package/dist/ui/table.d.ts.map +1 -1
  352. package/dist/ui/table.js +99 -55
  353. package/dist/ui/tabs.d.ts +23 -28
  354. package/dist/ui/tabs.d.ts.map +1 -1
  355. package/dist/ui/tabs.js +27 -25
  356. package/dist/ui/text.d.ts +11 -19
  357. package/dist/ui/text.d.ts.map +1 -1
  358. package/dist/ui/text.js +21 -16
  359. package/dist/ui/textarea.d.ts +5 -8
  360. package/dist/ui/textarea.d.ts.map +1 -1
  361. package/dist/ui/textarea.js +15 -16
  362. package/dist/ui/time-picker.d.ts +8 -20
  363. package/dist/ui/time-picker.d.ts.map +1 -1
  364. package/dist/ui/time-picker.js +79 -48
  365. package/dist/ui/toggle-group.d.ts +14 -34
  366. package/dist/ui/toggle-group.d.ts.map +1 -1
  367. package/dist/ui/toggle-group.js +144 -48
  368. package/dist/ui/toggle.d.ts +16 -30
  369. package/dist/ui/toggle.d.ts.map +1 -1
  370. package/dist/ui/toggle.js +85 -61
  371. package/dist/ui/tooltip.d.ts +18 -28
  372. package/dist/ui/tooltip.d.ts.map +1 -1
  373. package/dist/ui/tooltip.js +55 -38
  374. package/dist/ui/typography.d.ts +15 -63
  375. package/dist/ui/typography.d.ts.map +1 -1
  376. package/dist/ui/typography.js +101 -64
  377. package/dist/ui/useColorScheme.d.ts +5 -10
  378. package/dist/ui/useColorScheme.d.ts.map +1 -1
  379. package/dist/ui/useColorScheme.js +14 -15
  380. package/dist/ui/useListState.d.ts +23 -31
  381. package/dist/ui/useListState.d.ts.map +1 -1
  382. package/dist/ui/useListState.js +67 -73
  383. package/dist/ui/usecases/UseCaseCard.d.ts +7 -18
  384. package/dist/ui/usecases/UseCaseCard.d.ts.map +1 -1
  385. package/dist/ui/usecases/UseCaseCard.js +359 -34
  386. package/dist/ui/usecases/UserStoryCard.d.ts +5 -14
  387. package/dist/ui/usecases/UserStoryCard.d.ts.map +1 -1
  388. package/dist/ui/usecases/UserStoryCard.js +274 -35
  389. package/dist/ui/usecases/index.d.ts +3 -3
  390. package/dist/ui/usecases/index.d.ts.map +1 -0
  391. package/dist/ui/usecases/index.js +394 -3
  392. package/dist/ui/utils.d.ts +2 -6
  393. package/dist/ui/utils.d.ts.map +1 -1
  394. package/dist/ui/utils.js +6 -7
  395. package/package.json +775 -209
  396. package/dist/index.js.map +0 -1
  397. package/dist/ui/accordion.js.map +0 -1
  398. package/dist/ui/alert-dialog.js.map +0 -1
  399. package/dist/ui/alert.js.map +0 -1
  400. package/dist/ui/aspect-ratio.js.map +0 -1
  401. package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +0 -1
  402. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +0 -1
  403. package/dist/ui/atoms/Pagination/Pagination.js.map +0 -1
  404. package/dist/ui/atoms/SearchInput/SearchInput.js.map +0 -1
  405. package/dist/ui/avatar.js.map +0 -1
  406. package/dist/ui/badge.js.map +0 -1
  407. package/dist/ui/breadcrumb.js.map +0 -1
  408. package/dist/ui/button.js.map +0 -1
  409. package/dist/ui/card.js.map +0 -1
  410. package/dist/ui/carousel.js.map +0 -1
  411. package/dist/ui/checkbox.js.map +0 -1
  412. package/dist/ui/collapsible.js.map +0 -1
  413. package/dist/ui/command.js.map +0 -1
  414. package/dist/ui/context-menu.js.map +0 -1
  415. package/dist/ui/date-picker.js.map +0 -1
  416. package/dist/ui/date-range-picker.js.map +0 -1
  417. package/dist/ui/datetime-picker.js.map +0 -1
  418. package/dist/ui/dialog.js.map +0 -1
  419. package/dist/ui/dropdown-menu.js.map +0 -1
  420. package/dist/ui/empty-state.js.map +0 -1
  421. package/dist/ui/empty.js.map +0 -1
  422. package/dist/ui/fab.js.map +0 -1
  423. package/dist/ui/field.js.map +0 -1
  424. package/dist/ui/form.js.map +0 -1
  425. package/dist/ui/hover-card.js.map +0 -1
  426. package/dist/ui/icons/Check.js.map +0 -1
  427. package/dist/ui/icons/ChevronDown.js.map +0 -1
  428. package/dist/ui/icons/ChevronRight.js.map +0 -1
  429. package/dist/ui/icons/ChevronUp.js.map +0 -1
  430. package/dist/ui/icons/CircleUser.js.map +0 -1
  431. package/dist/ui/icons/Info.js.map +0 -1
  432. package/dist/ui/icons/Key.js.map +0 -1
  433. package/dist/ui/icons/MoonStar.js.map +0 -1
  434. package/dist/ui/icons/Sun.js.map +0 -1
  435. package/dist/ui/icons/X.js.map +0 -1
  436. package/dist/ui/icons/iconWithClassName.js.map +0 -1
  437. package/dist/ui/input.js.map +0 -1
  438. package/dist/ui/label.js.map +0 -1
  439. package/dist/ui/link.js.map +0 -1
  440. package/dist/ui/loading-button.js.map +0 -1
  441. package/dist/ui/loading-overlay.js.map +0 -1
  442. package/dist/ui/loading-screen.js.map +0 -1
  443. package/dist/ui/marketing/FeatureGrid.js.map +0 -1
  444. package/dist/ui/marketing/Hero.js.map +0 -1
  445. package/dist/ui/marketing/PricingTable.js.map +0 -1
  446. package/dist/ui/menubar.js.map +0 -1
  447. package/dist/ui/molecules/Autocomplete/index.js.map +0 -1
  448. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +0 -1
  449. package/dist/ui/molecules/SkeletonList.js.map +0 -1
  450. package/dist/ui/nativewind-env.d.ts +0 -1
  451. package/dist/ui/navigation-menu.js.map +0 -1
  452. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +0 -1
  453. package/dist/ui/organisms/ListPage/ListPage.js.map +0 -1
  454. package/dist/ui/page-header.js.map +0 -1
  455. package/dist/ui/password-strength.js.map +0 -1
  456. package/dist/ui/popover.js.map +0 -1
  457. package/dist/ui/progress.js.map +0 -1
  458. package/dist/ui/radio-group.js.map +0 -1
  459. package/dist/ui/select.js.map +0 -1
  460. package/dist/ui/separator.js.map +0 -1
  461. package/dist/ui/sheet.js.map +0 -1
  462. package/dist/ui/sidebar.js.map +0 -1
  463. package/dist/ui/skeleton.js.map +0 -1
  464. package/dist/ui/stack.js.map +0 -1
  465. package/dist/ui/stepper.js.map +0 -1
  466. package/dist/ui/switch.js.map +0 -1
  467. package/dist/ui/table.js.map +0 -1
  468. package/dist/ui/tabs.js.map +0 -1
  469. package/dist/ui/text.js.map +0 -1
  470. package/dist/ui/textarea.js.map +0 -1
  471. package/dist/ui/time-picker.js.map +0 -1
  472. package/dist/ui/toggle-group.js.map +0 -1
  473. package/dist/ui/toggle.js.map +0 -1
  474. package/dist/ui/tooltip.js.map +0 -1
  475. package/dist/ui/typography.js.map +0 -1
  476. package/dist/ui/useColorScheme.js.map +0 -1
  477. package/dist/ui/useListState.js.map +0 -1
  478. package/dist/ui/usecases/UseCaseCard.js.map +0 -1
  479. package/dist/ui/usecases/UserStoryCard.js.map +0 -1
  480. package/dist/ui/utils.js.map +0 -1
@@ -0,0 +1,214 @@
1
+ // ui/icons/iconWithClassName.ts
2
+ import { styled } from "nativewind";
3
+ function iconWithClassName(icon) {
4
+ styled(icon, {
5
+ className: {
6
+ target: "style",
7
+ nativeStyleMapping: {
8
+ color: true,
9
+ opacity: true
10
+ }
11
+ }
12
+ });
13
+ }
14
+
15
+ // ui/icons/ChevronDown.tsx
16
+ import { ChevronDown } from "lucide-react-native";
17
+ iconWithClassName(ChevronDown);
18
+ // ui/text.tsx
19
+ import * as Slot from "@rn-primitives/slot";
20
+ import * as React from "react";
21
+ import { Text as RNText } from "react-native";
22
+ import { cn } from "@contractspec/lib.ui-kit-core/utils";
23
+ import { jsxDEV } from "react/jsx-dev-runtime";
24
+ var TextClassContext = React.createContext(undefined);
25
+ function Text2({
26
+ className,
27
+ asChild = false,
28
+ ...props
29
+ }) {
30
+ const textClass = React.useContext(TextClassContext);
31
+ const Component = asChild ? Slot.Text : RNText;
32
+ return /* @__PURE__ */ jsxDEV(Component, {
33
+ className: cn("text-foreground web:select-text text-base", textClass, className),
34
+ ...props
35
+ }, undefined, false, undefined, this);
36
+ }
37
+ // ui/icons/Check.tsx
38
+ import { Check } from "lucide-react-native";
39
+ iconWithClassName(Check);
40
+ // ui/icons/ChevronUp.tsx
41
+ import { ChevronUp } from "lucide-react-native";
42
+ iconWithClassName(ChevronUp);
43
+ // ui/icons/ChevronRight.tsx
44
+ import { ChevronRight } from "lucide-react-native";
45
+ iconWithClassName(ChevronRight);
46
+ // ui/context-menu.tsx
47
+ import * as ContextMenuPrimitive from "@rn-primitives/context-menu";
48
+ import {
49
+ Platform,
50
+ StyleSheet,
51
+ Text as Text3,
52
+ View
53
+ } from "react-native";
54
+ import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
55
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
56
+ var ContextMenu = ContextMenuPrimitive.Root;
57
+ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
58
+ var ContextMenuGroup = ContextMenuPrimitive.Group;
59
+ var ContextMenuSub = ContextMenuPrimitive.Sub;
60
+ var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
61
+ function ContextMenuSubTrigger({
62
+ className,
63
+ inset,
64
+ children,
65
+ ...props
66
+ }) {
67
+ const { open } = ContextMenuPrimitive.useSubContext();
68
+ const Icon = Platform.OS === "web" ? ChevronRight : open ? ChevronUp : ChevronDown;
69
+ return /* @__PURE__ */ jsxDEV2(TextClassContext.Provider, {
70
+ value: cn2("native:text-lg text-primary text-sm select-none", open && "native:text-accent-foreground"),
71
+ children: /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.SubTrigger, {
72
+ className: cn2("native:py-2 active:bg-accent web:cursor-default web:select-none web:outline-hidden web:hover:bg-accent web:focus:bg-accent flex flex-row items-center gap-2 rounded-xs px-2 py-1.5", open && "bg-accent", inset && "pl-8", className),
73
+ ...props,
74
+ children: [
75
+ children,
76
+ /* @__PURE__ */ jsxDEV2(Icon, {
77
+ size: 18,
78
+ className: "text-foreground ml-auto"
79
+ }, undefined, false, undefined, this)
80
+ ]
81
+ }, undefined, true, undefined, this)
82
+ }, undefined, false, undefined, this);
83
+ }
84
+ function ContextMenuSubContent({
85
+ className,
86
+ ...props
87
+ }) {
88
+ const { open } = ContextMenuPrimitive.useSubContext();
89
+ return /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.SubContent, {
90
+ className: cn2("border-border bg-popover shadow-foreground/5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 mt-1 min-w-32 overflow-hidden rounded-md border p-1 shadow-md", open ? "web:animate-in web:fade-in-0 web:zoom-in-95" : "web:animate-out web:fade-out-0 web:zoom-out", className),
91
+ ...props
92
+ }, undefined, false, undefined, this);
93
+ }
94
+ function ContextMenuContent({
95
+ className,
96
+ overlayClassName,
97
+ overlayStyle,
98
+ portalHost,
99
+ ...props
100
+ }) {
101
+ const { open } = ContextMenuPrimitive.useRootContext();
102
+ return /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.Portal, {
103
+ hostName: portalHost,
104
+ children: /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.Overlay, {
105
+ style: overlayStyle ? StyleSheet.flatten([
106
+ Platform.OS !== "web" ? StyleSheet.absoluteFill : undefined,
107
+ overlayStyle
108
+ ]) : Platform.OS !== "web" ? StyleSheet.absoluteFill : undefined,
109
+ className: overlayClassName,
110
+ children: /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.Content, {
111
+ className: cn2("border-border bg-popover shadow-foreground/5 web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-md", open ? "web:animate-in web:fade-in-0 web:zoom-in-95" : "web:animate-out web:fade-out-0 web:zoom-out-95", className),
112
+ ...props
113
+ }, undefined, false, undefined, this)
114
+ }, undefined, false, undefined, this)
115
+ }, undefined, false, undefined, this);
116
+ }
117
+ function ContextMenuItem({
118
+ className,
119
+ inset,
120
+ ...props
121
+ }) {
122
+ return /* @__PURE__ */ jsxDEV2(TextClassContext.Provider, {
123
+ value: "select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground",
124
+ children: /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.Item, {
125
+ className: cn2("native:py-2 group active:bg-accent web:cursor-default web:outline-hidden web:hover:bg-accent web:focus:bg-accent relative flex flex-row items-center gap-2 rounded-xs px-2 py-1.5", inset && "pl-8", props.disabled && "web:pointer-events-none opacity-50", className),
126
+ ...props
127
+ }, undefined, false, undefined, this)
128
+ }, undefined, false, undefined, this);
129
+ }
130
+ function ContextMenuCheckboxItem({
131
+ className,
132
+ children,
133
+ ...props
134
+ }) {
135
+ return /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.CheckboxItem, {
136
+ className: cn2("web:group native:py-2 active:bg-accent web:cursor-default web:outline-hidden web:focus:bg-accent relative flex flex-row items-center rounded-xs py-1.5 pr-2 pl-8", props.disabled && "web:pointer-events-none opacity-50", className),
137
+ ...props,
138
+ children: [
139
+ /* @__PURE__ */ jsxDEV2(View, {
140
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
141
+ children: /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.ItemIndicator, {
142
+ children: /* @__PURE__ */ jsxDEV2(Check, {
143
+ size: 14,
144
+ strokeWidth: 3,
145
+ className: "text-foreground"
146
+ }, undefined, false, undefined, this)
147
+ }, undefined, false, undefined, this)
148
+ }, undefined, false, undefined, this),
149
+ children
150
+ ]
151
+ }, undefined, true, undefined, this);
152
+ }
153
+ function ContextMenuRadioItem({
154
+ className,
155
+ children,
156
+ ...props
157
+ }) {
158
+ return /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.RadioItem, {
159
+ className: cn2("web:group native:py-2 active:bg-accent web:cursor-default web:outline-hidden web:focus:bg-accent relative flex flex-row items-center rounded-xs py-1.5 pr-2 pl-8", props.disabled && "web:pointer-events-none opacity-50", className),
160
+ ...props,
161
+ children: [
162
+ /* @__PURE__ */ jsxDEV2(View, {
163
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
164
+ children: /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.ItemIndicator, {
165
+ children: /* @__PURE__ */ jsxDEV2(View, {
166
+ className: "bg-foreground h-2 w-2 rounded-full"
167
+ }, undefined, false, undefined, this)
168
+ }, undefined, false, undefined, this)
169
+ }, undefined, false, undefined, this),
170
+ children
171
+ ]
172
+ }, undefined, true, undefined, this);
173
+ }
174
+ function ContextMenuLabel({
175
+ className,
176
+ inset,
177
+ ...props
178
+ }) {
179
+ return /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.Label, {
180
+ className: cn2("native:text-base text-foreground web:cursor-default px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
181
+ ...props
182
+ }, undefined, false, undefined, this);
183
+ }
184
+ function ContextMenuSeparator({
185
+ className,
186
+ ...props
187
+ }) {
188
+ return /* @__PURE__ */ jsxDEV2(ContextMenuPrimitive.Separator, {
189
+ className: cn2("bg-border -mx-1 my-1 h-px", className),
190
+ ...props
191
+ }, undefined, false, undefined, this);
192
+ }
193
+ function ContextMenuShortcut({ className, ...props }) {
194
+ return /* @__PURE__ */ jsxDEV2(Text3, {
195
+ className: cn2("native:text-sm text-muted-foreground ml-auto text-xs tracking-widest", className),
196
+ ...props
197
+ }, undefined, false, undefined, this);
198
+ }
199
+ export {
200
+ ContextMenuTrigger,
201
+ ContextMenuSubTrigger,
202
+ ContextMenuSubContent,
203
+ ContextMenuSub,
204
+ ContextMenuShortcut,
205
+ ContextMenuSeparator,
206
+ ContextMenuRadioItem,
207
+ ContextMenuRadioGroup,
208
+ ContextMenuLabel,
209
+ ContextMenuItem,
210
+ ContextMenuGroup,
211
+ ContextMenuContent,
212
+ ContextMenuCheckboxItem,
213
+ ContextMenu
214
+ };
@@ -0,0 +1,85 @@
1
+ // ui/text.tsx
2
+ import * as Slot from "@rn-primitives/slot";
3
+ import * as React from "react";
4
+ import { Text as RNText } from "react-native";
5
+ import { cn } from "@contractspec/lib.ui-kit-core/utils";
6
+ import { jsxDEV } from "react/jsx-dev-runtime";
7
+ var TextClassContext = React.createContext(undefined);
8
+ function Text2({
9
+ className,
10
+ asChild = false,
11
+ ...props
12
+ }) {
13
+ const textClass = React.useContext(TextClassContext);
14
+ const Component = asChild ? Slot.Text : RNText;
15
+ return /* @__PURE__ */ jsxDEV(Component, {
16
+ className: cn("text-foreground web:select-text text-base", textClass, className),
17
+ ...props
18
+ }, undefined, false, undefined, this);
19
+ }
20
+ // ui/date-picker.tsx
21
+ import { useMemo, useState } from "react";
22
+ import { Platform, Pressable, View } from "react-native";
23
+ import DateTimePicker from "@react-native-community/datetimepicker";
24
+ import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
25
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
26
+ function formatDateDisplay(date) {
27
+ if (!date)
28
+ return "";
29
+ try {
30
+ return date.toLocaleDateString(undefined, {
31
+ day: "2-digit",
32
+ month: "long",
33
+ year: "numeric"
34
+ });
35
+ } catch {
36
+ return "";
37
+ }
38
+ }
39
+ function DatePicker({
40
+ value,
41
+ onChange,
42
+ disabled,
43
+ minDate,
44
+ maxDate,
45
+ placeholder = "Select date",
46
+ className
47
+ }) {
48
+ const [show, setShow] = useState(false);
49
+ const pickerProps = useMemo(() => ({
50
+ minimumDate: minDate,
51
+ maximumDate: maxDate,
52
+ timeZoneName: undefined
53
+ }), [minDate, maxDate]);
54
+ const handleChange = (_event, selectedDate) => {
55
+ if (Platform.OS !== "ios")
56
+ setShow(false);
57
+ if (selectedDate) {
58
+ onChange(selectedDate);
59
+ }
60
+ };
61
+ return /* @__PURE__ */ jsxDEV2(View, {
62
+ className: cn2("w-full", className),
63
+ children: [
64
+ /* @__PURE__ */ jsxDEV2(Pressable, {
65
+ disabled,
66
+ onPress: () => setShow(true),
67
+ className: cn2("border-input bg-background h-12 flex-row items-center rounded-md border px-3", disabled && "opacity-50"),
68
+ children: /* @__PURE__ */ jsxDEV2(Text2, {
69
+ className: cn2("text-foreground text-base", !value && "opacity-50"),
70
+ children: value ? formatDateDisplay(value) : placeholder
71
+ }, undefined, false, undefined, this)
72
+ }, undefined, false, undefined, this),
73
+ show && /* @__PURE__ */ jsxDEV2(DateTimePicker, {
74
+ value: value ?? new Date,
75
+ mode: "date",
76
+ display: Platform.OS === "ios" ? "inline" : "default",
77
+ onChange: handleChange,
78
+ ...pickerProps
79
+ }, undefined, false, undefined, this)
80
+ ]
81
+ }, undefined, true, undefined, this);
82
+ }
83
+ export {
84
+ DatePicker
85
+ };
@@ -0,0 +1,348 @@
1
+ // ui/text.tsx
2
+ import * as Slot from "@rn-primitives/slot";
3
+ import * as React from "react";
4
+ import { Text as RNText } from "react-native";
5
+ import { cn } from "@contractspec/lib.ui-kit-core/utils";
6
+ import { jsxDEV } from "react/jsx-dev-runtime";
7
+ var TextClassContext = React.createContext(undefined);
8
+ function Text2({
9
+ className,
10
+ asChild = false,
11
+ ...props
12
+ }) {
13
+ const textClass = React.useContext(TextClassContext);
14
+ const Component = asChild ? Slot.Text : RNText;
15
+ return /* @__PURE__ */ jsxDEV(Component, {
16
+ className: cn("text-foreground web:select-text text-base", textClass, className),
17
+ ...props
18
+ }, undefined, false, undefined, this);
19
+ }
20
+ // ui/stack.tsx
21
+ import { View } from "react-native";
22
+ import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
23
+ import { cva } from "class-variance-authority";
24
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
25
+ var baseStyle = "flex";
26
+ var vStackVariants = cva([baseStyle, "flex-col"], {
27
+ variants: {
28
+ spacing: {
29
+ none: "",
30
+ xs: "gap-y-1",
31
+ sm: "gap-y-2",
32
+ md: "gap-y-4",
33
+ lg: "gap-y-6",
34
+ xl: "gap-y-8",
35
+ "2xl": "gap-y-12"
36
+ },
37
+ align: {
38
+ stretch: "items-stretch",
39
+ start: "items-start",
40
+ center: "items-center",
41
+ end: "items-end"
42
+ },
43
+ justify: {
44
+ start: "justify-start",
45
+ center: "justify-center",
46
+ end: "justify-end",
47
+ between: "justify-between",
48
+ around: "justify-around",
49
+ evenly: "justify-evenly"
50
+ },
51
+ width: {
52
+ auto: "w-auto",
53
+ full: "w-full",
54
+ screen: "w-screen",
55
+ fit: "w-fit"
56
+ },
57
+ padding: {
58
+ none: "",
59
+ xs: "p-1",
60
+ sm: "p-2",
61
+ md: "p-4",
62
+ lg: "p-6",
63
+ xl: "p-8"
64
+ },
65
+ gap: {
66
+ none: "",
67
+ xs: "gap-1",
68
+ sm: "gap-2",
69
+ md: "gap-4",
70
+ lg: "gap-6",
71
+ xl: "gap-8"
72
+ }
73
+ },
74
+ defaultVariants: {
75
+ spacing: "md",
76
+ align: "stretch",
77
+ justify: "start",
78
+ width: "auto",
79
+ padding: "none",
80
+ gap: "none"
81
+ }
82
+ });
83
+ var hStackVariants = cva([baseStyle, "flex-row"], {
84
+ variants: {
85
+ spacing: {
86
+ none: "",
87
+ xs: "gap-x-1",
88
+ sm: "gap-x-2",
89
+ md: "gap-x-4",
90
+ lg: "gap-x-6",
91
+ xl: "gap-x-8",
92
+ "2xl": "gap-x-12"
93
+ },
94
+ align: {
95
+ stretch: "items-stretch",
96
+ start: "items-start",
97
+ center: "items-center",
98
+ end: "items-end",
99
+ baseline: "items-baseline"
100
+ },
101
+ justify: {
102
+ start: "justify-start",
103
+ center: "justify-center",
104
+ end: "justify-end",
105
+ between: "justify-between",
106
+ around: "justify-around",
107
+ evenly: "justify-evenly"
108
+ },
109
+ width: {
110
+ auto: "w-auto",
111
+ full: "w-full",
112
+ screen: "w-screen",
113
+ fit: "w-fit"
114
+ },
115
+ padding: {
116
+ none: "",
117
+ xs: "p-1",
118
+ sm: "p-2",
119
+ md: "p-4",
120
+ lg: "p-6",
121
+ xl: "p-8"
122
+ },
123
+ gap: {
124
+ none: "",
125
+ xs: "gap-1",
126
+ sm: "gap-2",
127
+ md: "gap-4",
128
+ lg: "gap-6",
129
+ xl: "gap-8"
130
+ },
131
+ wrap: {
132
+ nowrap: "flex-nowrap",
133
+ wrap: "flex-wrap",
134
+ reverse: "flex-wrap-reverse"
135
+ }
136
+ },
137
+ defaultVariants: {
138
+ spacing: "md",
139
+ align: "center",
140
+ justify: "start",
141
+ width: "auto",
142
+ padding: "none",
143
+ gap: "none",
144
+ wrap: "wrap"
145
+ }
146
+ });
147
+ var boxVariants = cva([baseStyle, "flex-row"], {
148
+ variants: {
149
+ spacing: {
150
+ none: "",
151
+ xs: "gap-x-1",
152
+ sm: "gap-x-2",
153
+ md: "gap-x-4",
154
+ lg: "gap-x-6",
155
+ xl: "gap-x-8",
156
+ "2xl": "gap-x-12"
157
+ },
158
+ align: {
159
+ stretch: "items-stretch",
160
+ start: "items-start",
161
+ center: "items-center",
162
+ end: "items-end",
163
+ baseline: "items-baseline"
164
+ },
165
+ justify: {
166
+ start: "justify-start",
167
+ center: "justify-center",
168
+ end: "justify-end",
169
+ between: "justify-between",
170
+ around: "justify-around",
171
+ evenly: "justify-evenly"
172
+ },
173
+ width: {
174
+ auto: "w-auto",
175
+ full: "w-full",
176
+ screen: "w-screen",
177
+ fit: "w-fit"
178
+ },
179
+ padding: {
180
+ none: "",
181
+ xs: "p-1",
182
+ sm: "p-2",
183
+ md: "p-4",
184
+ lg: "p-6",
185
+ xl: "p-8"
186
+ },
187
+ gap: {
188
+ none: "",
189
+ xs: "gap-1",
190
+ sm: "gap-2",
191
+ md: "gap-4",
192
+ lg: "gap-6",
193
+ xl: "gap-8"
194
+ },
195
+ wrap: {
196
+ nowrap: "flex-nowrap",
197
+ wrap: "flex-wrap",
198
+ reverse: "flex-wrap-reverse"
199
+ }
200
+ },
201
+ defaultVariants: {
202
+ spacing: "md",
203
+ align: "center",
204
+ justify: "center",
205
+ width: "auto",
206
+ padding: "none",
207
+ gap: "none",
208
+ wrap: "wrap"
209
+ }
210
+ });
211
+ function Box({
212
+ className,
213
+ spacing,
214
+ align,
215
+ justify,
216
+ width,
217
+ padding,
218
+ gap,
219
+ wrap,
220
+ ...props
221
+ }) {
222
+ return /* @__PURE__ */ jsxDEV2(View, {
223
+ className: cn2(boxVariants({ spacing, align, justify, width, padding, gap, wrap }), className),
224
+ ...props
225
+ }, undefined, false, undefined, this);
226
+ }
227
+ function HStack({
228
+ className,
229
+ spacing,
230
+ align,
231
+ justify,
232
+ width,
233
+ padding,
234
+ gap,
235
+ wrap,
236
+ ...props
237
+ }) {
238
+ return /* @__PURE__ */ jsxDEV2(View, {
239
+ className: cn2(hStackVariants({ spacing, align, justify, width, padding, gap, wrap }), className),
240
+ ...props
241
+ }, undefined, false, undefined, this);
242
+ }
243
+ function VStack({
244
+ className,
245
+ spacing,
246
+ align,
247
+ justify,
248
+ width,
249
+ padding,
250
+ gap,
251
+ ...props
252
+ }) {
253
+ return /* @__PURE__ */ jsxDEV2(View, {
254
+ className: cn2(vStackVariants({ spacing, align, justify, width, padding, gap }), className),
255
+ ...props
256
+ }, undefined, false, undefined, this);
257
+ }
258
+ // ui/date-range-picker.tsx
259
+ import { useMemo, useState } from "react";
260
+ import { Platform, Pressable } from "react-native";
261
+ import DateTimePicker from "@react-native-community/datetimepicker";
262
+ import { cn as cn3 } from "@contractspec/lib.ui-kit-core/utils";
263
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
264
+ function fmt(d) {
265
+ if (!d)
266
+ return "";
267
+ try {
268
+ return d.toLocaleDateString();
269
+ } catch {
270
+ return "";
271
+ }
272
+ }
273
+ function DateRangePicker({
274
+ value,
275
+ onChange,
276
+ disabled,
277
+ minDate,
278
+ maxDate,
279
+ placeholders,
280
+ className
281
+ }) {
282
+ const [showStart, setShowStart] = useState(false);
283
+ const [showEnd, setShowEnd] = useState(false);
284
+ const pickerCommon = useMemo(() => ({ minimumDate: minDate, maximumDate: maxDate }), [minDate, maxDate]);
285
+ const handleStart = (_, d) => {
286
+ if (Platform.OS !== "ios")
287
+ setShowStart(false);
288
+ if (!d)
289
+ return;
290
+ const end = value.end && d > value.end ? d : value.end;
291
+ onChange({ start: d, end });
292
+ };
293
+ const handleEnd = (_, d) => {
294
+ if (Platform.OS !== "ios")
295
+ setShowEnd(false);
296
+ if (!d)
297
+ return;
298
+ const start = value.start && d < value.start ? d : value.start;
299
+ onChange({ start, end: d });
300
+ };
301
+ return /* @__PURE__ */ jsxDEV3(VStack, {
302
+ className: cn3("w-full", className),
303
+ spacing: "sm",
304
+ children: [
305
+ /* @__PURE__ */ jsxDEV3(HStack, {
306
+ gap: "sm",
307
+ children: [
308
+ /* @__PURE__ */ jsxDEV3(Pressable, {
309
+ disabled,
310
+ onPress: () => setShowStart(true),
311
+ className: cn3("border-input bg-background h-12 flex-1 flex-row items-center rounded-md border px-3", disabled && "opacity-50"),
312
+ children: /* @__PURE__ */ jsxDEV3(Text2, {
313
+ className: cn3("text-foreground text-base", !value.start && "opacity-50"),
314
+ children: value.start ? fmt(value.start) : placeholders?.start || "Start date"
315
+ }, undefined, false, undefined, this)
316
+ }, undefined, false, undefined, this),
317
+ /* @__PURE__ */ jsxDEV3(Pressable, {
318
+ disabled,
319
+ onPress: () => setShowEnd(true),
320
+ className: cn3("border-input bg-background h-12 flex-1 flex-row items-center rounded-md border px-3", disabled && "opacity-50"),
321
+ children: /* @__PURE__ */ jsxDEV3(Text2, {
322
+ className: cn3("text-foreground text-base", !value.end && "opacity-50"),
323
+ children: value.end ? fmt(value.end) : placeholders?.end || "End date"
324
+ }, undefined, false, undefined, this)
325
+ }, undefined, false, undefined, this)
326
+ ]
327
+ }, undefined, true, undefined, this),
328
+ showStart && /* @__PURE__ */ jsxDEV3(DateTimePicker, {
329
+ value: value.start ?? new Date,
330
+ mode: "date",
331
+ display: Platform.OS === "ios" ? "inline" : "default",
332
+ onChange: handleStart,
333
+ ...pickerCommon
334
+ }, undefined, false, undefined, this),
335
+ showEnd && /* @__PURE__ */ jsxDEV3(DateTimePicker, {
336
+ value: value.end ?? value.start ?? new Date,
337
+ mode: "date",
338
+ display: Platform.OS === "ios" ? "inline" : "default",
339
+ onChange: handleEnd,
340
+ minimumDate: value.start ?? minDate,
341
+ maximumDate: maxDate
342
+ }, undefined, false, undefined, this)
343
+ ]
344
+ }, undefined, true, undefined, this);
345
+ }
346
+ export {
347
+ DateRangePicker
348
+ };