@lssm-tech/lib.ui-kit 4.1.6

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 (342) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +180 -0
  3. package/dist/browser/index.js +1 -0
  4. package/dist/browser/ui/accordion.js +1 -0
  5. package/dist/browser/ui/alert-dialog.js +1 -0
  6. package/dist/browser/ui/alert.js +1 -0
  7. package/dist/browser/ui/aspect-ratio.js +1 -0
  8. package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +1 -0
  9. package/dist/browser/ui/atoms/FilterSelect/index.js +1 -0
  10. package/dist/browser/ui/atoms/FilterSelect/types.js +0 -0
  11. package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -0
  12. package/dist/browser/ui/atoms/LoadingSpinner/index.js +1 -0
  13. package/dist/browser/ui/atoms/Pagination/Pagination.js +1 -0
  14. package/dist/browser/ui/atoms/Pagination/index.js +1 -0
  15. package/dist/browser/ui/atoms/Pagination/types.js +0 -0
  16. package/dist/browser/ui/atoms/SearchInput/SearchInput.js +1 -0
  17. package/dist/browser/ui/atoms/SearchInput/index.js +1 -0
  18. package/dist/browser/ui/atoms/SearchInput/types.js +0 -0
  19. package/dist/browser/ui/avatar.js +1 -0
  20. package/dist/browser/ui/badge.js +1 -0
  21. package/dist/browser/ui/breadcrumb.js +1 -0
  22. package/dist/browser/ui/button.js +1 -0
  23. package/dist/browser/ui/card.js +1 -0
  24. package/dist/browser/ui/carousel.js +1 -0
  25. package/dist/browser/ui/checkbox.js +1 -0
  26. package/dist/browser/ui/collapsible.js +1 -0
  27. package/dist/browser/ui/combobox.js +1 -0
  28. package/dist/browser/ui/command.js +1 -0
  29. package/dist/browser/ui/context-menu.js +1 -0
  30. package/dist/browser/ui/contracts.typecheck.js +0 -0
  31. package/dist/browser/ui/data-table.js +1 -0
  32. package/dist/browser/ui/date-picker.js +1 -0
  33. package/dist/browser/ui/date-range-picker.js +1 -0
  34. package/dist/browser/ui/datetime-picker.js +1 -0
  35. package/dist/browser/ui/dialog.js +1 -0
  36. package/dist/browser/ui/dropdown-menu.js +1 -0
  37. package/dist/browser/ui/empty-state.js +1 -0
  38. package/dist/browser/ui/empty.js +1 -0
  39. package/dist/browser/ui/fab.js +1 -0
  40. package/dist/browser/ui/field.js +1 -0
  41. package/dist/browser/ui/form.js +1 -0
  42. package/dist/browser/ui/hover-card.js +1 -0
  43. package/dist/browser/ui/icons/Check.js +1 -0
  44. package/dist/browser/ui/icons/ChevronDown.js +1 -0
  45. package/dist/browser/ui/icons/ChevronRight.js +1 -0
  46. package/dist/browser/ui/icons/ChevronUp.js +1 -0
  47. package/dist/browser/ui/icons/CircleUser.js +1 -0
  48. package/dist/browser/ui/icons/Info.js +1 -0
  49. package/dist/browser/ui/icons/Key.js +1 -0
  50. package/dist/browser/ui/icons/MoonStar.js +1 -0
  51. package/dist/browser/ui/icons/Sun.js +1 -0
  52. package/dist/browser/ui/icons/X.js +1 -0
  53. package/dist/browser/ui/icons/iconWithClassName.js +1 -0
  54. package/dist/browser/ui/input-group.js +1 -0
  55. package/dist/browser/ui/input-otp.js +1 -0
  56. package/dist/browser/ui/input-password.js +1 -0
  57. package/dist/browser/ui/input.js +1 -0
  58. package/dist/browser/ui/label.js +1 -0
  59. package/dist/browser/ui/link.js +1 -0
  60. package/dist/browser/ui/list.js +1 -0
  61. package/dist/browser/ui/loading-button.js +1 -0
  62. package/dist/browser/ui/loading-overlay.js +1 -0
  63. package/dist/browser/ui/loading-screen.js +1 -0
  64. package/dist/browser/ui/marketing/FeatureGrid.js +1 -0
  65. package/dist/browser/ui/marketing/Hero.js +1 -0
  66. package/dist/browser/ui/marketing/PricingTable.js +1 -0
  67. package/dist/browser/ui/marketing/index.js +1 -0
  68. package/dist/browser/ui/menubar.js +1 -0
  69. package/dist/browser/ui/molecules/Autocomplete/index.js +1 -0
  70. package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +1 -0
  71. package/dist/browser/ui/molecules/SearchAndFilter/index.js +1 -0
  72. package/dist/browser/ui/molecules/SearchAndFilter/types.js +0 -0
  73. package/dist/browser/ui/molecules/SkeletonList.js +1 -0
  74. package/dist/browser/ui/native-select.js +1 -0
  75. package/dist/browser/ui/nativewind-env.d.js +0 -0
  76. package/dist/browser/ui/navigation-menu.js +1 -0
  77. package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +1 -0
  78. package/dist/browser/ui/organisms/ErrorBoundary/index.js +1 -0
  79. package/dist/browser/ui/organisms/ListPage/ListPage.js +1 -0
  80. package/dist/browser/ui/organisms/ListPage/index.js +1 -0
  81. package/dist/browser/ui/organisms/ListPage/types.js +0 -0
  82. package/dist/browser/ui/page-header.js +1 -0
  83. package/dist/browser/ui/password-strength.js +1 -0
  84. package/dist/browser/ui/popover.js +1 -0
  85. package/dist/browser/ui/portal.js +1 -0
  86. package/dist/browser/ui/progress.js +1 -0
  87. package/dist/browser/ui/radio-group.js +1 -0
  88. package/dist/browser/ui/select.js +1 -0
  89. package/dist/browser/ui/separator.js +1 -0
  90. package/dist/browser/ui/sheet.js +1 -0
  91. package/dist/browser/ui/sidebar.js +1 -0
  92. package/dist/browser/ui/skeleton.js +1 -0
  93. package/dist/browser/ui/slider.js +1 -0
  94. package/dist/browser/ui/stack.js +1 -0
  95. package/dist/browser/ui/stepper.js +1 -0
  96. package/dist/browser/ui/switch.js +1 -0
  97. package/dist/browser/ui/table.js +1 -0
  98. package/dist/browser/ui/tabs.js +1 -0
  99. package/dist/browser/ui/text.js +1 -0
  100. package/dist/browser/ui/textarea.js +1 -0
  101. package/dist/browser/ui/time-picker.js +1 -0
  102. package/dist/browser/ui/toast.js +1 -0
  103. package/dist/browser/ui/toggle-group.js +1 -0
  104. package/dist/browser/ui/toggle.js +1 -0
  105. package/dist/browser/ui/toolbar.js +1 -0
  106. package/dist/browser/ui/tooltip.js +1 -0
  107. package/dist/browser/ui/typography.js +1 -0
  108. package/dist/browser/ui/useColorScheme.js +1 -0
  109. package/dist/browser/ui/useListState.js +1 -0
  110. package/dist/browser/ui/usecases/UseCaseCard.js +1 -0
  111. package/dist/browser/ui/usecases/UserStoryCard.js +1 -0
  112. package/dist/browser/ui/usecases/index.js +1 -0
  113. package/dist/browser/ui/utils.js +1 -0
  114. package/dist/browser/ui/visualization/Visualization.js +1 -0
  115. package/dist/browser/ui/visualization/index.js +1 -0
  116. package/dist/index.d.ts +2 -0
  117. package/dist/index.js +2 -0
  118. package/dist/ui/accordion.d.ts +16 -0
  119. package/dist/ui/accordion.js +2 -0
  120. package/dist/ui/alert-dialog.d.ts +46 -0
  121. package/dist/ui/alert-dialog.js +2 -0
  122. package/dist/ui/alert.d.ts +17 -0
  123. package/dist/ui/alert.js +2 -0
  124. package/dist/ui/aspect-ratio.d.ts +8 -0
  125. package/dist/ui/aspect-ratio.js +2 -0
  126. package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +3 -0
  127. package/dist/ui/atoms/FilterSelect/FilterSelect.js +2 -0
  128. package/dist/ui/atoms/FilterSelect/index.d.ts +2 -0
  129. package/dist/ui/atoms/FilterSelect/index.js +2 -0
  130. package/dist/ui/atoms/FilterSelect/types.d.ts +5 -0
  131. package/dist/ui/atoms/FilterSelect/types.js +1 -0
  132. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +19 -0
  133. package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +2 -0
  134. package/dist/ui/atoms/LoadingSpinner/index.d.ts +1 -0
  135. package/dist/ui/atoms/LoadingSpinner/index.js +2 -0
  136. package/dist/ui/atoms/Pagination/Pagination.d.ts +3 -0
  137. package/dist/ui/atoms/Pagination/Pagination.js +2 -0
  138. package/dist/ui/atoms/Pagination/index.d.ts +2 -0
  139. package/dist/ui/atoms/Pagination/index.js +2 -0
  140. package/dist/ui/atoms/Pagination/types.d.ts +3 -0
  141. package/dist/ui/atoms/Pagination/types.js +1 -0
  142. package/dist/ui/atoms/SearchInput/SearchInput.d.ts +3 -0
  143. package/dist/ui/atoms/SearchInput/SearchInput.js +2 -0
  144. package/dist/ui/atoms/SearchInput/index.d.ts +2 -0
  145. package/dist/ui/atoms/SearchInput/index.js +2 -0
  146. package/dist/ui/atoms/SearchInput/types.d.ts +3 -0
  147. package/dist/ui/atoms/SearchInput/types.js +1 -0
  148. package/dist/ui/avatar.d.ts +13 -0
  149. package/dist/ui/avatar.js +2 -0
  150. package/dist/ui/badge.d.ts +11 -0
  151. package/dist/ui/badge.js +2 -0
  152. package/dist/ui/breadcrumb.d.ts +12 -0
  153. package/dist/ui/breadcrumb.js +2 -0
  154. package/dist/ui/button.d.ts +16 -0
  155. package/dist/ui/button.js +2 -0
  156. package/dist/ui/card.d.ts +22 -0
  157. package/dist/ui/card.js +2 -0
  158. package/dist/ui/carousel.d.ts +1 -0
  159. package/dist/ui/carousel.js +2 -0
  160. package/dist/ui/checkbox.d.ts +12 -0
  161. package/dist/ui/checkbox.js +2 -0
  162. package/dist/ui/collapsible.d.ts +27 -0
  163. package/dist/ui/collapsible.js +2 -0
  164. package/dist/ui/combobox.d.ts +17 -0
  165. package/dist/ui/combobox.js +2 -0
  166. package/dist/ui/command.d.ts +1 -0
  167. package/dist/ui/command.js +2 -0
  168. package/dist/ui/context-menu.d.ts +83 -0
  169. package/dist/ui/context-menu.js +2 -0
  170. package/dist/ui/contracts.typecheck.d.ts +1 -0
  171. package/dist/ui/contracts.typecheck.js +1 -0
  172. package/dist/ui/data-table.d.ts +8 -0
  173. package/dist/ui/data-table.js +2 -0
  174. package/dist/ui/data-table.smoke.test.d.ts +1 -0
  175. package/dist/ui/date-picker.d.ts +4 -0
  176. package/dist/ui/date-picker.js +2 -0
  177. package/dist/ui/date-range-picker.d.ts +6 -0
  178. package/dist/ui/date-range-picker.js +2 -0
  179. package/dist/ui/datetime-picker.d.ts +6 -0
  180. package/dist/ui/datetime-picker.js +2 -0
  181. package/dist/ui/dialog.d.ts +51 -0
  182. package/dist/ui/dialog.js +2 -0
  183. package/dist/ui/dropdown-menu.d.ts +84 -0
  184. package/dist/ui/dropdown-menu.js +2 -0
  185. package/dist/ui/empty-state.d.ts +9 -0
  186. package/dist/ui/empty-state.js +2 -0
  187. package/dist/ui/empty.d.ts +12 -0
  188. package/dist/ui/empty.js +2 -0
  189. package/dist/ui/fab.d.ts +21 -0
  190. package/dist/ui/fab.js +2 -0
  191. package/dist/ui/field.d.ts +21 -0
  192. package/dist/ui/field.js +2 -0
  193. package/dist/ui/form.d.ts +29 -0
  194. package/dist/ui/form.js +2 -0
  195. package/dist/ui/hover-card.d.ts +25 -0
  196. package/dist/ui/hover-card.js +2 -0
  197. package/dist/ui/icons/Check.d.ts +2 -0
  198. package/dist/ui/icons/Check.js +2 -0
  199. package/dist/ui/icons/ChevronDown.d.ts +2 -0
  200. package/dist/ui/icons/ChevronDown.js +2 -0
  201. package/dist/ui/icons/ChevronRight.d.ts +2 -0
  202. package/dist/ui/icons/ChevronRight.js +2 -0
  203. package/dist/ui/icons/ChevronUp.d.ts +2 -0
  204. package/dist/ui/icons/ChevronUp.js +2 -0
  205. package/dist/ui/icons/CircleUser.d.ts +2 -0
  206. package/dist/ui/icons/CircleUser.js +2 -0
  207. package/dist/ui/icons/Info.d.ts +2 -0
  208. package/dist/ui/icons/Info.js +2 -0
  209. package/dist/ui/icons/Key.d.ts +2 -0
  210. package/dist/ui/icons/Key.js +2 -0
  211. package/dist/ui/icons/MoonStar.d.ts +2 -0
  212. package/dist/ui/icons/MoonStar.js +2 -0
  213. package/dist/ui/icons/Sun.d.ts +2 -0
  214. package/dist/ui/icons/Sun.js +2 -0
  215. package/dist/ui/icons/X.d.ts +2 -0
  216. package/dist/ui/icons/X.js +2 -0
  217. package/dist/ui/icons/iconWithClassName.d.ts +2 -0
  218. package/dist/ui/icons/iconWithClassName.js +2 -0
  219. package/dist/ui/input-group.d.ts +36 -0
  220. package/dist/ui/input-group.js +2 -0
  221. package/dist/ui/input-otp.d.ts +20 -0
  222. package/dist/ui/input-otp.js +2 -0
  223. package/dist/ui/input-password.d.ts +10 -0
  224. package/dist/ui/input-password.js +2 -0
  225. package/dist/ui/input.d.ts +8 -0
  226. package/dist/ui/input.js +2 -0
  227. package/dist/ui/label.d.ts +3 -0
  228. package/dist/ui/label.js +2 -0
  229. package/dist/ui/link.d.ts +6 -0
  230. package/dist/ui/link.js +2 -0
  231. package/dist/ui/list.d.ts +23 -0
  232. package/dist/ui/list.js +2 -0
  233. package/dist/ui/loading-button.d.ts +9 -0
  234. package/dist/ui/loading-button.js +2 -0
  235. package/dist/ui/loading-overlay.d.ts +7 -0
  236. package/dist/ui/loading-overlay.js +2 -0
  237. package/dist/ui/loading-screen.d.ts +6 -0
  238. package/dist/ui/loading-screen.js +2 -0
  239. package/dist/ui/marketing/FeatureGrid.d.ts +4 -0
  240. package/dist/ui/marketing/FeatureGrid.js +2 -0
  241. package/dist/ui/marketing/Hero.d.ts +16 -0
  242. package/dist/ui/marketing/Hero.js +2 -0
  243. package/dist/ui/marketing/PricingTable.d.ts +4 -0
  244. package/dist/ui/marketing/PricingTable.js +2 -0
  245. package/dist/ui/marketing/index.d.ts +3 -0
  246. package/dist/ui/marketing/index.js +2 -0
  247. package/dist/ui/menubar.d.ts +80 -0
  248. package/dist/ui/menubar.js +2 -0
  249. package/dist/ui/molecules/Autocomplete/index.d.ts +1 -0
  250. package/dist/ui/molecules/Autocomplete/index.js +2 -0
  251. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +3 -0
  252. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +2 -0
  253. package/dist/ui/molecules/SearchAndFilter/index.d.ts +2 -0
  254. package/dist/ui/molecules/SearchAndFilter/index.js +2 -0
  255. package/dist/ui/molecules/SearchAndFilter/types.d.ts +4 -0
  256. package/dist/ui/molecules/SearchAndFilter/types.js +1 -0
  257. package/dist/ui/molecules/SkeletonList.d.ts +7 -0
  258. package/dist/ui/molecules/SkeletonList.js +2 -0
  259. package/dist/ui/native-select.d.ts +29 -0
  260. package/dist/ui/native-select.js +2 -0
  261. package/dist/ui/nativewind-env.d.js +1 -0
  262. package/dist/ui/navigation-menu.d.ts +44 -0
  263. package/dist/ui/navigation-menu.js +2 -0
  264. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +25 -0
  265. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +2 -0
  266. package/dist/ui/organisms/ErrorBoundary/index.d.ts +2 -0
  267. package/dist/ui/organisms/ErrorBoundary/index.js +2 -0
  268. package/dist/ui/organisms/ListPage/ListPage.d.ts +2 -0
  269. package/dist/ui/organisms/ListPage/ListPage.js +2 -0
  270. package/dist/ui/organisms/ListPage/index.d.ts +2 -0
  271. package/dist/ui/organisms/ListPage/index.js +2 -0
  272. package/dist/ui/organisms/ListPage/types.d.ts +44 -0
  273. package/dist/ui/organisms/ListPage/types.js +1 -0
  274. package/dist/ui/page-header.d.ts +9 -0
  275. package/dist/ui/page-header.js +2 -0
  276. package/dist/ui/password-strength.d.ts +13 -0
  277. package/dist/ui/password-strength.js +2 -0
  278. package/dist/ui/popover.d.ts +23 -0
  279. package/dist/ui/popover.js +2 -0
  280. package/dist/ui/portal.d.ts +1 -0
  281. package/dist/ui/portal.js +2 -0
  282. package/dist/ui/progress.d.ts +7 -0
  283. package/dist/ui/progress.js +2 -0
  284. package/dist/ui/radio-group.d.ts +4 -0
  285. package/dist/ui/radio-group.js +2 -0
  286. package/dist/ui/select.d.ts +60 -0
  287. package/dist/ui/select.js +2 -0
  288. package/dist/ui/separator.d.ts +6 -0
  289. package/dist/ui/separator.js +2 -0
  290. package/dist/ui/sheet.d.ts +1 -0
  291. package/dist/ui/sheet.js +2 -0
  292. package/dist/ui/sidebar.d.ts +1 -0
  293. package/dist/ui/sidebar.js +2 -0
  294. package/dist/ui/skeleton.d.ts +4 -0
  295. package/dist/ui/skeleton.js +2 -0
  296. package/dist/ui/slider.d.ts +7 -0
  297. package/dist/ui/slider.js +2 -0
  298. package/dist/ui/stack.d.ts +43 -0
  299. package/dist/ui/stack.js +2 -0
  300. package/dist/ui/stepper.d.ts +10 -0
  301. package/dist/ui/stepper.js +2 -0
  302. package/dist/ui/switch.d.ts +7 -0
  303. package/dist/ui/switch.js +2 -0
  304. package/dist/ui/table.d.ts +24 -0
  305. package/dist/ui/table.js +2 -0
  306. package/dist/ui/tabs.d.ts +6 -0
  307. package/dist/ui/tabs.js +2 -0
  308. package/dist/ui/text.d.ts +12 -0
  309. package/dist/ui/text.js +2 -0
  310. package/dist/ui/textarea.d.ts +8 -0
  311. package/dist/ui/textarea.js +2 -0
  312. package/dist/ui/time-picker.d.ts +4 -0
  313. package/dist/ui/time-picker.js +2 -0
  314. package/dist/ui/toast.d.ts +40 -0
  315. package/dist/ui/toast.js +2 -0
  316. package/dist/ui/toggle-group.d.ts +15 -0
  317. package/dist/ui/toggle-group.js +2 -0
  318. package/dist/ui/toggle.d.ts +19 -0
  319. package/dist/ui/toggle.js +2 -0
  320. package/dist/ui/toolbar.d.ts +25 -0
  321. package/dist/ui/toolbar.js +2 -0
  322. package/dist/ui/tooltip.d.ts +27 -0
  323. package/dist/ui/tooltip.js +2 -0
  324. package/dist/ui/typography.d.ts +16 -0
  325. package/dist/ui/typography.js +2 -0
  326. package/dist/ui/useColorScheme.d.ts +6 -0
  327. package/dist/ui/useColorScheme.js +2 -0
  328. package/dist/ui/useListState.d.ts +6 -0
  329. package/dist/ui/useListState.js +2 -0
  330. package/dist/ui/usecases/UseCaseCard.d.ts +7 -0
  331. package/dist/ui/usecases/UseCaseCard.js +2 -0
  332. package/dist/ui/usecases/UserStoryCard.d.ts +5 -0
  333. package/dist/ui/usecases/UserStoryCard.js +2 -0
  334. package/dist/ui/usecases/index.d.ts +2 -0
  335. package/dist/ui/usecases/index.js +2 -0
  336. package/dist/ui/utils.d.ts +2 -0
  337. package/dist/ui/utils.js +2 -0
  338. package/dist/ui/visualization/Visualization.d.ts +7 -0
  339. package/dist/ui/visualization/Visualization.js +2 -0
  340. package/dist/ui/visualization/index.d.ts +1 -0
  341. package/dist/ui/visualization/index.js +2 -0
  342. package/package.json +1776 -0
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ interface LoadingSpinnerProps {
3
+ size?: 'sm' | 'md' | 'lg' | 'xl';
4
+ className?: string;
5
+ text?: string;
6
+ fullScreen?: boolean;
7
+ }
8
+ export declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
9
+ export declare const SkeletonLine: React.FC<{
10
+ className?: string;
11
+ }>;
12
+ export declare const SkeletonCard: React.FC<{
13
+ className?: string;
14
+ }>;
15
+ export declare const SkeletonTable: React.FC<{
16
+ rows?: number;
17
+ cols?: number;
18
+ }>;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as R}from"@contractspec/lib.ui-kit-core/utils";import*as _ from"@rn-primitives/slot";import*as Y from"react";import{Text as U}from"react-native";import{jsx as f}from"react/jsx-runtime";var X=Y.createContext(void 0);function F({className:q,asChild:A=!1,...D}){let E=Y.useContext(X);return f(A?_.Text:U,{className:R("web:select-text text-base text-foreground",E,q),...D})}import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as G from"@rn-primitives/slot";import{Platform as $}from"react-native";import{jsx as J}from"react/jsx-runtime";function u({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{role:"heading","aria-level":"1",className:I("web:select-text web:scroll-m-20 font-extrabold text-4xl text-foreground tracking-tight lg:text-5xl",q),...D})}function T({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{role:"heading","aria-level":"2",className:I("web:select-text web:scroll-m-20 border-border border-b pb-2 font-semibold text-3xl text-foreground tracking-tight first:mt-0",q),...D})}function h({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{role:"heading","aria-level":"3",className:I("web:select-text web:scroll-m-20 font-semibold text-2xl text-foreground tracking-tight",q),...D})}function j({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{role:"heading","aria-level":"4",className:I("web:select-text web:scroll-m-20 font-semibold text-foreground text-xl tracking-tight",q),...D})}function y({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{className:I("web:select-text text-base text-foreground",q),...D})}function C({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{role:$.OS==="web"?"blockquote":void 0,className:I("mt-6 native:mt-4 web:select-text border-border border-l-2 native:pl-3 pl-6 text-base text-foreground italic",q),...D})}function d({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{role:$.OS==="web"?"code":void 0,className:I("relative web:select-text rounded-md bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-foreground text-sm",q),...D})}function N({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{className:I("web:select-text text-muted-foreground text-xl",q),...D})}function m({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{className:I("web:select-text font-semibold text-foreground text-xl",q),...D})}function n({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{className:I("web:select-text font-medium text-foreground text-sm leading-none",q),...D})}function o({className:q,asChild:A=!1,...D}){return J(A?G.Text:F,{className:I("web:select-text text-muted-foreground text-sm",q),...D})}import{clsx as g}from"clsx";import{twMerge as b}from"tailwind-merge";function O(...q){return b(g(q))}import{Loader2 as z}from"lucide-react";import{View as M}from"react-native";import{jsx as K,jsxs as B}from"react/jsx-runtime";var H={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8",xl:"h-12 w-12"},s=({size:q="md",className:A,text:D,fullScreen:E=!1})=>{let W=B(M,{className:O("flex flex-col items-center justify-center gap-2",A),children:[K(z,{className:O("animate-spin text-primary-600",H[q])}),D&&K(y,{className:"animate-pulse text-base text-gray-600",children:D})]});if(E)return K(M,{className:"fixed inset-0 z-50 flex items-center justify-center bg-white/80 backdrop-blur-xs",children:W});return W},Z=({className:q})=>K(M,{className:O("h-4 animate-pulse rounded-xs bg-gray-200",q)}),qq=({className:q})=>B(M,{className:O("animate-pulse space-y-3 rounded-lg bg-gray-200 p-4",q),children:[K(Z,{className:"h-6 w-3/4"}),K(Z,{className:"h-4 w-full"}),K(Z,{className:"h-4 w-2/3"})]}),Aq=({rows:q=5,cols:A=4})=>K(M,{className:"space-y-3",children:Array.from({length:q}).map((D,E)=>K(M,{className:"flex space-x-4",children:Array.from({length:A}).map((W,Q)=>K(Z,{className:"flex-1"},Q))},E))});export{Aq as SkeletonTable,Z as SkeletonLine,qq as SkeletonCard,s as LoadingSpinner};
@@ -0,0 +1 @@
1
+ export { LoadingSpinner, SkeletonCard, SkeletonLine, SkeletonTable, } from './LoadingSpinner';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ export{t as SkeletonTable,r as SkeletonLine,l as SkeletonCard,o as LoadingSpinner};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { PaginationProps } from './types';
3
+ export declare const Pagination: React.FC<PaginationProps>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{styled as a}from"nativewind";function W(m){a(m,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as H}from"lucide-react-native";W(H);import{cn as p}from"@contractspec/lib.ui-kit-core/utils";import*as D from"@rn-primitives/slot";import*as $ from"react";import{Text as j}from"react-native";import{jsx as s}from"react/jsx-runtime";var G=$.createContext(void 0);function L({className:m,asChild:e=!1,...r}){let u=$.useContext(G);return s(e?D.Text:j,{className:p("web:select-text text-base text-foreground",u,m),...r})}import{cn as ee}from"@contractspec/lib.ui-kit-core/utils";import{cva as v}from"class-variance-authority";import{Pressable as me}from"react-native";import{jsx as o}from"react/jsx-runtime";var fe=v("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",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),re=v("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function k({ref:m,className:e,variant:r,size:u,...i}){return o(G.Provider,{value:re({variant:r,size:u,className:"web:pointer-events-none"}),children:o(me,{className:ee(i.disabled&&"web:pointer-events-none opacity-50",fe({variant:r,size:u,className:e})),ref:m,role:"button",...i})})}import{Check as _}from"lucide-react-native";W(_);import{ChevronUp as n}from"lucide-react-native";W(n);import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/select";import{Platform as q,StyleSheet as ue,View as be}from"react-native";import ie,{FadeIn as ye,FadeOut as de}from"react-native-reanimated";import{jsx as y,jsxs as B}from"react/jsx-runtime";var U=f.Root,Pe=f.Group,S=f.Value;function V({ref:m,className:e,children:r,...u}){return B(f.Trigger,{ref:m,className:I("flex h-10 native:h-12 flex-row items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-muted-foreground text-sm web:ring-offset-background web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 [&>span]:line-clamp-1",u.disabled&&"web:cursor-not-allowed opacity-50",e),...u,children:[r,y(H,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function he({className:m,...e}){if(q.OS!=="web")return null;return y(f.ScrollUpButton,{className:I("flex web:cursor-default items-center justify-center py-1",m),...e,children:y(n,{size:14,className:"text-foreground"})})}function le({className:m,...e}){if(q.OS!=="web")return null;return y(f.ScrollDownButton,{className:I("flex web:cursor-default items-center justify-center py-1",m),...e,children:y(H,{size:14,className:"text-foreground"})})}function w({className:m,children:e,position:r="popper",portalHost:u,...i}){let{open:h}=f.useRootContext();return y(f.Portal,{hostName:u,children:y(f.Overlay,{style:q.OS!=="web"?ue.absoluteFill:void 0,children:y(ie.View,{className:"z-50",entering:ye,exiting:de,children:B(f.Content,{className:I("data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 rounded-md border border-border bg-popover px-1 py-2 shadow-foreground/10 shadow-md",r==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",h?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",m),position:r,...i,children:[y(he,{}),y(f.Viewport,{className:I("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:e}),y(le,{})]})})})})}function ge({className:m,...e}){return y(f.Label,{className:I("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",m),...e})}function C({className:m,children:e,...r}){return B(f.Item,{className:I("web:group relative flex w-full web:cursor-default web:select-none flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 native:pl-10 pl-8 web:outline-hidden web:hover:bg-accent/50 web:focus:bg-accent active:bg-accent",r.disabled&&"web:pointer-events-none opacity-50",m),...r,children:[y(be,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:y(f.ItemIndicator,{children:y(_,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),y(f.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function ce({className:m,...e}){return y(f.Separator,{className:I("-mx-1 my-1 h-px bg-muted",m),...e})}import{cn as E}from"@contractspec/lib.ui-kit-core/utils";import{cva as J}from"class-variance-authority";import{View as K}from"react-native";import{jsx as Y}from"react/jsx-runtime";var Q="flex",Le=J([Q,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),Me=J([Q,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),Ne=J([Q,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function em({className:m,spacing:e,align:r,justify:u,width:i,padding:h,gap:l,wrap:T,...A}){return Y(K,{className:E(Ne({spacing:e,align:r,justify:u,width:i,padding:h,gap:l,wrap:T}),m),...A})}function R({className:m,spacing:e,align:r,justify:u,width:i,padding:h,gap:l,wrap:T,...A}){return Y(K,{className:E(Me({spacing:e,align:r,justify:u,width:i,padding:h,gap:l,wrap:T}),m),...A})}function X({className:m,spacing:e,align:r,justify:u,width:i,padding:h,gap:l,...T}){return Y(K,{className:E(Le({spacing:e,align:r,justify:u,width:i,padding:h,gap:l}),m),...T})}import{ChevronLeft as Ie,ChevronRight as Te,ChevronsLeft as We,ChevronsRight as ke}from"lucide-react-native";import{jsx as b,jsxs as M}from"react/jsx-runtime";function Ae(m,e){if(e<=7)return Array.from({length:e},(r,u)=>u+1);if(m<=3)return[1,2,3,4,5,"end-ellipsis",e];if(m>=e-2)return[1,"start-ellipsis",e-4,e-3,e-2,e-1,e];return[1,"start-ellipsis",m-1,m,m+1,"end-ellipsis",e]}var dm=({currentPage:m,totalPages:e,totalItems:r,itemsPerPage:u,onPageChange:i,onItemsPerPageChange:h,disabled:l=!1,className:T="",showItemsPerPage:A=!0,itemsPerPageOptions:P=[10,25,50,100]})=>{if(e<=0)return null;let z=Math.max(0,r),Z=Math.max(1,u),N=Math.min(Math.max(m,1),e),g=z===0?0:(N-1)*Z+1,c=z===0?0:Math.min(N*Z,z),F=N>1&&!l,O=N<e&&!l,x=Ae(N,e);return M(X,{align:"center",gap:"md",justify:"between",className:`sm:flex-row ${T}`,children:[b(X,{className:"order-2 text-base text-muted-foreground sm:order-1",children:M(L,{children:["Affichage de ",g," \xE0 ",c," sur ",z," r\xE9sultats"]})}),M(R,{align:"center",gap:"sm",className:"order-1 sm:order-2",children:[M(k,{variant:"outline",size:"sm",onPress:()=>i(1),disabled:!F,accessibilityLabel:"Premi\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[b(We,{className:"h-4 w-4"}),b(L,{className:"sr-only",children:"Premi\xE8re page"})]}),M(k,{variant:"outline",size:"sm",onPress:()=>i(N-1),disabled:!F,accessibilityLabel:"Page pr\xE9c\xE9dente",className:"h-8 w-8 p-0",children:[b(Ie,{className:"h-4 w-4"}),b(L,{className:"sr-only",children:"Page pr\xE9c\xE9dente"})]}),b(R,{align:"center",gap:"xs",children:x.map((d)=>{if(typeof d!=="number")return b(R,{className:"px-2 py-1 text-muted-foreground",children:b(L,{children:"..."})},d);return b(k,{variant:d===N?"default":"outline",size:"sm",onPress:()=>i(d),disabled:l,accessibilityLabel:`Page ${d}`,className:"h-8 min-w-8 px-2",children:b(L,{children:d})},d)})}),M(k,{variant:"outline",size:"sm",onPress:()=>i(N+1),disabled:!O,accessibilityLabel:"Page suivante",className:"h-8 w-8 p-0",children:[b(Te,{className:"h-4 w-4"}),b(L,{className:"sr-only",children:"Page suivante"})]}),M(k,{variant:"outline",size:"sm",onPress:()=>i(e),disabled:!O,accessibilityLabel:"Derni\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[b(ke,{className:"h-4 w-4"}),b(L,{className:"sr-only",children:"Derni\xE8re page"})]})]}),A&&h&&M(R,{align:"center",gap:"sm",className:"order-3 text-base",children:[b(L,{className:"text-muted-foreground",children:"Afficher:"}),M(U,{value:{value:u.toString(),label:u.toString()},onValueChange:(d)=>{let t=parseInt(d?.value??"",10);if(!Number.isNaN(t)&&t>0)h(t)},disabled:l,children:[b(V,{className:"h-8 w-16",children:b(S,{placeholder:"Afficher:"})}),b(w,{className:"bg-background",children:P.map((d)=>b(C,{value:d.toString(),label:d.toString(),children:d},d))})]})]})]})};export{dm as Pagination};
@@ -0,0 +1,2 @@
1
+ export { Pagination } from './Pagination';
2
+ export type { PaginationProps } from './types';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{styled as a}from"nativewind";function o(m){a(m,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as A}from"lucide-react-native";o(A);import{cn as p}from"@contractspec/lib.ui-kit-core/utils";import*as O from"@rn-primitives/slot";import*as R from"react";import{Text as j}from"react-native";import{jsx as s}from"react/jsx-runtime";var H=R.createContext(void 0);function L({className:m,asChild:e=!1,...r}){let i=R.useContext(H);return s(e?O.Text:j,{className:p("web:select-text text-base text-foreground",i,m),...r})}import{cn as ee}from"@contractspec/lib.ui-kit-core/utils";import{cva as v}from"class-variance-authority";import{Pressable as me}from"react-native";import{jsx as D}from"react/jsx-runtime";var fe=v("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",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),re=v("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function I({ref:m,className:e,variant:r,size:i,...b}){return D(H.Provider,{value:re({variant:r,size:i,className:"web:pointer-events-none"}),children:D(me,{className:ee(b.disabled&&"web:pointer-events-none opacity-50",fe({variant:r,size:i,className:e})),ref:m,role:"button",...b})})}import{Check as $}from"lucide-react-native";o($);import{ChevronUp as G}from"lucide-react-native";o(G);import{cn as N}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/select";import{Platform as _,StyleSheet as ie,View as ue}from"react-native";import be,{FadeIn as ye,FadeOut as de}from"react-native-reanimated";import{jsx as y,jsxs as q}from"react/jsx-runtime";var P=f.Root,ge=f.Group,U=f.Value;function S({ref:m,className:e,children:r,...i}){return q(f.Trigger,{ref:m,className:N("flex h-10 native:h-12 flex-row items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-muted-foreground text-sm web:ring-offset-background web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 [&>span]:line-clamp-1",i.disabled&&"web:cursor-not-allowed opacity-50",e),...i,children:[r,y(A,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function he({className:m,...e}){if(_.OS!=="web")return null;return y(f.ScrollUpButton,{className:N("flex web:cursor-default items-center justify-center py-1",m),...e,children:y(G,{size:14,className:"text-foreground"})})}function le({className:m,...e}){if(_.OS!=="web")return null;return y(f.ScrollDownButton,{className:N("flex web:cursor-default items-center justify-center py-1",m),...e,children:y(A,{size:14,className:"text-foreground"})})}function V({className:m,children:e,position:r="popper",portalHost:i,...b}){let{open:h}=f.useRootContext();return y(f.Portal,{hostName:i,children:y(f.Overlay,{style:_.OS!=="web"?ie.absoluteFill:void 0,children:y(be.View,{className:"z-50",entering:ye,exiting:de,children:q(f.Content,{className:N("data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 rounded-md border border-border bg-popover px-1 py-2 shadow-foreground/10 shadow-md",r==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",h?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",m),position:r,...b,children:[y(he,{}),y(f.Viewport,{className:N("p-1",r==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:e}),y(le,{})]})})})})}function ce({className:m,...e}){return y(f.Label,{className:N("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",m),...e})}function w({className:m,children:e,...r}){return q(f.Item,{className:N("web:group relative flex w-full web:cursor-default web:select-none flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 native:pl-10 pl-8 web:outline-hidden web:hover:bg-accent/50 web:focus:bg-accent active:bg-accent",r.disabled&&"web:pointer-events-none opacity-50",m),...r,children:[y(ue,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:y(f.ItemIndicator,{children:y($,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),y(f.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function xe({className:m,...e}){return y(f.Separator,{className:N("-mx-1 my-1 h-px bg-muted",m),...e})}import{cn as B}from"@contractspec/lib.ui-kit-core/utils";import{cva as E}from"class-variance-authority";import{View as J}from"react-native";import{jsx as X}from"react/jsx-runtime";var K="flex",Le=E([K,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),te=E([K,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),Me=E([K,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function mm({className:m,spacing:e,align:r,justify:i,width:b,padding:h,gap:l,wrap:n,...T}){return X(J,{className:B(Me({spacing:e,align:r,justify:i,width:b,padding:h,gap:l,wrap:n}),m),...T})}function W({className:m,spacing:e,align:r,justify:i,width:b,padding:h,gap:l,wrap:n,...T}){return X(J,{className:B(te({spacing:e,align:r,justify:i,width:b,padding:h,gap:l,wrap:n}),m),...T})}function Q({className:m,spacing:e,align:r,justify:i,width:b,padding:h,gap:l,...n}){return X(J,{className:B(Le({spacing:e,align:r,justify:i,width:b,padding:h,gap:l}),m),...n})}import{ChevronLeft as Ne,ChevronRight as ne,ChevronsLeft as oe,ChevronsRight as Ie}from"lucide-react-native";import{jsx as u,jsxs as t}from"react/jsx-runtime";function Te(m,e){if(e<=7)return Array.from({length:e},(r,i)=>i+1);if(m<=3)return[1,2,3,4,5,"end-ellipsis",e];if(m>=e-2)return[1,"start-ellipsis",e-4,e-3,e-2,e-1,e];return[1,"start-ellipsis",m-1,m,m+1,"end-ellipsis",e]}var We=({currentPage:m,totalPages:e,totalItems:r,itemsPerPage:i,onPageChange:b,onItemsPerPageChange:h,disabled:l=!1,className:n="",showItemsPerPage:T=!0,itemsPerPageOptions:C=[10,25,50,100]})=>{if(e<=0)return null;let k=Math.max(0,r),Y=Math.max(1,i),M=Math.min(Math.max(m,1),e),g=k===0?0:(M-1)*Y+1,c=k===0?0:Math.min(M*Y,k),Z=M>1&&!l,F=M<e&&!l,x=Te(M,e);return t(Q,{align:"center",gap:"md",justify:"between",className:`sm:flex-row ${n}`,children:[u(Q,{className:"order-2 text-base text-muted-foreground sm:order-1",children:t(L,{children:["Affichage de ",g," \xE0 ",c," sur ",k," r\xE9sultats"]})}),t(W,{align:"center",gap:"sm",className:"order-1 sm:order-2",children:[t(I,{variant:"outline",size:"sm",onPress:()=>b(1),disabled:!Z,accessibilityLabel:"Premi\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[u(oe,{className:"h-4 w-4"}),u(L,{className:"sr-only",children:"Premi\xE8re page"})]}),t(I,{variant:"outline",size:"sm",onPress:()=>b(M-1),disabled:!Z,accessibilityLabel:"Page pr\xE9c\xE9dente",className:"h-8 w-8 p-0",children:[u(Ne,{className:"h-4 w-4"}),u(L,{className:"sr-only",children:"Page pr\xE9c\xE9dente"})]}),u(W,{align:"center",gap:"xs",children:x.map((d)=>{if(typeof d!=="number")return u(W,{className:"px-2 py-1 text-muted-foreground",children:u(L,{children:"..."})},d);return u(I,{variant:d===M?"default":"outline",size:"sm",onPress:()=>b(d),disabled:l,accessibilityLabel:`Page ${d}`,className:"h-8 min-w-8 px-2",children:u(L,{children:d})},d)})}),t(I,{variant:"outline",size:"sm",onPress:()=>b(M+1),disabled:!F,accessibilityLabel:"Page suivante",className:"h-8 w-8 p-0",children:[u(ne,{className:"h-4 w-4"}),u(L,{className:"sr-only",children:"Page suivante"})]}),t(I,{variant:"outline",size:"sm",onPress:()=>b(e),disabled:!F,accessibilityLabel:"Derni\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[u(Ie,{className:"h-4 w-4"}),u(L,{className:"sr-only",children:"Derni\xE8re page"})]})]}),T&&h&&t(W,{align:"center",gap:"sm",className:"order-3 text-base",children:[u(L,{className:"text-muted-foreground",children:"Afficher:"}),t(P,{value:{value:i.toString(),label:i.toString()},onValueChange:(d)=>{let z=parseInt(d?.value??"",10);if(!Number.isNaN(z)&&z>0)h(z)},disabled:l,children:[u(S,{className:"h-8 w-16",children:u(U,{placeholder:"Afficher:"})}),u(V,{className:"bg-background",children:C.map((d)=>u(w,{value:d.toString(),label:d.toString(),children:d},d))})]})]})]})};export{We as Pagination};
@@ -0,0 +1,3 @@
1
+ import type { SharedPaginationProps } from '@contractspec/lib.ui-kit-core/interfaces';
2
+ export interface PaginationProps extends SharedPaginationProps {
3
+ }
@@ -0,0 +1 @@
1
+ // @bun
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { SearchInputProps } from './types';
3
+ export declare const SearchInput: React.FC<SearchInputProps>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import*as S from"@rn-primitives/slot";import*as g from"react";import{Text as D}from"react-native";import{jsx as G}from"react/jsx-runtime";var y=g.createContext(void 0);function r({className:f,asChild:m=!1,...e}){let h=g.useContext(y);return G(m?S.Text:D,{className:A("web:select-text text-base text-foreground",h,f),...e})}import{cn as H}from"@contractspec/lib.ui-kit-core/utils";import{cva as I}from"class-variance-authority";import{Pressable as J}from"react-native";import{jsx as E}from"react/jsx-runtime";var K=I("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",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),L=I("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function P({ref:f,className:m,variant:e,size:h,...o}){return E(y.Provider,{value:L({variant:e,size:h,className:"web:pointer-events-none"}),children:E(J,{className:H(o.disabled&&"web:pointer-events-none opacity-50",K({variant:e,size:h,className:m})),ref:f,role:"button",...o})})}import{cn as R}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as M}from"react-native";import{jsx as O}from"react/jsx-runtime";function B({className:f,placeholderClassName:m,...e}){return O(M,{className:R("web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 native:text-lg text-base text-foreground native:leading-tight web:ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 lg:text-sm",e.editable===!1&&"web:cursor-not-allowed opacity-50",f),placeholderClassName:R("text-muted-foreground",m),...e})}import{Search as Q,X as U}from"lucide-react";import{View as d}from"react-native";import{jsx as w,jsxs as F}from"react/jsx-runtime";var j=({value:f,onChange:m,placeholder:e="Rechercher...",onClear:h,disabled:o=!1,className:X=""})=>{let $=()=>{m(""),h?.()};return F(d,{className:`relative w-full ${X}`,children:[w(d,{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:w(Q,{className:"h-4 w-4 text-muted-foreground"})}),w(B,{value:f,onChange:(q)=>m(q.nativeEvent.text),placeholder:e,editable:!o,className:"pr-10 pl-10"}),f&&w(d,{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:F(P,{variant:"ghost",size:"sm",onPress:$,disabled:o,className:"h-6 w-6 p-0 hover:bg-transparent",children:[w(U,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),w(r,{className:"sr-only",children:"Effacer la recherche"})]})})]})};export{j as SearchInput};
@@ -0,0 +1,2 @@
1
+ export { SearchInput } from './SearchInput';
2
+ export type { SearchInputProps } from './types';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as q}from"@contractspec/lib.ui-kit-core/utils";import*as S from"@rn-primitives/slot";import*as w from"react";import{Text as u}from"react-native";import{jsx as A}from"react/jsx-runtime";var y=w.createContext(void 0);function p({className:f,asChild:m=!1,...e}){let o=w.useContext(y);return A(m?S.Text:u,{className:q("web:select-text text-base text-foreground",o,f),...e})}import{cn as D}from"@contractspec/lib.ui-kit-core/utils";import{cva as I}from"class-variance-authority";import{Pressable as G}from"react-native";import{jsx as d}from"react/jsx-runtime";var H=I("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",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),J=I("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function P({ref:f,className:m,variant:e,size:o,...h}){return d(y.Provider,{value:J({variant:e,size:o,className:"web:pointer-events-none"}),children:d(G,{className:D(h.disabled&&"web:pointer-events-none opacity-50",H({variant:e,size:o,className:m})),ref:f,role:"button",...h})})}import{cn as E}from"@contractspec/lib.ui-kit-core/utils";import{TextInput as K}from"react-native";import{jsx as L}from"react/jsx-runtime";function R({className:f,placeholderClassName:m,...e}){return L(K,{className:E("web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 native:text-lg text-base text-foreground native:leading-tight web:ring-offset-background file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 lg:text-sm",e.editable===!1&&"web:cursor-not-allowed opacity-50",f),placeholderClassName:E("text-muted-foreground",m),...e})}import{Search as M,X as O}from"lucide-react";import{View as g}from"react-native";import{jsx as r,jsxs as B}from"react/jsx-runtime";var Q=({value:f,onChange:m,placeholder:e="Rechercher...",onClear:o,disabled:h=!1,className:F=""})=>{let X=()=>{m(""),o?.()};return B(g,{className:`relative w-full ${F}`,children:[r(g,{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:r(M,{className:"h-4 w-4 text-muted-foreground"})}),r(R,{value:f,onChange:($)=>m($.nativeEvent.text),placeholder:e,editable:!h,className:"pr-10 pl-10"}),f&&r(g,{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B(P,{variant:"ghost",size:"sm",onPress:X,disabled:h,className:"h-6 w-6 p-0 hover:bg-transparent",children:[r(O,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),r(p,{className:"sr-only",children:"Effacer la recherche"})]})})]})};export{Q as SearchInput};
@@ -0,0 +1,3 @@
1
+ import type { SharedSearchInputProps } from '@contractspec/lib.ui-kit-core/interfaces';
2
+ export interface SearchInputProps extends SharedSearchInputProps {
3
+ }
@@ -0,0 +1 @@
1
+ // @bun
@@ -0,0 +1,13 @@
1
+ import * as AvatarPrimitive from '@rn-primitives/avatar';
2
+ import * as React from 'react';
3
+ declare function Avatar({ className, ...props }: AvatarPrimitive.RootProps & {
4
+ ref?: React.RefObject<AvatarPrimitive.RootRef>;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ declare function AvatarImage({ className, alt, ...props }: AvatarPrimitive.ImageProps & {
7
+ ref?: React.RefObject<AvatarPrimitive.ImageRef>;
8
+ alt?: string;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ declare function AvatarFallback({ className, ...props }: AvatarPrimitive.FallbackProps & {
11
+ ref?: React.RefObject<AvatarPrimitive.FallbackRef>;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as q}from"@contractspec/lib.ui-kit-core/utils";import*as d from"@rn-primitives/avatar";import{jsx as w}from"react/jsx-runtime";function B({className:f,...h}){return w(d.Root,{className:q("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",f),...h})}function C({className:f,alt:h,...y}){return w(d.Image,{className:q("aspect-square h-full w-full",f),...y})}function D({className:f,...h}){return w(d.Fallback,{className:q("flex h-full w-full items-center justify-center rounded-full bg-muted",f),...h})}export{C as AvatarImage,D as AvatarFallback,B as Avatar};
@@ -0,0 +1,11 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ import { View } from 'react-native';
4
+ declare const badgeVariants: (props?: ({
5
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ type BadgeProps = React.ComponentProps<typeof View> & VariantProps<typeof badgeVariants> & {
8
+ labelClassName?: string;
9
+ };
10
+ declare function Badge({ className, variant, labelClassName, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
11
+ export { Badge, badgeVariants };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import{cva as C}from"class-variance-authority";import{View as D}from"react-native";import{jsx as F}from"react/jsx-runtime";var E=C("web:inline-flex items-center rounded-full border border-border px-2.5 py-0.5 font-semibold text-xs web:transition-colors web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground web:hover:opacity-80 active:opacity-80",secondary:"border-transparent bg-secondary text-secondary-foreground web:hover:opacity-80 active:opacity-80",destructive:"border-transparent bg-destructive text-destructive-foreground web:hover:opacity-80 active:opacity-80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function K({className:f,variant:q,labelClassName:G,...z}){return F(D,{className:A(E({variant:q}),f),...z})}export{E as badgeVariants,K as Badge};
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { View } from 'react-native';
3
+ declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<typeof View>): import("react/jsx-runtime").JSX.Element;
5
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<typeof View>): import("react/jsx-runtime").JSX.Element;
6
+ declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<typeof View> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<typeof View>): import("react/jsx-runtime").JSX.Element;
10
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<typeof View>): import("react/jsx-runtime").JSX.Element;
11
+ declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<typeof View>): import("react/jsx-runtime").JSX.Element;
12
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as D}from"@contractspec/lib.ui-kit-core/utils";import{ChevronRight as G,MoreHorizontal as J}from"lucide-react";import{Text as K,View as A}from"react-native";import{jsx as y,jsxs as O}from"react/jsx-runtime";function X({...f}){return y("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...f})}function Y({className:f,...q}){return y(A,{"data-slot":"breadcrumb-list",className:D("flex flex-wrap items-center gap-1.5 break-words text-muted-foreground text-sm sm:gap-2.5",f),...q})}function Z({className:f,...q}){return y(A,{"data-slot":"breadcrumb-item",className:D("inline-flex items-center gap-1.5",f),...q})}function _({asChild:f,className:q,...F}){return y(A,{"data-slot":"breadcrumb-link",className:D("transition-colors hover:text-foreground",q),...F})}function $({className:f,...q}){return y(A,{"data-slot":"breadcrumb-page",role:"link","aria-disabled":!0,"aria-current":"page",className:D("font-normal text-foreground",f),...q})}function z({children:f,className:q,...F}){return y(A,{role:"presentation","data-slot":"breadcrumb-separator","aria-hidden":!0,className:D("[&>svg]:size-3.5",q),...F,children:f??y(G,{})})}function C({className:f,...q}){return O(A,{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":!0,className:D("flex size-9 items-center justify-center",f),...q,children:[y(J,{className:"size-4"}),y(A,{className:"sr-only",children:y(K,{children:"More"})})]})}export{z as BreadcrumbSeparator,$ as BreadcrumbPage,Y as BreadcrumbList,_ as BreadcrumbLink,Z as BreadcrumbItem,C as BreadcrumbEllipsis,X as Breadcrumb};
@@ -0,0 +1,16 @@
1
+ import type { SharedButtonProps } from '@contractspec/lib.ui-kit-core/interfaces';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
+ import { Pressable } from 'react-native';
5
+ declare const buttonVariants: (props?: ({
6
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
7
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
+ declare const buttonTextVariants: (props?: ({
10
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
11
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ type ButtonProps = SharedButtonProps & React.ComponentProps<typeof Pressable> & VariantProps<typeof buttonVariants>;
14
+ declare function Button({ ref, className, variant, size, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
15
+ export type { ButtonProps };
16
+ export { Button, buttonTextVariants, buttonVariants };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as J}from"@contractspec/lib.ui-kit-core/utils";import*as G from"@rn-primitives/slot";import*as w from"react";import{Text as K}from"react-native";import{jsx as L}from"react/jsx-runtime";var F=w.createContext(void 0);function X({className:A,asChild:D=!1,...g}){let q=w.useContext(F);return L(D?G.Text:K,{className:J("web:select-text text-base text-foreground",q,A),...g})}import{cn as M}from"@contractspec/lib.ui-kit-core/utils";import{cva as I}from"class-variance-authority";import{Pressable as O}from"react-native";import{jsx as H}from"react/jsx-runtime";var Q=I("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",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),S=I("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function P({ref:A,className:D,variant:g,size:q,...E}){return H(F.Provider,{value:S({variant:g,size:q,className:"web:pointer-events-none"}),children:H(O,{className:M(E.disabled&&"web:pointer-events-none opacity-50",Q({variant:g,size:q,className:D})),ref:A,role:"button",...E})})}export{Q as buttonVariants,S as buttonTextVariants,P as Button};
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import type { TextProps, ViewProps } from 'react-native';
3
+ import { Text, View } from 'react-native';
4
+ declare function Card({ className, ...props }: ViewProps & {
5
+ ref?: React.RefObject<View>;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardHeader({ className, ...props }: ViewProps & {
8
+ ref?: React.RefObject<View>;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ declare function CardTitle({ className, ...props }: TextProps & {
11
+ ref?: React.RefObject<Text>;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ declare function CardDescription({ className, ...props }: TextProps & {
14
+ ref?: React.RefObject<Text>;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ declare function CardContent({ className, ...props }: ViewProps & {
17
+ ref?: React.RefObject<View>;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ declare function CardFooter({ className, ...props }: ViewProps & {
20
+ ref?: React.RefObject<View>;
21
+ }): import("react/jsx-runtime").JSX.Element;
22
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as K}from"@contractspec/lib.ui-kit-core/utils";import*as E from"@rn-primitives/slot";import*as z from"react";import{Text as L}from"react-native";import{jsx as M}from"react/jsx-runtime";var B=z.createContext(void 0);function S({className:f,asChild:g=!1,...I}){let J=z.useContext(B);return M(g?E.Text:L,{className:K("web:select-text text-base text-foreground",J,f),...I})}import{cn as y}from"@contractspec/lib.ui-kit-core/utils";import{Text as G,View as A}from"react-native";import{jsx as q}from"react/jsx-runtime";function _({className:f,...g}){return q(A,{className:y("rounded-lg border border-border bg-card shadow-2xs shadow-foreground/10",f),...g})}function $({className:f,...g}){return q(A,{className:y("flex flex-col gap-y-1.5 p-6",f),...g})}function D({className:f,...g}){return q(G,{role:"heading","aria-level":3,className:y("font-semibold text-2xl text-card-foreground leading-none tracking-tight",f),...g})}function F({className:f,...g}){return q(G,{className:y("text-muted-foreground text-sm",f),...g})}function H({className:f,...g}){return q(B.Provider,{value:"text-card-foreground",children:q(A,{className:y("p-6 pt-0",f),...g})})}function R({className:f,...g}){return q(A,{className:y("flex flex-row items-center p-6 pt-0",f),...g})}export{D as CardTitle,$ as CardHeader,R as CardFooter,F as CardDescription,H as CardContent,_ as Card};
@@ -0,0 +1 @@
1
+ export declare const carousel = "null";
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var l="null";export{l as carousel};
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<Omit<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, "ref"> & {
3
+ asChild?: boolean;
4
+ } & {
5
+ onKeyDown?: (ev: React.KeyboardEvent) => void;
6
+ onKeyUp?: (ev: React.KeyboardEvent) => void;
7
+ } & {
8
+ checked: boolean;
9
+ onCheckedChange: (checked: boolean) => void;
10
+ disabled?: boolean;
11
+ } & React.RefAttributes<import("react-native").View>, "ref"> & React.RefAttributes<import("react-native").View>>;
12
+ export { Checkbox };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as w}from"@contractspec/lib.ui-kit-core/utils";import*as g from"@rn-primitives/checkbox";import{Check as D}from"lucide-react-native";import*as y from"react";import{jsx as q}from"react/jsx-runtime";var E=y.forwardRef(({className:z,...A},B)=>q(g.Root,{ref:B,className:w("web:peer h-4 w-4 shrink-0 rounded-xs border border-primary web:ring-offset-background web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",z),...A,children:q(g.Indicator,{className:w("flex items-center justify-center text-current"),children:q(D,{className:"h-4 w-4"})})}));E.displayName=g.Root.displayName;export{E as Checkbox};
@@ -0,0 +1,27 @@
1
+ declare const Collapsible: {
2
+ ({ asChild, disabled, open: openProp, defaultOpen, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
3
+ asChild?: boolean;
4
+ } & {
5
+ open?: boolean;
6
+ defaultOpen?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ disabled?: boolean;
9
+ } & import("react").RefAttributes<import("react-native").View>): React.JSX.Element;
10
+ displayName: string;
11
+ };
12
+ declare const CollapsibleTrigger: {
13
+ ({ asChild, onPress: onPressProp, disabled: disabledProp, ref, ...props }: Omit<import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>, "ref"> & {
14
+ asChild?: boolean;
15
+ } & {
16
+ onKeyDown?: (ev: React.KeyboardEvent) => void;
17
+ onKeyUp?: (ev: React.KeyboardEvent) => void;
18
+ } & import("react").RefAttributes<import("react-native").View>): React.JSX.Element;
19
+ displayName: string;
20
+ };
21
+ declare const CollapsibleContent: {
22
+ ({ asChild, forceMount, ref, ...props }: import("@rn-primitives/types").ForceMountable & import("react-native").ViewProps & {
23
+ asChild?: boolean;
24
+ } & import("react").RefAttributes<import("react-native").View>): React.JSX.Element | null;
25
+ displayName: string;
26
+ };
27
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import*as i from"@rn-primitives/collapsible";var l=i.Root,o=i.Trigger,e=i.Content;export{o as CollapsibleTrigger,e as CollapsibleContent,l as Collapsible};
@@ -0,0 +1,17 @@
1
+ export interface ComboboxOption {
2
+ value: string;
3
+ label: string;
4
+ disabled?: boolean;
5
+ keywords?: string[];
6
+ }
7
+ export interface ComboboxProps {
8
+ options: ComboboxOption[];
9
+ value?: string;
10
+ onValueChange?: (value: string) => void;
11
+ placeholder?: string;
12
+ searchPlaceholder?: string;
13
+ emptyText?: string;
14
+ disabled?: boolean;
15
+ className?: string;
16
+ }
17
+ export declare function Combobox({ options, value, onValueChange, placeholder, emptyText, disabled, className, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{styled as V}from"nativewind";function t(b){V(b,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as v}from"lucide-react-native";t(v);import{Check as C}from"lucide-react-native";t(C);import{ChevronUp as r}from"lucide-react-native";t(r);import{cn as i}from"@contractspec/lib.ui-kit-core/utils";import*as e from"@rn-primitives/select";import{Platform as W,StyleSheet as k,View as q}from"react-native";import z,{FadeIn as E,FadeOut as J}from"react-native-reanimated";import{jsx as d,jsxs as O}from"react/jsx-runtime";var T=e.Root,_=e.Group,G=e.Value;function I({ref:b,className:l,children:u,...f}){return O(e.Trigger,{ref:b,className:i("flex h-10 native:h-12 flex-row items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-muted-foreground text-sm web:ring-offset-background web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 [&>span]:line-clamp-1",f.disabled&&"web:cursor-not-allowed opacity-50",l),...f,children:[u,d(v,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function K({className:b,...l}){if(W.OS!=="web")return null;return d(e.ScrollUpButton,{className:i("flex web:cursor-default items-center justify-center py-1",b),...l,children:d(r,{size:14,className:"text-foreground"})})}function P({className:b,...l}){if(W.OS!=="web")return null;return d(e.ScrollDownButton,{className:i("flex web:cursor-default items-center justify-center py-1",b),...l,children:d(v,{size:14,className:"text-foreground"})})}function L({className:b,children:l,position:u="popper",portalHost:f,...a}){let{open:o}=e.useRootContext();return d(e.Portal,{hostName:f,children:d(e.Overlay,{style:W.OS!=="web"?k.absoluteFill:void 0,children:d(z.View,{className:"z-50",entering:E,exiting:J,children:O(e.Content,{className:i("data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 rounded-md border border-border bg-popover px-1 py-2 shadow-foreground/10 shadow-md",u==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",o?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",b),position:u,...a,children:[d(K,{}),d(e.Viewport,{className:i("p-1",u==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:l}),d(P,{})]})})})})}function p({className:b,...l}){return d(e.Label,{className:i("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",b),...l})}function h({className:b,children:l,...u}){return O(e.Item,{className:i("web:group relative flex w-full web:cursor-default web:select-none flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 native:pl-10 pl-8 web:outline-hidden web:hover:bg-accent/50 web:focus:bg-accent active:bg-accent",u.disabled&&"web:pointer-events-none opacity-50",b),...u,children:[d(q,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:d(e.ItemIndicator,{children:d(C,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),d(e.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function j({className:b,...l}){return d(e.Separator,{className:i("-mx-1 my-1 h-px bg-muted",b),...l})}import{jsx as m,jsxs as Q}from"react/jsx-runtime";function de({options:b,value:l,onValueChange:u,placeholder:f="Select option",emptyText:a="No option found.",disabled:o,className:M}){let y=b.find((g)=>g.value===l);return Q(T,{value:y?{value:y.value,label:y.label}:void 0,onValueChange:(g)=>{if(g)u?.(g.value)},disabled:o,children:[m(I,{disabled:o,className:M,children:m(G,{placeholder:f})}),m(L,{children:m(_,{children:b.length?b.map((g)=>m(h,{value:g.value,label:g.label,disabled:g.disabled},g.value)):m(h,{value:"__empty",label:a,disabled:!0})})})]})}export{de as Combobox};
@@ -0,0 +1 @@
1
+ export declare const carousel = "null";
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var l="null";export{l as carousel};
@@ -0,0 +1,83 @@
1
+ import * as ContextMenuPrimitive from '@rn-primitives/context-menu';
2
+ import * as React from 'react';
3
+ import { type StyleProp, type TextProps, View, type ViewStyle } from 'react-native';
4
+ declare const ContextMenu: {
5
+ ({ asChild, relativeTo, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
6
+ asChild?: boolean;
7
+ } & {
8
+ onOpenChange?: (open: boolean) => void;
9
+ relativeTo?: "longPress" | "trigger";
10
+ } & React.RefAttributes<View>): React.JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const ContextMenuTrigger: {
14
+ ({ asChild, onLongPress: onLongPressProp, disabled, onAccessibilityAction: onAccessibilityActionProp, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
15
+ asChild?: boolean;
16
+ } & {
17
+ onKeyDown?: (ev: React.KeyboardEvent) => void;
18
+ onKeyUp?: (ev: React.KeyboardEvent) => void;
19
+ } & React.RefAttributes<import("@rn-primitives/context-menu").TriggerRef>): React.JSX.Element;
20
+ displayName: string;
21
+ };
22
+ declare const ContextMenuGroup: {
23
+ ({ asChild, ref, ...props }: import("react-native").ViewProps & {
24
+ asChild?: boolean;
25
+ } & React.RefAttributes<View>): React.JSX.Element;
26
+ displayName: string;
27
+ };
28
+ declare const ContextMenuSub: {
29
+ ({ asChild, defaultOpen, open: openProp, onOpenChange: onOpenChangeProp, ref, ...props }: import("react-native").ViewProps & {
30
+ asChild?: boolean;
31
+ } & {
32
+ defaultOpen?: boolean;
33
+ open?: boolean;
34
+ onOpenChange?: (value: boolean) => void;
35
+ } & React.RefAttributes<View>): React.JSX.Element;
36
+ displayName: string;
37
+ };
38
+ declare const ContextMenuRadioGroup: {
39
+ ({ asChild, value, onValueChange, ref, ...props }: import("react-native").ViewProps & {
40
+ asChild?: boolean;
41
+ } & {
42
+ value: string | undefined;
43
+ onValueChange: (value: string) => void;
44
+ } & React.RefAttributes<View>): React.JSX.Element;
45
+ displayName: string;
46
+ };
47
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ContextMenuPrimitive.SubTriggerProps & {
48
+ ref?: React.RefObject<ContextMenuPrimitive.SubTriggerRef>;
49
+ children?: React.ReactNode;
50
+ inset?: boolean;
51
+ }): import("react/jsx-runtime").JSX.Element;
52
+ declare function ContextMenuSubContent({ className, ...props }: ContextMenuPrimitive.SubContentProps & {
53
+ ref?: React.RefObject<ContextMenuPrimitive.SubContentRef>;
54
+ }): import("react/jsx-runtime").JSX.Element;
55
+ declare function ContextMenuContent({ className, overlayClassName, overlayStyle, portalHost, ...props }: ContextMenuPrimitive.ContentProps & {
56
+ ref?: React.RefObject<ContextMenuPrimitive.ContentRef>;
57
+ overlayStyle?: StyleProp<ViewStyle>;
58
+ overlayClassName?: string;
59
+ portalHost?: string;
60
+ }): import("react/jsx-runtime").JSX.Element;
61
+ declare function ContextMenuItem({ className, inset, ...props }: ContextMenuPrimitive.ItemProps & {
62
+ ref?: React.RefObject<ContextMenuPrimitive.ItemRef>;
63
+ className?: string;
64
+ inset?: boolean;
65
+ }): import("react/jsx-runtime").JSX.Element;
66
+ declare function ContextMenuCheckboxItem({ className, children, ...props }: ContextMenuPrimitive.CheckboxItemProps & {
67
+ ref?: React.RefObject<ContextMenuPrimitive.CheckboxItemRef>;
68
+ children?: React.ReactNode;
69
+ }): import("react/jsx-runtime").JSX.Element;
70
+ declare function ContextMenuRadioItem({ className, children, ...props }: ContextMenuPrimitive.RadioItemProps & {
71
+ ref?: React.RefObject<ContextMenuPrimitive.RadioItemRef>;
72
+ children?: React.ReactNode;
73
+ }): import("react/jsx-runtime").JSX.Element;
74
+ declare function ContextMenuLabel({ className, inset, ...props }: ContextMenuPrimitive.LabelProps & {
75
+ ref?: React.RefObject<ContextMenuPrimitive.LabelRef>;
76
+ className?: string;
77
+ inset?: boolean;
78
+ }): import("react/jsx-runtime").JSX.Element;
79
+ declare function ContextMenuSeparator({ className, ...props }: ContextMenuPrimitive.SeparatorProps & {
80
+ ref?: React.RefObject<ContextMenuPrimitive.SeparatorRef>;
81
+ }): import("react/jsx-runtime").JSX.Element;
82
+ declare function ContextMenuShortcut({ className, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
83
+ export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{styled as H}from"nativewind";function B(W){H(W,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as Q}from"lucide-react-native";B(Q);import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as G from"@rn-primitives/slot";import*as J from"react";import{Text as g}from"react-native";import{jsx as P}from"react/jsx-runtime";var K=J.createContext(void 0);function T({className:W,asChild:L=!1,...q}){let F=J.useContext(K);return P(L?G.Text:g,{className:I("web:select-text text-base text-foreground",F,W),...q})}import{Check as X}from"lucide-react-native";B(X);import{ChevronUp as Y}from"lucide-react-native";B(Y);import{ChevronRight as Z}from"lucide-react-native";B(Z);import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@rn-primitives/context-menu";import{Platform as $,StyleSheet as _,Text as V,View as D}from"react-native";import{jsx as z,jsxs as U}from"react/jsx-runtime";var e=f.Root,s=f.Trigger,ff=f.Group,Wf=f.Sub,Lf=f.RadioGroup;function qf({className:W,inset:L,children:q,...F}){let{open:E}=f.useSubContext(),O=$.OS==="web"?Z:E?Y:Q;return z(K.Provider,{value:A("select-none native:text-lg text-primary text-sm",E&&"native:text-accent-foreground"),children:U(f.SubTrigger,{className:A("flex web:cursor-default web:select-none flex-row items-center gap-2 rounded-xs px-2 native:py-2 py-1.5 web:outline-hidden web:hover:bg-accent web:focus:bg-accent active:bg-accent",E&&"bg-accent",L&&"pl-8",W),...F,children:[q,z(O,{size:18,className:"ml-auto text-foreground"})]})})}function zf({className:W,...L}){let{open:q}=f.useSubContext();return z(f.SubContent,{className:A("data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 mt-1 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 shadow-foreground/5 shadow-md",q?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out web:animate-out",W),...L})}function Af({className:W,overlayClassName:L,overlayStyle:q,portalHost:F,...E}){let{open:O}=f.useRootContext();return z(f.Portal,{hostName:F,children:z(f.Overlay,{style:q?_.flatten([$.OS!=="web"?_.absoluteFill:void 0,q]):$.OS!=="web"?_.absoluteFill:void 0,className:L,children:z(f.Content,{className:A("web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 shadow-foreground/5 shadow-md",O?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",W),...E})})})}function Bf({className:W,inset:L,...q}){return z(K.Provider,{value:"select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground",children:z(f.Item,{className:A("group relative flex web:cursor-default flex-row items-center gap-2 rounded-xs px-2 native:py-2 py-1.5 web:outline-hidden web:hover:bg-accent web:focus:bg-accent active:bg-accent",L&&"pl-8",q.disabled&&"web:pointer-events-none opacity-50",W),...q})})}function Ef({className:W,children:L,...q}){return U(f.CheckboxItem,{className:A("web:group relative flex web:cursor-default flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 pl-8 web:outline-hidden web:focus:bg-accent active:bg-accent",q.disabled&&"web:pointer-events-none opacity-50",W),...q,children:[z(D,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:z(f.ItemIndicator,{children:z(X,{size:14,strokeWidth:3,className:"text-foreground"})})}),L]})}function Ff({className:W,children:L,...q}){return U(f.RadioItem,{className:A("web:group relative flex web:cursor-default flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 pl-8 web:outline-hidden web:focus:bg-accent active:bg-accent",q.disabled&&"web:pointer-events-none opacity-50",W),...q,children:[z(D,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:z(f.ItemIndicator,{children:z(D,{className:"h-2 w-2 rounded-full bg-foreground"})})}),L]})}function Jf({className:W,inset:L,...q}){return z(f.Label,{className:A("web:cursor-default px-2 py-1.5 font-semibold native:text-base text-foreground text-sm",L&&"pl-8",W),...q})}function Kf({className:W,...L}){return z(f.Separator,{className:A("-mx-1 my-1 h-px bg-border",W),...L})}function Of({className:W,...L}){return z(V,{className:A("ml-auto native:text-sm text-muted-foreground text-xs tracking-widest",W),...L})}export{s as ContextMenuTrigger,qf as ContextMenuSubTrigger,zf as ContextMenuSubContent,Wf as ContextMenuSub,Of as ContextMenuShortcut,Kf as ContextMenuSeparator,Ff as ContextMenuRadioItem,Lf as ContextMenuRadioGroup,Jf as ContextMenuLabel,Bf as ContextMenuItem,ff as ContextMenuGroup,Af as ContextMenuContent,Ef as ContextMenuCheckboxItem,e as ContextMenu};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ // @bun
@@ -0,0 +1,8 @@
1
+ import type { ContractTableController, ContractTableRowRenderModel } from '@contractspec/lib.presentation-runtime-core';
2
+ import type { SharedDataTableProps } from '@contractspec/lib.ui-kit-core/interfaces';
3
+ import * as React from 'react';
4
+ export interface DataTableProps<TItem = unknown> extends SharedDataTableProps<TItem> {
5
+ controller: ContractTableController<TItem, React.ReactNode>;
6
+ onRowPress?: (row: ContractTableRowRenderModel<TItem, React.ReactNode>) => void;
7
+ }
8
+ export declare function DataTable<TItem>({ controller, className, toolbar, footer, emptyState, loading, onRowPress, }: DataTableProps<TItem>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{styled as De}from"nativewind";function S(e){De(e,{className:{target:"style",nativeStyleMapping:{color:!0,opacity:!0}}})}import{ChevronDown as $}from"lucide-react-native";S($);import{cn as Ge}from"@contractspec/lib.ui-kit-core/utils";import*as fe from"@rn-primitives/slot";import*as q from"react";import{Text as _e}from"react-native";import{jsx as qe}from"react/jsx-runtime";var E=q.createContext(void 0);function f({className:e,asChild:t=!1,...n}){let i=q.useContext(E);return qe(t?fe.Text:_e,{className:Ge("web:select-text text-base text-foreground",i,e),...n})}import{cn as Je}from"@contractspec/lib.ui-kit-core/utils";import{cva as be}from"class-variance-authority";import{Pressable as Ke}from"react-native";import{jsx as ue}from"react/jsx-runtime";var Oe=be("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",{variants:{variant:{default:"bg-primary web:hover:opacity-90 active:opacity-90",destructive:"bg-destructive web:hover:opacity-90 active:opacity-90",outline:"border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",secondary:"bg-secondary web:hover:opacity-80 active:opacity-80",ghost:"web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",link:"web:underline-offset-4 web:hover:underline web:focus:underline"},size:{default:"h-10 native:h-12 native:px-5 px-4 native:py-3 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 native:h-14 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qe=be("web:whitespace-nowrap font-medium native:text-base text-foreground text-sm web:transition-colors",{variants:{variant:{default:"text-primary-foreground",destructive:"text-destructive-foreground",outline:"group-active:text-accent-foreground",secondary:"text-secondary-foreground group-active:text-secondary-foreground",ghost:"group-active:text-accent-foreground",link:"text-primary group-active:underline"},size:{default:"",sm:"",lg:"native:text-lg",icon:""}},defaultVariants:{variant:"default",size:"default"}});function M({ref:e,className:t,variant:n,size:i,...l}){return ue(E.Provider,{value:Qe({variant:n,size:i,className:"web:pointer-events-none"}),children:ue(Ke,{className:Je(l.disabled&&"web:pointer-events-none opacity-50",Oe({variant:n,size:i,className:t})),ref:e,role:"button",...l})})}import{Check as A}from"lucide-react-native";S(A);import{ChevronUp as X}from"lucide-react-native";S(X);import{cn as L}from"@contractspec/lib.ui-kit-core/utils";import*as m from"@rn-primitives/select";import{Platform as Q,StyleSheet as Ye,View as Ze}from"react-native";import Fe,{FadeIn as Ne,FadeOut as Ue}from"react-native-reanimated";import{jsx as R,jsxs as Y}from"react/jsx-runtime";var Re=m.Root,st=m.Group,Te=m.Value;function Ce({ref:e,className:t,children:n,...i}){return Y(m.Trigger,{ref:e,className:L("flex h-10 native:h-12 flex-row items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-muted-foreground text-sm web:ring-offset-background web:focus:outline-hidden web:focus:ring-2 web:focus:ring-ring web:focus:ring-offset-2 [&>span]:line-clamp-1",i.disabled&&"web:cursor-not-allowed opacity-50",t),...i,children:[n,R($,{size:16,"aria-hidden":!0,className:"text-foreground opacity-50"})]})}function ce({className:e,...t}){if(Q.OS!=="web")return null;return R(m.ScrollUpButton,{className:L("flex web:cursor-default items-center justify-center py-1",e),...t,children:R(X,{size:14,className:"text-foreground"})})}function pe({className:e,...t}){if(Q.OS!=="web")return null;return R(m.ScrollDownButton,{className:L("flex web:cursor-default items-center justify-center py-1",e),...t,children:R($,{size:14,className:"text-foreground"})})}function ge({className:e,children:t,position:n="popper",portalHost:i,...l}){let{open:a}=m.useRootContext();return R(m.Portal,{hostName:i,children:R(m.Overlay,{style:Q.OS!=="web"?Ye.absoluteFill:void 0,children:R(Fe.View,{className:"z-50",entering:Ne,exiting:Ue,children:Y(m.Content,{className:L("data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 rounded-md border border-border bg-popover px-1 py-2 shadow-foreground/10 shadow-md",n==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",a?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",e),position:n,...l,children:[R(ce,{}),R(m.Viewport,{className:L("p-1",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:t}),R(pe,{})]})})})})}function jt({className:e,...t}){return R(m.Label,{className:L("py-1.5 pr-2 native:pb-2 native:pl-10 pl-8 font-semibold native:text-base text-popover-foreground text-sm",e),...t})}function he({className:e,children:t,...n}){return Y(m.Item,{className:L("web:group relative flex w-full web:cursor-default web:select-none flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 native:pl-10 pl-8 web:outline-hidden web:hover:bg-accent/50 web:focus:bg-accent active:bg-accent",n.disabled&&"web:pointer-events-none opacity-50",e),...n,children:[R(Ze,{className:"absolute left-2 native:left-3.5 flex h-3.5 w-3.5 items-center justify-center native:pt-px",children:R(m.ItemIndicator,{children:R(A,{size:16,strokeWidth:3,className:"text-popover-foreground"})})}),R(m.ItemText,{className:"native:text-base native:text-lg text-popover-foreground text-sm web:group-focus:text-accent-foreground"})]})}function en({className:e,...t}){return R(m.Separator,{className:L("-mx-1 my-1 h-px bg-muted",e),...t})}import{cn as Z}from"@contractspec/lib.ui-kit-core/utils";import{cva as F}from"class-variance-authority";import{View as N}from"react-native";import{jsx as c}from"react/jsx-runtime";var U="flex",xe=F([U,"flex-col"],{variants:{spacing:{none:"",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-4",lg:"gap-y-6",xl:"gap-y-8","2xl":"gap-y-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{spacing:"md",align:"stretch",justify:"start",width:"auto",padding:"none",gap:"none"}}),se=F([U,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"start",width:"auto",padding:"none",gap:"none",wrap:"wrap"}}),je=F([U,"flex-row"],{variants:{spacing:{none:"",xs:"gap-x-1",sm:"gap-x-2",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},align:{stretch:"items-stretch",start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},width:{auto:"w-auto",full:"w-full",screen:"w-screen",fit:"w-fit"},padding:{none:"",xs:"p-1",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},gap:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap",reverse:"flex-wrap-reverse"}},defaultVariants:{spacing:"md",align:"center",justify:"center",width:"auto",padding:"none",gap:"none",wrap:"wrap"}});function ln({className:e,spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b,...y}){return c(N,{className:Z(je({spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b}),e),...y})}function P({className:e,spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b,...y}){return c(N,{className:Z(se({spacing:t,align:n,justify:i,width:l,padding:a,gap:d,wrap:b}),e),...y})}function v({className:e,spacing:t,align:n,justify:i,width:l,padding:a,gap:d,...b}){return c(N,{className:Z(xe({spacing:t,align:n,justify:i,width:l,padding:a,gap:d}),e),...b})}import{ChevronLeft as et,ChevronRight as tt,ChevronsLeft as nt,ChevronsRight as it}from"lucide-react-native";import{jsx as u,jsxs as k}from"react/jsx-runtime";function ot(e,t){if(t<=7)return Array.from({length:t},(n,i)=>i+1);if(e<=3)return[1,2,3,4,5,"end-ellipsis",t];if(e>=t-2)return[1,"start-ellipsis",t-4,t-3,t-2,t-1,t];return[1,"start-ellipsis",e-1,e,e+1,"end-ellipsis",t]}var p=({currentPage:e,totalPages:t,totalItems:n,itemsPerPage:i,onPageChange:l,onItemsPerPageChange:a,disabled:d=!1,className:b="",showItemsPerPage:y=!0,itemsPerPageOptions:H=[10,25,50,100]})=>{if(t<=0)return null;let C=Math.max(0,n),_=Math.max(1,i),z=Math.min(Math.max(e,1),t),We=C===0?0:(z-1)*_+1,Ae=C===0?0:Math.min(z*_,C),ae=z>1&&!d,me=z<t&&!d,Xe=ot(z,t);return k(v,{align:"center",gap:"md",justify:"between",className:`sm:flex-row ${b}`,children:[u(v,{className:"order-2 text-base text-muted-foreground sm:order-1",children:k(f,{children:["Affichage de ",We," \xE0 ",Ae," sur ",C," r\xE9sultats"]})}),k(P,{align:"center",gap:"sm",className:"order-1 sm:order-2",children:[k(M,{variant:"outline",size:"sm",onPress:()=>l(1),disabled:!ae,accessibilityLabel:"Premi\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[u(nt,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Premi\xE8re page"})]}),k(M,{variant:"outline",size:"sm",onPress:()=>l(z-1),disabled:!ae,accessibilityLabel:"Page pr\xE9c\xE9dente",className:"h-8 w-8 p-0",children:[u(et,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Page pr\xE9c\xE9dente"})]}),u(P,{align:"center",gap:"xs",children:Xe.map((g)=>{if(typeof g!=="number")return u(P,{className:"px-2 py-1 text-muted-foreground",children:u(f,{children:"..."})},g);return u(M,{variant:g===z?"default":"outline",size:"sm",onPress:()=>l(g),disabled:d,accessibilityLabel:`Page ${g}`,className:"h-8 min-w-8 px-2",children:u(f,{children:g})},g)})}),k(M,{variant:"outline",size:"sm",onPress:()=>l(z+1),disabled:!me,accessibilityLabel:"Page suivante",className:"h-8 w-8 p-0",children:[u(tt,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Page suivante"})]}),k(M,{variant:"outline",size:"sm",onPress:()=>l(t),disabled:!me,accessibilityLabel:"Derni\xE8re page",className:"hidden h-8 w-8 p-0 sm:flex",children:[u(it,{className:"h-4 w-4"}),u(f,{className:"sr-only",children:"Derni\xE8re page"})]})]}),y&&a&&k(P,{align:"center",gap:"sm",className:"order-3 text-base",children:[u(f,{className:"text-muted-foreground",children:"Afficher:"}),k(Re,{value:{value:i.toString(),label:i.toString()},onValueChange:(g)=>{let O=parseInt(g?.value??"",10);if(!Number.isNaN(O)&&O>0)a(O)},disabled:d,children:[u(Ce,{className:"h-8 w-16",children:u(Te,{placeholder:"Afficher:"})}),u(ge,{className:"bg-background",children:H.map((g)=>u(he,{value:g.toString(),label:g.toString(),children:g},g))})]})]})]})};import{cn as Ie}from"@contractspec/lib.ui-kit-core/utils";import*as D from"@rn-primitives/checkbox";import{Check as dt}from"lucide-react-native";import*as Pe from"react";import{jsx as x}from"react/jsx-runtime";var J=Pe.forwardRef(({className:e,...t},n)=>x(D.Root,{ref:n,className:Ie("web:peer h-4 w-4 shrink-0 rounded-xs border border-primary web:ring-offset-background web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:x(D.Indicator,{className:Ie("flex items-center justify-center text-current"),children:x(dt,{className:"h-4 w-4"})})}));J.displayName=D.Root.displayName;import{ChevronRight as s}from"lucide-react-native";S(s);import{cn as w}from"@contractspec/lib.ui-kit-core/utils";import*as r from"@rn-primitives/dropdown-menu";import{Platform as ee,StyleSheet as j,Text as rt,View as te}from"react-native";import{jsx as T,jsxs as oe}from"react/jsx-runtime";var we=r.Root,ye=r.Trigger,Wn=r.Group,An=r.Portal,Xn=r.Sub,Dn=r.RadioGroup;function Gn({className:e,inset:t,children:n,...i}){let{open:l}=r.useSubContext(),a=ee.OS==="web"?s:l?X:$;return T(E.Provider,{value:w("select-none native:text-lg text-primary text-sm",l&&"native:text-accent-foreground"),children:oe(r.SubTrigger,{className:w("flex web:cursor-default web:select-none flex-row items-center gap-2 rounded-xs px-2 native:py-2 py-1.5 web:outline-hidden web:hover:bg-accent web:focus:bg-accent active:bg-accent",l&&"bg-accent",t&&"pl-8",e),...i,children:[n,T(a,{size:18,className:"ml-auto text-foreground"})]})})}function _n({className:e,...t}){let{open:n}=r.useSubContext();return T(r.SubContent,{className:w("data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 mt-1 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 shadow-foreground/5 shadow-md",n?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out web:animate-out",e),...t})}function Me({className:e,overlayClassName:t,overlayStyle:n,portalHost:i,...l}){let{open:a}=r.useRootContext();return T(r.Portal,{hostName:i,children:T(r.Overlay,{style:n?j.flatten([ee.OS!=="web"?j.absoluteFill:void 0,n]):ee.OS!=="web"?j.absoluteFill:void 0,className:t,children:T(r.Content,{className:w("web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 shadow-foreground/5 shadow-md",a?"web:fade-in-0 web:zoom-in-95 web:animate-in":"web:fade-out-0 web:zoom-out-95 web:animate-out",e),...l})})})}function ne({className:e,inset:t,...n}){return T(E.Provider,{value:"select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground",children:T(r.Item,{className:w("group relative flex web:cursor-default flex-row items-center gap-2 rounded-xs px-2 native:py-2 py-1.5 web:outline-hidden web:hover:bg-accent web:focus:bg-accent active:bg-accent",t&&"pl-8",n.disabled&&"web:pointer-events-none opacity-50",e),...n})})}function ke({className:e,children:t,checked:n,...i}){return oe(r.CheckboxItem,{className:w("web:group relative flex web:cursor-default flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 pl-8 web:outline-hidden web:focus:bg-accent active:bg-accent",i.disabled&&"web:pointer-events-none opacity-50",e),checked:n,...i,children:[T(te,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:T(r.ItemIndicator,{children:T(A,{size:14,strokeWidth:3,className:"text-foreground"})})}),t]})}function qn({className:e,children:t,...n}){return oe(r.RadioItem,{className:w("web:group relative flex web:cursor-default flex-row items-center rounded-xs native:py-2 py-1.5 pr-2 pl-8 web:outline-hidden web:focus:bg-accent active:bg-accent",n.disabled&&"web:pointer-events-none opacity-50",e),...n,children:[T(te,{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:T(r.ItemIndicator,{children:T(te,{className:"h-2 w-2 rounded-full bg-foreground"})})}),t]})}function ze({className:e,inset:t,...n}){return T(r.Label,{className:w("web:cursor-default px-2 py-1.5 font-semibold native:text-base text-foreground text-sm",t&&"pl-8",e),...n})}function ie({className:e,...t}){return T(r.Separator,{className:w("-mx-1 my-1 h-px bg-border",e),...t})}function Jn({className:e,...t}){return T(rt,{className:w("ml-auto native:text-sm text-muted-foreground text-xs tracking-widest",e),...t})}import{cn as lt}from"@contractspec/lib.ui-kit-core/utils";import*as Le from"react";import at,{useAnimatedStyle as mt,useSharedValue as ft,withRepeat as ut,withSequence as bt,withTiming as Se}from"react-native-reanimated";import{jsx as Rt}from"react/jsx-runtime";var Ee=1000;function Ve({className:e,...t}){let n=ft(1);Le.useEffect(()=>{n.value=ut(bt(Se(0.5,{duration:Ee}),Se(1,{duration:Ee})),-1)},[]);let i=mt(()=>({opacity:n.value}));return Rt(at.View,{style:i,className:lt("rounded-md bg-secondary dark:bg-muted",e),...t})}import{cn as B}from"@contractspec/lib.ui-kit-core/utils";import*as h from"@rn-primitives/table";import{jsx as V}from"react/jsx-runtime";function He({className:e,...t}){return V(h.Root,{className:B("w-full caption-bottom text-sm",e),...t})}function ve({className:e,...t}){return V(h.Header,{className:B("border-border [&_tr]:border-b",e),...t})}function Be({className:e,style:t,...n}){return V(h.Body,{className:B("flex-1 border-border [&_tr:last-child]:border-0",e),style:[{minHeight:2},t],...n})}function cn({className:e,...t}){return V(h.Footer,{className:B("bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})}function K({className:e,...t}){return V(h.Row,{className:B("flex-row border-border border-b web:transition-colors web:hover:bg-muted/50 web:data-[state=selected]:bg-muted",e),...t})}function $e({className:e,...t}){return V(E.Provider,{value:"text-muted-foreground",children:V(h.Head,{className:B("h-12 justify-center px-4 text-left font-medium [&:has([role=checkbox])]:pr-0",e),...t})})}function de({className:e,...t}){return V(h.Cell,{className:B("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t})}import{ChevronDown as Tt,ChevronRight as Ct,Columns3 as gt}from"lucide-react-native";import*as G from"react";import{ScrollView as ht,View as W}from"react-native";import It from"react-native-reanimated";import{jsx as o,jsxs as I,Fragment as zt}from"react/jsx-runtime";function mi({controller:e,className:t,toolbar:n,footer:i,emptyState:l,loading:a,onRowPress:d}){let b=e.visibleColumns.filter((C)=>C.pinState==="left"),y=e.visibleColumns.filter((C)=>!C.pinState),H=e.visibleColumns.filter((C)=>C.pinState==="right");return I(v,{gap:"md",className:t,children:[I(P,{justify:"between",align:"center",children:[o(W,{children:n}),o(Pt,{columns:e.columns})]}),a?o(v,{gap:"sm",children:Array.from({length:5}).map((C,_)=>o(Ve,{className:"h-12 w-full"},_))}):e.rows.length===0?l??o(W,{className:"rounded-md border border-border border-dashed p-6",children:o(f,{className:"text-center text-muted-foreground",children:"No rows available."})}):o(W,{className:"rounded-md border border-border",children:I(P,{gap:"none",align:"start",wrap:"nowrap",children:[b.length?re(e,b,d):null,o(ht,{horizontal:!0,showsHorizontalScrollIndicator:!1,children:re(e,y,d)}),H.length?re(e,H,d):null]})}),e.pageCount>0?o(p,{currentPage:e.pageIndex+1,totalPages:e.pageCount,totalItems:e.totalItems,itemsPerPage:e.pageSize,onPageChange:(C)=>e.setPageIndex(C-1),onItemsPerPageChange:(C)=>e.setPageSize(C)}):null,i]})}function re(e,t,n){return I(He,{children:[o(ve,{children:o(K,{children:t.map((i)=>o($e,{style:{width:i.size,minWidth:i.size},children:I(P,{gap:"sm",align:"center",justify:"between",wrap:"nowrap",children:[o(W,{children:yt(e,i)}),i.canResize?o(wt,{column:i}):null]})},i.id))})}),o(Be,{children:e.rows.map((i)=>{let l=new Map(i.cells.map((a)=>[a.columnId,a]));return I(v,{gap:"none",children:[o(K,{onPress:()=>n?.(i),children:t.map((a)=>o(de,{style:{width:a.size,minWidth:a.size},children:Mt(i,l.get(a.id))},a.id))}),i.isExpanded&&i.expandedContent?o(K,{children:o(de,{style:{width:t.reduce((a,d)=>a+d.size,0)},children:i.expandedContent})}):null]},i.id)})})]})}function Pt({columns:e}){let t=e.filter((d)=>d.kind==="data"),n=t.filter((d)=>d.canHide),i=n.filter((d)=>!d.visible),l=t.filter((d)=>d.visible),a=t.some((d)=>d.pinState);if(!n.length)return null;return I(we,{children:[o(ye,{asChild:!0,children:I(M,{variant:"outline",size:"sm",children:[o(gt,{size:16}),o(f,{children:"Columns"})]})}),I(Me,{children:[o(ze,{children:"Visible Columns"}),o(ie,{}),n.map((d)=>{let b=d.visible&&l.length<=1;return o(ke,{checked:d.visible,disabled:b,onCheckedChange:(y)=>{let H=Boolean(y);if(!H&&b)return;d.toggleVisibility?.(H)},children:I(P,{justify:"between",className:"w-full",children:[o(f,{children:d.label}),b?o(f,{className:"text-muted-foreground text-xs",children:"Required"}):null]})},d.id)}),i.length||a?I(zt,{children:[o(ie,{}),i.length?o(ne,{onPress:()=>n.forEach((d)=>d.toggleVisibility?.(!0)),children:o(f,{children:"Show All Columns"})}):null,a?o(ne,{onPress:()=>t.forEach((d)=>d.pin?.(!1)),children:o(f,{children:"Reset Pins"})}):null]}):null]})]})}function wt({column:e}){let t=G.useRef(null),n=G.useCallback(()=>{t.current=null},[]),i=G.useCallback((l)=>{let a=l.nativeEvent.pageX,d=t.current;if(t.current=a,d===null)return;let b=a-d;if(!Number.isFinite(b)||b===0)return;e.resizeBy?.(b)},[e]);return o(It.View,{testID:"resize-handle",onStartShouldSetResponder:()=>!0,onMoveShouldSetResponder:()=>!0,onResponderGrant:(l)=>{t.current=l.nativeEvent.pageX},onResponderMove:i,onResponderRelease:n,onResponderTerminate:n,className:"justify-center px-1",children:o(f,{className:"text-muted-foreground text-xs",children:"||"})})}function yt(e,t){if(t.kind==="selection"&&e.selectionMode==="multiple")return o(J,{"aria-label":"Select all rows",accessibilityLabel:"Select all rows",checked:e.allRowsSelected||e.someRowsSelected,onPress:(n)=>n.stopPropagation?.(),onCheckedChange:(n)=>e.toggleAllRowsSelected?.(Boolean(n))});if(t.kind==="expansion")return null;return typeof t.header==="string"?o(f,{children:t.header}):t.header}function Mt(e,t){if(!t)return null;if(t.kind==="selection")return o(J,{"aria-label":`Select row ${e.id}`,accessibilityLabel:`Select row ${e.id}`,checked:e.isSelected,onPress:(n)=>n.stopPropagation?.(),onCheckedChange:(n)=>e.toggleSelected?.(Boolean(n))});if(t.kind==="expansion"){if(!e.canExpand)return null;return o(M,{variant:"ghost",size:"icon","aria-label":e.isExpanded?`Collapse row ${e.id}`:`Expand row ${e.id}`,accessibilityLabel:e.isExpanded?`Collapse row ${e.id}`:`Expand row ${e.id}`,onPress:(n)=>{n.stopPropagation?.(),e.toggleExpanded?.()},children:e.isExpanded?o(Tt,{size:16}):o(Ct,{size:16})})}return typeof t.content==="string"?o(f,{ellipsizeMode:le(t)?"tail":void 0,numberOfLines:le(t)?1:void 0,children:t.content}):kt(t)}function le(e){return e.overflow==="truncate"||e.overflow==="expand"}function kt(e){if(e.overflow==="wrap")return o(W,{className:"min-w-0",children:e.content});if(le(e))return o(W,{className:"min-w-0 overflow-hidden",children:e.content});return e.content}export{mi as DataTable};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { SharedDatePickerProps } from '@contractspec/lib.ui-kit-core/interfaces';
2
+ export interface DatePickerProps extends SharedDatePickerProps {
3
+ }
4
+ export declare function DatePicker({ value, onChange, disabled, minDate, maxDate, placeholder, className, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{cn as Z}from"@contractspec/lib.ui-kit-core/utils";import*as K from"@rn-primitives/slot";import*as B from"react";import{Text as _}from"react-native";import{jsx as M}from"react/jsx-runtime";var $=B.createContext(void 0);function L({className:q,asChild:E=!1,...z}){let A=B.useContext($);return M(E?K.Text:_,{className:Z("web:select-text text-base text-foreground",A,q),...z})}import{cn as G}from"@contractspec/lib.ui-kit-core/utils";import R from"@react-native-community/datetimepicker";import{useMemo as V,useState as y}from"react";import{Platform as O,Pressable as f,View as g}from"react-native";import{jsx as H,jsxs as k}from"react/jsx-runtime";function S(q){if(!q)return"";try{return q.toLocaleDateString(void 0,{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}function u({value:q,onChange:E,disabled:z,minDate:A,maxDate:F,placeholder:Q="Select date",className:U}){let[W,I]=y(!1),X=V(()=>({minimumDate:A,maximumDate:F,timeZoneName:void 0}),[A,F]),Y=(w,J)=>{if(O.OS!=="ios")I(!1);if(J)E(J)};return k(g,{className:G("w-full",U),children:[H(f,{disabled:z,onPress:()=>I(!0),className:G("h-12 flex-row items-center rounded-md border border-input bg-background px-3",z&&"opacity-50"),children:H(L,{className:G("text-base text-foreground",!q&&"opacity-50"),children:q?S(q):Q})}),W&&H(R,{value:q??new Date,mode:"date",display:O.OS==="ios"?"inline":"default",onChange:Y,...X})]})}export{u as DatePicker};