@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
package/dist/ui/field.js CHANGED
@@ -1,123 +1,560 @@
1
- 'use client';
2
-
3
- import { Box, VStack } from "./stack.js";
4
- import { P } from "./typography.js";
5
- import { Label } from "./label.js";
6
- import { Separator } from "./separator.js";
7
- import { useMemo } from "react";
1
+ // @bun
2
+ // ui/text.tsx
3
+ import * as Slot from "@rn-primitives/slot";
4
+ import * as React from "react";
5
+ import { Text as RNText } from "react-native";
8
6
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
9
- import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { jsxDEV } from "react/jsx-dev-runtime";
8
+ var TextClassContext = React.createContext(undefined);
9
+ function Text2({
10
+ className,
11
+ asChild = false,
12
+ ...props
13
+ }) {
14
+ const textClass = React.useContext(TextClassContext);
15
+ const Component = asChild ? Slot.Text : RNText;
16
+ return /* @__PURE__ */ jsxDEV(Component, {
17
+ className: cn("text-foreground web:select-text text-base", textClass, className),
18
+ ...props
19
+ }, undefined, false, undefined, this);
20
+ }
21
+ // ui/label.tsx
22
+ import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
23
+ import * as LabelPrimitive from "@rn-primitives/label";
24
+ import { Platform } from "react-native";
25
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
26
+ function Label({
27
+ className,
28
+ onPress,
29
+ onLongPress,
30
+ onPressIn,
31
+ onPressOut,
32
+ disabled,
33
+ ...props
34
+ }) {
35
+ return /* @__PURE__ */ jsxDEV2(LabelPrimitive.Root, {
36
+ className: cn2("flex flex-row items-center gap-2 select-none", Platform.select({
37
+ web: "cursor-default leading-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50"
38
+ }), disabled && "opacity-50"),
39
+ onPress,
40
+ onLongPress,
41
+ onPressIn,
42
+ onPressOut,
43
+ disabled,
44
+ children: /* @__PURE__ */ jsxDEV2(LabelPrimitive.Text, {
45
+ className: cn2("text-foreground text-sm font-medium", Platform.select({ web: "leading-none" }), className),
46
+ ...props
47
+ }, undefined, false, undefined, this)
48
+ }, undefined, false, undefined, this);
49
+ }
50
+ // ui/stack.tsx
51
+ import { View } from "react-native";
52
+ import { cn as cn3 } from "@contractspec/lib.ui-kit-core/utils";
10
53
  import { cva } from "class-variance-authority";
