@flipova/foundation 2.4.4 → 3.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/CHANGES.md +66 -0
  2. package/COMPONENTS.md +102 -0
  3. package/DOCS.md +261 -0
  4. package/LICENSE +1 -1
  5. package/README.md +169 -118
  6. package/components/contract/index.ts +3 -0
  7. package/components/contract/recipes/accordion.ts +42 -0
  8. package/components/contract/recipes/avatar.ts +41 -0
  9. package/components/contract/recipes/badge.ts +46 -0
  10. package/components/contract/recipes/button.ts +58 -0
  11. package/components/contract/recipes/calendar.ts +118 -0
  12. package/components/contract/recipes/card.ts +21 -0
  13. package/components/contract/recipes/checkbox.ts +33 -0
  14. package/components/contract/recipes/divider.ts +9 -0
  15. package/components/contract/recipes/fab.ts +31 -0
  16. package/components/contract/recipes/feedback.ts +66 -0
  17. package/components/contract/recipes/formcontrol.ts +16 -0
  18. package/components/contract/recipes/heading.ts +16 -0
  19. package/components/contract/recipes/icon.ts +40 -0
  20. package/components/contract/recipes/index.ts +30 -0
  21. package/components/contract/recipes/input.ts +39 -0
  22. package/components/contract/recipes/layout.ts +44 -0
  23. package/components/contract/recipes/link.ts +6 -0
  24. package/components/contract/recipes/modal.ts +40 -0
  25. package/components/contract/recipes/overlay.ts +250 -0
  26. package/components/contract/recipes/progress.ts +27 -0
  27. package/components/contract/recipes/radio.ts +39 -0
  28. package/components/contract/recipes/select.ts +63 -0
  29. package/components/contract/recipes/skeleton.ts +25 -0
  30. package/components/contract/recipes/slider.ts +50 -0
  31. package/components/contract/recipes/spinner.ts +12 -0
  32. package/components/contract/recipes/switch.ts +26 -0
  33. package/components/contract/recipes/table.ts +37 -0
  34. package/components/contract/recipes/tabs.ts +31 -0
  35. package/components/contract/recipes/text.ts +12 -0
  36. package/components/contract/recipes/textarea.ts +37 -0
  37. package/components/contract/recipes/util.ts +15 -0
  38. package/components/contract/theme.ts +116 -0
  39. package/components/contract/types.ts +598 -0
  40. package/components/providers/css-vars.ts +43 -0
  41. package/components/providers/flipova/components/Accordion.tsx +41 -0
  42. package/components/providers/flipova/components/ActionSheet.tsx +34 -0
  43. package/components/providers/flipova/components/Alert.tsx +15 -0
  44. package/components/providers/flipova/components/AlertDialog.tsx +31 -0
  45. package/components/providers/flipova/components/Avatar.tsx +30 -0
  46. package/components/providers/flipova/components/Badge.tsx +14 -0
  47. package/components/providers/flipova/components/BottomSheet.tsx +24 -0
  48. package/components/providers/flipova/components/Box.tsx +1 -0
  49. package/components/providers/flipova/components/Button.tsx +31 -0
  50. package/components/providers/flipova/components/Calendar.tsx +85 -0
  51. package/components/providers/flipova/components/Card.tsx +13 -0
  52. package/components/providers/flipova/components/Center.tsx +11 -0
  53. package/components/providers/flipova/components/Checkbox.tsx +24 -0
  54. package/components/providers/flipova/components/DateTimePicker.tsx +45 -0
  55. package/components/providers/flipova/components/Divider.tsx +9 -0
  56. package/components/providers/flipova/components/Drawer.tsx +18 -0
  57. package/components/providers/flipova/components/Fab.tsx +22 -0
  58. package/components/providers/flipova/components/FlatList.tsx +1 -0
  59. package/components/providers/flipova/components/FormControl.tsx +27 -0
  60. package/components/providers/flipova/components/Grid.tsx +18 -0
  61. package/components/providers/flipova/components/HStack.tsx +13 -0
  62. package/components/providers/flipova/components/Heading.tsx +19 -0
  63. package/components/providers/flipova/components/Icon.tsx +20 -0
  64. package/components/providers/flipova/components/Image.tsx +1 -0
  65. package/components/providers/flipova/components/ImageBackground.tsx +1 -0
  66. package/components/providers/flipova/components/ImageViewer.tsx +25 -0
  67. package/components/providers/flipova/components/Input.tsx +29 -0
  68. package/components/providers/flipova/components/InputAccessoryView.tsx +1 -0
  69. package/components/providers/flipova/components/KeyboardAvoidingView.tsx +1 -0
  70. package/components/providers/flipova/components/Link.tsx +21 -0
  71. package/components/providers/flipova/components/LiquidGlass.tsx +13 -0
  72. package/components/providers/flipova/components/Menu.tsx +43 -0
  73. package/components/providers/flipova/components/Modal.tsx +24 -0
  74. package/components/providers/flipova/components/Popover.tsx +23 -0
  75. package/components/providers/flipova/components/Portal.tsx +42 -0
  76. package/components/providers/flipova/components/Pressable.tsx +1 -0
  77. package/components/providers/flipova/components/Progress.tsx +22 -0
  78. package/components/providers/flipova/components/RadioGroup.tsx +36 -0
  79. package/components/providers/flipova/components/RefreshControl.tsx +1 -0
  80. package/components/providers/flipova/components/SafeAreaView.tsx +1 -0
  81. package/components/providers/flipova/components/ScrollView.tsx +1 -0
  82. package/components/providers/flipova/components/SectionList.tsx +1 -0
  83. package/components/providers/flipova/components/Select.tsx +61 -0
  84. package/components/providers/flipova/components/Skeleton.tsx +25 -0
  85. package/components/providers/flipova/components/Slider.tsx +52 -0
  86. package/components/providers/flipova/components/Spinner.tsx +19 -0
  87. package/components/providers/flipova/components/StatusBar.tsx +1 -0
  88. package/components/providers/flipova/components/Switch.tsx +21 -0
  89. package/components/providers/flipova/components/Table.tsx +33 -0
  90. package/components/providers/flipova/components/Tabs.tsx +39 -0
  91. package/components/providers/flipova/components/Text.tsx +13 -0
  92. package/components/providers/flipova/components/Textarea.tsx +28 -0
  93. package/components/providers/flipova/components/Toast.tsx +28 -0
  94. package/components/providers/flipova/components/Tooltip.tsx +34 -0
  95. package/components/providers/flipova/components/VStack.tsx +13 -0
  96. package/components/providers/flipova/components/View.tsx +1 -0
  97. package/components/providers/flipova/components/VirtualizedList.tsx +1 -0
  98. package/components/providers/flipova/index.tsx +189 -0
  99. package/components/providers/gluestack/index.tsx +226 -0
  100. package/components/providers/gluestack/more.tsx +151 -0
  101. package/components/{ui → providers/gluestack/ui}/accordion/index.tsx +2 -2
  102. package/components/{ui → providers/gluestack/ui}/actionsheet/index.tsx +15 -15
  103. package/components/{ui → providers/gluestack/ui}/alert/index.tsx +1 -1
  104. package/components/{ui → providers/gluestack/ui}/alert-dialog/index.tsx +3 -3
  105. package/components/{ui → providers/gluestack/ui}/badge/index.tsx +2 -2
  106. package/components/{ui → providers/gluestack/ui}/bottomsheet/index.tsx +11 -10
  107. package/components/{ui → providers/gluestack/ui}/box/index.tsx +4 -1
  108. package/components/{ui → providers/gluestack/ui}/button/index.tsx +1 -1
  109. package/components/{ui → providers/gluestack/ui}/calendar/index.tsx +4 -4
  110. package/components/{ui → providers/gluestack/ui}/card/index.tsx +1 -1
  111. package/components/{ui → providers/gluestack/ui}/center/index.tsx +1 -1
  112. package/components/{ui → providers/gluestack/ui}/checkbox/index.tsx +9 -8
  113. package/components/{ui → providers/gluestack/ui}/date-time-picker/index.tsx +4 -4
  114. package/components/providers/gluestack/ui/date-time-picker/index.web.tsx +197 -0
  115. package/components/{ui → providers/gluestack/ui}/divider/index.tsx +1 -1
  116. package/components/{ui → providers/gluestack/ui}/drawer/index.tsx +2 -2
  117. package/components/{ui → providers/gluestack/ui}/fab/index.tsx +1 -1
  118. package/components/{ui → providers/gluestack/ui}/form-control/index.tsx +3 -3
  119. package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/config.ts +1 -62
  120. package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/tokens.js +1 -1
  121. package/components/{ui → providers/gluestack/ui}/grid/index.tsx +3 -3
  122. package/components/{ui → providers/gluestack/ui}/heading/index.tsx +7 -7
  123. package/components/{ui → providers/gluestack/ui}/hstack/index.tsx +1 -1
  124. package/components/{ui → providers/gluestack/ui}/icon/index.tsx +1 -1
  125. package/components/{ui → providers/gluestack/ui}/image/index.tsx +0 -1
  126. package/components/{ui → providers/gluestack/ui}/image-viewer/index.tsx +96 -99
  127. package/components/providers/gluestack/ui/index.ts +58 -0
  128. package/components/{ui → providers/gluestack/ui}/input/index.tsx +1 -1
  129. package/components/{ui → providers/gluestack/ui}/link/index.tsx +2 -2
  130. package/components/{ui → providers/gluestack/ui}/liquid-glass/index.tsx +2 -2
  131. package/components/{ui → providers/gluestack/ui}/menu/index.tsx +5 -4
  132. package/components/{ui → providers/gluestack/ui}/modal/index.tsx +19 -17
  133. package/components/{ui → providers/gluestack/ui}/popover/index.tsx +4 -4
  134. package/components/{ui → providers/gluestack/ui}/portal/index.tsx +1 -1
  135. package/components/{ui → providers/gluestack/ui}/progress/index.tsx +2 -2
  136. package/components/{ui → providers/gluestack/ui}/radio/index.tsx +1 -1
  137. package/components/{ui → providers/gluestack/ui}/select/index.tsx +8 -12
  138. package/components/{ui → providers/gluestack/ui}/select/select-actionsheet.tsx +13 -13
  139. package/components/{ui → providers/gluestack/ui}/skeleton/index.tsx +2 -2
  140. package/components/{ui → providers/gluestack/ui}/slider/index.tsx +1 -1
  141. package/components/{ui → providers/gluestack/ui}/spinner/index.tsx +2 -2
  142. package/components/{ui → providers/gluestack/ui}/table/index.tsx +33 -33
  143. package/components/{ui → providers/gluestack/ui}/tabs/TabsAnimatedIndicator.tsx +1 -1
  144. package/components/{ui → providers/gluestack/ui}/tabs/index.tsx +2 -2
  145. package/components/{ui → providers/gluestack/ui}/text/index.tsx +1 -1
  146. package/components/{ui → providers/gluestack/ui}/toast/index.tsx +4 -4
  147. package/components/{ui → providers/gluestack/ui}/tooltip/index.tsx +1 -1
  148. package/components/{ui → providers/gluestack/ui}/vstack/index.tsx +1 -1
  149. package/components/providers/index.ts +2 -0
  150. package/components/providers/paper/index.tsx +449 -0
  151. package/components/providers/provider.tsx +80 -0
  152. package/components/providers/reusables/classes.ts +163 -0
  153. package/components/providers/reusables/index.tsx +289 -0
  154. package/components/providers/rn-base/Box.tsx +7 -0
  155. package/components/providers/rn-base/FlatList.tsx +16 -0
  156. package/components/providers/rn-base/Image.tsx +18 -0
  157. package/components/providers/rn-base/ImageBackground.tsx +11 -0
  158. package/components/providers/rn-base/InputAccessoryView.tsx +9 -0
  159. package/components/providers/rn-base/KeyboardAvoidingView.tsx +15 -0
  160. package/components/providers/rn-base/Pressable.tsx +19 -0
  161. package/components/providers/rn-base/RefreshControl.tsx +16 -0
  162. package/components/providers/rn-base/SafeAreaView.tsx +11 -0
  163. package/components/providers/rn-base/ScrollView.tsx +11 -0
  164. package/components/providers/rn-base/SectionList.tsx +22 -0
  165. package/components/providers/rn-base/StatusBar.tsx +17 -0
  166. package/components/providers/rn-base/View.tsx +7 -0
  167. package/components/providers/rn-base/VirtualizedList.tsx +18 -0
  168. package/components/providers/rn-base/index.tsx +64 -0
  169. package/components/providers/tamagui/index.tsx +375 -0
  170. package/components/providers/types.ts +17 -0
  171. package/components/theme/design-theme.ts +230 -0
  172. package/components/ui/create.tsx +14 -0
  173. package/components/ui/index.ts +68 -58
  174. package/components/ui/resolve.ts +40 -0
  175. package/design/canonical.index.txt +2 -16
  176. package/design/manifest.xml +4 -3
  177. package/design/schema.xsd +44 -434
  178. package/design/themes.xml +7 -177
  179. package/design/tools/{npm.js → cli.js} +173 -73
  180. package/design/tools/gui/index.html +998 -0
  181. package/design/tools/lib/check.js +533 -0
  182. package/design/tools/lib/contract.js +23 -0
  183. package/design/tools/lib/edit.js +166 -0
  184. package/design/tools/lib/generate.js +465 -0
  185. package/design/tools/lib/gui.js +614 -0
  186. package/design/tools/lib/lint.js +139 -0
  187. package/design/tools/lib/registry.js +135 -0
  188. package/design/tools/lib/util.js +53 -0
  189. package/design/tools/lib/xml.js +257 -0
  190. package/design/tools/lib/xsd.js +408 -0
  191. package/dist/chunk-2QM2ZUDS.mjs +1308 -0
  192. package/dist/chunk-2QM2ZUDS.mjs.map +1 -0
  193. package/dist/chunk-2T2TCUYF.js +1371 -0
  194. package/dist/chunk-2T2TCUYF.js.map +1 -0
  195. package/dist/chunk-6UKTC4KF.js +43 -0
  196. package/dist/chunk-6UKTC4KF.js.map +1 -0
  197. package/dist/chunk-6Z4WRTI4.mjs +37 -0
  198. package/dist/chunk-6Z4WRTI4.mjs.map +1 -0
  199. package/dist/chunk-G3K6J5KY.js +157 -0
  200. package/dist/chunk-G3K6J5KY.js.map +1 -0
  201. package/dist/chunk-GM45RCSI.mjs +96 -0
  202. package/dist/chunk-GM45RCSI.mjs.map +1 -0
  203. package/dist/chunk-GQJLHH2P.mjs +3 -0
  204. package/dist/chunk-GQJLHH2P.mjs.map +1 -0
  205. package/dist/chunk-ICNR56VP.js +1653 -0
  206. package/dist/chunk-ICNR56VP.js.map +1 -0
  207. package/dist/chunk-J5LGTIGS.mjs +9 -0
  208. package/dist/chunk-J5LGTIGS.mjs.map +1 -0
  209. package/dist/chunk-LRPZLF2K.mjs +30 -0
  210. package/dist/chunk-LRPZLF2K.mjs.map +1 -0
  211. package/dist/chunk-OC4MXNXU.js +32 -0
  212. package/dist/chunk-OC4MXNXU.js.map +1 -0
  213. package/dist/chunk-PZ5AY32C.js +11 -0
  214. package/dist/chunk-PZ5AY32C.js.map +1 -0
  215. package/dist/chunk-RWVTZUEG.js +161 -0
  216. package/dist/chunk-RWVTZUEG.js.map +1 -0
  217. package/dist/chunk-V473I5XQ.js +4 -0
  218. package/dist/chunk-V473I5XQ.js.map +1 -0
  219. package/dist/chunk-V4ULAISZ.js +915 -0
  220. package/dist/chunk-V4ULAISZ.js.map +1 -0
  221. package/dist/chunk-WRJERTJS.mjs +145 -0
  222. package/dist/chunk-WRJERTJS.mjs.map +1 -0
  223. package/dist/chunk-YIBPE3KQ.mjs +864 -0
  224. package/dist/chunk-YIBPE3KQ.mjs.map +1 -0
  225. package/dist/chunk-YUAQIZPN.mjs +1556 -0
  226. package/dist/chunk-YUAQIZPN.mjs.map +1 -0
  227. package/dist/contract/index.d.mts +304 -0
  228. package/dist/contract/index.d.ts +304 -0
  229. package/dist/contract/index.js +256 -0
  230. package/dist/contract/index.js.map +1 -0
  231. package/dist/contract/index.mjs +3 -0
  232. package/dist/contract/index.mjs.map +1 -0
  233. package/dist/index.d.mts +4 -40
  234. package/dist/index.d.ts +4 -40
  235. package/dist/index.js +73 -992
  236. package/dist/index.mjs +2 -1
  237. package/dist/providers/flipova/index.d.mts +133 -0
  238. package/dist/providers/flipova/index.d.ts +133 -0
  239. package/dist/providers/flipova/index.js +249 -0
  240. package/dist/providers/flipova/index.js.map +1 -0
  241. package/dist/providers/flipova/index.mjs +4 -0
  242. package/dist/providers/flipova/index.mjs.map +1 -0
  243. package/dist/providers/gluestack/index.d.mts +7 -0
  244. package/dist/providers/gluestack/index.d.ts +7 -0
  245. package/dist/providers/gluestack/index.js +240 -0
  246. package/dist/providers/gluestack/index.js.map +1 -0
  247. package/dist/providers/gluestack/index.mjs +238 -0
  248. package/dist/providers/gluestack/index.mjs.map +1 -0
  249. package/dist/providers/gluestack/ui/index.d.mts +3472 -0
  250. package/dist/providers/gluestack/ui/index.d.ts +3472 -0
  251. package/dist/{chunk-LCTFQJZM.js → providers/gluestack/ui/index.js} +860 -2297
  252. package/dist/providers/gluestack/ui/index.js.map +1 -0
  253. package/dist/{chunk-2R66P5X5.mjs → providers/gluestack/ui/index.mjs} +468 -2062
  254. package/dist/providers/gluestack/ui/index.mjs.map +1 -0
  255. package/dist/providers/index.d.mts +37 -0
  256. package/dist/providers/index.d.ts +37 -0
  257. package/dist/providers/index.js +28 -0
  258. package/dist/providers/index.js.map +1 -0
  259. package/dist/providers/index.mjs +3 -0
  260. package/dist/providers/index.mjs.map +1 -0
  261. package/dist/providers/paper/index.d.mts +30 -0
  262. package/dist/providers/paper/index.d.ts +30 -0
  263. package/dist/providers/paper/index.js +362 -0
  264. package/dist/providers/paper/index.js.map +1 -0
  265. package/dist/providers/paper/index.mjs +353 -0
  266. package/dist/providers/paper/index.mjs.map +1 -0
  267. package/dist/providers/reusables/index.d.mts +60 -0
  268. package/dist/providers/reusables/index.d.ts +60 -0
  269. package/dist/providers/reusables/index.js +348 -0
  270. package/dist/providers/reusables/index.js.map +1 -0
  271. package/dist/providers/reusables/index.mjs +311 -0
  272. package/dist/providers/reusables/index.mjs.map +1 -0
  273. package/dist/providers/tamagui/index.d.mts +15 -0
  274. package/dist/providers/tamagui/index.d.ts +15 -0
  275. package/dist/providers/tamagui/index.js +275 -0
  276. package/dist/providers/tamagui/index.js.map +1 -0
  277. package/dist/providers/tamagui/index.mjs +270 -0
  278. package/dist/providers/tamagui/index.mjs.map +1 -0
  279. package/dist/theme-BznFrVT1.d.mts +566 -0
  280. package/dist/theme-BznFrVT1.d.ts +566 -0
  281. package/dist/types-C7P80VKR.d.ts +22 -0
  282. package/dist/types-Tspvmask.d.mts +22 -0
  283. package/dist/ui/index.d.mts +190 -7017
  284. package/dist/ui/index.d.ts +190 -7017
  285. package/dist/ui/index.js +73 -992
  286. package/dist/ui/index.mjs +2 -1
  287. package/package.json +136 -35
  288. package/components/ui/date-time-picker/index.web.tsx +0 -195
  289. package/design/documentation.xml +0 -607
  290. package/design/tools/design.js +0 -188
  291. package/design/tools/requirements.txt +0 -35
  292. package/design/tools/sources/.checker/__init__.py +0 -81
  293. package/design/tools/sources/.checker/checks.py +0 -198
  294. package/design/tools/sources/.checker/cli.py +0 -154
  295. package/design/tools/sources/.checker/io.py +0 -242
  296. package/design/tools/sources/.checker/model.py +0 -144
  297. package/design/tools/sources/.checker/registry.py +0 -115
  298. package/design/tools/sources/.checker/report.py +0 -21
  299. package/design/tools/sources/.docgen/__init__.py +0 -45
  300. package/design/tools/sources/.docgen/cli.py +0 -101
  301. package/design/tools/sources/.docgen/model.py +0 -147
  302. package/design/tools/sources/.docgen/reference.py +0 -97
  303. package/design/tools/sources/.docgen/site.py +0 -145
  304. package/design/tools/sources/.docgen/xsddoc.py +0 -329
  305. package/design/tools/sources/.generate/__init__.py +0 -35
  306. package/design/tools/sources/.generate/cli.py +0 -76
  307. package/design/tools/sources/.generate/common.py +0 -33
  308. package/design/tools/sources/.generate/config.py +0 -177
  309. package/design/tools/sources/.generate/model.py +0 -51
  310. package/design/tools/sources/.generate/tokens.py +0 -141
  311. package/design/tools/sources/.linter/__init__.py +0 -9
  312. package/design/tools/sources/.linter/cli.py +0 -44
  313. package/design/tools/sources/.linter/discovery.py +0 -30
  314. package/design/tools/sources/.linter/errors.py +0 -45
  315. package/design/tools/sources/.linter/linter.py +0 -68
  316. package/design/tools/sources/.xmleditor/__init__.py +0 -74
  317. package/design/tools/sources/.xmleditor/blocks.py +0 -185
  318. package/design/tools/sources/.xmleditor/cli.py +0 -141
  319. package/design/tools/sources/.xmleditor/editor.py +0 -906
  320. package/design/tools/sources/.xmleditor/model.py +0 -708
  321. package/design/tools/sources/.xmleditor/widgets.py +0 -1832
  322. package/design/tools/sources/.xmleditor/xsdmodel.py +0 -753
  323. package/design/tools/sources/checker.py +0 -55
  324. package/design/tools/sources/docgen.py +0 -66
  325. package/design/tools/sources/generate.py +0 -48
  326. package/design/tools/sources/linter.py +0 -54
  327. package/design/tools/sources/ruff.toml +0 -12
  328. package/design/tools/sources/xmleditor.py +0 -62
  329. package/design/tools/unix/_venv_python.sh +0 -16
  330. package/design/tools/unix/check.sh +0 -13
  331. package/design/tools/unix/doc.sh +0 -14
  332. package/design/tools/unix/gen.sh +0 -14
  333. package/design/tools/unix/lint.sh +0 -10
  334. package/design/tools/unix/run.sh +0 -20
  335. package/design/tools/unix/verify.sh +0 -12
  336. package/design/tools/unix/xmledit.sh +0 -12
  337. package/design/tools/windows/check.cmd +0 -12
  338. package/design/tools/windows/doc.cmd +0 -12
  339. package/design/tools/windows/gen.cmd +0 -11
  340. package/design/tools/windows/lint.cmd +0 -9
  341. package/design/tools/windows/run.cmd +0 -26
  342. package/design/tools/windows/verify.cmd +0 -10
  343. package/design/tools/windows/xmledit.cmd +0 -10
  344. package/dist/chunk-2R66P5X5.mjs.map +0 -1
  345. package/dist/chunk-LCTFQJZM.js.map +0 -1
  346. /package/components/{ui → providers/gluestack/ui}/accordion/ANIMATION_CUSTOMIZATION.md +0 -0
  347. /package/components/{ui → providers/gluestack/ui}/accordion/AccordionAnimatedHeight.tsx +0 -0
  348. /package/components/{ui → providers/gluestack/ui}/accordion/AccordionAnimatedIcon.tsx +0 -0
  349. /package/components/{ui → providers/gluestack/ui}/accordion/AnimatedHeight.tsx +0 -0
  350. /package/components/{ui → providers/gluestack/ui}/accordion/AnimatedIcon.tsx +0 -0
  351. /package/components/{ui → providers/gluestack/ui}/accordion/MIGRATION_SUMMARY.md +0 -0
  352. /package/components/{ui → providers/gluestack/ui}/accordion/USAGE_EXAMPLE.tsx +0 -0
  353. /package/components/{ui → providers/gluestack/ui}/accordion/animation-config.ts +0 -0
  354. /package/components/{ui → providers/gluestack/ui}/avatar/index.tsx +0 -0
  355. /package/components/{ui → providers/gluestack/ui}/box/index.web.tsx +0 -0
  356. /package/components/{ui → providers/gluestack/ui}/box/styles.tsx +0 -0
  357. /package/components/{ui → providers/gluestack/ui}/calendar/creator.tsx +0 -0
  358. /package/components/{ui → providers/gluestack/ui}/calendar/styles.tsx +0 -0
  359. /package/components/{ui → providers/gluestack/ui}/card/index.web.tsx +0 -0
  360. /package/components/{ui → providers/gluestack/ui}/card/styles.tsx +0 -0
  361. /package/components/{ui → providers/gluestack/ui}/center/index.web.tsx +0 -0
  362. /package/components/{ui → providers/gluestack/ui}/center/styles.tsx +0 -0
  363. /package/components/{ui → providers/gluestack/ui}/date-time-picker/creator.tsx +0 -0
  364. /package/components/{ui → providers/gluestack/ui}/date-time-picker/styles.tsx +0 -0
  365. /package/components/{ui → providers/gluestack/ui}/flat-list/index.tsx +0 -0
  366. /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/index.tsx +0 -0
  367. /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/index.web.tsx +0 -0
  368. /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/script.ts +0 -0
  369. /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/theme-context.ts +0 -0
  370. /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/tokens.d.ts +0 -0
  371. /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/useGluestackColors.ts +0 -0
  372. /package/components/{ui → providers/gluestack/ui}/grid/index.web.tsx +0 -0
  373. /package/components/{ui → providers/gluestack/ui}/grid/styles.tsx +0 -0
  374. /package/components/{ui → providers/gluestack/ui}/heading/index.web.tsx +0 -0
  375. /package/components/{ui → providers/gluestack/ui}/heading/styles.tsx +0 -0
  376. /package/components/{ui → providers/gluestack/ui}/hstack/index.web.tsx +0 -0
  377. /package/components/{ui → providers/gluestack/ui}/hstack/styles.tsx +0 -0
  378. /package/components/{ui → providers/gluestack/ui}/icon/index.web.tsx +0 -0
  379. /package/components/{ui → providers/gluestack/ui}/image-background/index.tsx +0 -0
  380. /package/components/{ui → providers/gluestack/ui}/image-viewer/index.web.tsx +0 -0
  381. /package/components/{ui → providers/gluestack/ui}/input-accessory-view/index.tsx +0 -0
  382. /package/components/{ui → providers/gluestack/ui}/keyboard-avoiding-view/index.tsx +0 -0
  383. /package/components/{ui → providers/gluestack/ui}/pressable/index.tsx +0 -0
  384. /package/components/{ui → providers/gluestack/ui}/refresh-control/index.tsx +0 -0
  385. /package/components/{ui → providers/gluestack/ui}/safe-area-view/index.tsx +0 -0
  386. /package/components/{ui → providers/gluestack/ui}/scroll-view/index.tsx +0 -0
  387. /package/components/{ui → providers/gluestack/ui}/section-list/index.tsx +0 -0
  388. /package/components/{ui → providers/gluestack/ui}/skeleton/index.web.tsx +0 -0
  389. /package/components/{ui → providers/gluestack/ui}/skeleton/styles.tsx +0 -0
  390. /package/components/{ui → providers/gluestack/ui}/status-bar/index.tsx +0 -0
  391. /package/components/{ui → providers/gluestack/ui}/switch/index.tsx +0 -0
  392. /package/components/{ui → providers/gluestack/ui}/table/index.web.tsx +0 -0
  393. /package/components/{ui → providers/gluestack/ui}/table/styles.tsx +0 -0
  394. /package/components/{ui → providers/gluestack/ui}/tabs/animation-config.ts +0 -0
  395. /package/components/{ui → providers/gluestack/ui}/tabs/creator.tsx +0 -0
  396. /package/components/{ui → providers/gluestack/ui}/text/index.web.tsx +0 -0
  397. /package/components/{ui → providers/gluestack/ui}/text/styles.tsx +0 -0
  398. /package/components/{ui → providers/gluestack/ui}/textarea/index.tsx +0 -0
  399. /package/components/{ui → providers/gluestack/ui}/view/index.tsx +0 -0
  400. /package/components/{ui → providers/gluestack/ui}/virtualized-list/index.tsx +0 -0
  401. /package/components/{ui → providers/gluestack/ui}/vstack/index.web.tsx +0 -0
  402. /package/components/{ui → providers/gluestack/ui}/vstack/styles.tsx +0 -0
