@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,46 @@
1
+ // ui/skeleton.tsx
2
+ import * as React from "react";
3
+ import Animated, {
4
+ useAnimatedStyle,
5
+ useSharedValue,
6
+ withRepeat,
7
+ withSequence,
8
+ withTiming
9
+ } from "react-native-reanimated";
10
+ import { cn } from "@contractspec/lib.ui-kit-core/utils";
11
+ import { jsxDEV } from "react/jsx-dev-runtime";
12
+ var duration = 1000;
13
+ function Skeleton({
14
+ className,
15
+ ...props
16
+ }) {
17
+ const sv = useSharedValue(1);
18
+ React.useEffect(() => {
19
+ sv.value = withRepeat(withSequence(withTiming(0.5, { duration }), withTiming(1, { duration })), -1);
20
+ }, []);
21
+ const style = useAnimatedStyle(() => ({
22
+ opacity: sv.value
23
+ }));
24
+ return /* @__PURE__ */ jsxDEV(Animated.View, {
25
+ style,
26
+ className: cn("bg-secondary dark:bg-muted rounded-md", className),
27
+ ...props
28
+ }, undefined, false, undefined, this);
29
+ }
30
+ // ui/molecules/SkeletonList.tsx
31
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
32
+ function SkeletonList({
33
+ count = 6,
34
+ className = "",
35
+ itemClassName = ""
36
+ }) {
37
+ return /* @__PURE__ */ jsxDEV2("div", {
38
+ className: `space-y-3 ${className}`,
39
+ children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsxDEV2(Skeleton, {
40
+ className: `h-20 rounded-md ${itemClassName}`
41
+ }, i, false, undefined, this))
42
+ }, undefined, false, undefined, this);
43
+ }
44
+ export {
45
+ SkeletonList
46
+ };
File without changes
@@ -0,0 +1,147 @@
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/navigation-menu.tsx
19
+ import * as NavigationMenuPrimitive from "@rn-primitives/navigation-menu";
20
+ import { cva } from "class-variance-authority";
21
+ import { Platform, View } from "react-native";
22
+ import Animated, {
23
+ Extrapolation,
24
+ FadeInLeft,
25
+ FadeOutLeft,
26
+ interpolate,
27
+ useAnimatedStyle,
28
+ useDerivedValue,
29
+ withTiming
30
+ } from "react-native-reanimated";
31
+ import { cn } from "@contractspec/lib.ui-kit-core/utils";
32
+ import { jsxDEV } from "react/jsx-dev-runtime";
33
+ function NavigationMenu({
34
+ className,
35
+ children,
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ jsxDEV(NavigationMenuPrimitive.Root, {
39
+ className: cn("relative z-10 flex max-w-max flex-row items-center justify-center", className),
40
+ ...props,
41
+ children: [
42
+ children,
43
+ Platform.OS === "web" && /* @__PURE__ */ jsxDEV(NavigationMenuViewport, {}, undefined, false, undefined, this)
44
+ ]
45
+ }, undefined, true, undefined, this);
46
+ }
47
+ function NavigationMenuList({
48
+ className,
49
+ ...props
50
+ }) {
51
+ return /* @__PURE__ */ jsxDEV(NavigationMenuPrimitive.List, {
52
+ className: cn("web:group web:list-none flex flex-1 flex-row items-center justify-center gap-1", className),
53
+ ...props
54
+ }, undefined, false, undefined, this);
55
+ }
56
+ var NavigationMenuItem = NavigationMenuPrimitive.Item;
57
+ var navigationMenuTriggerStyle = cva("web:group web:inline-flex flex-row h-10 native:h-12 native:px-3 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium web:transition-colors web:hover:bg-accent active:bg-accent web:hover:text-accent-foreground web:focus:bg-accent web:focus:text-accent-foreground web:focus:outline-hidden web:disabled:pointer-events-none disabled:opacity-50 web:data-active:bg-accent/50 web:data-[state=open]:bg-accent/50");
58
+ function NavigationMenuTrigger({
59
+ className,
60
+ children,
61
+ ...props
62
+ }) {
63
+ const { value } = NavigationMenuPrimitive.useRootContext();
64
+ const { value: itemValue } = NavigationMenuPrimitive.useItemContext();
65
+ const progress = useDerivedValue(() => value === itemValue ? withTiming(1, { duration: 250 }) : withTiming(0, { duration: 200 }));
66
+ const chevronStyle = useAnimatedStyle(() => ({
67
+ transform: [{ rotate: `${progress.value * 180}deg` }],
68
+ opacity: interpolate(progress.value, [0, 1], [1, 0.8], Extrapolation.CLAMP)
69
+ }));
70
+ return /* @__PURE__ */ jsxDEV(NavigationMenuPrimitive.Trigger, {
71
+ className: cn(navigationMenuTriggerStyle(), "web:group gap-1.5", value === itemValue && "bg-accent", className),
72
+ ...props,
73
+ children: [
74
+ children,
75
+ /* @__PURE__ */ jsxDEV(Animated.View, {
76
+ style: chevronStyle,
77
+ children: /* @__PURE__ */ jsxDEV(ChevronDown, {
78
+ size: 12,
79
+ className: cn("text-foreground web:transition web:duration-200 relative h-3 w-3"),
80
+ "aria-hidden": true
81
+ }, undefined, false, undefined, this)
82
+ }, undefined, false, undefined, this)
83
+ ]
84
+ }, undefined, true, undefined, this);
85
+ }
86
+ function NavigationMenuContent({
87
+ className,
88
+ children,
89
+ portalHost,
90
+ ...props
91
+ }) {
92
+ const { value } = NavigationMenuPrimitive.useRootContext();
93
+ const { value: itemValue } = NavigationMenuPrimitive.useItemContext();
94
+ return /* @__PURE__ */ jsxDEV(NavigationMenuPrimitive.Portal, {
95
+ hostName: portalHost,
96
+ children: /* @__PURE__ */ jsxDEV(NavigationMenuPrimitive.Content, {
97
+ className: cn("native:border native:border-border native:rounded-lg native:shadow-lg native:bg-popover native:text-popover-foreground native:overflow-hidden w-full", value === itemValue ? "web:animate-in web:fade-in web:slide-in-from-right-20" : "web:animate-out web:fade-out web:slide-out-to-left-20", className),
98
+ ...props,
99
+ children: /* @__PURE__ */ jsxDEV(Animated.View, {
100
+ entering: Platform.OS !== "web" ? FadeInLeft : undefined,
101
+ exiting: Platform.OS !== "web" ? FadeOutLeft : undefined,
102
+ children
103
+ }, undefined, false, undefined, this)
104
+ }, undefined, false, undefined, this)
105
+ }, undefined, false, undefined, this);
106
+ }
107
+ var NavigationMenuLink = NavigationMenuPrimitive.Link;
108
+ function NavigationMenuViewport({
109
+ className,
110
+ ...props
111
+ }) {
112
+ return /* @__PURE__ */ jsxDEV(View, {
113
+ className: cn("absolute top-full left-0 flex justify-center"),
114
+ children: /* @__PURE__ */ jsxDEV(View, {
115
+ className: cn("web:origin-top-center border-border bg-popover text-popover-foreground web:h-(--radix-navigation-menu-viewport-height) web:animate-in web:zoom-in-90 relative mt-1.5 w-full overflow-hidden rounded-md border shadow-lg", className),
116
+ ...props,
117
+ children: /* @__PURE__ */ jsxDEV(NavigationMenuPrimitive.Viewport, {}, undefined, false, undefined, this)
118
+ }, undefined, false, undefined, this)
119
+ }, undefined, false, undefined, this);
120
+ }
121
+ function NavigationMenuIndicator({
122
+ ref,
123
+ className,
124
+ ...props
125
+ }) {
126
+ const { value } = NavigationMenuPrimitive.useRootContext();
127
+ const { value: itemValue } = NavigationMenuPrimitive.useItemContext();
128
+ return /* @__PURE__ */ jsxDEV(NavigationMenuPrimitive.Indicator, {
129
+ ref,
130
+ className: cn("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden", value === itemValue ? "web:animate-in web:fade-in" : "web:animate-out web:fade-out", className),
131
+ ...props,
132
+ children: /* @__PURE__ */ jsxDEV(View, {
133
+ className: "bg-border shadow-foreground/5 relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"
134
+ }, undefined, false, undefined, this)
135
+ }, undefined, false, undefined, this);
136
+ }
137
+ export {
138
+ navigationMenuTriggerStyle,
139
+ NavigationMenuViewport,
140
+ NavigationMenuTrigger,
141
+ NavigationMenuList,
142
+ NavigationMenuLink,
143
+ NavigationMenuItem,
144
+ NavigationMenuIndicator,
145
+ NavigationMenuContent,
146
+ NavigationMenu
147
+ };
@@ -0,0 +1,222 @@
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/button.tsx
21
+ import { cva } from "class-variance-authority";
22
+ import { Pressable } from "react-native";
23
+ import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
24
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
25
+ var buttonVariants = cva("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2", {
26
+ variants: {
27
+ variant: {
28
+ default: "bg-primary web:hover:opacity-90 active:opacity-90",
29
+ destructive: "bg-destructive web:hover:opacity-90 active:opacity-90",
30
+ outline: "border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
31
+ secondary: "bg-secondary web:hover:opacity-80 active:opacity-80",
32
+ ghost: "web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
33
+ link: "web:underline-offset-4 web:hover:underline web:focus:underline"
34
+ },
35
+ size: {
36
+ default: "h-10 px-4 py-2 native:h-12 native:px-5 native:py-3",
37
+ sm: "h-9 rounded-md px-3",
38
+ lg: "h-11 rounded-md px-8 native:h-14",
39
+ icon: "h-10 w-10"
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ variant: "default",
44
+ size: "default"
45
+ }
46
+ });
47
+ var buttonTextVariants = cva("web:whitespace-nowrap text-sm native:text-base font-medium text-foreground web:transition-colors", {
48
+ variants: {
49
+ variant: {
50
+ default: "text-primary-foreground",
51
+ destructive: "text-destructive-foreground",
52
+ outline: "group-active:text-accent-foreground",
53
+ secondary: "text-secondary-foreground group-active:text-secondary-foreground",
54
+ ghost: "group-active:text-accent-foreground",
55
+ link: "text-primary group-active:underline"
56
+ },
57
+ size: {
58
+ default: "",
59
+ sm: "",
60
+ lg: "native:text-lg",
61
+ icon: ""
62
+ }
63
+ },
64
+ defaultVariants: {
65
+ variant: "default",
66
+ size: "default"
67
+ }
68
+ });
69
+ function Button({ ref, className, variant, size, ...props }) {
70
+ return /* @__PURE__ */ jsxDEV2(TextClassContext.Provider, {
71
+ value: buttonTextVariants({
72
+ variant,
73
+ size,
74
+ className: "web:pointer-events-none"
75
+ }),
76
+ children: /* @__PURE__ */ jsxDEV2(Pressable, {
77
+ className: cn2(props.disabled && "web:pointer-events-none opacity-50", buttonVariants({ variant, size, className })),
78
+ ref,
79
+ role: "button",
80
+ ...props
81
+ }, undefined, false, undefined, this)
82
+ }, undefined, false, undefined, this);
83
+ }
84
+ // ui/organisms/ErrorBoundary/ErrorBoundary.tsx
85
+ import React2 from "react";
86
+ import { AlertTriangle, RefreshCw, Home } from "lucide-react";
87
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
88
+ "use client";
89
+ var DefaultErrorFallback = ({
90
+ error,
91
+ errorId,
92
+ resetError
93
+ }) => {
94
+ const isDevelopment = true;
95
+ return /* @__PURE__ */ jsxDEV3("div", {
96
+ className: "flex min-h-screen items-center justify-center bg-gray-50 px-4",
97
+ children: /* @__PURE__ */ jsxDEV3("div", {
98
+ className: "w-full max-w-md rounded-lg bg-white p-6 text-center shadow-lg",
99
+ children: [
100
+ /* @__PURE__ */ jsxDEV3("div", {
101
+ className: "mb-4 flex justify-center",
102
+ children: /* @__PURE__ */ jsxDEV3(AlertTriangle, {
103
+ className: "h-12 w-12 text-red-500"
104
+ }, undefined, false, undefined, this)
105
+ }, undefined, false, undefined, this),
106
+ /* @__PURE__ */ jsxDEV3("h1", {
107
+ className: "mb-2 text-2xl font-semibold text-gray-900",
108
+ children: "Une erreur s'est produite"
109
+ }, undefined, false, undefined, this),
110
+ /* @__PURE__ */ jsxDEV3("p", {
111
+ className: "mb-6 text-gray-600",
112
+ children: "Nous nous excusons pour ce désagrément. Notre équipe a été notifiée et travaille à résoudre le problème."
113
+ }, undefined, false, undefined, this),
114
+ isDevelopment && /* @__PURE__ */ jsxDEV3("div", {
115
+ className: "mb-6 rounded-md bg-red-50 p-4 text-left",
116
+ children: [
117
+ /* @__PURE__ */ jsxDEV3("p", {
118
+ className: "mb-2 text-base font-medium text-red-800",
119
+ children: "Erreur de développement:"
120
+ }, undefined, false, undefined, this),
121
+ /* @__PURE__ */ jsxDEV3("p", {
122
+ className: "font-mono text-sm break-all text-red-700",
123
+ children: error.message
124
+ }, undefined, false, undefined, this),
125
+ errorId && /* @__PURE__ */ jsxDEV3("p", {
126
+ className: "mt-2 text-sm text-red-600",
127
+ children: [
128
+ "ID: ",
129
+ errorId
130
+ ]
131
+ }, undefined, true, undefined, this)
132
+ ]
133
+ }, undefined, true, undefined, this),
134
+ /* @__PURE__ */ jsxDEV3("div", {
135
+ className: "flex flex-col justify-center gap-3 sm:flex-row",
136
+ children: [
137
+ /* @__PURE__ */ jsxDEV3(Button, {
138
+ onPress: resetError,
139
+ className: "flex items-center gap-2",
140
+ children: [
141
+ /* @__PURE__ */ jsxDEV3(RefreshCw, {
142
+ className: "h-4 w-4"
143
+ }, undefined, false, undefined, this),
144
+ "Réessayer"
145
+ ]
146
+ }, undefined, true, undefined, this),
147
+ /* @__PURE__ */ jsxDEV3(Button, {
148
+ onPress: () => window.location.href = "/",
149
+ variant: "secondary",
150
+ className: "flex items-center gap-2",
151
+ children: [
152
+ /* @__PURE__ */ jsxDEV3(Home, {
153
+ className: "h-4 w-4"
154
+ }, undefined, false, undefined, this),
155
+ "Accueil"
156
+ ]
157
+ }, undefined, true, undefined, this)
158
+ ]
159
+ }, undefined, true, undefined, this),
160
+ !isDevelopment && errorId && /* @__PURE__ */ jsxDEV3("p", {
161
+ className: "mt-4 text-sm text-gray-500",
162
+ children: [
163
+ "Code d'erreur: ",
164
+ errorId
165
+ ]
166
+ }, undefined, true, undefined, this)
167
+ ]
168
+ }, undefined, true, undefined, this)
169
+ }, undefined, false, undefined, this);
170
+ };
171
+
172
+ class ErrorBoundary extends React2.Component {
173
+ constructor(props) {
174
+ super(props);
175
+ this.state = {
176
+ hasError: false,
177
+ error: null,
178
+ errorId: null
179
+ };
180
+ }
181
+ static getDerivedStateFromError(error) {
182
+ return {
183
+ hasError: true,
184
+ error
185
+ };
186
+ }
187
+ componentDidCatch(error, errorInfo) {
188
+ const errorId = `err_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
189
+ this.setState({ errorId });
190
+ this.props.onError?.(error, errorInfo);
191
+ if (true) {
192
+ console.error("ErrorBoundary caught an error:", error, errorInfo);
193
+ }
194
+ }
195
+ resetError = () => {
196
+ this.setState({
197
+ hasError: false,
198
+ error: null,
199
+ errorId: null
200
+ });
201
+ };
202
+ render() {
203
+ if (this.state.hasError && this.state.error) {
204
+ const FallbackComponent = this.props.fallback || DefaultErrorFallback;
205
+ return /* @__PURE__ */ jsxDEV3(FallbackComponent, {
206
+ error: this.state.error,
207
+ errorId: this.state.errorId,
208
+ resetError: this.resetError
209
+ }, undefined, false, undefined, this);
210
+ }
211
+ return this.props.children;
212
+ }
213
+ }
214
+ var useErrorHandler = () => {
215
+ return React2.useCallback((error) => {
216
+ throw error;
217
+ }, []);
218
+ };
219
+ export {
220
+ useErrorHandler,
221
+ ErrorBoundary
222
+ };
@@ -0,0 +1,222 @@
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/button.tsx
21
+ import { cva } from "class-variance-authority";
22
+ import { Pressable } from "react-native";
23
+ import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
24
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
25
+ var buttonVariants = cva("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2", {
26
+ variants: {
27
+ variant: {
28
+ default: "bg-primary web:hover:opacity-90 active:opacity-90",
29
+ destructive: "bg-destructive web:hover:opacity-90 active:opacity-90",
30
+ outline: "border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
31
+ secondary: "bg-secondary web:hover:opacity-80 active:opacity-80",
32
+ ghost: "web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
33
+ link: "web:underline-offset-4 web:hover:underline web:focus:underline"
34
+ },
35
+ size: {
36
+ default: "h-10 px-4 py-2 native:h-12 native:px-5 native:py-3",
37
+ sm: "h-9 rounded-md px-3",
38
+ lg: "h-11 rounded-md px-8 native:h-14",
39
+ icon: "h-10 w-10"
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ variant: "default",
44
+ size: "default"
45
+ }
46
+ });
47
+ var buttonTextVariants = cva("web:whitespace-nowrap text-sm native:text-base font-medium text-foreground web:transition-colors", {
48
+ variants: {
49
+ variant: {
50
+ default: "text-primary-foreground",
51
+ destructive: "text-destructive-foreground",
52
+ outline: "group-active:text-accent-foreground",
53
+ secondary: "text-secondary-foreground group-active:text-secondary-foreground",
54
+ ghost: "group-active:text-accent-foreground",
55
+ link: "text-primary group-active:underline"
56
+ },
57
+ size: {
58
+ default: "",
59
+ sm: "",
60
+ lg: "native:text-lg",
61
+ icon: ""
62
+ }
63
+ },
64
+ defaultVariants: {
65
+ variant: "default",
66
+ size: "default"
67
+ }
68
+ });
69
+ function Button({ ref, className, variant, size, ...props }) {
70
+ return /* @__PURE__ */ jsxDEV2(TextClassContext.Provider, {
71
+ value: buttonTextVariants({
72
+ variant,
73
+ size,
74
+ className: "web:pointer-events-none"
75
+ }),
76
+ children: /* @__PURE__ */ jsxDEV2(Pressable, {
77
+ className: cn2(props.disabled && "web:pointer-events-none opacity-50", buttonVariants({ variant, size, className })),
78
+ ref,
79
+ role: "button",
80
+ ...props
81
+ }, undefined, false, undefined, this)
82
+ }, undefined, false, undefined, this);
83
+ }
84
+ // ui/organisms/ErrorBoundary/ErrorBoundary.tsx
85
+ import React2 from "react";
86
+ import { AlertTriangle, RefreshCw, Home } from "lucide-react";
87
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
88
+ "use client";
89
+ var DefaultErrorFallback = ({
90
+ error,
91
+ errorId,
92
+ resetError
93
+ }) => {
94
+ const isDevelopment = true;
95
+ return /* @__PURE__ */ jsxDEV3("div", {
96
+ className: "flex min-h-screen items-center justify-center bg-gray-50 px-4",
97
+ children: /* @__PURE__ */ jsxDEV3("div", {
98
+ className: "w-full max-w-md rounded-lg bg-white p-6 text-center shadow-lg",
99
+ children: [
100
+ /* @__PURE__ */ jsxDEV3("div", {
101
+ className: "mb-4 flex justify-center",
102
+ children: /* @__PURE__ */ jsxDEV3(AlertTriangle, {
103
+ className: "h-12 w-12 text-red-500"
104
+ }, undefined, false, undefined, this)
105
+ }, undefined, false, undefined, this),
106
+ /* @__PURE__ */ jsxDEV3("h1", {
107
+ className: "mb-2 text-2xl font-semibold text-gray-900",
108
+ children: "Une erreur s'est produite"
109
+ }, undefined, false, undefined, this),
110
+ /* @__PURE__ */ jsxDEV3("p", {
111
+ className: "mb-6 text-gray-600",
112
+ children: "Nous nous excusons pour ce désagrément. Notre équipe a été notifiée et travaille à résoudre le problème."
113
+ }, undefined, false, undefined, this),
114
+ isDevelopment && /* @__PURE__ */ jsxDEV3("div", {
115
+ className: "mb-6 rounded-md bg-red-50 p-4 text-left",
116
+ children: [
117
+ /* @__PURE__ */ jsxDEV3("p", {
118
+ className: "mb-2 text-base font-medium text-red-800",
119
+ children: "Erreur de développement:"
120
+ }, undefined, false, undefined, this),
121
+ /* @__PURE__ */ jsxDEV3("p", {
122
+ className: "font-mono text-sm break-all text-red-700",
123
+ children: error.message
124
+ }, undefined, false, undefined, this),
125
+ errorId && /* @__PURE__ */ jsxDEV3("p", {
126
+ className: "mt-2 text-sm text-red-600",
127
+ children: [
128
+ "ID: ",
129
+ errorId
130
+ ]
131
+ }, undefined, true, undefined, this)
132
+ ]
133
+ }, undefined, true, undefined, this),
134
+ /* @__PURE__ */ jsxDEV3("div", {
135
+ className: "flex flex-col justify-center gap-3 sm:flex-row",
136
+ children: [
137
+ /* @__PURE__ */ jsxDEV3(Button, {
138
+ onPress: resetError,
139
+ className: "flex items-center gap-2",
140
+ children: [
141
+ /* @__PURE__ */ jsxDEV3(RefreshCw, {
142
+ className: "h-4 w-4"
143
+ }, undefined, false, undefined, this),
144
+ "Réessayer"
145
+ ]
146
+ }, undefined, true, undefined, this),
147
+ /* @__PURE__ */ jsxDEV3(Button, {
148
+ onPress: () => window.location.href = "/",
149
+ variant: "secondary",
150
+ className: "flex items-center gap-2",
151
+ children: [
152
+ /* @__PURE__ */ jsxDEV3(Home, {
153
+ className: "h-4 w-4"
154
+ }, undefined, false, undefined, this),
155
+ "Accueil"
156
+ ]
157
+ }, undefined, true, undefined, this)
158
+ ]
159
+ }, undefined, true, undefined, this),
160
+ !isDevelopment && errorId && /* @__PURE__ */ jsxDEV3("p", {
161
+ className: "mt-4 text-sm text-gray-500",
162
+ children: [
163
+ "Code d'erreur: ",
164
+ errorId
165
+ ]
166
+ }, undefined, true, undefined, this)
167
+ ]
168
+ }, undefined, true, undefined, this)
169
+ }, undefined, false, undefined, this);
170
+ };
171
+
172
+ class ErrorBoundary extends React2.Component {
173
+ constructor(props) {
174
+ super(props);
175
+ this.state = {
176
+ hasError: false,
177
+ error: null,
178
+ errorId: null
179
+ };
180
+ }
181
+ static getDerivedStateFromError(error) {
182
+ return {
183
+ hasError: true,
184
+ error
185
+ };
186
+ }
187
+ componentDidCatch(error, errorInfo) {
188
+ const errorId = `err_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
189
+ this.setState({ errorId });
190
+ this.props.onError?.(error, errorInfo);
191
+ if (true) {
192
+ console.error("ErrorBoundary caught an error:", error, errorInfo);
193
+ }
194
+ }
195
+ resetError = () => {
196
+ this.setState({
197
+ hasError: false,
198
+ error: null,
199
+ errorId: null
200
+ });
201
+ };
202
+ render() {
203
+ if (this.state.hasError && this.state.error) {
204
+ const FallbackComponent = this.props.fallback || DefaultErrorFallback;
205
+ return /* @__PURE__ */ jsxDEV3(FallbackComponent, {
206
+ error: this.state.error,
207
+ errorId: this.state.errorId,
208
+ resetError: this.resetError
209
+ }, undefined, false, undefined, this);
210
+ }
211
+ return this.props.children;
212
+ }
213
+ }
214
+ var useErrorHandler = () => {
215
+ return React2.useCallback((error) => {
216
+ throw error;
217
+ }, []);
218
+ };
219
+ export {
220
+ useErrorHandler,
221
+ ErrorBoundary
222
+ };