11
-
12
- //#region ui/field.tsx
54
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
55
+ var baseStyle = "flex";
56
+ var vStackVariants = cva([baseStyle, "flex-col"], {
57
+ variants: {
58
+ spacing: {
59
+ none: "",
60
+ xs: "gap-y-1",
61
+ sm: "gap-y-2",
62
+ md: "gap-y-4",
63
+ lg: "gap-y-6",
64
+ xl: "gap-y-8",
65
+ "2xl": "gap-y-12"
66
+ },
67
+ align: {
68
+ stretch: "items-stretch",
69
+ start: "items-start",
70
+ center: "items-center",
71
+ end: "items-end"
72
+ },
73
+ justify: {
74
+ start: "justify-start",
75
+ center: "justify-center",
76
+ end: "justify-end",
77
+ between: "justify-between",
78
+ around: "justify-around",
79
+ evenly: "justify-evenly"
80
+ },
81
+ width: {
82
+ auto: "w-auto",
83
+ full: "w-full",
84
+ screen: "w-screen",
85
+ fit: "w-fit"
86
+ },
87
+ padding: {
88
+ none: "",
89
+ xs: "p-1",
90
+ sm: "p-2",
91
+ md: "p-4",
92
+ lg: "p-6",
93
+ xl: "p-8"
94
+ },
95
+ gap: {
96
+ none: "",
97
+ xs: "gap-1",
98
+ sm: "gap-2",
99
+ md: "gap-4",
100
+ lg: "gap-6",
101
+ xl: "gap-8"
102
+ }
103
+ },
104
+ defaultVariants: {
105
+ spacing: "md",
106
+ align: "stretch",
107
+ justify: "start",
108
+ width: "auto",
109
+ padding: "none",
110
+ gap: "none"
111
+ }
112
+ });
113
+ var hStackVariants = cva([baseStyle, "flex-row"], {
114
+ variants: {
115
+ spacing: {
116
+ none: "",
117
+ xs: "gap-x-1",
118
+ sm: "gap-x-2",
119
+ md: "gap-x-4",
120
+ lg: "gap-x-6",
121
+ xl: "gap-x-8",
122
+ "2xl": "gap-x-12"
123
+ },
124
+ align: {
125
+ stretch: "items-stretch",
126
+ start: "items-start",
127
+ center: "items-center",
128
+ end: "items-end",
129
+ baseline: "items-baseline"
130
+ },
131
+ justify: {
132
+ start: "justify-start",
133
+ center: "justify-center",
134
+ end: "justify-end",
135
+ between: "justify-between",
136
+ around: "justify-around",
137
+ evenly: "justify-evenly"
138
+ },
139
+ width: {
140
+ auto: "w-auto",
141
+ full: "w-full",
142
+ screen: "w-screen",
143
+ fit: "w-fit"
144
+ },
145
+ padding: {
146
+ none: "",
147
+ xs: "p-1",
148
+ sm: "p-2",
149
+ md: "p-4",
150
+ lg: "p-6",
151
+ xl: "p-8"
152
+ },
153
+ gap: {
154
+ none: "",
155
+ xs: "gap-1",
156
+ sm: "gap-2",
157
+ md: "gap-4",
158
+ lg: "gap-6",
159
+ xl: "gap-8"
160
+ },
161
+ wrap: {
162
+ nowrap: "flex-nowrap",
163
+ wrap: "flex-wrap",
164
+ reverse: "flex-wrap-reverse"
165
+ }
166
+ },
167
+ defaultVariants: {
168
+ spacing: "md",
169
+ align: "center",
170
+ justify: "start",
171
+ width: "auto",
172
+ padding: "none",
173
+ gap: "none",
174
+ wrap: "wrap"
175
+ }
176
+ });
177
+ var boxVariants = cva([baseStyle, "flex-row"], {
178
+ variants: {
179
+ spacing: {
180
+ none: "",
181
+ xs: "gap-x-1",
182
+ sm: "gap-x-2",
183
+ md: "gap-x-4",
184
+ lg: "gap-x-6",
185
+ xl: "gap-x-8",
186
+ "2xl": "gap-x-12"
187
+ },
188
+ align: {
189
+ stretch: "items-stretch",
190
+ start: "items-start",
191
+ center: "items-center",
192
+ end: "items-end",
193
+ baseline: "items-baseline"
194
+ },
195
+ justify: {
196
+ start: "justify-start",
197
+ center: "justify-center",
198
+ end: "justify-end",
199
+ between: "justify-between",
200
+ around: "justify-around",
201
+ evenly: "justify-evenly"
202
+ },
203
+ width: {
204
+ auto: "w-auto",
205
+ full: "w-full",
206
+ screen: "w-screen",
207
+ fit: "w-fit"
208
+ },
209
+ padding: {
210
+ none: "",
211
+ xs: "p-1",
212
+ sm: "p-2",
213
+ md: "p-4",
214
+ lg: "p-6",
215
+ xl: "p-8"
216
+ },
217
+ gap: {
218
+ none: "",
219
+ xs: "gap-1",
220
+ sm: "gap-2",
221
+ md: "gap-4",
222
+ lg: "gap-6",
223
+ xl: "gap-8"
224
+ },
225
+ wrap: {
226
+ nowrap: "flex-nowrap",
227
+ wrap: "flex-wrap",
228
+ reverse: "flex-wrap-reverse"
229
+ }
230
+ },
231
+ defaultVariants: {
232
+ spacing: "md",
233
+ align: "center",
234
+ justify: "center",
235
+ width: "auto",
236
+ padding: "none",
237
+ gap: "none",
238
+ wrap: "wrap"
239
+ }
240
+ });
241
+ function Box({
242
+ className,
243
+ spacing,
244
+ align,
245
+ justify,
246
+ width,
247
+ padding,
248
+ gap,
249
+ wrap,
250
+ ...props
251
+ }) {
252
+ return /* @__PURE__ */ jsxDEV3(View, {
253
+ className: cn3(boxVariants({ spacing, align, justify, width, padding, gap, wrap }), className),
254
+ ...props
255
+ }, undefined, false, undefined, this);
256
+ }
257
+ function HStack({
258
+ className,
259
+ spacing,
260
+ align,
261
+ justify,
262
+ width,
263
+ padding,
264
+ gap,
265
+ wrap,
266
+ ...props
267
+ }) {
268
+ return /* @__PURE__ */ jsxDEV3(View, {
269
+ className: cn3(hStackVariants({ spacing, align, justify, width, padding, gap, wrap }), className),
270
+ ...props
271
+ }, undefined, false, undefined, this);
272
+ }
273
+ function VStack({
274
+ className,
275
+ spacing,
276
+ align,
277
+ justify,
278
+ width,
279
+ padding,
280
+ gap,
281
+ ...props
282
+ }) {
283
+ return /* @__PURE__ */ jsxDEV3(View, {
284
+ className: cn3(vStackVariants({ spacing, align, justify, width, padding, gap }), className),
285
+ ...props
286
+ }, undefined, false, undefined, this);
287
+ }
288
+ // ui/typography.tsx
289
+ import * as Slot2 from "@rn-primitives/slot";
290
+ import { Platform as Platform2 } from "react-native";
291
+ import { cn as cn4 } from "@contractspec/lib.ui-kit-core/utils";
292
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
293
+ function H1({ className, asChild = false, ...props }) {
294
+ const Component = asChild ? Slot2.Text : Text2;
295
+ return /* @__PURE__ */ jsxDEV4(Component, {
296
+ role: "heading",
297
+ "aria-level": "1",
298
+ className: cn4("text-foreground web:select-text web:scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl", className),
299
+ ...props
300
+ }, undefined, false, undefined, this);
301
+ }
302
+ function H2({ className, asChild = false, ...props }) {
303
+ const Component = asChild ? Slot2.Text : Text2;
304
+ return /* @__PURE__ */ jsxDEV4(Component, {
305
+ role: "heading",
306
+ "aria-level": "2",
307
+ className: cn4("border-border text-foreground web:select-text web:scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0", className),
308
+ ...props
309
+ }, undefined, false, undefined, this);
310
+ }
311
+ function H3({ className, asChild = false, ...props }) {
312
+ const Component = asChild ? Slot2.Text : Text2;
313
+ return /* @__PURE__ */ jsxDEV4(Component, {
314
+ role: "heading",
315
+ "aria-level": "3",
316
+ className: cn4("text-foreground web:select-text web:scroll-m-20 text-2xl font-semibold tracking-tight", className),
317
+ ...props
318
+ }, undefined, false, undefined, this);
319
+ }
320
+ function H4({ className, asChild = false, ...props }) {
321
+ const Component = asChild ? Slot2.Text : Text2;
322
+ return /* @__PURE__ */ jsxDEV4(Component, {
323
+ role: "heading",
324
+ "aria-level": "4",
325
+ className: cn4("text-foreground web:select-text web:scroll-m-20 text-xl font-semibold tracking-tight", className),
326
+ ...props
327
+ }, undefined, false, undefined, this);
328
+ }
329
+ function P({ className, asChild = false, ...props }) {
330
+ const Component = asChild ? Slot2.Text : Text2;
331
+ return /* @__PURE__ */ jsxDEV4(Component, {
332
+ className: cn4("text-foreground web:select-text text-base", className),
333
+ ...props
334
+ }, undefined, false, undefined, this);
335
+ }
336
+ function BlockQuote({ className, asChild = false, ...props }) {
337
+ const Component = asChild ? Slot2.Text : Text2;
338
+ return /* @__PURE__ */ jsxDEV4(Component, {
339
+ role: Platform2.OS === "web" ? "blockquote" : undefined,
340
+ className: cn4("native:mt-4 native:pl-3 border-border text-foreground web:select-text mt-6 border-l-2 pl-6 text-base italic", className),
341
+ ...props
342
+ }, undefined, false, undefined, this);
343
+ }
344
+ function Code({ className, asChild = false, ...props }) {
345
+ const Component = asChild ? Slot2.Text : Text2;
346
+ return /* @__PURE__ */ jsxDEV4(Component, {
347
+ role: Platform2.OS === "web" ? "code" : undefined,
348
+ className: cn4("bg-muted text-foreground web:select-text relative rounded-md px-[0.3rem] py-[0.2rem] text-sm font-semibold", className),
349
+ ...props
350
+ }, undefined, false, undefined, this);
351
+ }
352
+ function Lead({ className, asChild = false, ...props }) {
353
+ const Component = asChild ? Slot2.Text : Text2;
354
+ return /* @__PURE__ */ jsxDEV4(Component, {
355
+ className: cn4("text-muted-foreground web:select-text text-xl", className),
356
+ ...props
357
+ }, undefined, false, undefined, this);
358
+ }
359
+ function Large({ className, asChild = false, ...props }) {
360
+ const Component = asChild ? Slot2.Text : Text2;
361
+ return /* @__PURE__ */ jsxDEV4(Component, {
362
+ className: cn4("text-foreground web:select-text text-xl font-semibold", className),
363
+ ...props
364
+ }, undefined, false, undefined, this);
365
+ }
366
+ function Small({ className, asChild = false, ...props }) {
367
+ const Component = asChild ? Slot2.Text : Text2;
368
+ return /* @__PURE__ */ jsxDEV4(Component, {
369
+ className: cn4("text-foreground web:select-text text-sm leading-none font-medium", className),
370
+ ...props
371
+ }, undefined, false, undefined, this);
372
+ }
373
+ function Muted({ className, asChild = false, ...props }) {
374
+ const Component = asChild ? Slot2.Text : Text2;
375
+ return /* @__PURE__ */ jsxDEV4(Component, {
376
+ className: cn4("text-muted-foreground web:select-text text-sm", className),
377
+ ...props
378
+ }, undefined, false, undefined, this);
379
+ }
380
+ // ui/separator.tsx
381
+ import * as SeparatorPrimitive from "@rn-primitives/separator";
382
+ import { cn as cn5 } from "@contractspec/lib.ui-kit-core/utils";
383
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
384
+ function Separator({
385
+ className,
386
+ orientation = "horizontal",
387
+ decorative = true,
388
+ ...props
389
+ }) {
390
+ return /* @__PURE__ */ jsxDEV5(SeparatorPrimitive.Root, {
391
+ decorative,
392
+ orientation,
393
+ className: cn5("bg-border shrink-0", orientation === "horizontal" ? "h-px w-full" : "h-full w-px", className),
394
+ ...props
395
+ }, undefined, false, undefined, this);
396
+ }
397
+ // ui/field.tsx
398
+ import { useMemo } from "react";
399
+ import { cva as cva2 } from "class-variance-authority";
400
+ import { cn as cn6 } from "@contractspec/lib.ui-kit-core/utils";
401
+ import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
402
+ "use client";
13
403
  function FieldSet({ className, ...props }) {
14
- return /* @__PURE__ */ jsx(Box, {
15
- "data-slot": "field-set",
16
- className: cn("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
17
- ...props
18
- });
19
- }
20
- function FieldLegend({ className, variant = "legend", ...props }) {
21
- return /* @__PURE__ */ jsx(Box, {
22
- "data-slot": "field-legend",
23
- "data-variant": variant,
24
- className: cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className),
25
- ...props
26
- });
404
+ return /* @__PURE__ */ jsxDEV6(Box, {
405
+ "data-slot": "field-set",
406
+ className: cn6("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
407
+ ...props
408
+ }, undefined, false, undefined, this);
409
+ }
410
+ function FieldLegend({
411
+ className,
412
+ variant = "legend",
413
+ ...props
414
+ }) {
415
+ return /* @__PURE__ */ jsxDEV6(Box, {
416
+ "data-slot": "field-legend",
417
+ "data-variant": variant,
418
+ className: cn6("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className),
419
+ ...props
420
+ }, undefined, false, undefined, this);
27
421
  }
28
422
  function FieldGroup({ className, ...props }) {
29
- return /* @__PURE__ */ jsx(Box, {
30
- "data-slot": "field-group",
31
- className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4", className),
32
- ...props
33
- });
34
- }
35
- const fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
36
- variants: { orientation: {
37
- vertical: ["flex-col *:w-full [&>.sr-only]:w-auto"],
38
- horizontal: [
39
- "flex-row items-center",
40
- "data-[slot=field-label]:*:flex-auto",
41
- "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
42
- ],
43
- responsive: [
44
- "flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto",
45
- "@md/field-group:data-[slot=field-label]:*:flex-auto",
46
- "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
47
- ]
48
- } },
49
- defaultVariants: { orientation: "vertical" }
423
+ return /* @__PURE__ */ jsxDEV6(Box, {
424
+ "data-slot": "field-group",
425
+ className: cn6("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4", className),
426
+ ...props
427
+ }, undefined, false, undefined, this);
428
+ }
429
+ var fieldVariants = cva2("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
430
+ variants: {
431
+ orientation: {
432
+ vertical: ["flex-col *:w-full [&>.sr-only]:w-auto"],
433
+ horizontal: [
434
+ "flex-row items-center",
435
+ "data-[slot=field-label]:*:flex-auto",
436
+ "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
437
+ ],
438
+ responsive: [
439
+ "flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto",
440
+ "@md/field-group:data-[slot=field-label]:*:flex-auto",
441
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
442
+ ]
443
+ }
444
+ },
445
+ defaultVariants: {
446
+ orientation: "vertical"
447
+ }
50
448
  });