@@ -0,0 +1,1308 @@
1
+ // components/contract/types.ts
2
+ var UI_NAMES = [
3
+ "Accordion",
4
+ "ActionSheet",
5
+ "Alert",
6
+ "AlertDialog",
7
+ "Avatar",
8
+ "Badge",
9
+ "BottomSheet",
10
+ "Box",
11
+ "Button",
12
+ "Calendar",
13
+ "Card",
14
+ "Center",
15
+ "Checkbox",
16
+ "DateTimePicker",
17
+ "Divider",
18
+ "Drawer",
19
+ "Fab",
20
+ "FlatList",
21
+ "FormControl",
22
+ "Grid",
23
+ "Heading",
24
+ "HStack",
25
+ "Icon",
26
+ "Image",
27
+ "ImageBackground",
28
+ "ImageViewer",
29
+ "Input",
30
+ "InputAccessoryView",
31
+ "KeyboardAvoidingView",
32
+ "LiquidGlass",
33
+ "Link",
34
+ "Menu",
35
+ "Modal",
36
+ "Popover",
37
+ "Portal",
38
+ "Pressable",
39
+ "Progress",
40
+ "RadioGroup",
41
+ "RefreshControl",
42
+ "SafeAreaView",
43
+ "ScrollView",
44
+ "SectionList",
45
+ "Select",
46
+ "Skeleton",
47
+ "Slider",
48
+ "Spinner",
49
+ "StatusBar",
50
+ "Switch",
51
+ "Table",
52
+ "Tabs",
53
+ "Text",
54
+ "Textarea",
55
+ "Toast",
56
+ "Tooltip",
57
+ "View",
58
+ "VirtualizedList",
59
+ "VStack"
60
+ ];
61
+ var PROVIDERS = ["flipova", "gluestack", "reusables", "paper", "tamagui"];
62
+
63
+ // components/theme/design-theme.ts
64
+ var designTheme = {
65
+ themes: {
66
+ "light": {
67
+ mode: "light",
68
+ variant: "default",
69
+ colors: {
70
+ "background": "#fafafa",
71
+ "foreground": "#18181b",
72
+ "card": "#ffffff",
73
+ "cardForeground": "#18181b",
74
+ "popover": "#ffffff",
75
+ "popoverForeground": "#18181b",
76
+ "primary": "#2563eb",
77
+ "primaryForeground": "#ffffff",
78
+ "secondary": "#475569",
79
+ "secondaryForeground": "#ffffff",
80
+ "muted": "#f4f4f5",
81
+ "mutedForeground": "#52525b",
82
+ "accent": "#eff6ff",
83
+ "accentForeground": "#1e3a8a",
84
+ "destructive": "#dc2626",
85
+ "destructiveForeground": "#ffffff",
86
+ "border": "#e4e4e7",
87
+ "input": "#e4e4e7",
88
+ "ring": "#3b82f6",
89
+ "success": "#16a34a",
90
+ "successForeground": "#ffffff",
91
+ "warning": "#d97706",
92
+ "warningForeground": "#ffffff",
93
+ "error": "#dc2626",
94
+ "errorForeground": "#ffffff",
95
+ "info": "#0284c7",
96
+ "infoForeground": "#ffffff"
97
+ }
98
+ },
99
+ "dark": {
100
+ mode: "dark",
101
+ variant: "default",
102
+ colors: {
103
+ "background": "#18181b",
104
+ "foreground": "#f4f4f5",
105
+ "card": "#27272a",
106
+ "cardForeground": "#f4f4f5",
107
+ "popover": "#27272a",
108
+ "popoverForeground": "#f4f4f5",
109
+ "primary": "#3b82f6",
110
+ "primaryForeground": "#ffffff",
111
+ "secondary": "#64748b",
112
+ "secondaryForeground": "#ffffff",
113
+ "muted": "#27272a",
114
+ "mutedForeground": "#a1a1aa",
115
+ "accent": "#1e3a8a",
116
+ "accentForeground": "#dbeafe",
117
+ "destructive": "#ef4444",
118
+ "destructiveForeground": "#ffffff",
119
+ "border": "#3f3f46",
120
+ "input": "#3f3f46",
121
+ "ring": "#60a5fa",
122
+ "success": "#22c55e",
123
+ "successForeground": "#18181b",
124
+ "warning": "#f59e0b",
125
+ "warningForeground": "#18181b",
126
+ "error": "#ef4444",
127
+ "errorForeground": "#ffffff",
128
+ "info": "#0ea5e9",
129
+ "infoForeground": "#ffffff"
130
+ }
131
+ }
132
+ },
133
+ variants: {
134
+ "default": { "dark": "dark", "light": "light" }
135
+ },
136
+ scale: {
137
+ spacing: {
138
+ "0": 0,
139
+ "0.5": 2,
140
+ "1": 4,
141
+ "1.5": 6,
142
+ "2": 8,
143
+ "2.5": 10,
144
+ "3": 12,
145
+ "3.5": 14,
146
+ "4": 16,
147
+ "5": 20,
148
+ "6": 24,
149
+ "7": 28,
150
+ "8": 32,
151
+ "9": 36,
152
+ "10": 40,
153
+ "11": 44,
154
+ "12": 48,
155
+ "14": 56,
156
+ "16": 64,
157
+ "20": 80,
158
+ "24": 96,
159
+ "32": 128,
160
+ "40": 160,
161
+ "48": 192
162
+ },
163
+ radii: {
164
+ "none": 0,
165
+ "xs": 2,
166
+ "sm": 4,
167
+ "md": 8,
168
+ "lg": 12,
169
+ "xl": 16,
170
+ "2xl": 24,
171
+ "3xl": 32,
172
+ "full": 9999
173
+ },
174
+ fontSizes: {
175
+ "2xs": 10,
176
+ "xs": 12,
177
+ "sm": 14,
178
+ "md": 16,
179
+ "lg": 18,
180
+ "xl": 20,
181
+ "2xl": 24,
182
+ "3xl": 30,
183
+ "4xl": 36,
184
+ "5xl": 48,
185
+ "6xl": 60,
186
+ "7xl": 72,
187
+ "8xl": 96,
188
+ "9xl": 128
189
+ },
190
+ fontWeights: {
191
+ "thin": 100,
192
+ "extralight": 200,
193
+ "light": 300,
194
+ "normal": 400,
195
+ "medium": 500,
196
+ "semibold": 600,
197
+ "bold": 700,
198
+ "extrabold": 800,
199
+ "black": 900
200
+ },
201
+ lineHeights: {
202
+ "xs": 16,
203
+ "sm": 20,
204
+ "md": 24,
205
+ "lg": 28,
206
+ "xl": 28,
207
+ "2xl": 32,
208
+ "3xl": 36,
209
+ "4xl": 40,
210
+ "5xl": 1,
211
+ "6xl": 1,
212
+ "7xl": 1,
213
+ "8xl": 1,
214
+ "9xl": 1
215
+ },
216
+ letterSpacings: {
217
+ "tighter": -0.05,
218
+ "tight": -0.025,
219
+ "normal": 0,
220
+ "wide": 0.025,
221
+ "wider": 0.05,
222
+ "widest": 0.1
223
+ },
224
+ opacity: {
225
+ "faint": 0.08,
226
+ "muted": 0.4,
227
+ "dim": 0.6,
228
+ "solid": 1
229
+ },
230
+ duration: {
231
+ "instant": 0,
232
+ "fastest": 80,
233
+ "fast": 120,
234
+ "normal": 200,
235
+ "slow": 350,
236
+ "slower": 500,
237
+ "slowest": 700
238
+ },
239
+ zIndex: {
240
+ "base": 0,
241
+ "sticky": 100,
242
+ "dropdown": 1e3,
243
+ "popover": 1500,
244
+ "overlay": 1300,
245
+ "drawer": 1400,
246
+ "modal": 2e3,
247
+ "toast": 3e3,
248
+ "tooltip": 3100
249
+ },
250
+ breakpoints: {
251
+ "base": 0,
252
+ "xs": 480,
253
+ "sm": 640,
254
+ "md": 768,
255
+ "lg": 1024,
256
+ "xl": 1280,
257
+ "2xl": 1536
258
+ },
259
+ fontFamilies: {
260
+ "system": { native: "system", web: "system-ui, -apple-system, Segoe UI, Roboto, sans-serif" },
261
+ "mono": { native: "monospace", web: "ui-monospace, SFMono-Regular, Menlo, monospace" },
262
+ "serif": { native: "serif", web: "Georgia, Cambria, Times New Roman, serif" },
263
+ "sans": { native: "System", web: "var(--font-sans)" },
264
+ "body": { native: "System", web: "var(--font-sans)" },
265
+ "heading": { native: "System", web: "var(--font-heading)" },
266
+ "roboto": { native: "Roboto", web: "Roboto, sans-serif" }
267
+ },
268
+ shadows: {
269
+ "sm": { color: "#000000", offsetX: 0, offsetY: 1, radius: 2, opacity: 0.05, elevation: 1 },
270
+ "md": { color: "#000000", offsetX: 0, offsetY: 3, radius: 4, opacity: 0.1, elevation: 3 },
271
+ "lg": { color: "#000000", offsetX: 0, offsetY: 6, radius: 12, opacity: 0.1, elevation: 6 },
272
+ "xl": { color: "#000000", offsetX: 0, offsetY: 12, radius: 24, opacity: 0.14, elevation: 10 },
273
+ "hard-1": { color: "#262626", offsetX: -2, offsetY: 2, radius: 8, opacity: 0.2, elevation: 1 },
274
+ "hard-2": { color: "#262626", offsetX: 0, offsetY: 3, radius: 10, opacity: 0.2, elevation: 1 },
275
+ "hard-3": { color: "#262626", offsetX: 2, offsetY: 2, radius: 8, opacity: 0.2, elevation: 1 },
276
+ "hard-4": { color: "#262626", offsetX: 0, offsetY: -3, radius: 10, opacity: 0.2, elevation: 1 },
277
+ "hard-5": { color: "#262626", offsetX: 0, offsetY: 2, radius: 10, opacity: 0.1, elevation: 1 },
278
+ "soft-1": { color: "#262626", offsetX: 0, offsetY: 0, radius: 10, opacity: 0.1, elevation: 1 },
279
+ "soft-2": { color: "#262626", offsetX: 0, offsetY: 0, radius: 20, opacity: 0.2, elevation: 1 },
280
+ "soft-3": { color: "#262626", offsetX: 0, offsetY: 0, radius: 30, opacity: 0.1, elevation: 1 },
281
+ "soft-4": { color: "#262626", offsetX: 0, offsetY: 0, radius: 40, opacity: 0.1, elevation: 1 }
282
+ }
283
+ }
284
+ };
285
+
286
+ // components/contract/theme.ts
287
+ var REQUIRED_ROLES = [
288
+ "background",
289
+ "foreground",
290
+ "card",
291
+ "cardForeground",
292
+ "popover",
293
+ "popoverForeground",
294
+ "primary",
295
+ "primaryForeground",
296
+ "secondary",
297
+ "secondaryForeground",
298
+ "muted",
299
+ "mutedForeground",
300
+ "accent",
301
+ "accentForeground",
302
+ "destructive",
303
+ "destructiveForeground",
304
+ "border",
305
+ "input",
306
+ "ring",
307
+ "success",
308
+ "successForeground",
309
+ "warning",
310
+ "warningForeground",
311
+ "error",
312
+ "errorForeground",
313
+ "info",
314
+ "infoForeground"
315
+ ];
316
+ var defaultRegistry = designTheme;
317
+ function themeIdFor(variant, mode, theme = defaultRegistry) {
318
+ const variants = theme.variants;
319
+ const pair = variant && variants[variant] || variants.default || Object.values(variants)[0];
320
+ const byMode = pair?.[mode];
321
+ if (byMode && theme.themes[byMode]) return byMode;
322
+ const any = Object.entries(theme.themes).find(([, t]) => t.mode === mode) ?? Object.entries(theme.themes)[0];
323
+ if (!any) throw new Error("the theme registry declares no theme");
324
+ return any[0];
325
+ }
326
+ function resolveTheme(id, theme = defaultRegistry) {
327
+ const t = theme.themes[id];
328
+ if (!t) throw new Error(`unknown theme "${id}" (known: ${Object.keys(theme.themes).join(", ")})`);
329
+ const missing = REQUIRED_ROLES.filter((r) => !(r in t.colors));
330
+ if (missing.length)
331
+ throw new Error(`theme "${id}" lacks the colour role(s) the components read: ${missing.join(", ")}`);
332
+ return { id, mode: t.mode, variant: t.variant, colors: t.colors, scale: theme.scale };
333
+ }
334
+ function withAlpha(hex, alpha) {
335
+ let d = hex.replace("#", "");
336
+ if (d.length === 3) d = [...d].map((c) => c + c).join("");
337
+ const n = parseInt(d.slice(0, 6), 16);
338
+ const a = Math.round(alpha * 1e3) / 1e3;
339
+ return `rgba(${n >> 16 & 255}, ${n >> 8 & 255}, ${n & 255}, ${a})`;
340
+ }
341
+
342
+ // components/contract/recipes/util.ts
343
+ var px = (theme, scale, key) => {
344
+ const v = theme.scale[scale][key];
345
+ if (v === void 0) throw new Error(`design token ${scale}.${key} is missing from the registry`);
346
+ return v;
347
+ };
348
+ var weight = (theme, key) => String(px(theme, "fontWeights", key));
349
+
350
+ // components/contract/recipes/button.ts
351
+ function buttonRecipe({ variant = "default", size = "default", disabled = false }, t) {
352
+ const c = t.colors;
353
+ const bg = {
354
+ default: c.primary,
355
+ destructive: c.destructive,
356
+ outline: c.background,
357
+ secondary: c.secondary,
358
+ ghost: "transparent",
359
+ link: "transparent"
360
+ };
361
+ const fg = {
362
+ default: c.primaryForeground,
363
+ destructive: "#ffffff",
364
+ outline: c.foreground,
365
+ secondary: c.secondaryForeground,
366
+ ghost: c.foreground,
367
+ link: c.primary
368
+ };
369
+ const dims = {
370
+ default: { paddingHorizontal: px(t, "spacing", "4"), paddingVertical: px(t, "spacing", "2") },
371
+ sm: { minHeight: px(t, "spacing", "8"), paddingHorizontal: px(t, "spacing", "3") },
372
+ lg: { minHeight: px(t, "spacing", "10"), paddingHorizontal: px(t, "spacing", "8") },
373
+ icon: { minHeight: px(t, "spacing", "9"), minWidth: px(t, "spacing", "9") }
374
+ };
375
+ const container = {
376
+ flexDirection: "row",
377
+ alignItems: "center",
378
+ justifyContent: "center",
379
+ borderRadius: px(t, "radii", "md"),
380
+ gap: px(t, "spacing", "2"),
381
+ backgroundColor: bg[variant],
382
+ ...dims[size],
383
+ opacity: disabled ? 0.4 : 1
384
+ };
385
+ if (variant === "outline") {
386
+ container.borderWidth = 1;
387
+ container.borderColor = c.border;
388
+ }
389
+ const label = {
390
+ color: fg[variant],
391
+ fontSize: px(t, "fontSizes", size === "sm" ? "xs" : "sm"),
392
+ fontWeight: weight(t, "medium")
393
+ };
394
+ return { container, label, spinner: { size: px(t, "spacing", "4"), color: fg[variant] } };
395
+ }
396
+
397
+ // components/contract/recipes/text.ts
398
+ function textRecipe({ size = "md", bold, underline, strikeThrough }, t) {
399
+ const style = { color: t.colors.foreground, fontSize: px(t, "fontSizes", size) };
400
+ if (bold) style.fontWeight = weight(t, "bold");
401
+ if (underline || strikeThrough)
402
+ style.textDecorationLine = underline && strikeThrough ? "underline line-through" : underline ? "underline" : "line-through";
403
+ return style;
404
+ }
405
+
406
+ // components/contract/recipes/heading.ts
407
+ var SIZE = { 1: "4xl", 2: "3xl", 3: "2xl", 4: "xl", 5: "lg", 6: "md" };
408
+ function headingRecipe({ level = 2 }, t) {
409
+ const fontSize = px(t, "fontSizes", SIZE[level]);
410
+ return {
411
+ color: t.colors.foreground,
412
+ fontSize,
413
+ fontWeight: weight(t, level <= 4 ? "bold" : "semibold"),
414
+ // tighter tracking on the large levels, expressed (as the registry does) as a fraction of the size
415
+ letterSpacing: level <= 2 ? Math.round(fontSize * t.scale.letterSpacings.tight * 100) / 100 : 0
416
+ };
417
+ }
418
+
419
+ // components/contract/recipes/input.ts
420
+ function inputRecipe({ disabled = false, invalid = false }, t) {
421
+ const c = t.colors;
422
+ return {
423
+ container: {
424
+ height: px(t, "spacing", "9"),
425
+ width: "100%",
426
+ flexDirection: "row",
427
+ alignItems: "center",
428
+ gap: px(t, "spacing", "2"),
429
+ paddingHorizontal: px(t, "spacing", "3"),
430
+ borderRadius: px(t, "radii", "md"),
431
+ borderWidth: 1,
432
+ borderColor: invalid ? withAlpha(c.destructive, 0.4) : c.border,
433
+ backgroundColor: "transparent",
434
+ opacity: disabled ? 0.5 : 1
435
+ },
436
+ field: {
437
+ flex: 1,
438
+ height: "100%",
439
+ color: c.foreground,
440
+ fontSize: px(t, "fontSizes", "sm"),
441
+ paddingVertical: px(t, "spacing", "1")
442
+ },
443
+ placeholderTextColor: c.mutedForeground,
444
+ focusBorderColor: c.ring
445
+ };
446
+ }
447
+
448
+ // components/contract/recipes/textarea.ts
449
+ function textareaRecipe({ rows = 4, disabled = false, invalid = false }, t) {
450
+ const c = t.colors;
451
+ const line = t.scale.lineHeights.sm;
452
+ const pad = px(t, "spacing", "2");
453
+ return {
454
+ field: {
455
+ width: "100%",
456
+ minHeight: rows * line + 2 * pad + 2,
457
+ paddingHorizontal: px(t, "spacing", "3"),
458
+ paddingVertical: pad,
459
+ borderRadius: px(t, "radii", "md"),
460
+ borderWidth: 1,
461
+ borderColor: invalid ? withAlpha(c.destructive, 0.4) : c.border,
462
+ backgroundColor: "transparent",
463
+ color: c.foreground,
464
+ fontSize: px(t, "fontSizes", "sm"),
465
+ lineHeight: line,
466
+ textAlignVertical: "top",
467
+ opacity: disabled ? 0.5 : 1
468
+ },
469
+ placeholderTextColor: c.mutedForeground,
470
+ focusBorderColor: c.ring
471
+ };
472
+ }
473
+
474
+ // components/contract/recipes/select.ts
475
+ function selectRecipe({ disabled = false, invalid = false }, t) {
476
+ const c = t.colors;
477
+ const sh = t.scale.shadows.md;
478
+ return {
479
+ trigger: {
480
+ height: px(t, "spacing", "9"),
481
+ width: "100%",
482
+ flexDirection: "row",
483
+ alignItems: "center",
484
+ justifyContent: "space-between",
485
+ gap: px(t, "spacing", "2"),
486
+ paddingHorizontal: px(t, "spacing", "3"),
487
+ borderRadius: px(t, "radii", "md"),
488
+ borderWidth: 1,
489
+ borderColor: invalid ? withAlpha(c.destructive, 0.4) : c.border,
490
+ backgroundColor: "transparent",
491
+ opacity: disabled ? 0.5 : 1
492
+ },
493
+ triggerLabel: { flex: 1, color: c.foreground, fontSize: px(t, "fontSizes", "sm") },
494
+ placeholderColor: c.mutedForeground,
495
+ menu: {
496
+ marginTop: px(t, "spacing", "1"),
497
+ padding: px(t, "spacing", "1"),
498
+ maxHeight: px(t, "spacing", "48") + px(t, "spacing", "12"),
499
+ backgroundColor: c.popover,
500
+ borderRadius: px(t, "radii", "md"),
501
+ borderWidth: 1,
502
+ borderColor: c.border,
503
+ shadowColor: sh.color,
504
+ shadowOffset: { width: sh.offsetX, height: sh.offsetY },
505
+ shadowOpacity: sh.opacity,
506
+ shadowRadius: sh.radius,
507
+ elevation: sh.elevation
508
+ },
509
+ option: {
510
+ paddingHorizontal: px(t, "spacing", "2"),
511
+ paddingVertical: px(t, "spacing", "1.5"),
512
+ borderRadius: px(t, "radii", "sm")
513
+ },
514
+ optionSelected: { backgroundColor: c.accent },
515
+ optionLabel: { color: c.popoverForeground, fontSize: px(t, "fontSizes", "sm") },
516
+ optionLabelSelected: { color: c.accentForeground, fontWeight: weight(t, "medium") },
517
+ disabledOptionOpacity: 0.4,
518
+ focusBorderColor: c.ring
519
+ };
520
+ }
521
+
522
+ // components/contract/recipes/checkbox.ts
523
+ function checkboxRecipe({ checked = false, disabled = false, invalid = false }, t) {
524
+ const c = t.colors;
525
+ const size = px(t, "spacing", "5");
526
+ return {
527
+ row: { flexDirection: "row", alignItems: "center", gap: px(t, "spacing", "2"), opacity: disabled ? 0.4 : 1 },
528
+ box: {
529
+ width: size,
530
+ height: size,
531
+ alignItems: "center",
532
+ justifyContent: "center",
533
+ borderRadius: px(t, "radii", "sm"),
534
+ borderWidth: 1,
535
+ borderColor: invalid ? withAlpha(c.destructive, 0.6) : checked ? c.primary : c.input,
536
+ backgroundColor: checked ? c.primary : "transparent"
537
+ },
538
+ mark: { color: c.primaryForeground, fontSize: px(t, "fontSizes", "xs") },
539
+ label: { color: c.foreground, fontSize: px(t, "fontSizes", "sm") }
540
+ };
541
+ }
542
+
543
+ // components/contract/recipes/radio.ts
544
+ function radioRecipe({ orientation = "vertical", disabled = false }, t) {
545
+ const c = t.colors;
546
+ const size = px(t, "spacing", "5");
547
+ const dot = px(t, "spacing", "2.5");
548
+ return {
549
+ group: {
550
+ flexDirection: orientation === "horizontal" ? "row" : "column",
551
+ gap: px(t, "spacing", orientation === "horizontal" ? "4" : "2"),
552
+ opacity: disabled ? 0.4 : 1
553
+ },
554
+ row: { flexDirection: "row", alignItems: "center", gap: px(t, "spacing", "2") },
555
+ circle: (selected) => ({
556
+ width: size,
557
+ height: size,
558
+ alignItems: "center",
559
+ justifyContent: "center",
560
+ borderRadius: px(t, "radii", "full"),
561
+ borderWidth: 1,
562
+ borderColor: selected ? c.primary : c.input
563
+ }),
564
+ dot: { width: dot, height: dot, borderRadius: px(t, "radii", "full"), backgroundColor: c.primary },
565
+ label: { color: c.foreground, fontSize: px(t, "fontSizes", "sm") }
566
+ };
567
+ }
568
+
569
+ // components/contract/recipes/switch.ts
570
+ function switchRecipe({ size = "md", disabled = false }, t) {
571
+ return {
572
+ trackOn: t.colors.primary,
573
+ trackOff: t.colors.input,
574
+ thumb: t.colors.background,
575
+ scale: { sm: 0.75, md: 1, lg: 1.25 }[size],
576
+ opacity: disabled ? 0.4 : 1,
577
+ width: px(t, "spacing", "11"),
578
+ height: px(t, "spacing", "6")
579
+ };
580
+ }
581
+
582
+ // components/contract/recipes/card.ts
583
+ function cardRecipe({ size = "default" }, t) {
584
+ const sh = t.scale.shadows.sm;
585
+ return {
586
+ flexDirection: "column",
587
+ backgroundColor: t.colors.card,
588
+ borderWidth: 1,
589
+ borderColor: t.colors.border,
590
+ borderRadius: px(t, "radii", "xl"),
591
+ padding: px(t, "spacing", size === "sm" ? "3" : "4"),
592
+ gap: px(t, "spacing", size === "sm" ? "3" : "6"),
593
+ shadowColor: sh.color,
594
+ shadowOffset: { width: sh.offsetX, height: sh.offsetY },
595
+ shadowOpacity: sh.opacity,
596
+ shadowRadius: sh.radius,
597
+ elevation: sh.elevation
598
+ };
599
+ }
600
+
601
+ // components/contract/recipes/badge.ts
602
+ function badgeRecipe({ variant = "default" }, t) {
603
+ const c = t.colors;
604
+ const bg = {
605
+ default: c.primary,
606
+ secondary: c.secondary,
607
+ destructive: c.destructive,
608
+ outline: "transparent"
609
+ };
610
+ const fg = {
611
+ default: c.primaryForeground,
612
+ secondary: c.secondaryForeground,
613
+ destructive: "#ffffff",
614
+ outline: c.foreground
615
+ };
616
+ const container = {
617
+ flexDirection: "row",
618
+ alignItems: "center",
619
+ justifyContent: "center",
620
+ borderRadius: px(t, "radii", "sm"),
621
+ paddingHorizontal: px(t, "spacing", "2"),
622
+ paddingVertical: px(t, "spacing", "0.5"),
623
+ backgroundColor: bg[variant]
624
+ };
625
+ if (variant === "outline") {
626
+ container.borderWidth = 1;
627
+ container.borderColor = c.border;
628
+ }
629
+ return {
630
+ container,
631
+ label: {
632
+ color: fg[variant],
633
+ fontSize: px(t, "fontSizes", "xs"),
634
+ fontWeight: weight(t, "medium"),
635
+ textTransform: "uppercase"
636
+ }
637
+ };
638
+ }
639
+
640
+ // components/contract/recipes/avatar.ts
641
+ var BOX = { sm: "8", md: "10", lg: "14", xl: "20" };
642
+ var TEXT = { sm: "xs", md: "sm", lg: "xl", xl: "3xl" };
643
+ function avatarRecipe({ size = "md" }, t) {
644
+ const box = px(t, "spacing", BOX[size]);
645
+ return {
646
+ container: {
647
+ width: box,
648
+ height: box,
649
+ borderRadius: px(t, "radii", "full"),
650
+ overflow: "hidden",
651
+ alignItems: "center",
652
+ justifyContent: "center",
653
+ backgroundColor: t.colors.muted
654
+ },
655
+ image: { width: box, height: box },
656
+ initials: {
657
+ color: t.colors.mutedForeground,
658
+ fontSize: px(t, "fontSizes", TEXT[size]),
659
+ fontWeight: weight(t, "medium")
660
+ }
661
+ };
662
+ }
663
+ function initialsOf(name) {
664
+ const words = (name ?? "").trim().split(/\s+/).filter(Boolean);
665
+ if (!words.length) return "?";
666
+ const letters = words.length === 1 ? [words[0]] : [words[0], words[words.length - 1]];
667
+ return letters.map((w) => Array.from(w)[0].toUpperCase()).join("");
668
+ }
669
+
670
+ // components/contract/recipes/divider.ts
671
+ function dividerRecipe({ orientation = "horizontal" }, t) {
672
+ return orientation === "vertical" ? { width: 1, alignSelf: "stretch", backgroundColor: t.colors.border } : { height: 1, width: "100%", backgroundColor: t.colors.border };
673
+ }
674
+
675
+ // components/contract/recipes/modal.ts
676
+ function modalRecipe(_p, t) {
677
+ const c = t.colors;
678
+ const sh = t.scale.shadows.lg;
679
+ return {
680
+ // the scrim is the shadow colour of the registry (black in the starter), not a literal
681
+ backdrop: {
682
+ flex: 1,
683
+ alignItems: "center",
684
+ justifyContent: "center",
685
+ padding: px(t, "spacing", "4"),
686
+ backgroundColor: withAlpha(sh.color, 0.5)
687
+ },
688
+ panel: {
689
+ width: "100%",
690
+ maxWidth: px(t, "spacing", "48") * 2.5,
691
+ gap: px(t, "spacing", "4"),
692
+ padding: px(t, "spacing", "6"),
693
+ backgroundColor: c.popover,
694
+ borderRadius: px(t, "radii", "xl"),
695
+ borderWidth: 1,
696
+ borderColor: c.border,
697
+ shadowColor: sh.color,
698
+ shadowOffset: { width: sh.offsetX, height: sh.offsetY },
699
+ shadowOpacity: sh.opacity,
700
+ shadowRadius: sh.radius,
701
+ elevation: sh.elevation
702
+ },
703
+ title: { color: c.popoverForeground, fontSize: px(t, "fontSizes", "lg"), fontWeight: weight(t, "semibold") }
704
+ };
705
+ }
706
+
707
+ // components/contract/recipes/tabs.ts
708
+ function tabsRecipe(_p, t) {
709
+ const c = t.colors;
710
+ return {
711
+ list: { flexDirection: "row", borderBottomWidth: 1, borderBottomColor: c.border },
712
+ tab: (active, disabled) => ({
713
+ paddingHorizontal: px(t, "spacing", "4"),
714
+ paddingVertical: px(t, "spacing", "2"),
715
+ borderBottomWidth: 2,
716
+ marginBottom: -1,
717
+ borderBottomColor: active ? c.primary : "transparent",
718
+ opacity: disabled ? 0.4 : 1
719
+ }),
720
+ label: (active) => ({
721
+ color: active ? c.foreground : c.mutedForeground,
722
+ fontSize: px(t, "fontSizes", "sm"),
723
+ fontWeight: weight(t, "medium")
724
+ }),
725
+ panel: { paddingTop: px(t, "spacing", "4") }
726
+ };
727
+ }
728
+
729
+ // components/contract/recipes/feedback.ts
730
+ function feedbackColor(variant, t) {
731
+ const c = t.colors;
732
+ return { info: c.info, success: c.success, warning: c.warning, error: c.error, default: c.border }[variant];
733
+ }
734
+ function alertRecipe({ variant = "info" }, t) {
735
+ const accent = feedbackColor(variant, t);
736
+ return {
737
+ accent,
738
+ container: {
739
+ width: "100%",
740
+ gap: px(t, "spacing", "1"),
741
+ padding: px(t, "spacing", "4"),
742
+ borderRadius: px(t, "radii", "lg"),
743
+ borderWidth: 1,
744
+ borderColor: withAlpha(accent, 0.4),
745
+ borderLeftWidth: 4,
746
+ borderLeftColor: accent,
747
+ backgroundColor: withAlpha(accent, 0.1)
748
+ },
749
+ title: { color: t.colors.foreground, fontSize: px(t, "fontSizes", "sm"), fontWeight: weight(t, "semibold") },
750
+ body: { color: t.colors.foreground, fontSize: px(t, "fontSizes", "sm") }
751
+ };
752
+ }
753
+ function toastRecipe({ variant = "default" }, t) {
754
+ const c = t.colors;
755
+ const accent = feedbackColor(variant, t);
756
+ const sh = t.scale.shadows.lg;
757
+ return {
758
+ accent,
759
+ container: {
760
+ minWidth: px(t, "spacing", "40") + px(t, "spacing", "24"),
761
+ flexDirection: "row",
762
+ alignItems: "flex-start",
763
+ gap: px(t, "spacing", "3"),
764
+ padding: px(t, "spacing", "4"),
765
+ borderRadius: px(t, "radii", "lg"),
766
+ borderWidth: 1,
767
+ borderColor: c.border,
768
+ borderLeftWidth: 4,
769
+ borderLeftColor: accent,
770
+ backgroundColor: c.popover,
771
+ shadowColor: sh.color,
772
+ shadowOffset: { width: sh.offsetX, height: sh.offsetY },
773
+ shadowOpacity: sh.opacity,
774
+ shadowRadius: sh.radius,
775
+ elevation: sh.elevation
776
+ },
777
+ title: { color: c.popoverForeground, fontSize: px(t, "fontSizes", "sm"), fontWeight: weight(t, "semibold") },
778
+ body: { color: c.mutedForeground, fontSize: px(t, "fontSizes", "sm") }
779
+ };
780
+ }
781
+
782
+ // components/contract/recipes/progress.ts
783
+ var HEIGHT = { sm: "1", md: "2", lg: "3" };
784
+ function progressRecipe({ value, size = "md" }, t) {
785
+ const pct = Math.min(100, Math.max(0, Number.isFinite(value) ? value : 0));
786
+ return {
787
+ value: pct,
788
+ track: {
789
+ width: "100%",
790
+ height: px(t, "spacing", HEIGHT[size]),
791
+ borderRadius: px(t, "radii", "full"),
792
+ overflow: "hidden",
793
+ backgroundColor: t.colors.muted
794
+ },
795
+ bar: { width: `${pct}%`, height: "100%", borderRadius: px(t, "radii", "full"), backgroundColor: t.colors.primary }
796
+ };
797
+ }
798
+
799
+ // components/contract/recipes/skeleton.ts
800
+ function skeletonRecipe({ width = "100%", height, circle = false }, t) {
801
+ const h = height ?? px(t, "spacing", "4");
802
+ return {
803
+ block: {
804
+ width: circle ? h : width,
805
+ height: h,
806
+ borderRadius: px(t, "radii", circle ? "full" : "md"),
807
+ backgroundColor: t.colors.muted
808
+ },
809
+ pulse: { minOpacity: px(t, "opacity", "dim"), durationMs: px(t, "duration", "slower") * 2 }
810
+ };
811
+ }
812
+
813
+ // components/contract/recipes/spinner.ts
814
+ function spinnerRecipe({ size = "md" }, t) {
815
+ return { size: size === "sm" ? "small" : "large", scale: { sm: 1, md: 1, lg: 1.5 }[size], color: t.colors.primary };
816
+ }
817
+
818
+ // components/contract/recipes/layout.ts
819
+ var DEFAULT_SPACE = "2";
820
+ function stackRecipe(direction, { space = DEFAULT_SPACE }, t) {
821
+ return { flexDirection: direction, gap: px(t, "spacing", space) };
822
+ }
823
+ function centerRecipe() {
824
+ return { alignItems: "center", justifyContent: "center" };
825
+ }
826
+ function gridRecipe({ columns = 2, space = DEFAULT_SPACE }, t) {
827
+ const gap = px(t, "spacing", space);
828
+ const n = Math.max(1, Math.floor(columns));
829
+ return {
830
+ container: { flexDirection: "row", flexWrap: "wrap", gap },
831
+ cell: {
832
+ flexGrow: 0,
833
+ flexShrink: 0,
834
+ flexBasis: `${(100 / n).toFixed(4)}%`,
835
+ maxWidth: `calc(${(100 / n).toFixed(4)}% - ${gap * (n - 1) / n}px)`
836
+ }
837
+ };
838
+ }
839
+ function imageRecipe({ width, height, radius }, t) {
840
+ const s = {};
841
+ if (width !== void 0) s.width = width;
842
+ if (height !== void 0) s.height = height;
843
+ if (radius) s.borderRadius = px(t, "radii", radius);
844
+ return s;
845
+ }
846
+
847
+ // components/contract/recipes/icon.ts
848
+ var GLYPHS = {
849
+ check: "\u2713",
850
+ close: "\u2715",
851
+ "chevron-up": "\u25B4",
852
+ "chevron-down": "\u25BE",
853
+ "chevron-left": "\u25C2",
854
+ "chevron-right": "\u25B8",
855
+ plus: "+",
856
+ minus: "\u2212",
857
+ search: "\u2315",
858
+ info: "\u24D8",
859
+ warning: "\u26A0",
860
+ star: "\u2605",
861
+ menu: "\u2630",
862
+ dot: "\u25CF"
863
+ };
864
+ function iconColor(color, t) {
865
+ const c = t.colors;
866
+ return {
867
+ foreground: c.foreground,
868
+ muted: c.mutedForeground,
869
+ primary: c.primary,
870
+ destructive: c.destructive,
871
+ success: c.success,
872
+ warning: c.warning,
873
+ info: c.info
874
+ }[color];
875
+ }
876
+ function iconRecipe({ name, size = "md", color = "foreground" }, t) {
877
+ return { glyph: GLYPHS[name], style: { color: iconColor(color, t), fontSize: px(t, "fontSizes", size) } };
878
+ }
879
+
880
+ // components/contract/recipes/link.ts
881
+ function linkRecipe(t) {
882
+ return { color: t.colors.primary, fontSize: px(t, "fontSizes", "md"), textDecorationLine: "underline" };
883
+ }
884
+
885
+ // components/contract/recipes/accordion.ts
886
+ function accordionRecipe(t) {
887
+ const c = t.colors;
888
+ return {
889
+ container: {
890
+ width: "100%",
891
+ borderWidth: 1,
892
+ borderColor: c.border,
893
+ borderRadius: px(t, "radii", "lg"),
894
+ backgroundColor: c.card,
895
+ overflow: "hidden"
896
+ },
897
+ item: { borderBottomWidth: 1, borderBottomColor: c.border },
898
+ header: (_open, disabled) => ({
899
+ flexDirection: "row",
900
+ alignItems: "center",
901
+ justifyContent: "space-between",
902
+ gap: px(t, "spacing", "2"),
903
+ paddingHorizontal: px(t, "spacing", "4"),
904
+ paddingVertical: px(t, "spacing", "3"),
905
+ opacity: disabled ? 0.4 : 1
906
+ }),
907
+ title: { flex: 1, color: c.cardForeground, fontSize: px(t, "fontSizes", "sm"), fontWeight: weight(t, "medium") },
908
+ chevron: { color: c.mutedForeground, fontSize: px(t, "fontSizes", "sm") },
909
+ content: {
910
+ paddingHorizontal: px(t, "spacing", "4"),
911
+ paddingBottom: px(t, "spacing", "4"),
912
+ gap: px(t, "spacing", "2")
913
+ }
914
+ };
915
+ }
916
+
917
+ // components/contract/recipes/overlay.ts
918
+ var shadow = (t, key) => {
919
+ const sh = t.scale.shadows[key];
920
+ return {
921
+ shadowColor: sh.color,
922
+ shadowOffset: { width: sh.offsetX, height: sh.offsetY },
923
+ shadowOpacity: sh.opacity,
924
+ shadowRadius: sh.radius,
925
+ elevation: sh.elevation
926
+ };
927
+ };
928
+ function surface(t, radius, sh) {
929
+ return {
930
+ backgroundColor: t.colors.popover,
931
+ borderWidth: 1,
932
+ borderColor: t.colors.border,
933
+ borderRadius: px(t, "radii", radius),
934
+ ...shadow(t, sh)
935
+ };
936
+ }
937
+ var scrim = (t) => withAlpha(t.scale.shadows.lg.color, 0.5);
938
+ function popoverRecipe(t) {
939
+ return {
940
+ panel: {
941
+ ...surface(t, "md", "md"),
942
+ position: "absolute",
943
+ top: "100%",
944
+ left: 0,
945
+ marginTop: px(t, "spacing", "1"),
946
+ minWidth: px(t, "spacing", "48"),
947
+ padding: px(t, "spacing", "3"),
948
+ gap: px(t, "spacing", "2"),
949
+ zIndex: t.scale.zIndex.popover
950
+ }
951
+ };
952
+ }
953
+ function tooltipRecipe(t) {
954
+ return {
955
+ bubble: {
956
+ position: "absolute",
957
+ bottom: "100%",
958
+ alignSelf: "center",
959
+ marginBottom: px(t, "spacing", "1"),
960
+ paddingHorizontal: px(t, "spacing", "2"),
961
+ paddingVertical: px(t, "spacing", "1"),
962
+ borderRadius: px(t, "radii", "sm"),
963
+ backgroundColor: t.colors.foreground,
964
+ zIndex: t.scale.zIndex.tooltip
965
+ },
966
+ label: { color: t.colors.background, fontSize: px(t, "fontSizes", "xs") }
967
+ };
968
+ }
969
+ function menuRecipe(t) {
970
+ const c = t.colors;
971
+ return {
972
+ panel: {
973
+ ...surface(t, "md", "md"),
974
+ position: "absolute",
975
+ top: "100%",
976
+ left: 0,
977
+ marginTop: px(t, "spacing", "1"),
978
+ minWidth: px(t, "spacing", "40"),
979
+ padding: px(t, "spacing", "1"),
980
+ zIndex: t.scale.zIndex.dropdown
981
+ },
982
+ item: (disabled) => ({
983
+ paddingHorizontal: px(t, "spacing", "2"),
984
+ paddingVertical: px(t, "spacing", "1.5"),
985
+ borderRadius: px(t, "radii", "sm"),
986
+ opacity: disabled ? 0.4 : 1
987
+ }),
988
+ label: (destructive) => ({
989
+ color: destructive ? c.destructive : c.popoverForeground,
990
+ fontSize: px(t, "fontSizes", "sm")
991
+ })
992
+ };
993
+ }
994
+ function sheetRecipe(t) {
995
+ const c = t.colors;
996
+ return {
997
+ backdrop: { flex: 1, justifyContent: "flex-end", backgroundColor: scrim(t) },
998
+ panel: {
999
+ ...surface(t, "xl", "xl"),
1000
+ borderBottomLeftRadius: 0,
1001
+ borderBottomRightRadius: 0,
1002
+ width: "100%",
1003
+ padding: px(t, "spacing", "4"),
1004
+ gap: px(t, "spacing", "2")
1005
+ },
1006
+ title: {
1007
+ color: c.mutedForeground,
1008
+ fontSize: px(t, "fontSizes", "sm"),
1009
+ textAlign: "center",
1010
+ paddingVertical: px(t, "spacing", "1")
1011
+ },
1012
+ handle: {
1013
+ alignSelf: "center",
1014
+ width: px(t, "spacing", "10"),
1015
+ height: px(t, "spacing", "1"),
1016
+ borderRadius: px(t, "radii", "full"),
1017
+ backgroundColor: c.border,
1018
+ marginBottom: px(t, "spacing", "2")
1019
+ },
1020
+ action: {
1021
+ paddingVertical: px(t, "spacing", "3"),
1022
+ alignItems: "center",
1023
+ borderRadius: px(t, "radii", "md"),
1024
+ backgroundColor: c.muted
1025
+ },
1026
+ actionLabel: (destructive) => ({
1027
+ color: destructive ? c.destructive : c.foreground,
1028
+ fontSize: px(t, "fontSizes", "md"),
1029
+ fontWeight: weight(t, "medium")
1030
+ }),
1031
+ cancel: {
1032
+ paddingVertical: px(t, "spacing", "3"),
1033
+ alignItems: "center",
1034
+ borderRadius: px(t, "radii", "md"),
1035
+ borderWidth: 1,
1036
+ borderColor: c.border
1037
+ },
1038
+ cancelLabel: { color: c.foreground, fontSize: px(t, "fontSizes", "md") }
1039
+ };
1040
+ }
1041
+ function alertDialogRecipe(t) {
1042
+ const c = t.colors;
1043
+ return {
1044
+ backdrop: {
1045
+ flex: 1,
1046
+ alignItems: "center",
1047
+ justifyContent: "center",
1048
+ padding: px(t, "spacing", "4"),
1049
+ backgroundColor: scrim(t)
1050
+ },
1051
+ panel: {
1052
+ ...surface(t, "xl", "lg"),
1053
+ width: "100%",
1054
+ maxWidth: px(t, "spacing", "48") * 2,
1055
+ padding: px(t, "spacing", "6"),
1056
+ gap: px(t, "spacing", "2")
1057
+ },
1058
+ title: { color: c.popoverForeground, fontSize: px(t, "fontSizes", "lg"), fontWeight: weight(t, "semibold") },
1059
+ description: { color: c.mutedForeground, fontSize: px(t, "fontSizes", "sm") },
1060
+ actions: {
1061
+ flexDirection: "row",
1062
+ justifyContent: "flex-end",
1063
+ gap: px(t, "spacing", "2"),
1064
+ marginTop: px(t, "spacing", "4")
1065
+ }
1066
+ };
1067
+ }
1068
+ function drawerRecipe(side, t) {
1069
+ return {
1070
+ backdrop: {
1071
+ flex: 1,
1072
+ flexDirection: "row",
1073
+ justifyContent: side === "left" ? "flex-start" : "flex-end",
1074
+ backgroundColor: scrim(t)
1075
+ },
1076
+ panel: {
1077
+ ...surface(t, "none", "xl"),
1078
+ height: "100%",
1079
+ width: px(t, "spacing", "48") * 1.5,
1080
+ maxWidth: "85%",
1081
+ padding: px(t, "spacing", "4"),
1082
+ gap: px(t, "spacing", "2"),
1083
+ borderWidth: 0,
1084
+ [side === "left" ? "borderRightWidth" : "borderLeftWidth"]: 1
1085
+ }
1086
+ };
1087
+ }
1088
+ function imageViewerRecipe(t) {
1089
+ return {
1090
+ backdrop: {
1091
+ flex: 1,
1092
+ alignItems: "center",
1093
+ justifyContent: "center",
1094
+ backgroundColor: withAlpha(t.scale.shadows.lg.color, 0.92)
1095
+ },
1096
+ image: { width: "100%", height: "80%" },
1097
+ close: {
1098
+ position: "absolute",
1099
+ top: px(t, "spacing", "10"),
1100
+ right: px(t, "spacing", "4"),
1101
+ width: px(t, "spacing", "10"),
1102
+ height: px(t, "spacing", "10"),
1103
+ alignItems: "center",
1104
+ justifyContent: "center",
1105
+ borderRadius: px(t, "radii", "full"),
1106
+ backgroundColor: withAlpha(t.colors.background, 0.2)
1107
+ },
1108
+ closeLabel: { color: t.colors.background, fontSize: px(t, "fontSizes", "lg") }
1109
+ };
1110
+ }
1111
+ function liquidGlassRecipe(t) {
1112
+ return {
1113
+ backgroundColor: withAlpha(t.colors.card, 0.6),
1114
+ borderWidth: 1,
1115
+ borderColor: withAlpha(t.colors.border, 0.6),
1116
+ borderRadius: px(t, "radii", "xl"),
1117
+ padding: px(t, "spacing", "4"),
1118
+ ...shadow(t, "md")
1119
+ };
1120
+ }
1121
+
1122
+ // components/contract/recipes/slider.ts
1123
+ function sliderRecipe({ disabled = false }, t) {
1124
+ const c = t.colors;
1125
+ const thumb = px(t, "spacing", "5");
1126
+ return {
1127
+ thumbSize: thumb,
1128
+ root: { width: "100%", height: thumb, justifyContent: "center", opacity: disabled ? 0.4 : 1 },
1129
+ track: {
1130
+ height: px(t, "spacing", "1.5"),
1131
+ borderRadius: px(t, "radii", "full"),
1132
+ backgroundColor: c.muted,
1133
+ overflow: "hidden"
1134
+ },
1135
+ filled: { height: "100%", backgroundColor: c.primary },
1136
+ thumb: {
1137
+ position: "absolute",
1138
+ width: thumb,
1139
+ height: thumb,
1140
+ borderRadius: px(t, "radii", "full"),
1141
+ backgroundColor: c.background,
1142
+ borderWidth: 2,
1143
+ borderColor: c.primary
1144
+ }
1145
+ };
1146
+ }
1147
+ function sliderFraction(value, min, max) {
1148
+ if (!(max > min)) return 0;
1149
+ return Math.min(1, Math.max(0, (value - min) / (max - min)));
1150
+ }
1151
+ function sliderValue(fraction, min, max, step) {
1152
+ const raw = min + Math.min(1, Math.max(0, fraction)) * (max - min);
1153
+ const snapped = step > 0 ? Math.round((raw - min) / step) * step + min : raw;
1154
+ const decimals = (String(step).split(".")[1] ?? "").length;
1155
+ return Math.min(max, Math.max(min, Number(snapped.toFixed(decimals))));
1156
+ }
1157
+
1158
+ // components/contract/recipes/formcontrol.ts
1159
+ function formControlRecipe(disabled, t) {
1160
+ const c = t.colors;
1161
+ return {
1162
+ root: { gap: px(t, "spacing", "1.5"), opacity: disabled ? 0.5 : 1 },
1163
+ label: { color: c.foreground, fontSize: px(t, "fontSizes", "sm"), fontWeight: weight(t, "medium") },
1164
+ required: { color: c.destructive },
1165
+ helper: { color: c.mutedForeground, fontSize: px(t, "fontSizes", "xs") },
1166
+ error: { color: c.destructive, fontSize: px(t, "fontSizes", "xs") }
1167
+ };
1168
+ }
1169
+
1170
+ // components/contract/recipes/fab.ts
1171
+ function fabRecipe({ label }, t) {
1172
+ const c = t.colors;
1173
+ const sh = t.scale.shadows.lg;
1174
+ const size = px(t, "spacing", "14");
1175
+ return {
1176
+ container: {
1177
+ position: "absolute",
1178
+ right: px(t, "spacing", "4"),
1179
+ bottom: px(t, "spacing", "4"),
1180
+ flexDirection: "row",
1181
+ alignItems: "center",
1182
+ justifyContent: "center",
1183
+ gap: px(t, "spacing", "2"),
1184
+ height: size,
1185
+ ...label ? { paddingHorizontal: px(t, "spacing", "5") } : { width: size },
1186
+ borderRadius: px(t, "radii", "full"),
1187
+ backgroundColor: c.primary,
1188
+ shadowColor: sh.color,
1189
+ shadowOffset: { width: sh.offsetX, height: sh.offsetY },
1190
+ shadowOpacity: sh.opacity,
1191
+ shadowRadius: sh.radius,
1192
+ elevation: sh.elevation
1193
+ },
1194
+ label: { color: c.primaryForeground, fontSize: px(t, "fontSizes", "sm"), fontWeight: weight(t, "medium") },
1195
+ icon: { color: c.primaryForeground, fontSize: px(t, "fontSizes", "xl") }
1196
+ };
1197
+ }
1198
+
1199
+ // components/contract/recipes/table.ts
1200
+ function tableRecipe(t) {
1201
+ const c = t.colors;
1202
+ const align = (a = "left") => ({ left: "flex-start", center: "center", right: "flex-end" })[a];
1203
+ const pad = { paddingHorizontal: px(t, "spacing", "3"), paddingVertical: px(t, "spacing", "2") };
1204
+ return {
1205
+ container: {
1206
+ width: "100%",
1207
+ borderWidth: 1,
1208
+ borderColor: c.border,
1209
+ borderRadius: px(t, "radii", "lg"),
1210
+ overflow: "hidden",
1211
+ backgroundColor: c.card
1212
+ },
1213
+ caption: { color: c.mutedForeground, fontSize: px(t, "fontSizes", "xs"), padding: px(t, "spacing", "2") },
1214
+ headRow: { flexDirection: "row", backgroundColor: c.muted, borderBottomWidth: 1, borderBottomColor: c.border },
1215
+ row: (last) => ({ flexDirection: "row", borderBottomWidth: last ? 0 : 1, borderBottomColor: c.border }),
1216
+ head: (a) => ({ flex: 1, ...pad, alignItems: align(a) }),
1217
+ cell: (a) => ({ flex: 1, ...pad, alignItems: align(a) }),
1218
+ headLabel: { color: c.mutedForeground, fontSize: px(t, "fontSizes", "xs"), fontWeight: weight(t, "semibold") },
1219
+ cellLabel: { color: c.cardForeground, fontSize: px(t, "fontSizes", "sm") }
1220
+ };
1221
+ }
1222
+
1223
+ // components/contract/recipes/calendar.ts
1224
+ var pad2 = (n) => String(n).padStart(2, "0");
1225
+ function parseDate(s) {
1226
+ const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(s ?? "");
1227
+ if (!m) return null;
1228
+ const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];
1229
+ const dt = new Date(Date.UTC(y, mo - 1, d));
1230
+ return dt.getUTCFullYear() === y && dt.getUTCMonth() === mo - 1 && dt.getUTCDate() === d ? [y, mo, d] : null;
1231
+ }
1232
+ var formatDate = (y, m, d) => `${String(y).padStart(4, "0")}-${pad2(m)}-${pad2(d)}`;
1233
+ var daysIn = (y, m) => new Date(Date.UTC(y, m, 0)).getUTCDate();
1234
+ function shiftMonth(y, m, by) {
1235
+ const idx = y * 12 + (m - 1) + by;
1236
+ return [Math.floor(idx / 12), idx % 12 + 1];
1237
+ }
1238
+ function monthGrid(y, m, { weekStartsOn = 0, min, max }) {
1239
+ const first = new Date(Date.UTC(y, m - 1, 1)).getUTCDay();
1240
+ const lead = (first - weekStartsOn + 7) % 7;
1241
+ const cells = Array.from({ length: lead }, () => ({ date: null, day: null, disabled: true }));
1242
+ for (let d = 1; d <= daysIn(y, m); d++) {
1243
+ const date = formatDate(y, m, d);
1244
+ cells.push({ date, day: d, disabled: !!min && date < min || !!max && date > max });
1245
+ }
1246
+ while (cells.length % 7) cells.push({ date: null, day: null, disabled: true });
1247
+ return Array.from({ length: cells.length / 7 }, (_, i) => cells.slice(i * 7, i * 7 + 7));
1248
+ }
1249
+ var WEEKDAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
1250
+ var MONTHS = [
1251
+ "January",
1252
+ "February",
1253
+ "March",
1254
+ "April",
1255
+ "May",
1256
+ "June",
1257
+ "July",
1258
+ "August",
1259
+ "September",
1260
+ "October",
1261
+ "November",
1262
+ "December"
1263
+ ];
1264
+ function calendarRecipe(t) {
1265
+ const c = t.colors;
1266
+ const cell = px(t, "spacing", "10");
1267
+ return {
1268
+ container: {
1269
+ padding: px(t, "spacing", "3"),
1270
+ gap: px(t, "spacing", "2"),
1271
+ backgroundColor: c.card,
1272
+ borderWidth: 1,
1273
+ borderColor: c.border,
1274
+ borderRadius: px(t, "radii", "lg"),
1275
+ alignSelf: "flex-start"
1276
+ },
1277
+ header: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" },
1278
+ title: { color: c.cardForeground, fontSize: px(t, "fontSizes", "sm"), fontWeight: weight(t, "semibold") },
1279
+ nav: {
1280
+ width: px(t, "spacing", "8"),
1281
+ height: px(t, "spacing", "8"),
1282
+ alignItems: "center",
1283
+ justifyContent: "center",
1284
+ borderRadius: px(t, "radii", "md")
1285
+ },
1286
+ navLabel: { color: c.mutedForeground, fontSize: px(t, "fontSizes", "md") },
1287
+ weekRow: { flexDirection: "row" },
1288
+ weekday: { width: cell, textAlign: "center", color: c.mutedForeground, fontSize: px(t, "fontSizes", "xs") },
1289
+ row: { flexDirection: "row" },
1290
+ day: (selected, disabled) => ({
1291
+ width: cell,
1292
+ height: cell,
1293
+ alignItems: "center",
1294
+ justifyContent: "center",
1295
+ borderRadius: px(t, "radii", "md"),
1296
+ backgroundColor: selected ? c.primary : "transparent",
1297
+ opacity: disabled ? 0.3 : 1
1298
+ }),
1299
+ dayLabel: (selected) => ({
1300
+ color: selected ? c.primaryForeground : c.cardForeground,
1301
+ fontSize: px(t, "fontSizes", "sm")
1302
+ })
1303
+ };
1304
+ }
1305
+
1306
+ export { DEFAULT_SPACE, GLYPHS, MONTHS, PROVIDERS, REQUIRED_ROLES, UI_NAMES, WEEKDAYS, accordionRecipe, alertDialogRecipe, alertRecipe, avatarRecipe, badgeRecipe, buttonRecipe, calendarRecipe, cardRecipe, centerRecipe, checkboxRecipe, daysIn, defaultRegistry, dividerRecipe, drawerRecipe, fabRecipe, feedbackColor, formControlRecipe, formatDate, gridRecipe, headingRecipe, iconColor, iconRecipe, imageRecipe, imageViewerRecipe, initialsOf, inputRecipe, linkRecipe, liquidGlassRecipe, menuRecipe, modalRecipe, monthGrid, parseDate, popoverRecipe, progressRecipe, radioRecipe, resolveTheme, scrim, selectRecipe, sheetRecipe, shiftMonth, skeletonRecipe, sliderFraction, sliderRecipe, sliderValue, spinnerRecipe, stackRecipe, switchRecipe, tableRecipe, tabsRecipe, textRecipe, textareaRecipe, themeIdFor, toastRecipe, tooltipRecipe, withAlpha };
1307
+ //# sourceMappingURL=chunk-2QM2ZUDS.mjs.map
1308
+ //# sourceMappingURL=chunk-2QM2ZUDS.mjs.map