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