51
- function Field({ className, orientation = "vertical", ...props }) {
52
- return /* @__PURE__ */ jsx(Box, {
53
- role: "group",
54
- "data-slot": "field",
55
- "data-orientation": orientation,
56
- className: cn(fieldVariants({ orientation }), className),
57
- ...props
58
- });
449
+ function Field({
450
+ className,
451
+ orientation = "vertical",
452
+ ...props
453
+ }) {
454
+ return /* @__PURE__ */ jsxDEV6(Box, {
455
+ role: "group",
456
+ "data-slot": "field",
457
+ "data-orientation": orientation,
458
+ className: cn6(fieldVariants({ orientation }), className),
459
+ ...props
460
+ }, undefined, false, undefined, this);
59
461
  }
60
462
  function FieldContent({ className, ...props }) {
61
- return /* @__PURE__ */ jsx(Box, {
62
- "data-slot": "field-content",
63
- className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
64
- ...props
65
- });
66
- }
67
- function FieldLabel({ className, ...props }) {
68
- return /* @__PURE__ */ jsx(Label, {
69
- "data-slot": "field-label",
70
- className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", className),
71
- ...props
72
- });
463
+ return /* @__PURE__ */ jsxDEV6(Box, {
464
+ "data-slot": "field-content",
465
+ className: cn6("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
466
+ ...props
467
+ }, undefined, false, undefined, this);
468
+ }
469
+ function FieldLabel({
470
+ className,
471
+ ...props
472
+ }) {
473
+ return /* @__PURE__ */ jsxDEV6(Label, {
474
+ "data-slot": "field-label",
475
+ className: cn6("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4", "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10", className),
476
+ ...props
477
+ }, undefined, false, undefined, this);
73
478
  }
74
479
  function FieldTitle({ className, ...props }) {
75
- return /* @__PURE__ */ jsx(Box, {
76
- "data-slot": "field-label",
77
- className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
78
- ...props
79
- });
480
+ return /* @__PURE__ */ jsxDEV6(Box, {
481
+ "data-slot": "field-label",
482
+ className: cn6("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", className),
483
+ ...props
484
+ }, undefined, false, undefined, this);
80
485
  }
81
486
  function FieldDescription({ className, ...props }) {
82
- return /* @__PURE__ */ jsx(P, {
83
- "data-slot": "field-description",
84
- className: cn("text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
85
- ...props
86
- });
87
- }
88
- function FieldSeparator({ children, className, ...props }) {
89
- return /* @__PURE__ */ jsxs(Box, {
90
- "data-slot": "field-separator",
91
- "data-content": !!children,
92
- className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
93
- ...props,
94
- children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx(Box, {
95
- className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
96
- "data-slot": "field-separator-content",
97
- children
98
- })]
99
- });
100
- }
101
- function FieldError({ className, children, errors, ...props }) {
102
- const content = useMemo(() => {
103
- if (children) return children;
104
- if (!errors?.length) return null;
105
- if (errors?.length == 1) return errors[0]?.message;
106
- return /* @__PURE__ */ jsx(VStack, {
107
- className: "ml-4 flex list-disc flex-col gap-1",
108
- children: errors.map((error, index) => error?.message && /* @__PURE__ */ jsx(P, { children: error.message }, index))
109
- });
110
- }, [children, errors]);
111
- if (!content) return null;
112
- return /* @__PURE__ */ jsx(Box, {
113
- role: "alert",
114
- "data-slot": "field-error",
115
- className: cn("text-destructive text-sm font-normal", className),
116
- ...props,
117
- children: content
118
- });
119
- }
120
-
121
- //#endregion
122
- export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
123
- //# sourceMappingURL=field.js.map
487
+ return /* @__PURE__ */ jsxDEV6(P, {
488
+ "data-slot": "field-description",
489
+ className: cn6("text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className),
490
+ ...props
491
+ }, undefined, false, undefined, this);
492
+ }
493
+ function FieldSeparator({
494
+ children,
495
+ className,
496
+ ...props
497
+ }) {
498
+ return /* @__PURE__ */ jsxDEV6(Box, {
499
+ "data-slot": "field-separator",
500
+ "data-content": !!children,
501
+ className: cn6("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
502
+ ...props,
503
+ children: [
504
+ /* @__PURE__ */ jsxDEV6(Separator, {
505
+ className: "absolute inset-0 top-1/2"
506
+ }, undefined, false, undefined, this),
507
+ children && /* @__PURE__ */ jsxDEV6(Box, {
508
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
509
+ "data-slot": "field-separator-content",
510
+ children
511
+ }, undefined, false, undefined, this)
512
+ ]
513
+ }, undefined, true, undefined, this);
514
+ }
515
+ function FieldError({
516
+ className,
517
+ children,
518
+ errors,
519
+ ...props
520
+ }) {
521
+ const content = useMemo(() => {
522
+ if (children) {
523
+ return children;
524
+ }
525
+ if (!errors?.length) {
526
+ return null;
527
+ }
528
+ if (errors?.length == 1) {
529
+ return errors[0]?.message;
530
+ }
531
+ return /* @__PURE__ */ jsxDEV6(VStack, {
532
+ className: "ml-4 flex list-disc flex-col gap-1",
533
+ children: errors.map((error, index) => error?.message && /* @__PURE__ */ jsxDEV6(P, {
534
+ children: error.message
535
+ }, index, false, undefined, this))
536
+ }, undefined, false, undefined, this);
537
+ }, [children, errors]);
538
+ if (!content) {
539
+ return null;
540
+ }
541
+ return /* @__PURE__ */ jsxDEV6(Box, {
542
+ role: "alert",
543
+ "data-slot": "field-error",
544
+ className: cn6("text-destructive text-sm font-normal", className),
545
+ ...props,
546
+ children: content
547
+ }, undefined, false, undefined, this);
548
+ }
549
+ export {
550
+ FieldTitle,
551
+ FieldSet,
552
+ FieldSeparator,
553
+ FieldLegend,
554
+ FieldLabel,
555
+ FieldGroup,
556
+ FieldError,
557
+ FieldDescription,
558
+ FieldContent,
559
+ Field
560
+ };